elementary/naviframe - implemented focus next hook

SVN revision: 69238
This commit is contained in:
ChunEon Park 2012-03-12 09:14:14 +00:00
parent 6763d9b38e
commit 10b8ef434e
1 changed files with 21 additions and 4 deletions

View File

@ -1059,11 +1059,28 @@ _item_new(Evas_Object *obj,
static Eina_Bool
_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next)
{
Eina_Bool ret;
Elm_Naviframe_Item *top_it;
Eina_List *l = NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd || !wd->stack) return EINA_FALSE;
return elm_widget_focus_next_get(VIEW(elm_naviframe_top_item_get(obj)),
dir,
next);
void *(*list_data_get)(const Eina_List *list);
if (!wd) return EINA_FALSE;
top_it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj);
if (!top_it) return EINA_FALSE;
list_data_get = eina_list_data_get;
//Forcus order: prev button, next button, contents
if (top_it->title_prev_btn)
l = eina_list_append(l, top_it->title_prev_btn);
if (top_it->title_next_btn)
l = eina_list_append(l, top_it->title_next_btn);
l = eina_list_append(l, VIEW(top_it));
ret = elm_widget_focus_list_next_get(obj, l, list_data_get, dir, next);
eina_list_free(l);
return ret;
}
EAPI Evas_Object *