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

C++ eina_list_append函数代码示例

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

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



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

示例1: tpe_event_type_add

int 
tpe_event_type_add(const char *name){
	struct event_info *einfo;

	/* Register a new event by this name */
	einfo = calloc(1,sizeof(struct event_info));
	einfo->name = strdup(name);
	einfo->ecore_event = ecore_event_type_new();
	einfo->handlers = 0;
	
	/* XXX: This cast needs to go: Needs a fix in ecore however */
	//ecore_hash_set(hash, (void*)name, einfo);	
	hash = eina_list_append(hash, einfo);
	return 0;
}
开发者ID:nashidau,项目名称:galaxie,代码行数:15,代码来源:tpe_event.c


示例2: pre_line_x1y1

void
pre_line_x1y1(double x1, double y1)
{
    XY                 *xy;
    Eina_List          *list = NULL;

    xy = (XY *) malloc(sizeof(XY));
    ENGY_ASSERT(xy);

    xy->x = x1;
    xy->y = y1;
    list = eina_list_append(list, xy);

    msg_create_and_send(CMD_PRE_DATA, 0, list);
}
开发者ID:playya,项目名称:Enlightenment,代码行数:15,代码来源:line.c


示例3: _refresh_cached_pages

/**
 * @brief Refreshes history of realized pages
 *
 * @param self an EailNaviframe object
 * @param list list of realized pages
 */
