aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2018-09-11 07:37:56 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-09-13 09:54:28 +0200
commitc3f7c58e4e92dfae95012fb0c54b2f4af959205a (patch)
tree19fc7038b67f2e0f13a98adb4a23f6f810303d35 /src/examples
parentethumb: fix module loading when running in tree (diff)
downloadefl-c3f7c58e4e92dfae95012fb0c54b2f4af959205a.tar.gz
spinner_example: add focused, unfocused callback to test focus signal
add focused, unfocused callback for test Differential Revision: https://phab.enlightenment.org/D7019
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/elementary/spinner_example.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/examples/elementary/spinner_example.c b/src/examples/elementary/spinner_example.c
index a9467d327e..00d4ddd193 100644
--- a/src/examples/elementary/spinner_example.c
+++ b/src/examples/elementary/spinner_example.c
@@ -23,6 +23,18 @@ _delay_changed_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EIN
printf("Value delay changed to %0.f\n", elm_spinner_value_get(obj));
}
+static void
+_focused_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+ printf("spinner focused\n");
+}
+
+static void
+_unfocused_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+ printf("spinner unfocused\n");
+}
+
EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
@@ -108,6 +120,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
elm_box_pack_end(bx, sp);
evas_object_show(sp);
elm_spinner_editable_set(sp, EINA_TRUE);
+ evas_object_smart_callback_add(sp, "focused", _focused_cb, NULL);
+ evas_object_smart_callback_add(sp, "unfocused", _unfocused_cb, NULL);
evas_object_smart_callback_add(sp, "changed", _changed_cb, NULL);
evas_object_smart_callback_add(sp, "delay,changed", _delay_changed_cb, NULL);