summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-11-18 09:54:21 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-11-18 09:59:51 +0900
commit41054c99dcf12297216dd6a78f5704887043fc83 (patch)
tree9b771630f796303b975fafe3bf3c5fcc9a722437 /src
parentaab4e06160de2b21d42a1912e30eab857bd98c44 (diff)
test_genlist.c: added callbacks for unrealized and delete to test the callback sequence.
Diffstat (limited to 'src')
-rw-r--r--src/bin/test_genlist.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index 96396143b..4d6e676f2 100644
--- a/src/bin/test_genlist.c
+++ b/src/bin/test_genlist.c
@@ -3643,6 +3643,14 @@ _gl_del_win_del_cb(void *data, Evas *e EINA_UNUSED,
3643 elm_genlist_item_class_free(data); 3643 elm_genlist_item_class_free(data);
3644} 3644}
3645 3645
3646static void
3647_gl_del_unrealized_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
3648 void *event_info)
3649{
3650 int num = (int)(uintptr_t)elm_object_item_data_get(event_info);
3651 printf("unrealized item # %d\n", num);
3652}
3653
3646static Evas_Object * 3654static Evas_Object *
3647_gl_del_genlist_add(Evas_Object *bx) 3655_gl_del_genlist_add(Evas_Object *bx)
3648{ 3656{
@@ -3653,6 +3661,8 @@ _gl_del_genlist_add(Evas_Object *bx)
3653 evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL); 3661 evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
3654 elm_box_pack_end(bx, gl); 3662 elm_box_pack_end(bx, gl);
3655 evas_object_show(gl); 3663 evas_object_show(gl);
3664 evas_object_smart_callback_add(gl, "unrealized",
3665 _gl_del_unrealized_cb, NULL);
3656 3666
3657 return gl; 3667 return gl;
3658} 3668}
@@ -3712,6 +3722,12 @@ _gl_del_sel(void *data, Evas_Object *obj, void *event_info)
3712 } 3722 }
3713} 3723}
3714 3724
3725static void
3726_gl_del_del_cb(void *data, Evas_Object *obj EINA_UNUSED)
3727{
3728 printf("deleted item # %d\n", (int)(uintptr_t)data);
3729}
3730
3715void 3731void
3716test_genlist_del(void *data EINA_UNUSED, 3732test_genlist_del(void *data EINA_UNUSED,
3717 Evas_Object *obj EINA_UNUSED, 3733 Evas_Object *obj EINA_UNUSED,
@@ -3752,7 +3768,7 @@ test_genlist_del(void *data EINA_UNUSED,
3752 itc->func.text_get = _gl_del_text_get; 3768 itc->func.text_get = _gl_del_text_get;
3753 itc->func.content_get = gl_content_get; 3769 itc->func.content_get = gl_content_get;
3754 itc->func.state_get = NULL; 3770 itc->func.state_get = NULL;
3755 itc->func.del = NULL; 3771 itc->func.del = _gl_del_del_cb;
3756 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, 3772 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL,
3757 _gl_del_win_del_cb, itc); 3773 _gl_del_win_del_cb, itc);
3758 3774