elm_genlist_item_class_free(data);
}
+static void
+_gl_del_unrealized_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+ void *event_info)
+{
+ int num = (int)(uintptr_t)elm_object_item_data_get(event_info);
+ printf("unrealized item # %d\n", num);
+}
+
static Evas_Object *
_gl_del_genlist_add(Evas_Object *bx)
{
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(bx, gl);
evas_object_show(gl);
+ evas_object_smart_callback_add(gl, "unrealized",
+ _gl_del_unrealized_cb, NULL);
return gl;
}
}
}
+static void
+_gl_del_del_cb(void *data, Evas_Object *obj EINA_UNUSED)
+{
+ printf("deleted item # %d\n", (int)(uintptr_t)data);
+}
+
void
test_genlist_del(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
itc->func.text_get = _gl_del_text_get;
itc->func.content_get = gl_content_get;
itc->func.state_get = NULL;
- itc->func.del = NULL;
+ itc->func.del = _gl_del_del_cb;
evas_object_event_callback_add(win, EVAS_CALLBACK_DEL,
_gl_del_win_del_cb, itc);