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;
//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)
{
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;
}
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;
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 {
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));
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);
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);
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;
}
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;