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 *