summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2014-02-18 04:03:34 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-02-26 01:26:02 +0900
commiteea1d9b3dc972be583259b8cccda91f644563723 (patch)
treef266e43675188e3f81cfad05684b02176209f087 /src/bin
parent5983ab351d0c44ca5b2ed342bac747f566147399 (diff)
popup: implemented widget item focus feauture.
@feature Summary: 1. Added "item,focused" and "item,unfocused" callbacks for widget item since VIEW(item) is a elm layout. 2. Added sd->box into focus chain to enable the focus movement on widget items. Test Plan: elementary_test -> popup -> "popup-center-title + items + 3 buttons" Reviewers: seoz, woohyun CC: nirajkr Differential Revision: https://phab.enlightenment.org/D563
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/test_popup.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bin/test_popup.c b/src/bin/test_popup.c
index b627249e8..e343cd47f 100644
--- a/src/bin/test_popup.c
+++ b/src/bin/test_popup.c
@@ -315,6 +315,22 @@ _popup_center_title_content_3button_cb(void *data, Evas_Object *obj EINA_UNUSED,
315} 315}
316 316
317static void 317static void
318_item_focused_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
319{
320 Elm_Object_Item *it = event_info;
321
322 printf("item,focused:%p\n", it);
323}
324
325static void
326_item_unfocused_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
327{
328 Elm_Object_Item *it = event_info;
329
330 printf("item,unfocused:%p\n", it);
331}
332
333static void
318_popup_center_title_item_3button_cb(void *data, Evas_Object *obj EINA_UNUSED, 334_popup_center_title_item_3button_cb(void *data, Evas_Object *obj EINA_UNUSED,
319 void *event_info EINA_UNUSED) 335 void *event_info EINA_UNUSED)
320{ 336{
@@ -360,6 +376,8 @@ _popup_center_title_item_3button_cb(void *data, Evas_Object *obj EINA_UNUSED,
360 // popup show should be called after adding all the contents and the buttons 376 // popup show should be called after adding all the contents and the buttons
361 // of popup to set the focus into popup's contents correctly. 377 // of popup to set the focus into popup's contents correctly.
362 evas_object_show(popup); 378 evas_object_show(popup);
379 evas_object_smart_callback_add(popup, "item,focused", _item_focused_cb, NULL);
380 evas_object_smart_callback_add(popup, "item,unfocused", _item_unfocused_cb, NULL);
363} 381}
364 382
365static void 383static void