widget: added selected callback for genlist items.

This commit is contained in:
Daniel Juyung Seo 2014-08-21 23:20:00 +09:00
parent 5135a6a2b4
commit c40d90d64b
1 changed files with 8 additions and 1 deletions

View File

@ -806,6 +806,13 @@ _widget_genlist_content_get(void *data EINA_UNUSED, Evas_Object *obj,
return o;
}
static void
_genlist_item_sel_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info)
{
printf("Item %p is selected\n", event_info);
}
static Evas_Object *
_widget_genlist_create(Evas_Object *parent, const char *orig_style, const char *style)
{
@ -847,7 +854,7 @@ _widget_genlist_create(Evas_Object *parent, const char *orig_style, const char *
for (i = 0; i < 50; i++)
{
elm_genlist_item_append(o, ic, (void *)(long)i, NULL, item_type,
NULL, NULL);
_genlist_item_sel_cb, NULL);
}
elm_genlist_item_class_free(ic);