static void
_refresh_cached_pages(EailNaviframe *self, const Eina_List *list)
{
   int list_count = eina_list_count(list);

   eina_list_free(self->cached_pages);

   for (int i = 0; i < list_count; i++)
     {
        AtkObject *child = eail_naviframe_page_new(ATK_OBJECT(self), i);
        atk_object_initialize(child, eina_list_nth(list, i));
        g_object_ref(child);
        self->cached_pages = eina_list_append(self->cached_pages, child);
     }
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:21,代码来源:eail_naviframe.c


示例4: elm_win_add

EAPI Evas_Object *
elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
{
   Evas_Object *win;
   Evas_Object * (* _elm_win_add) (Evas_Object *, const char *, Elm_Win_Type) =
      dlsym(RTLD_NEXT, "elm_win_add");

   win = _elm_win_add(parent, name, type);
   evas_list = eina_list_append(evas_list, evas_object_evas_get(win));
#ifdef DEBUG_TSUITE
   printf("Appended EVAS=<%p> list size=<%d>\n", evas_object_evas_get(win), eina_list_count(evas_list));
#endif

   return win;
}
开发者ID:Limsik,项目名称:e17,代码行数:15,代码来源:tsuite_evas_hook.c


示例5: START_TEST

END_TEST

START_TEST(inherits_test)
{
   Eina_List *compare = NULL, *itr1, *itr2;
   Eina_List *inherits_list = NULL;
   char *str1, *str2;
   eina_init();
   compare = eina_list_append(compare, "MyBaseClass1");
   compare = eina_list_append(compare, "MyBaseClass2");

   eolian_database_init();
   eolian_eo_class_desc_parse(EO_COMMENT);
   inherits_list = (Eina_List*) database_class_inherits_list_get("MyClassName");
   fail_if(!inherits_list);
   ck_assert_int_eq(eina_list_count(inherits_list), 2);
   itr2 = compare;
   EINA_LIST_FOREACH(inherits_list, itr1, str1)
     {
        str2 = eina_list_data_get(itr2);
        ck_assert_str_eq(str1, str2);

        itr2 = eina_list_next(itr2);
     }
开发者ID:jeremyz,项目名称:eolian,代码行数:24,代码来源:suite.c


示例6: 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


示例7: DRT_SUPPORT_FRAME_GET_OR_RETURN

Eina_List* DumpRenderTreeSupportEfl::frameChildren(const Evas_Object* ewkFrame)
{
    DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, 0);

    Eina_List* childFrames = 0;

    for (unsigned index = 0; index < frame->tree().childCount(); index++) {
        WebCore::Frame *childFrame = frame->tree().child(index);
        WebCore::FrameLoaderClientEfl& client = static_cast<WebCore::FrameLoaderClientEfl&>(childFrame->loader().client());

        childFrames = eina_list_append(childFrames, client.webFrame());
    }

    return childFrames;
}
开发者ID:JefferyJeffery,项目名称:webkit,代码行数:15,代码来源:DumpRenderTreeSupportEfl.cpp


示例8: setup_panel

void setup_panel(Evas *_e)
{
	int w;
	Panel_Button *pbutton1, *pbutton2, *pbutton3;

	o_panel = evas_object_image_add(_e);
	evas_object_image_file_set(o_panel, IM "panel.png",
			IM "panel.png");

	evas_object_image_size_get(o_panel, &w, NULL);
	evas_object_move(o_panel, 0, 0);
	evas_object_resize(o_panel, w, win_h);
	evas_object_image_fill_set(o_panel, 0, 0, w, win_h);
	evas_object_layer_set(o_panel, 200);

	evas_object_show(o_panel);

	/* Panel title */
	o_txt_paneltitle = evas_object_text_add(_e);
	evas_object_text_font_set(o_txt_paneltitle, "sinon", 17);
	evas_object_text_text_set(o_txt_paneltitle, "Etox Test");
	evas_object_color_set(o_txt_paneltitle, 255, 255, 255, 255);
	evas_object_layer_set(o_txt_paneltitle, 250);
	evas_object_show(o_txt_paneltitle);

	/* Panel buttons */
	pbutton1 = panel_button(evas, "Basic", basic_tests());
	pbuttons = eina_list_append(pbuttons, pbutton1);

	pbutton2 = panel_button(evas, "Style", style_tests());
	pbuttons = eina_list_append(pbuttons, pbutton2);

	pbutton3 = panel_button(evas, "Callbacks", callback_tests());
	pbuttons = eina_list_append(pbuttons, pbutton3);

}
开发者ID:playya,项目名称:Enlightenment,代码行数:36,代码来源:panel.c


示例9: eail_genlist_get_items

/**
 * @brief Prepares Eina_List filled with Elm_Object_Item* objects
 * representing items in the list
 *
 * @return filled list with list items. Call eina_list_free on that list when
 * results processing has been finished
 */
static Eina_List *
eail_genlist_get_items(EailGenlist *genlist)
{
    Eina_List *items = NULL;
    Elm_Object_Item *item;
    Evas_Object *widget = eail_widget_get_widget(EAIL_WIDGET(genlist));

    item = elm_genlist_first_item_get(widget);
    while (item) {
        items = eina_list_append(items, item);
        item = elm_genlist_item_next_get(item);
    }

    return items;
}
开发者ID:radoslawjablonski,项目名称:eail,代码行数:22,代码来源:eail_genlist.c


示例10: evas_gl_font_texture_new

void *
evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg)
{
   Evas_Engine_GL_Context *gc = context;
   Evas_GL_Texture *tex;
   int w, h, j, nw, fh, x, y;
   DATA8 *ndata, *data, *p1, *p2;

   if (fg->ext_dat) return fg->ext_dat; // FIXME: one engine at a time can do this :(

   w = fg->glyph_out->bitmap.width;
   h = fg->glyph_out->bitmap.rows;
   if ((w == 0) || (h == 0)) return NULL;

   if (!fg->glyph_out->rle) return NULL;
   data = evas_common_font_glyph_uncompress(fg, &w, &h);
   if (!data) return NULL;
   j = w;
   if (j < w) j = w;

   // expand to 32bit (4 byte) aligned rows for texture upload
   nw = ((w + 3) / 4) * 4;
   ndata = alloca(nw *h);
   if (!ndata) return NULL;
   for (y = 0; y < h; y++)
     {
        p1 = data + (j * y);
        p2 = ndata + (nw * y);
        for (x = 0; x < w; x++)
          {
             *p2 = *p1;
             p1++;
             p2++;
          }
     }
   fh = fg->fi->max_h;
   tex = evas_gl_common_texture_alpha_new(gc, ndata, w, h, fh);
   if (!tex) goto done;
   tex->sx1 = ((double)(tex->x)) / (double)tex->pt->w;
   tex->sy1 = ((double)(tex->y)) / (double)tex->pt->h;
   tex->sx2 = ((double)(tex->x + tex->w)) / (double)tex->pt->w;
   tex->sy2 = ((double)(tex->y + tex->h)) / (double)tex->pt->h;
   tex->fglyph = fg;
   gc->font_glyph_textures = eina_list_append(gc->font_glyph_textures, tex);
done:
   free(data);
   return tex;
}
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:48,代码来源:evas_gl_font.c


