• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ eina_stringshare_add函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中eina_stringshare_add函数的典型用法代码示例。如果您正苦于以下问题:C++ eina_stringshare_add函数的具体用法?C++ eina_stringshare_add怎么用?C++ eina_stringshare_add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了eina_stringshare_add函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: esql_res_to_string

/**
 * @brief Convert result to a string
 * @param res Result
 * @return Stringshared result
 */
const char *
esql_res_to_string(Esql_Res *res)
{
   Esql_Row *row;
   Esql_Cell *cell;
   EINA_SAFETY_ON_NULL_RETURN_VAL(res, NULL);
   EINA_SAFETY_ON_TRUE_RETURN_VAL(res->row_count > 1, NULL);
   if (!res->row_count) return NULL;
   row = EINA_INLIST_CONTAINER_GET(res->rows, Esql_Row);
   cell = EINA_INLIST_CONTAINER_GET(row->cells, Esql_Cell);
   EINA_SAFETY_ON_TRUE_RETURN_VAL(
     (cell->type != ESQL_CELL_TYPE_STRING) &&
     (cell->type != ESQL_CELL_TYPE_UNKNOWN), NULL);
   return eina_stringshare_add(cell->value.string);
}
开发者ID:gzorin,项目名称:e17,代码行数:20,代码来源:esql_convert.c


示例2: efreet_desktop_x_field_get

EAPI const char *
efreet_desktop_x_field_get(Efreet_Desktop *desktop, const char *key)
{
    const char *ret;

    EINA_SAFETY_ON_NULL_RETURN_VAL(desktop, NULL);
    EINA_SAFETY_ON_NULL_RETURN_VAL(desktop->x, NULL);
    EINA_SAFETY_ON_TRUE_RETURN_VAL(strncmp(key, "X-", 2), NULL);

    ret = eina_hash_find(desktop->x, key);
    if (!ret)
        return NULL;

    return eina_stringshare_add(ret);
}
开发者ID:Limsik,项目名称:e17,代码行数:15,代码来源:efreet_desktop.c


示例3: ERR

EMap_Route *emap_route_gpx_new(const char *file)
{
   if(!file)
   {
      ERR("File is null");
      return NULL;
   }

   EMap_Route *route = emap_route_new(EMAP_TRACK_TYPE_GPX);
   route->gpx.file = eina_stringshare_add(file);

   _parse(route);

   return route;
}
开发者ID:caivega,项目名称:enlightenment,代码行数:15,代码来源:route_gpx.c


示例4: e_init_status_set

EAPI void
e_init_status_set(const char *str)
{
   if (!init_exe) return;
//   printf("---STAT %p %s\n", client, str);
   if (!client)
     {
        stats = eina_list_append(stats, eina_stringshare_add(str));
        return;
     }
//   printf("---SEND\n");
   ecore_ipc_client_send(client, E_IPC_DOMAIN_INIT, 1, 0, 0, 0, (void *)str,
                         strlen(str) + 1);
   ecore_ipc_client_flush(client);
}
开发者ID:hippytaff,项目名称:Enform,代码行数:15,代码来源:e_init.c


示例5: _fill_list

