From eea64e73220740fd8bbfe86f7aa378f4ee726f41 Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Wed, 25 Jul 2012 10:28:51 +0000 Subject: [PATCH] elementary / elc_popup : Add focus direction for popup. SVN revision: 74383 --- legacy/elementary/src/lib/elc_popup.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/legacy/elementary/src/lib/elc_popup.c b/legacy/elementary/src/lib/elc_popup.c index d36cdc242f..d81260b45a 100644 --- a/legacy/elementary/src/lib/elc_popup.c +++ b/legacy/elementary/src/lib/elc_popup.c @@ -1031,6 +1031,20 @@ _focus_next_hook(const Evas_Object *obj, return elm_widget_focus_next_get(wd->notify, dir, next); } +static Eina_Bool +_focus_direction_hook(const Evas_Object *obj, + const Evas_Object *base, + double degree, + Evas_Object **direction, + double *weight) +{ + Widget_Data *wd = elm_widget_data_get(obj); + + if (!wd) + return EINA_FALSE; + return elm_widget_focus_direction_get(wd->notify, base, degree, direction, weight); +} + static void _item_text_set(Elm_Popup_Content_Item *item, const char *label) { @@ -1242,6 +1256,7 @@ elm_popup_add(Evas_Object *parent) elm_widget_content_unset_hook_set(obj,_content_unset_hook); elm_widget_can_focus_set(obj, EINA_FALSE); elm_widget_focus_next_hook_set(obj, _focus_next_hook); + elm_widget_focus_direction_hook_set(obj, _focus_direction_hook); evas_object_smart_callbacks_descriptions_set(obj, _signals); wd->notify = elm_notify_add(obj);