示例11: 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


示例12: 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


示例13: _forecasts_config_item_get

static Config_Item *
_forecasts_config_item_get(const char *id)
{
   Eina_List *l;
   Config_Item *ci;
   char buf[128];

   if (!id)
     {
        int num = 0;

        /* Create id */
        if (forecasts_config->items)
          {
             const char *p;
             ci = eina_list_last(forecasts_config->items)->data;
             p = strrchr(ci->id, '.');
             if (p) num = strtol(p + 1, NULL, 10) + 1;
          }
        snprintf(buf, sizeof(buf), "%s.%d", _gadcon_class.name, num);
        id = buf;
     }
   else
     {
        for (l = forecasts_config->items; l; l = l->next)
          {
             ci = l->data;
             if (!ci->id)
               continue;
             if (!strcmp(ci->id, id))
               return ci;
          }
     }

   ci = E_NEW(Config_Item, 1);
   ci->id = eina_stringshare_add(id);
   ci->poll_time = 60.0;
   ci->days = 15.0;
   ci->degrees = DEGREES_C;
   ci->host = eina_stringshare_add("query.yahooapis.com");
   ci->code = eina_stringshare_add(DEFAULT_LOCATION);
   ci->show_text = 1;
   ci->popup_on_hover = 1;
   ci->by_code = 1;

   forecasts_config->items = eina_list_append(forecasts_config->items, ci);
   return ci;
}
开发者ID:thewaiter,项目名称:moksha-modules-extra,代码行数:48,代码来源:e_mod_main.c


示例14: e_modapi_init

EAPI void *
e_modapi_init (E_Module * m)
{
  char buf[4096];

  snprintf (buf, sizeof (buf), "%s/locale", e_module_dir_get (m));
  bindtextdomain (PACKAGE, buf);
  bind_textdomain_codeset (PACKAGE, "UTF-8");

  conf_item_edd = E_CONFIG_DD_NEW ("MPDule_Config_Item", Config_Item);
#undef T
#undef D
#define T Config_Item
#define D conf_item_edd
  E_CONFIG_VAL (D, T, id, STR);
  E_CONFIG_VAL (D, T, poll_time, DOUBLE);
  E_CONFIG_VAL (D, T, hostname, STR);
  E_CONFIG_VAL (D, T, port, INT);
  E_CONFIG_VAL (D, T, show_popup, UCHAR);

  conf_edd = E_CONFIG_DD_NEW ("MPDule_Config", Config);
#undef T
#undef D
#define T Config
#define D conf_edd
  E_CONFIG_LIST (D, T, items, conf_item_edd);

  mpdule_config = e_config_domain_load ("module.mpdule", conf_edd);
  if (!mpdule_config)
    {
      Config_Item *ci;

      mpdule_config = E_NEW (Config, 1);

      ci = E_NEW (Config_Item, 1);
      ci->id = eina_stringshare_add ("0");
      ci->poll_time = 1.0;
      ci->hostname = eina_stringshare_add ("localhost");
      ci->port = 6600;
      ci->show_popup = 1;

      mpdule_config->items = eina_list_append (mpdule_config->items, ci);
    }
  mpdule_config->module = m;

  e_gadcon_provider_register (&_gc_class);
  return m;
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:48,代码来源:e_mod_main.c


示例15: _efl_net_socket_windows_operation_new

Efl_Net_Socket_Windows_Operation *
_efl_net_socket_windows_operation_new(Eo *o, Efl_Net_Socket_Windows_Operation_Success_Cb success_cb, Efl_Net_Socket_Windows_Operation_Failure_Cb failure_cb, const void *data)
{
   Efl_Net_Socket_Windows_Operation *op;
   Efl_Net_Socket_Windows_Data *pd = efl_data_scope_get(o, EFL_NET_SOCKET_WINDOWS_CLASS);

   EINA_SAFETY_ON_NULL_RETURN_VAL(pd, NULL);
   EINA_SAFETY_ON_NULL_RETURN_VAL(success_cb, NULL);
   EINA_SAFETY_ON_NULL_RETURN_VAL(failure_cb, NULL);

   op = calloc(1, sizeof(*op));
   EINA_SAFETY_ON_NULL_RETURN_VAL(op, NULL);

   op->base.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
   if (!op->base.hEvent)
     {
        char *msg = _efl_net_windows_error_msg_get(GetLastError());
        ERR("socket=%p success_cb=%p failure_cb=%p data=%p: error=%s",
            op->o, op->success_cb, op->failure_cb, op->data, msg);
        free(msg);
        goto error_event;
     }

   op->event_handler = ecore_main_win32_handler_add(op->base.hEvent, _efl_net_socket_windows_operation_event, op);
   if (!op->event_handler)
     {
        ERR("socket=%p success_cb=%p failure_cb=%p data=%p: could not create event handler",
            op->o, op->success_cb, op->failure_cb, op->data);
        goto error_handler;
     }

   op->success_cb = success_cb;
   op->failure_cb = failure_cb;
   op->data = data;
   op->o = o;
   pd->pending_ops = eina_list_append(pd->pending_ops, op);

   DBG("op=%p (socket=%p) success_cb=%p failure_cb=%p data=%p",
       op, op->o, op->success_cb, op->failure_cb, op->data);

   return op;

 error_handler:
   CloseHandle(op->base.hEvent);
 error_event:
   free(op);
   return NULL;
}
开发者ID:tasn,项目名称:efl,代码行数:48,代码来源:efl_net_socket_windows.c


示例16: 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


示例17: _ecore_con_url_header_cb

static size_t
_ecore_con_url_header_cb(void *ptr, size_t size, size_t nitems, void *stream)
{
   size_t real_size = size * nitems;
   Ecore_Con_Url *url_con = stream;

   char *header = malloc(sizeof(char)*(real_size + 1));
   if (!header) return real_size;
   memcpy(header, ptr, real_size);
   header[real_size] = '\0';

   url_con->response_headers = eina_list_append(url_con->response_headers,
					        header);

   return real_size;
}
开发者ID:OpenInkpot-archive,项目名称:ecore,代码行数:16,代码来源:ecore_con_url.c


示例18: elua_init_module

static int
elua_init_module(lua_State *L)
{
   if (!lua_isnoneornil(L, 1))
     {
        lua_pushvalue(L, 1);
        lua_call(L, 0, 0);
     }
   if (!lua_isnoneornil(L, 2))
     {
        lua_pushvalue(L, 2);
        elua_modlist = eina_list_append(elua_modlist,
           (void*)(size_t)luaL_ref(L, LUA_REGISTRYINDEX));
     }
   return 0;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:16,代码来源:main.c


示例19: ephysics_constraint_body_del

void
ephysics_constraint_body_del(EPhysics_Body *body)
{
   void *ldata;
   EPhysics_Constraint *constraint;
   Eina_List *l, *constraints, *rem = NULL;

   constraints = ephysics_world_constraints_get(body->world);
   if (!constraints) return;

   EINA_LIST_FOREACH(constraints, l, ldata)
     {
        constraint = (EPhysics_Constraint *)ldata;
        if (constraint->bodies[0] == body || constraint->bodies[1])
          rem = eina_list_append(rem, constraint);
     }
开发者ID:jigpu,项目名称:efl,代码行数:16,代码来源:ephysics_constraints.cpp


示例20: eail_button_get_widget_children

/**
 * @brief Gets the list of widget's children
 *
 * @param widget EailWidget instance
 *
 * @returns Eina_list representing the list of children
 * or NULL if widget has no children
 */
static Eina_List *
eail_button_get_widget_children(EailWidget *widget)
{
   Eina_List *list = NULL;
   Evas_Object *child, *obj;

   obj = eail_widget_get_widget(EAIL_WIDGET(widget));
   if (obj)
     {
        child = elm_object_part_content_get(obj, "icon");
        if (child && elm_object_widget_check(child))
          list = eina_list_append(list, child);
     }

   return list;
}
开发者ID:mknapinski,项目名称:eail,代码行数:24,代码来源:eail_button.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ eina_list_remove函数代码示例发布时间:2022-05-30
下一篇:
C++ eina_init函数代码示例发布时间: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