summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-17 18:22:13 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-02-22 14:00:31 +0100
commitb9f82ccac30a1fdd7d5864b1b700bdfc839bce1f (patch)
treee4d015976c250ba1bd7949bcf4f8057a814f8c6a /src
parent46ce95f43f9a54de74e8ff4900a79705a4c41cb0 (diff)
efl_ui_focus_composition: remove unneeded API
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_focus_composition.c26
-rw-r--r--src/lib/elementary/efl_ui_focus_composition.eo9
-rw-r--r--src/lib/elementary/efl_ui_list_view.c1
-rw-r--r--src/lib/elementary/elm_gengrid.c1
-rw-r--r--src/lib/elementary/elm_toolbar.c2
5 files changed, 8 insertions, 31 deletions
diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c
index 1db938a7f4..3b95b16bcc 100644
--- a/src/lib/elementary/efl_ui_focus_composition.c
+++ b/src/lib/elementary/efl_ui_focus_composition.c
@@ -14,7 +14,7 @@
14typedef struct { 14typedef struct {
15 Eina_List *order, *targets_ordered; 15 Eina_List *order, *targets_ordered;
16 Eina_List *register_target, *registered_targets; 16 Eina_List *register_target, *registered_targets;
17 Efl_Ui_Focus_Manager *registered, *custom_manager, *old_manager; 17 Efl_Ui_Focus_Manager *registered, *old_manager;
18 Eina_Bool dirty; 18 Eina_Bool dirty;
19 Eina_Bool logical; 19 Eina_Bool logical;
20} Efl_Ui_Focus_Composition_Data; 20} Efl_Ui_Focus_Composition_Data;
@@ -27,10 +27,7 @@ _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd)
27 //Legacy code compatibility, only update the custom chain of elements if legacy was NOT messing with it. 27 //Legacy code compatibility, only update the custom chain of elements if legacy was NOT messing with it.
28 if (elm_widget_is_legacy(obj) && elm_object_focus_custom_chain_get(obj)) return; 28 if (elm_widget_is_legacy(obj) && elm_object_focus_custom_chain_get(obj)) return;
29 29
30 if (pd->custom_manager) 30 manager = pd->registered;
31 manager = pd->custom_manager;
32 else
33 manager = pd->registered;
34 31
35 if (manager) 32 if (manager)
36 { 33 {
@@ -167,7 +164,12 @@ _efl_ui_focus_composition_efl_ui_widget_focus_state_apply(Eo *obj, Efl_Ui_Focus_
167 registered = efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, redirect); 164 registered = efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, redirect);
168 165
169 if (registered) 166 if (registered)
170 pd->registered = configured_state->manager; 167 {
168 if (efl_isa(obj, EFL_UI_FOCUS_MANAGER_INTERFACE))
169 pd->registered = obj;
170 else
171 pd->registered = configured_state->manager;
172 }
171 else 173 else
172 pd->registered = NULL; 174 pd->registered = NULL;
173 175
@@ -195,18 +197,6 @@ _efl_ui_focus_composition_efl_ui_focus_object_prepare_logical_none_recursive(Eo
195} 197}
196 198
197EOLIAN static void 199EOLIAN static void
198_efl_ui_focus_composition_custom_manager_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Efl_Ui_Focus_Manager *custom_manager)
199{
200 pd->custom_manager = custom_manager;
201}
202
203EOLIAN static Efl_Ui_Focus_Manager*
204_efl_ui_focus_composition_custom_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd)
205{
206 return pd->custom_manager;
207}
208
209EOLIAN static void
210_efl_ui_focus_composition_logical_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Eina_Bool logical_mode) 200_efl_ui_focus_composition_logical_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Eina_Bool logical_mode)
211{ 201{
212 pd->logical = logical_mode; 202 pd->logical = logical_mode;
diff --git a/src/lib/elementary/efl_ui_focus_composition.eo b/src/lib/elementary/efl_ui_focus_composition.eo
index 3fb5a360dc..15d2a60347 100644
--- a/src/lib/elementary/efl_ui_focus_composition.eo
+++ b/src/lib/elementary/efl_ui_focus_composition.eo
@@ -29,15 +29,6 @@ mixin @beta Efl.Ui.Focus.Composition requires Efl.Ui.Widget {
29 You can use this function to call composition_elements. 29 You can use this function to call composition_elements.
30 ]] 30 ]]
31 } 31 }
32 @property custom_manager @protected {
33 [[Register all children in this manager
34
35 Set to $null to register them in the same manager as the implementor is
36 ]]
37 values {
38 custom_manager : Efl.Ui.Focus.Manager; [[EFL focus manager]]
39 }
40 }
41 @property logical_mode @protected { 32 @property logical_mode @protected {
42 [[Set to true if all children should be registered as logicals]] 33 [[Set to true if all children should be registered as logicals]]
43 values { 34 values {
diff --git a/src/lib/elementary/efl_ui_list_view.c b/src/lib/elementary/efl_ui_list_view.c
index 955313fa5a..055d3714e2 100644
--- a/src/lib/elementary/efl_ui_list_view.c
+++ b/src/lib/elementary/efl_ui_list_view.c
@@ -680,7 +680,6 @@ _efl_ui_list_view_efl_object_constructor(Eo *obj, Efl_Ui_List_View_Data *pd)
680 680
681 efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _list_element_focused, NULL); 681 efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _list_element_focused, NULL);
682 682
683 efl_ui_focus_composition_custom_manager_set(obj, obj);
684 efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE); 683 efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE);
685 684
686 pd->style = eina_stringshare_add(elm_widget_style_get(obj)); 685 pd->style = eina_stringshare_add(elm_widget_style_get(obj));
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 778c950f19..354f9d7932 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -4354,7 +4354,6 @@ _elm_gengrid_efl_object_constructor(Eo *obj, Elm_Gengrid_Data *sd)
4354 efl_ui_focus_parent_provider_gen_container_set(efl_added, obj), 4354 efl_ui_focus_parent_provider_gen_container_set(efl_added, obj),
4355 efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map)); 4355 efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map));
4356 4356
4357 efl_ui_focus_composition_custom_manager_set(obj, obj);
4358 efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE); 4357 efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE);
4359 4358
4360 obj = efl_constructor(efl_super(obj, MY_CLASS)); 4359 obj = efl_constructor(efl_super(obj, MY_CLASS));
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index 8d6caf9c6c..e55b1d0a06 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -2986,8 +2986,6 @@ _elm_toolbar_efl_object_constructor(Eo *obj, Elm_Toolbar_Data *_pd EINA_UNUSED)
2986 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); 2986 evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
2987 efl_access_object_role_set(obj, EFL_ACCESS_ROLE_TOOL_BAR); 2987 efl_access_object_role_set(obj, EFL_ACCESS_ROLE_TOOL_BAR);
2988 2988
2989 efl_ui_focus_composition_custom_manager_set(obj, obj);
2990
2991 return obj; 2989 return obj;
2992} 2990}
2993 2991