aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2018-09-11 07:22:06 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-09-13 09:53:58 +0200
commit8bd0cfdb984ce071574ac5910379b3d431bca665 (patch)
treef4421d05ff56edf315364b4959e2343f5890ed8a /src/bin/elementary
parenttests/elm: use custom tick source for animator events (diff)
downloadefl-8bd0cfdb984ce071574ac5910379b3d431bca665.tar.gz
test_gengrid: add focused, unfocused callback to test focus signal
add focused, unfocused callback for test Differential Revision: https://phab.enlightenment.org/D7018
Diffstat (limited to 'src/bin/elementary')
-rw-r--r--src/bin/elementary/test_gengrid.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bin/elementary/test_gengrid.c b/src/bin/elementary/test_gengrid.c
index da256806a5..e2009e0db6 100644
--- a/src/bin/elementary/test_gengrid.c
+++ b/src/bin/elementary/test_gengrid.c
@@ -1615,6 +1615,13 @@ _gengrid_focus_item_cb(void *data, Evas_Object *obj EINA_UNUSED,
}
static void
+_gengrid_focus_cb(void *data, Evas_Object *obj EINA_UNUSED,
+ void *event_info)
+{
+ printf("%s: %p\n", (char *)data, event_info);
+}
+
+static void
_gengrid_focus_popup_close_cb(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
@@ -1787,6 +1794,8 @@ test_gengrid_focus(void *data EINA_UNUSED,
evas_object_size_hint_min_set(gengrid, 0, ELM_SCALE_SIZE(620));
elm_box_pack_end(in_bx, gengrid);
evas_object_show(gengrid);
+ evas_object_smart_callback_add(gengrid, "focused", _gengrid_focus_cb, "focused");
+ evas_object_smart_callback_add(gengrid, "unfocused", _gengrid_focus_cb, "unfocused");
evas_object_smart_callback_add(gengrid, "item,focused", _gengrid_focus_item_cb, "item,focused");
evas_object_smart_callback_add(gengrid, "item,unfocused", _gengrid_focus_item_cb, "item,unfocused");
evas_object_smart_callback_add(gengrid, "selected", _gengrid_focus_item_cb, "selected");
@@ -1806,6 +1815,8 @@ test_gengrid_focus(void *data EINA_UNUSED,
evas_object_size_hint_min_set(gengrid2, 0, ELM_SCALE_SIZE(620));
elm_box_pack_end(in_bx, gengrid2);
evas_object_show(gengrid2);
+ evas_object_smart_callback_add(gengrid2, "focused", _gengrid_focus_cb, "focused");
+ evas_object_smart_callback_add(gengrid2, "unfocused", _gengrid_focus_cb, "unfocused");
evas_object_smart_callback_add(gengrid2, "item,focused", _gengrid_focus_item_cb, "item,focused");
evas_object_smart_callback_add(gengrid2, "item,unfocused", _gengrid_focus_item_cb, "item,unfocused");
evas_object_smart_callback_add(gengrid2, "selected", _gengrid_focus_item_cb, "selected");