static void _fill_list (Evasxx::Object *obj)
{
  DIR *d;
  struct dirent *de;
  Eina_List *dirs = NULL, *l;
  char *real;

  if (!(d = opendir(getenv("HOME")))) return;
  while ((de = readdir(d)) != NULL)
  {
    char buff[PATH_MAX];

    if (de->d_name[0] == '.') continue;
    snprintf(buff, sizeof(buff), "%s/%s", getenv("HOME"), de->d_name);
    if (!ecore_file_is_dir(buff)) continue;
    real = ecore_file_realpath(buff);
    dirs = eina_list_append(dirs, real);
  }
  closedir(d);

  dirs = eina_list_sort(dirs, eina_list_count(dirs), EINA_COMPARE_CB(strcoll));
#if 0
   EINA_LIST_FOREACH(dirs, l, real)
     {
        Eina_Bool result = EINA_FALSE;

        result = _dir_has_subs(real);
        if (!result)
          elm_genlist_item_append(obj, &itc, eina_stringshare_add(real),
                                  NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
        else
          elm_genlist_item_append(obj, &itc, eina_stringshare_add(real),
                                  NULL, ELM_GENLIST_ITEM_TREE,
                                  NULL, NULL);
        free(real);
     }
开发者ID:Limsik,项目名称:e17,代码行数:36,代码来源:test_panel.cpp


示例6: e_drag_new

E_API E_Drag *
e_drag_new(int x, int y,
           const char **types, unsigned int num_types,
           void *data, int size,
           void *(*convert_cb)(E_Drag * drag, const char *type),
           void (*finished_cb)(E_Drag *drag, int dropped))
{
   E_Drag *drag;
   unsigned int i;

   /* No need to create a drag object without type */
   if ((!types) || (!num_types)) return NULL;
   drag = e_object_alloc(sizeof(E_Drag) + num_types * sizeof(char *),
                         E_DRAG_TYPE, E_OBJECT_CLEANUP_FUNC(_e_drag_free));
   if (!drag) return NULL;

   drag->x = x;
   drag->y = y;
   drag->w = 24;
   drag->h = 24;
   drag->layer = E_LAYER_CLIENT_DRAG;

   drag->evas = e_comp->evas;

   drag->type = E_DRAG_NONE;

   for (i = 0; i < num_types; i++)
     drag->types[i] = eina_stringshare_add(types[i]);
   drag->num_types = num_types;
   drag->data = data;
   drag->data_size = size;
   drag->cb.convert = convert_cb;
   drag->cb.finished = finished_cb;

   _drag_list = eina_list_append(_drag_list, drag);

#ifndef HAVE_WAYLAND_ONLY
   if (e_comp_util_has_x())
     ecore_x_window_shadow_tree_flush();
#endif

   _drag_win_root = e_comp->root;

   drag->cb.key_down = NULL;
   drag->cb.key_up = NULL;

   return drag;
}
开发者ID:FlorentRevest,项目名称:Enlightenment,代码行数:48,代码来源:e_dnd.c


示例7: azy_content_deserialize_request_json

Eina_Bool
azy_content_deserialize_request_json(Azy_Content *content,
                                     const char *buf,
                                     ssize_t len  EINA_UNUSED)
{
   cJSON *object, *grab;
   int i;

   if ((!content) || (!buf))
     return EINA_FALSE;

   if (!(object = cJSON_Parse(buf)))
     {
        azy_content_error_code_set(content, AZY_ERROR_REQUEST_JSON_OBJECT);
        return EINA_FALSE;
     }

   if ((grab = cJSON_GetObjectItem(object, "id")))
     content->id = grab->valueint;

   if (!(grab = cJSON_GetObjectItem(object, "method")))
     {
        azy_content_error_code_set(content, AZY_ERROR_REQUEST_JSON_METHOD);
        cJSON_Delete(object);
        return EINA_FALSE;
     }

   content->method = eina_stringshare_add(grab->valuestring);

   grab = cJSON_GetObjectItem(object, "params");

   for (i = 0; grab && (i < cJSON_GetArraySize(grab)); i++)
     {
        Eina_Value *v;

        if (!(v = azy_value_deserialize_json(cJSON_GetArrayItem(grab, i))))
          {
             azy_content_error_faultmsg_set(content, -1, "Can't parse JSON-RPC request. Failed to deserialize parameter %d.", i);
             cJSON_Delete(object);
             return EINA_FALSE;
          }

        content->params = eina_list_append(content->params, v);
     }

   cJSON_Delete(object);
   return EINA_TRUE;
}
开发者ID:gfriloux,项目名称:maelstrom,代码行数:48,代码来源:azy_content_json.c


示例8: print_iter

static void
print_iter (DBusMessageIter *iter, int depth)
{
	do
	{
		int type = dbus_message_iter_get_arg_type (iter);
	
		if (type == DBUS_TYPE_INVALID)
			break;
		
		char *val;
		dbus_message_iter_get_basic (iter, &val);
		e->value = eina_stringshare_add(val);
	}
	while (dbus_message_iter_next (iter));
}
开发者ID:Alien-nick,项目名称:princeamds-code,代码行数:16,代码来源:main.c


示例9: efreet_parse_locale

/**
 * @internal
 * @return Returns no value
 * @brief Parses out the language, country and modifer setting from the
 * LC_MESSAGES environment variable
 */
static void
efreet_parse_locale(void)
{
   efreet_parsed_locale = 1;

   if (efreet_parse_locale_setting("LANG"))
     return;

   if (efreet_parse_locale_setting("LC_ALL"))
     return;

   if (efreet_parse_locale_setting("LC_MESSAGES"))
     return;
   
   efreet_language = eina_stringshare_add("C");
}
开发者ID:RomainNaour,项目名称:efl,代码行数:22,代码来源:efreet.c


示例10: ems_config_filename_default_get

static const char *
ems_config_filename_default_get(void)
{
	static const char *filename = NULL;
	char tmp[PATH_MAX];

	if (filename)
		return filename;

	snprintf(tmp, sizeof(tmp), "%s/.config/enna-media-server/%s", getenv("HOME"), EMS_CONFIG_FILE);
	filename =  eina_stringshare_add(tmp);

	DBG("CONFIG filename : %s", filename);

	return filename;
}
开发者ID:chep,项目名称:Enna-Media-Server,代码行数:16,代码来源:ems_config.c


示例11: enna_volumes_listener_add

Enna_Volumes_Listener *
enna_volumes_listener_add(const char *name, EnnaVolumesFunc add, EnnaVolumesFunc rmv, void *data)
{
   Enna_Volumes_Listener *vl;

   vl = ENNA_NEW(Enna_Volumes_Listener, 1);
   vl->name = eina_stringshare_add(name);
   vl->add = add;
   vl->remove = rmv;
   vl->data = data;

   enna_log(ENNA_MSG_EVENT, "volumes", "Add: %s listener", vl->name);

   enna_volumes_listeners = eina_list_append(enna_volumes_listeners, vl);
   return vl;
}
开发者ID:enna-project,项目名称:enna,代码行数:16,代码来源:volumes.c


示例12: _basic_apply_data

static int
_basic_apply_data (E_Config_Dialog * cfd, E_Config_Dialog_Data * cfdata)
{
  Config_Item *ci;

  ci = cfd->data;
  ci->poll_time = cfdata->poll_time;
  if (ci->hostname)
    eina_stringshare_del (ci->hostname);
  ci->hostname = eina_stringshare_add (cfdata->hostname);
  ci->port = atoi (cfdata->port);
  ci->show_popup = cfdata->show_popup;
  e_config_save_queue ();
  _mpdule_config_updated (ci);
  return 1;
}
开发者ID:TetragrammatonHermit,项目名称:enlightenment,代码行数:16,代码来源:e_mod_config.c


示例13: ewk_web_database_filename_get

const char* ewk_web_database_filename_get(Ewk_Web_Database* database)
{
#if ENABLE(SQL_DATABASE)
    if (database->filename)
        return database->filename;

    WebCore::SecurityOrigin* origin = database->securityOrigin.get();
    WTF::String path = WebCore::DatabaseManager::manager().fullPathForDatabase(origin, database->coreName);
    database->filename = eina_stringshare_add(path.utf8().data());

    return database->filename;
#else
    UNUSED_PARAM(database);
    return 0;
#endif
}
开发者ID:harlanlewis,项目名称:webkit,代码行数:16,代码来源:ewk_web_database.cpp


示例14: ewk_web_database_display_name_get

const char* ewk_web_database_display_name_get(Ewk_Web_Database* database)
{
#if ENABLE(SQL_DATABASE)
    if (database->displayName)
        return database->displayName;

    WebCore::SecurityOrigin* origin = database->securityOrigin.get();
    WebCore::DatabaseDetails details = WebCore::DatabaseManager::manager().detailsForNameAndOrigin(database->name, origin);
    database->displayName = eina_stringshare_add(details.displayName().utf8().data());

    return database->displayName;
#else
    UNUSED_PARAM(database);
    return 0;
#endif
}
开发者ID:harlanlewis,项目名称:webkit,代码行数:16,代码来源:ewk_web_database.cpp


示例15: e_modapi_init

E_API void *
e_modapi_init(E_Module *m)
{
   conf_module = m;
   e_configure_registry_category_add("windows", 50, _("Windows"), NULL, "preferences-system-windows");
   e_configure_registry_item_add("windows/window_list", 70, _("Window Switcher"), NULL, "preferences-winlist", e_int_config_winlist);
   e_winlist_init();
   _winlist_act = eina_stringshare_add("winlist");
   /* add module supplied action */
   _act_winlist = e_action_add(_winlist_act);
   if (_act_winlist)
     {
        _act_winlist->func.go = _e_mod_action_winlist_cb;
        _act_winlist->func.go_mouse = _e_mod_action_winlist_mouse_cb;
        _act_winlist->func.go_wheel = _e_mod_action_winlist_wheel_cb;
        _act_winlist->func.go_key = _e_mod_action_winlist_key_cb;
        _act_winlist->func.go_edge = _e_mod_action_winlist_edge_cb;
        _act_winlist->func.go_signal = _e_mod_action_winlist_signal_cb;
        _act_winlist->func.go_acpi = _e_mod_action_winlist_acpi_cb;
        e_action_predef_name_set(N_("Window : List"), N_("Next Window"),
                                 "winlist", "next", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Previous Window"),
                                 "winlist", "prev", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Next window of same class"), "winlist",
                                 "class-next", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Previous window of same class"),
                                 "winlist", "class-prev", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Next window class"), "winlist",
                                 "classes-next", NULL, 0);
        e_action_predef_name_set(N_("Window : List"),
                                 N_("Previous window class"),
                                 "winlist", "classes-prev", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window on the Left"),
                                 "winlist", "left", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window Down"),
                                 "winlist", "down", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window Up"),
                                 "winlist", "up", NULL, 0);
        e_action_predef_name_set(N_("Window : List"), N_("Window on the Right"),
                                 "winlist", "right", NULL, 0);
     }
   e_module_delayed_set(m, 1);
   return m;
}
开发者ID:tasn,项目名称:enlightenment,代码行数:47,代码来源:e_mod_main.c


示例16: _item_new

static Evry_Item_App *
_item_new(Plugin *p, const char *label, const char *id)
{
   Evry_Item_App *app;

   app = EVRY_ITEM_NEW(Evry_Item_App, p, label, NULL, evry_item_app_free);
   EVRY_ACTN(app)->action = &_exec_open_file_action;
   EVRY_ACTN(app)->it1.type = EVRY_TYPE_FILE;
   EVRY_ITEM(app)->id = eina_stringshare_add(id);

   eina_hash_add(p->added, id, app);

   EVRY_ACTN(app)->remember_context = EINA_TRUE;
   EVRY_ITEM(app)->subtype = EVRY_TYPE_ACTION;

   return app;
}
开发者ID:wargio,项目名称:e17,代码行数:17,代码来源:evry_plug_apps.c


示例17: efreet_icon_extension_add

EAPI void
efreet_icon_extension_add(const char *ext)
{
    Eina_List *l;

    EINA_SAFETY_ON_NULL_RETURN(ext);

    ext = eina_stringshare_add(ext);

    if ((l = eina_list_data_find_list(efreet_icon_extensions, ext)))
    {
        efreet_icon_extensions = eina_list_promote_list(efreet_icon_extensions, l);
        eina_stringshare_del(ext);
    }
    else
        efreet_icon_extensions = eina_list_prepend(efreet_icon_extensions, ext);
}
开发者ID:Limsik,项目名称:e17,代码行数:17,代码来源:efreet_icon.c


示例18: _eco_match_add

static void
_eco_match_add(void *data, void *data2)
{
  Eco_Option *match, *value;
  e_widget_ilist_append(o_matches, NULL, "class=XTerm",
			_eco_match_click_cb, NULL, NULL);

  match = eco_config_option_list_add(cfg_screen, "opacity_matches");
  match->stringValue = eina_stringshare_add("class=XTerm");  
  value = eco_config_option_list_add(cfg_screen, "opacity_values");
  value->intValue = 100;
  e_widget_slider_value_int_set(o_opacity, value->intValue);
  
  e_widget_disabled_set(o_opacity, 0);
  e_widget_ilist_selected_set(o_matches,
			      e_widget_ilist_count(o_matches));
}
开发者ID:Elive,项目名称:ecomorph,代码行数:17,代码来源:eco_config_opacity.c


示例19: e_modapi_init

/**
 * Setup basic module.
 *
 * It is called when the module is enabled.
 *
 * @param   m a pointer to your E_Module structure.
 * @return  This becomes m->data, return NULL if this falied, and you won't get enabled.
 * @ingroup Emu_Module_Basic_Group
 */
EAPI void *
e_modapi_init(E_Module *m)
{
   char buf[4096];

   emu_module = m;
   snprintf(buf, sizeof(buf), "%s/e-module-emu.edj", e_module_dir_get(m));
   _emu_module_edje = eina_stringshare_add(buf);
   /* Set up module's message catalogue */
   snprintf(buf, sizeof(buf), "%s/locale", e_module_dir_get(m));
   bindtextdomain(PACKAGE, buf);
   bind_textdomain_codeset(PACKAGE, "UTF-8");

   e_gadcon_provider_register(&_gadcon_class);

   return m;
}
开发者ID:playya,项目名称:Enlightenment,代码行数:26,代码来源:e_mod_main.c


示例20: _mark_new

static Elm_Calendar_Mark *
_mark_new(Evas_Object *obj,
          const char *mark_type,
          struct tm *mark_time,
          Elm_Calendar_Mark_Repeat_Type repeat)
{
   Elm_Calendar_Mark *mark;

   mark = calloc(1, sizeof(Elm_Calendar_Mark));
   if (!mark) return NULL;
   mark->obj = obj;
   mark->mark_type = eina_stringshare_add(mark_type);
   mark->mark_time = *mark_time;
   mark->repeat = repeat;

   return mark;
}
开发者ID:Limsik,项目名称:e17,代码行数:17,代码来源:elm_calendar.c



注:本文中的eina_stringshare_add函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ eint_irq_to_bit函数代码示例发布时间:2022-05-30
下一篇:
C++ eina_shutdown函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap