/* append an item */ static void _append_bt_clicked(void *data, Evas_Object *obj, void *event_info) { Evas_Object *grid = data; Example_Item *it = _item_new(); elm_gengrid_item_append(grid, gic, it, _grid_sel, NULL); }
static void _box_fill(Ngi_Box *box) { Efreet_Desktop *desktop; Eina_List *l; if (!box->apps) return; ngi_freeze(box->ng); EINA_LIST_FOREACH(box->apps->desktops, l, desktop) _item_new(box, desktop, 1, NULL); ngi_thaw(box->ng); }
/* "insert after" callback */ static void _after_bt_clicked(void *data, Evas_Object *obj, void *event_info) { Example_Item *it; Evas_Object *grid = data; Elm_Object_Item *sel; sel = elm_gengrid_selected_item_get(grid); if (!sel) return; it = _item_new(); elm_gengrid_item_insert_after(grid, gic, it, sel, _grid_sel, NULL); }
static Evry_Item_App * _item_exe_add(Plugin *p, const char *exe, int match) { Evry_Item_App *app = NULL; if ((app = eina_hash_find(p->added, exe))) { if (eina_list_data_find_list(p->base.items, app)) return app; } if (!app) { app = _item_new(p, ecore_file_file_get(exe), exe); app->file = eina_stringshare_ref(EVRY_ITEM(app)->id); } EVRY_ITEM(app)->fuzzy_match = match; EVRY_PLUGIN_ITEM_APPEND(p, app); return app; }