efl_ui_focus_composition: remove unneeded API
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Sun, 17 Feb 2019 17:22:13 +0000 (18:22 +0100)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 8 Mar 2019 11:49:35 +0000 (20:49 +0900)
the purpose of this API can be improved, and the values there can be
guessed.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7993

src/lib/elementary/efl_ui_focus_composition.c
src/lib/elementary/efl_ui_focus_composition.eo
src/lib/elementary/efl_ui_list_view.c
src/lib/elementary/elm_gengrid.c
src/lib/elementary/elm_genlist.c
src/lib/elementary/elm_toolbar.c
src/lib/elementary_tizen/elm_genlist.c

index 1db938a..3b95b16 100644 (file)
@@ -14,7 +14,7 @@
 typedef struct {
    Eina_List *order, *targets_ordered;
    Eina_List *register_target, *registered_targets;
-   Efl_Ui_Focus_Manager *registered, *custom_manager, *old_manager;
+   Efl_Ui_Focus_Manager *registered, *old_manager;
    Eina_Bool dirty;
    Eina_Bool logical;
 } Efl_Ui_Focus_Composition_Data;
@@ -27,10 +27,7 @@ _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd)
    //Legacy code compatibility, only update the custom chain of elements if legacy was NOT messing with it.
    if (elm_widget_is_legacy(obj) && elm_object_focus_custom_chain_get(obj)) return;
 
-   if (pd->custom_manager)
-     manager = pd->custom_manager;
-   else
-     manager = pd->registered;
+   manager = pd->registered;
 
    if (manager)
      {
@@ -167,7 +164,12 @@ _efl_ui_focus_composition_efl_ui_widget_focus_state_apply(Eo *obj, Efl_Ui_Focus_
    registered = efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, redirect);
 
    if (registered)
-     pd->registered = configured_state->manager;
+     {
+        if (efl_isa(obj, EFL_UI_FOCUS_MANAGER_INTERFACE))
+          pd->registered = obj;
+        else
+          pd->registered = configured_state->manager;
+     }
    else
      pd->registered = NULL;
 
@@ -195,18 +197,6 @@ _efl_ui_focus_composition_efl_ui_focus_object_prepare_logical_none_recursive(Eo
 }
 
 EOLIAN static void
-_efl_ui_focus_composition_custom_manager_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Efl_Ui_Focus_Manager *custom_manager)
-{
-   pd->custom_manager = custom_manager;
-}
-
-EOLIAN static Efl_Ui_Focus_Manager*
-_efl_ui_focus_composition_custom_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd)
-{
-   return pd->custom_manager;
-}
-
-EOLIAN static void
 _efl_ui_focus_composition_logical_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Eina_Bool logical_mode)
 {
    pd->logical = logical_mode;
index 3fb5a36..15d2a60 100644 (file)
@@ -29,15 +29,6 @@ mixin @beta Efl.Ui.Focus.Composition requires Efl.Ui.Widget {
            You can use this function to call composition_elements.
          ]]
       }
-      @property custom_manager @protected {
-         [[Register all children in this manager
-
-           Set to $null to register them in the same manager as the implementor is
-         ]]
-         values {
-            custom_manager : Efl.Ui.Focus.Manager; [[EFL focus manager]]
-         }
-      }
       @property logical_mode @protected {
          [[Set to true if all children should be registered as logicals]]
          values {
index 480f186..9a563df 100644 (file)
@@ -679,7 +679,6 @@ _efl_ui_list_view_efl_object_constructor(Eo *obj, Efl_Ui_List_View_Data *pd)
 
    efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _list_element_focused, NULL);
 
-   efl_ui_focus_composition_custom_manager_set(obj, obj);
    efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE);
 
    pd->style = eina_stringshare_add(elm_widget_style_get(obj));
index 0739282..2bacdc5 100644 (file)
@@ -5757,7 +5757,6 @@ _elm_gengrid_efl_object_constructor(Eo *obj, Elm_Gengrid_Data *sd)
          efl_ui_focus_parent_provider_gen_container_set(efl_added, obj),
          efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map));
 
-        efl_ui_focus_composition_custom_manager_set(obj, obj);
         efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE);
 
         efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _gengrid_element_focused, obj);
index 938e2b0..943812f 100644 (file)
@@ -6377,7 +6377,6 @@ _elm_genlist_efl_object_constructor(Eo *obj, Elm_Genlist_Data *sd)
         efl_ui_focus_parent_provider_gen_container_set(efl_added, obj),
         efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map));
 
-        efl_ui_focus_composition_custom_manager_set(obj, obj);
         efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE);
 
         efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _genlist_element_focused, obj);
index 1f36ac4..c71d25a 100644 (file)
@@ -3320,11 +3320,6 @@ _elm_toolbar_efl_object_constructor(Eo *obj, Elm_Toolbar_Data *_pd EINA_UNUSED)
    evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
    efl_access_object_role_set(obj, EFL_ACCESS_ROLE_TOOL_BAR);
 
-   //TIZEN_ONLY(20180607): Restore legacy focus
-   if (!elm_widget_is_legacy(obj))
-   //
-     efl_ui_focus_composition_custom_manager_set(obj, obj);
-
    return obj;
 }
 
index dd92d15..fd22848 100644 (file)
@@ -6800,7 +6800,6 @@ _elm_genlist_efl_object_constructor(Eo *obj, Elm_Genlist_Data *sd)
     efl_ui_focus_parent_provider_gen_container_set(efl_added, obj),
     efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map));
 
-   efl_ui_focus_composition_custom_manager_set(obj, obj);
    efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE);
 
    sd->obj = obj;