elm_naviframe: remove old api!
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>
Mon, 25 Sep 2017 16:10:47 +0000 (18:10 +0200)
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>
Tue, 10 Oct 2017 17:28:46 +0000 (19:28 +0200)
src/lib/elementary/elc_naviframe.c
src/lib/elementary/elm_naviframe.eo

index c6a3e56..3688971 100644 (file)
@@ -90,19 +90,9 @@ _resize_object_reset(Evas_Object *obj, Elm_Naviframe_Item_Data *it)
 static void
 _prev_page_focus_recover(Elm_Naviframe_Item_Data *it)
 {
-   Evas_Object *newest;
-   unsigned int order = 0;
+   Elm_Naviframe *n = it->base->widget;
 
-   newest = elm_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE);
-   if (newest)
-     elm_object_focus_set(newest, EINA_TRUE);
-   else
-     {
-        if (elm_object_focus_allow_get(VIEW(it)))
-          elm_object_focus_set(VIEW(it), EINA_TRUE);
-        else
-          elm_object_focus_set(WIDGET(it), EINA_TRUE);
-     }
+   efl_ui_focus_manager_focus_set(efl_ui_focus_user_manager_get(n), n);
 }
 
 EOLIAN static void
@@ -1378,76 +1368,6 @@ _on_obj_size_hints_changed(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
      _item_dispmode_set(it, dispmode);
 }
 
-EOLIAN static Eina_Bool
-_elm_naviframe_elm_widget_focus_next(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, Elm_Focus_Direction dir, Evas_Object **next, Elm_Object_Item **next_item)
-{
-   Evas_Object *ao;
-
-   Eina_List *l = NULL;
-   Elm_Object_Item *eo_top_it;
-   void *(*list_data_get)(const Eina_List *list);
-
-   Eina_Bool int_ret = EINA_FALSE;
-
-   eo_top_it = elm_naviframe_top_item_get(obj);
-   if (!eo_top_it) goto end;
-
-   list_data_get = eina_list_data_get;
-
-   ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_it, top_it);
-   l = eina_list_append(l, VIEW(top_it));
-
-   /* access */
-   if (_elm_config->access_mode)
-     {
-        ao = _access_object_get(top_it, TITLE_ACCESS_PART);
-        if (ao) l = eina_list_append(l, ao);
-     }
-
-   int_ret = elm_widget_focus_list_next_get(obj, l, list_data_get, dir, next, next_item);
-   eina_list_free(l);
-
-end:
-   if (!int_ret)
-     {
-        *next = obj;
-        int_ret = !elm_widget_focus_get(obj);
-     }
-
-   return int_ret;
-}
-
-EOLIAN static Eina_Bool
-_elm_naviframe_elm_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd EINA_UNUSED)
-{
-   return EINA_TRUE;
-}
-
-EOLIAN static Eina_Bool
-_elm_naviframe_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd EINA_UNUSED, const Evas_Object *base, double degree, Evas_Object **direction, Elm_Object_Item **direction_item, double *weight)
-{
-   Eina_Bool int_ret;
-
-   Eina_List *l = NULL;
-   Elm_Object_Item *eo_top_it;
-   void *(*list_data_get)(const Eina_List *list);
-
-   eo_top_it = elm_naviframe_top_item_get(obj);
-   if (!eo_top_it) return EINA_FALSE;
-
-   list_data_get = eina_list_data_get;
-
-   ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_it, top_it);
-   l = eina_list_append(l, VIEW(top_it));
-
-   int_ret = elm_widget_focus_list_direction_get
-            (obj, base, l, list_data_get, degree, direction, direction_item, weight);
-
-   eina_list_free(l);
-
-   return int_ret;
-}
-
 EOLIAN static void
 _elm_naviframe_efl_canvas_group_group_add(Eo *obj, Elm_Naviframe_Data *priv)
 {
@@ -1611,7 +1531,6 @@ _item_push_helper(Elm_Naviframe_Item_Data *item)
    evas_object_show(VIEW(item));
 
    ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_item, top_item);
-   if (top_item) elm_obj_widget_focused_object_clear(VIEW(top_item));
    _resize_object_reset(obj, item);
    if (top_item)
      {
@@ -1752,7 +1671,6 @@ _elm_naviframe_item_insert_after(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Ite
 
    if (top_inserted)
      {
-        elm_obj_widget_focused_object_clear(VIEW(after));
         elm_widget_tree_unfocusable_set(VIEW(after), EINA_TRUE);
         _resize_object_reset(obj, it);
         evas_object_show(VIEW(it));
@@ -2071,12 +1989,6 @@ _elm_naviframe_event_enabled_get(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd)
    return !sd->freeze_events;
 }
 
-EOLIAN static Eina_Bool
-_elm_naviframe_elm_widget_focus_next_manager_is(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd EINA_UNUSED)
-{
-   return EINA_TRUE;
-}
-
 static void
 _elm_naviframe_class_constructor(Efl_Class *klass)
 {
index 332e98c..a9e16e0 100644 (file)
@@ -69,7 +69,7 @@ class Elm.Naviframe (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
            This pops an item that is on the top(visible) of the naviframe, makes it
            disappear, then deletes the item. The item that was underneath it on the
            stack will become visible.
-           
+
            When pop transition animation is in progress, new pop operation is blocked until current pop operation
            is complete.
           ]]
@@ -98,7 +98,7 @@ class Elm.Naviframe (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
 
            The item pushed becomes one page of the naviframe, this item will be
            deleted when it is popped.
-           
+
            When push transition animation is in progress, pop operation is blocked until push is complete.
 
            The following styles are available for this item:
@@ -144,11 +144,7 @@ class Elm.Naviframe (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
       class.constructor;
       Efl.Object.constructor;
       Efl.Gfx.visible { set; }
-      Elm.Widget.focus_direction;
-      Elm.Widget.focus_next_manager_is;
-      Elm.Widget.focus_direction_manager_is;
       Elm.Widget.on_access_update;
-      Elm.Widget.focus_next;
       Efl.Ui.Translatable.translation_update;
       Elm.Widget.theme_apply;
       Elm.Widget.widget_event;