}
}
implements {
- @empty Efl.Ui.Focus.Object.focus {set;}
- @empty Efl.Ui.Focus.Object.focus_parent {get;}
- @empty Efl.Ui.Focus.Object.focus_geometry {get;}
+ Efl.Ui.Focus.Object.focus {set;}
+ Efl.Ui.Focus.Object.focus_parent {get;}
+ Efl.Ui.Focus.Object.focus_geometry {get;}
}
}
int_ret = efl_ui_focus_object_on_focus_update(efl_super(obj, MY_CLASS));
if (!int_ret) return EINA_FALSE;
- if (!elm_widget_focus_get(obj))
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ Eina_Bool focused = EINA_FALSE;
+ if (elm_widget_is_legacy(obj))
+ focused = elm_widget_focus_get(obj);
+ else
+ focused = efl_ui_focus_object_focus_get(obj);
+ if (!focused)
+ //if (!efl_ui_focus_object_focus_get(obj))
+ //
{
Clock_Mod_Api *dt_mod = _dt_mod_init();
if ((dt_mod) && (dt_mod->obj_hide))
Efl.Pack_Linear.pack_index_get;
Efl.Pack_Linear.pack_content_get;
Efl.Ui.Scrollable.match_content { set; }
- @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create;
- @empty Efl.Ui.Widget.focus_state_apply;
- @empty Efl.Ui.Focus.Manager.move;
+ Efl.Ui.Widget_Focus_Manager.focus_manager_create;
+ Efl.Ui.Widget.focus_state_apply;
+ Efl.Ui.Focus.Manager.move;
Efl.Ui.Single_Selectable.last_selected { get; }
Efl.Ui.Multi_Selectable.selected_iterator_new;
Efl.Ui.Multi_Selectable.select_mode {get; set;}
class @beta Efl.Ui.Collection_Focus_Manager extends Efl.Ui.Focus.Manager_Calc {
[[Internal class which implements collection specific behaviour, cannot be used outside of @Efl.Ui.Collection.]]
implements {
- @empty Efl.Ui.Focus.Manager.manager_focus { set; }
- @empty Efl.Ui.Focus.Manager.request_move;
+ Efl.Ui.Focus.Manager.manager_focus { set; }
+ Efl.Ui.Focus.Manager.request_move;
}
}
Efl.Ui.Widget.theme_apply;
Efl.Ui.Scrollable.match_content { set; }
- @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create;
- @empty Efl.Ui.Focus.Manager.move;
- @empty Efl.Ui.Widget.focus_state_apply;
+ Efl.Ui.Widget_Focus_Manager.focus_manager_create;
+ Efl.Ui.Focus.Manager.move;
+ Efl.Ui.Widget.focus_state_apply;
}
events {
item,realized : Efl.Ui.Item; [[Event triggered when an @Efl.Ui.Item has been provided by the @Efl.Ui.Factory and is about to be used.]]
class @beta Efl.Ui.Collection_View_Focus_Manager extends Efl.Ui.Focus.Manager_Calc {
[[Internal class which implements collection specific behaviour, cannot be used outside of collection]]
implements {
- @empty Efl.Ui.Focus.Manager.manager_focus { set; }
- @empty Efl.Ui.Focus.Manager.request_move;
+ Efl.Ui.Focus.Manager.manager_focus { set; }
+ Efl.Ui.Focus.Manager.request_move;
}
}
}
implements {
Efl.Object.invalidate;
- @empty Efl.Ui.Widget.focus_state_apply;
- @empty Efl.Ui.Focus.Object.setup_order_non_recursive;
+ Efl.Ui.Widget.focus_state_apply;
+ Efl.Ui.Focus.Object.setup_order_non_recursive;
@empty .prepare;
- @empty .composition_elements;
- @empty .dirty;
- @empty .logical_mode;
}
}
}
}
implements {
- @empty Efl.Ui.Focus.Object.focus_geometry {get;}
- @empty Efl.Ui.Focus.Object.focus_parent {get;}
- @empty Efl.Ui.Focus.Object.focus_manager {get;}
- @empty Efl.Ui.Focus.Object.focus {set;}
- @empty .canvas_object;
- @empty .focus_manager_object;
- @empty .focus_manager_parent;
+ Efl.Ui.Focus.Object.focus_geometry {get;}
+ Efl.Ui.Focus.Object.focus_parent {get;}
+ Efl.Ui.Focus.Object.focus_manager {get;}
+ Efl.Ui.Focus.Object.focus {set;}
Efl.Object.destructor;
}
}
_efl_ui_focus_layer_efl_gfx_entity_visible_set(Eo *obj, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool v)
{
efl_gfx_entity_visible_set(efl_super(obj, MY_CLASS), v);
-
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj))
+ return;
+ //
if (pd->enable_on_visible)
{
efl_ui_focus_layer_enable_set(obj, v);
EOLIAN static void
_efl_ui_focus_layer_efl_object_invalidate(Eo *obj, Efl_Ui_Focus_Layer_Data *pd EINA_UNUSED)
{
- efl_ui_focus_layer_enable_set(obj, EINA_FALSE);
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(obj))
+ //
+ efl_ui_focus_layer_enable_set(obj, EINA_FALSE);
+
efl_invalidate(efl_super(obj, MY_CLASS));
}
_efl_ui_focus_layer_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Layer_Data *pd)
{
obj = efl_constructor(efl_super(obj, MY_CLASS));
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj))
+ return obj;
+ //
pd->enable_on_visible = EINA_TRUE;
pd->cycle = EINA_TRUE;
return obj;
}
}
implements {
- @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create;
- @empty Efl.Ui.Widget.focus_state_apply;
+ Efl.Ui.Widget_Focus_Manager.focus_manager_create;
+ Efl.Ui.Widget.focus_state_apply;
Efl.Gfx.Entity.visible {set;}
- @empty Efl.Ui.Focus.Manager.move;
- @empty Efl.Ui.Focus.Object.focus_manager { get; }
- @empty Efl.Ui.Focus.Object.focus_parent { get; }
+ Efl.Ui.Focus.Manager.move;
+ Efl.Ui.Focus.Object.focus_manager { get; }
+ Efl.Ui.Focus.Object.focus_parent { get; }
Efl.Object.constructor;
Efl.Object.invalidate;
- @empty .enable;
- @empty .behaviour;
}
}
implements {
class.constructor;
class.destructor;
- @empty Efl.Ui.Focus.Manager.move;
- @empty Efl.Ui.Focus.Manager.request_move;
- @empty Efl.Ui.Focus.Manager.manager_focus {get; set;}
- @empty Efl.Ui.Focus.Manager.redirect {set; get;}
- @empty Efl.Ui.Focus.Manager.border_elements {get;}
- @empty Efl.Ui.Focus.Manager.viewport_elements {get;}
- @empty Efl.Ui.Focus.Manager.root {set; get;}
- @empty Efl.Ui.Focus.Manager.request_subchild;
- @empty Efl.Ui.Focus.Manager.fetch;
- @empty Efl.Ui.Focus.Manager.logical_end;
- @empty Efl.Ui.Focus.Manager.reset_history;
- @empty Efl.Ui.Focus.Manager.pop_history_stack;
- @empty Efl.Ui.Focus.Manager.setup_on_first_touch;
- @empty Efl.Ui.Focus.Manager.dirty_logic_freeze;
- @empty Efl.Ui.Focus.Manager.dirty_logic_unfreeze;
+ Efl.Ui.Focus.Manager.move;
+ Efl.Ui.Focus.Manager.request_move;
+ Efl.Ui.Focus.Manager.manager_focus {get; set;}
+ Efl.Ui.Focus.Manager.redirect {set; get;}
+ Efl.Ui.Focus.Manager.border_elements {get;}
+ Efl.Ui.Focus.Manager.viewport_elements {get;}
+ Efl.Ui.Focus.Manager.root {set; get;}
+ Efl.Ui.Focus.Manager.request_subchild;
+ Efl.Ui.Focus.Manager.fetch;
+ Efl.Ui.Focus.Manager.logical_end;
+ Efl.Ui.Focus.Manager.reset_history;
+ Efl.Ui.Focus.Manager.pop_history_stack;
+ Efl.Ui.Focus.Manager.setup_on_first_touch;
+ Efl.Ui.Focus.Manager.dirty_logic_freeze;
+ Efl.Ui.Focus.Manager.dirty_logic_unfreeze;
Efl.Object.constructor;
Efl.Object.finalize;
Efl.Object.provider_find;
Efl.Object.destructor;
- @empty .register;
- @empty .register_logical;
- @empty .update_redirect;
- @empty .update_parent;
- @empty .update_children;
- @empty .update_order;
- @empty .unregister;
}
}
}
}
implements {
- @empty Efl.Ui.Focus.Manager_Calc.register_logical;
- @empty Efl.Ui.Focus.Manager_Calc.register;
- @empty Efl.Ui.Focus.Manager_Calc.unregister;
- @empty Efl.Ui.Focus.Manager.manager_focus {set; get;}
- @empty Efl.Ui.Focus.Manager.fetch;
- @empty Efl.Ui.Focus.Manager.logical_end;
- @empty Efl.Ui.Focus.Manager.border_elements {get;}
- @empty Efl.Ui.Focus.Manager.viewport_elements {get;}
- @empty Efl.Ui.Focus.Manager.request_move;
- @empty Efl.Ui.Focus.Manager.move;
- @empty .canvas_object;
+ Efl.Ui.Focus.Manager_Calc.register_logical;
+ Efl.Ui.Focus.Manager_Calc.register;
+ Efl.Ui.Focus.Manager_Calc.unregister;
+ Efl.Ui.Focus.Manager.manager_focus {set; get;}
+ Efl.Ui.Focus.Manager.fetch;
+ Efl.Ui.Focus.Manager.logical_end;
+ Efl.Ui.Focus.Manager.border_elements {get;}
+ Efl.Ui.Focus.Manager.viewport_elements {get;}
+ Efl.Ui.Focus.Manager.request_move;
+ Efl.Ui.Focus.Manager.move;
Efl.Object.constructor;
Efl.Object.destructor;
Efl.Object.finalize;
implements {
Efl.Object.constructor;
Efl.Object.destructor;
- @empty Efl.Ui.Focus.Manager.move;
+ Efl.Ui.Focus.Manager.move;
}
}
@empty .focus_manager;
@empty .focus_parent;
@empty .on_focus_update;
- @empty .setup_order;
- @empty .child_focus;
- @empty .focus;
}
events {
focus,changed : bool; [[Emitted if the focus state has changed.]]
the widget's parent as the focus parent.
]]
implements {
- @empty Efl.Ui.Focus.Parent_Provider.find_logical_parent;
+ Efl.Ui.Focus.Parent_Provider.find_logical_parent;
}
}
EOLIAN static void
_efl_ui_focus_util_focus(Efl_Ui_Focus_Object *user)
{
- //TIZEN_ONLY(20191021): disable focus manager
- return;
- //
- /*
Efl_Ui_Focus_Object *entry;
Efl_Ui_Widget *top, *o;
Efl_Ui_Focus_Manager *m, *registered_manager;
{
efl_ui_focus_manager_focus_set(registered_manager, user);
}
- */
}
EOLIAN static Efl_Ui_Focus_Manager*
_efl_ui_focus_util_active_manager(Efl_Ui_Focus_Manager *manager)
{
- //TIZEN_ONLY(20191021): disable focus manager
- return NULL;
- //
- /*
while (efl_ui_focus_manager_redirect_get(manager))
manager = efl_ui_focus_manager_redirect_get(manager);
return manager;
- */
}
EOLIAN static Efl_Ui_Focus_Direction
_efl_ui_focus_util_direction_complement(Efl_Ui_Focus_Direction dir)
{
- //TIZEN_ONLY(20191021): disable focus manager
- return EFL_UI_FOCUS_DIRECTION_LAST;
- //
- /*
#define COMP(a,b) \
if (dir == a) return b; \
if (dir == b) return a;
#undef COMP
return EFL_UI_FOCUS_DIRECTION_LAST;
- */
}
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
if (!elm_widget_can_focus_get(obj)) return EINA_FALSE;
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ Eina_Bool focused = EINA_FALSE;
+ if (elm_widget_is_legacy(obj))
+ focused = elm_widget_focus_get(obj);
+ else
+ focused = efl_ui_focus_object_focus_get(obj);
- if (efl_ui_focus_object_focus_get(obj))
+ if (focused)
+ //if (efl_ui_focus_object_focus_get(obj))
+ //
{
if (elm_widget_is_legacy(obj))
elm_layout_signal_emit(obj, "elm,action,focus", "elm");
Efl.Content.content_unset;
Efl.Canvas.Group.group_calculate;
Efl.Ui.Widget.theme_apply;
- @empty Efl.Ui.Widget.focus_state_apply;
+ Efl.Ui.Widget.focus_state_apply;
Efl.Ui.Widget.widget_input_event_handler;
- @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create;
+ Efl.Ui.Widget_Focus_Manager.focus_manager_create;
Efl.Ui.Scrollable.match_content { set; }
}
}
ELM_WIDGET_DATA_GET(obj, sd); \
if (!sd) return
+//TIZEN_ONLY(20180607): Restore legacy focus
+/*
#define ELM_WIDGET_FOCUS_GET(obj) \
(efl_isa(obj, EFL_UI_WIDGET_CLASS) && \
((_elm_access_auto_highlight_get()) ? (elm_widget_highlight_get(obj)) : \
(efl_ui_focus_object_focus_get(obj))))
-
+*/
+#define ELM_WIDGET_FOCUS_GET(obj) \
+ (efl_isa(obj, EFL_UI_WIDGET_CLASS) && \
+ ((_elm_access_auto_highlight_get()) ? (elm_widget_highlight_get(obj)) : \
+ (elm_widget_is_legacy(obj) ? elm_widget_focus_get(obj) : efl_ui_focus_object_focus_get(obj))))
+//
const char SIG_WIDGET_FOCUSED[] = "focused";
const char SIG_WIDGET_UNFOCUSED[] = "unfocused";
const char SIG_WIDGET_LANG_CHANGED[] = "language,changed";
_logical_parent_eval(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina_Bool should, Eina_Bool *state_change_to_parent)
{
//TIZEN_ONLY(20180607): Restore legacy focus
- return NULL;
+ if (elm_widget_is_legacy(obj))
+ return NULL;
//
Efl_Ui_Widget *parent;
Efl_Ui_Focus_Parent_Provider *provider;
_full_eval(Eo *obj, Elm_Widget_Smart_Data *pd)
{
//TIZEN_ONLY(20180607): Restore legacy focus
- return;
+ if (elm_widget_is_legacy(obj))
+ return;
//
Efl_Ui_Focus_Object *old_parent;
Efl_Ui_Focus_Object *old_registered_parent, *old_registered_manager;
eina_stringshare_del(sd->style);
if (sd->theme) elm_theme_free(sd->theme);
//TIZEN_ONLY(20180607): Restore legacy focus
- _if_focused_revert(obj, EINA_TRUE);
- efl_ui_widget_focus_custom_chain_unset(obj);
+ if (elm_widget_is_legacy(obj))
+ {
+ _if_focused_revert(obj, EINA_TRUE);
+ efl_ui_widget_focus_custom_chain_unset(obj);
+ }
//
eina_stringshare_del(sd->access_info);
eina_stringshare_del(sd->accessible_name);
_elm_widget_full_eval_children(Eo *obj, Elm_Widget_Smart_Data *sd)
{
//TIZEN_ONLY(20180607): Restore legacy focus
- return;
+ if (elm_widget_is_legacy(obj))
+ return;
//
Eina_List *l;
Eo *child;
{
//TIZEN_ONLY(20180607): Restore legacy focus
if (elm_widget_is(subs))
- efl_ui_widget_focus_disabled_handle((Evas_Object *)subs);
+ {
+ if (elm_widget_is_legacy(subs))
+ efl_ui_widget_focus_disabled_handle((Evas_Object *)subs);
+ }
//
if (efl_isa(subs, EFL_UI_WIDGET_CLASS))
efl_ui_widget_disabled_set(subs, efl_ui_widget_disabled_get(obj));
if (!_is_focusable(obj)) return;
- /* TIZEN_ONLY(20180607): Restore legacy focus
- if (pd->focus.manager && !pd->focus.logical)
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj))
{
- efl_ui_focus_util_focus(obj);
+ Evas_Object *o = obj;
+ do
+ {
+ if (_elm_widget_is(o)) break;
+ o = evas_object_smart_parent_get(o);
+ }
+ while (o);
+
+ efl_ui_widget_focus_mouse_up_handle(o);
+ return;
}
- */
- Evas_Object *o = obj;
- do
+ //
+ if (pd->focus.manager && !pd->focus.logical)
{
- if (_elm_widget_is(o)) break;
- o = evas_object_smart_parent_get(o);
+ efl_ui_focus_util_focus(obj);
}
- while (o);
-
- efl_ui_widget_focus_mouse_up_handle(o);
}
// TIZEN_ONLY(20190821): keep legacy focus logic
if (!elm_widget_can_focus_get(obj))
return EINA_FALSE;
- focused = efl_ui_focus_object_focus_get(obj);
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj))
+ focused = elm_widget_focus_get(obj);
+ else
+ //
+ focused = efl_ui_focus_object_focus_get(obj);
if (!sd->resize_obj)
evas_object_focus_set(obj, focused);
//TIZEN_ONLY(20180607): Restore legacy focus
- if (focused)
- evas_object_smart_callback_call(obj, "focused", NULL);
- else
- evas_object_smart_callback_call(obj, "unfocused", NULL);
+ if (elm_widget_is_legacy(obj))
+ {
+ if (focused)
+ evas_object_smart_callback_call(obj, "focused", NULL);
+ else
+ evas_object_smart_callback_call(obj, "unfocused", NULL);
+ }
//
if (_elm_atspi_enabled() && !elm_widget_child_can_focus_get(obj))
Efl.Access.Object.access_children { get; }
Efl.Access.Object.attributes { get; }
Efl.Access.Component.focus_grab;
- @empty Efl.Ui.Focus.Object.focus_manager { get; }
- @empty Efl.Ui.Focus.Object.focus_parent { get; }
- @empty Efl.Ui.Focus.Object.focus_geometry { get; }
- @empty Efl.Ui.Focus.Object.focus { set; }
+ Efl.Ui.Focus.Object.focus_manager { get; }
+ Efl.Ui.Focus.Object.focus_parent { get; }
+ Efl.Ui.Focus.Object.focus_geometry { get; }
+ Efl.Ui.Focus.Object.focus { set; }
Efl.Ui.I18n.mirrored { get; set; [[This sets the mirror state of the whole sub-tree. ]] }
Efl.Ui.I18n.mirrored_automatic { get; set; }
Efl.Ui.Focus.Object.on_focus_update;
{
Eo *res = NULL;
- /* TIZEN_ONLY(20191021): disable focus manager
pd->manager = efl_ui_widget_focus_manager_create(obj, obj);
EINA_SAFETY_ON_NULL_RETURN_VAL(pd->manager, res);
efl_ref(pd->manager);
efl_composite_attach(obj, pd->manager);
_efl_ui_focus_manager_redirect_events_add(pd->manager, obj);
- */
res = efl_constructor(efl_super(obj, MY_CLASS));
{
efl_destructor(efl_super(obj, MY_CLASS));
- /* TIZEN_ONLY(20191021): disable focus manager
_efl_ui_focus_manager_redirect_events_del(pd->manager, obj);
efl_unref(pd->manager);
pd->manager = NULL;
- */
}
EOLIAN static Eina_Bool
implements {
Efl.Object.constructor;
Efl.Object.destructor;
- @empty Efl.Ui.Widget.focus_state_apply;
+ Efl.Ui.Widget.focus_state_apply;
}
}
ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
if (sd->type != EFL_UI_WIN_TYPE_FAKE)
{
- /* TIZEN_ONLY(20180607): Restore legacy focus
- Efl_Ui_Focus_Manager *man = sd->obj;
- while(efl_ui_focus_manager_redirect_get(man))
- {
- man = efl_ui_focus_manager_redirect_get(man);
- }
-
- Evas_Object *focused = efl_ui_focus_manager_focus_get(man);
- if (focused)
- efl_ui_focus_object_focus_set(focused, EINA_TRUE);
- */
- if (!efl_ui_widget_focus_order_get(obj))
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj))
{
- efl_ui_widget_focus_steal(obj, NULL);
+ if (!efl_ui_widget_focus_order_get(obj))
+ {
+ efl_ui_widget_focus_steal(obj, NULL);
+ }
+ else
+ {
+ Evas_Object *newest = NULL;
+ unsigned int newest_focus_order = 0;
+
+ newest = efl_ui_widget_newest_focus_order_get
+ (obj, &newest_focus_order, EINA_TRUE);
+ // TIZEN_ONLY (20180508): onscreen_is should not be checked
+ // to keep compatibility with Tizen 2.4
+ /*
+ if (newest &&
+ (_elm_widget_onscreen_is(newest) || (newest == obj)))
+ efl_ui_widget_focus_restore(obj);
+ */
+ if (newest) efl_ui_widget_focus_restore(obj);
+ /////////////////////////////////////////////////////////////
+ else
+ evas_object_focus_set(obj, EINA_TRUE);
+ }
}
else
+ //
{
- Evas_Object *newest = NULL;
- unsigned int newest_focus_order = 0;
+ Efl_Ui_Focus_Manager *man = sd->obj;
+ while(efl_ui_focus_manager_redirect_get(man))
+ {
+ man = efl_ui_focus_manager_redirect_get(man);
+ }
- newest = efl_ui_widget_newest_focus_order_get
- (obj, &newest_focus_order, EINA_TRUE);
- if (newest) efl_ui_widget_focus_restore(obj);
- else
- evas_object_focus_set(obj, EINA_TRUE);
+ Evas_Object *focused = efl_ui_focus_manager_focus_get(man);
+ if (focused)
+ efl_ui_focus_object_focus_set(focused, EINA_TRUE);
}
- //
}
evas_object_smart_callback_call(obj, SIG_FOCUS_IN, NULL);
//TIZEN_ONLY(20180607): Restore legacy focus
- //evas_object_smart_callback_call(obj, SIG_WIDGET_FOCUSED, NULL);
+ if (!elm_widget_is_legacy(obj))
//
+ evas_object_smart_callback_call(obj, SIG_WIDGET_FOCUSED, NULL);
ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
sd->focus_highlight.cur.visible = EINA_TRUE;
_elm_win_focus_highlight_reconfigure_job_start(sd);
/* else if (sd->img_obj) */
/* { */
/* } */
- /* TIZEN_ONLY(20180607): Restore legacy focus
if ((!efl_ui_focus_manager_focus_get(sd->obj)) &&
(!efl_ui_focus_manager_redirect_get(sd->obj)))
{
else if (!evas_focus_get(evas_object_evas_get(sd->obj)))
evas_object_focus_set(obj, EINA_TRUE);
}
- */
}
static void
ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
evas_object_smart_callback_call(obj, SIG_FOCUS_OUT, NULL);
//TIZEN_ONLY(20180607): Restore legacy focus
- //evas_object_smart_callback_call(obj, SIG_WIDGET_UNFOCUSED, NULL);
+ if (!elm_widget_is_legacy(obj))
//
+ evas_object_smart_callback_call(obj, SIG_WIDGET_UNFOCUSED, NULL);
ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
sd->focus_highlight.cur.visible = EINA_FALSE;
_elm_win_focus_highlight_reconfigure_job_start(sd);
efl_access_window_deactivated_signal_emit(obj);
efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_TYPE_ACTIVE, EINA_FALSE);
}
-
- /*TIZEN_ONLY(20180607): Restore legacy focus
- if (sd->type != EFL_UI_WIN_TYPE_FAKE)
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(obj) && sd->type != ELM_WIN_FAKE)
+ //if (sd->type != EFL_UI_WIN_TYPE_FAKE)
+ //
{
Efl_Ui_Focus_Manager *man = sd->obj;
while(efl_ui_focus_manager_redirect_get(man))
Evas_Object *focused = efl_ui_focus_manager_focus_get(man);
efl_ui_focus_object_focus_set(focused, EINA_FALSE);
}
- */
/* do nothing */
/* if (sd->img_obj) */
/* { */
if (!efl_ui_focus_object_on_focus_update(efl_super(obj, MY_CLASS)))
return EINA_TRUE;
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ Eina_Bool focused;
+ if (elm_widget_is_legacy(obj))
+ focused = elm_widget_focus_get(obj);
+ else
+ focused = efl_ui_focus_object_focus_get(obj);
+
if (sd->img_obj)
- evas_object_focus_set(sd->img_obj, efl_ui_focus_object_focus_get(obj));
+ evas_object_focus_set(sd->img_obj, focused);
else
- evas_object_focus_set(obj, efl_ui_focus_object_focus_get(obj));
+ evas_object_focus_set(obj, focused);
+ /*
+ if (sd->img_obj)
+ evas_object_focus_set(sd->img_obj, efl_ui_focus_object_focus_get(obj));
+ else
+ evas_object_focus_set(obj, efl_ui_focus_object_focus_get(obj));
+ */
+ //
return EINA_TRUE;
}
focus_dir = EFL_UI_FOCUS_DIRECTION_DOWN;
else return EINA_FALSE;
- //TIZEN_ONLY(20180607): Restore legacy focus
- efl_ui_widget_focus_cycle(obj, focus_dir);
- /*
+
// The handling for legacy is different due to elm_object_next set
if (elm_widget_is_legacy(obj))
- elm_object_focus_next(obj, focus_dir);
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ //elm_object_focus_next(obj, focus_dir);
+ efl_ui_widget_focus_cycle(obj, focus_dir);
+ //
else
{
Efl_Ui_Widget *o;
}
}
}
- */
+
return EINA_TRUE;
}
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
- /* TIZEN_ONLY(20180607): Restore legacy focus
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(data))
+ {
+ efl_ui_widget_focus_hide_handle(data);
+ return;
+ }
+ //
Efl_Ui_Win *real_win = elm_widget_top_get(data);
efl_ui_focus_manager_redirect_set(real_win, NULL);
- */
- efl_ui_widget_focus_hide_handle(data);
- //
}
static void
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
- /* TIZEN_ONLY(20180607): Restore legacy focus
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(data))
+ {
+ efl_ui_widget_focus_steal(data, NULL);
+ return;
+ }
+ //
Efl_Ui_Win *real_win = elm_widget_top_get(data);
efl_ui_focus_manager_redirect_set(real_win, data);
efl_ui_focus_manager_focus_set(data, efl_ui_focus_manager_root_get(data));
- */
- efl_ui_widget_focus_steal(data, NULL);
- //
}
static void
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
- /* TIZEN_ONLY(20180607): Restore legacy focus
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(data))
+ {
+ efl_ui_widget_focused_object_clear(data);
+ return;
+ }
+ //
Efl_Ui_Win *real_win = elm_widget_top_get(data);
efl_ui_focus_manager_redirect_set(real_win, NULL);
- */
- efl_ui_widget_focused_object_clear(data);
- //
}
static void
elm_win_focus_get(const Efl_Ui_Win *obj)
{
EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(obj, MY_CLASS), EINA_FALSE);
- /* TIZEN_ONLY(20180607): Restore legacy focus
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj))
+ {
+ ELM_WIN_DATA_GET_OR_RETURN(obj, sd, EINA_FALSE);
+ return ecore_evas_focus_get(sd->ee);
+ }
return efl_ui_focus_object_focus_get(obj);
- */
- ELM_WIN_DATA_GET_OR_RETURN(obj, sd, EINA_FALSE);
- return ecore_evas_focus_get(sd->ee);
- //
}
EAPI Eina_Bool
that it's not covered by any other window.]]
Efl.Gfx.Stack.lower_to_bottom; [[This action is ignored by the Window.]]
Efl.Ui.Widget.theme_apply;
- @empty Efl.Ui.Focus.Object.focus { get; }
+ Efl.Ui.Focus.Object.focus { get; }
Efl.Ui.Focus.Object.on_focus_update;
Efl.Ui.Widget.widget_input_event_handler;
- @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create;
+ Efl.Ui.Widget_Focus_Manager.focus_manager_create;
Efl.Access.Object.state_set { get; }
Efl.Access.Object.i18n_name { get; }
Efl.Access.Component.extents { get; }
_elm_hoversel_item_elm_widget_item_item_focus_get(const Eo *eo_it EINA_UNUSED,
Elm_Hoversel_Item_Data *it)
{
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(VIEW(it)))
+ return elm_widget_focus_get(VIEW(it));
+ //
+
return efl_ui_focus_object_focus_get(VIEW(it));
}
evas_object_smart_callback_add(bt, "clicked", _on_item_clicked, item);
//TIZEN_ONLY(20180607): Restore legacy focus
- evas_object_smart_callback_add(bt, "focused", _item_focused_cb, item);
- evas_object_smart_callback_add(bt, "unfocused", _item_unfocused_cb, item);
+ if (elm_widget_is_legacy(bt))
+ {
+ evas_object_smart_callback_add(bt, "focused", _item_focused_cb, item);
+ evas_object_smart_callback_add(bt, "unfocused", _item_unfocused_cb, item);
+ }
+ else
//
- efl_event_callback_add(bt, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _item_focus_changed, item);
+ efl_event_callback_add(bt, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _item_focus_changed, item);
sd->items = eina_list_append(sd->items, eo_item);
static void
_prev_page_focus_recover(Elm_Naviframe_Item_Data *it)
{
- /* TIZEN_ONLY(20180607): Restore legacy focus
- Elm_Naviframe *n = it->base->widget;
- efl_ui_focus_manager_focus_set(efl_ui_focus_object_focus_manager_get(n), n);
- */
- Evas_Object *newest;
- unsigned int order = 0;
-
- newest = efl_ui_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE);
- if (newest)
- elm_object_focus_set(newest, EINA_TRUE);
- else
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(it->base->widget))
{
- if (elm_object_focus_allow_get(VIEW(it)))
- elm_object_focus_set(VIEW(it), EINA_TRUE);
+ Evas_Object *newest;
+ unsigned int order = 0;
+
+ newest = efl_ui_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE);
+ if (newest)
+ elm_object_focus_set(newest, EINA_TRUE);
else
- elm_object_focus_set(WIDGET(it), EINA_TRUE);
+ {
+ 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);
+ }
+ return;
}
//
+ Elm_Naviframe *n = it->base->widget;
+ efl_ui_focus_manager_focus_set(efl_ui_focus_object_focus_manager_get(n), n);
}
EOLIAN static void
evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_on_obj_size_hints_changed, obj);
+ elm_widget_can_focus_set(obj, EINA_FALSE);
//TIZEN_ONLY(20180607): Restore legacy focus
- //elm_widget_can_focus_set(obj, EINA_FALSE);
- elm_widget_can_focus_set(obj, EINA_TRUE);
+ if (elm_widget_is_legacy(obj))
+ elm_widget_can_focus_set(obj, EINA_TRUE);
//
}
ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_item, top_item);
//TIZEN_ONLY(20180607): Restore legacy focus
- if (top_item)
+ if (top_item && elm_widget_is_legacy(obj))
efl_ui_widget_focused_object_clear(VIEW(top_item));
//
_resize_object_reset(obj, item);
if (top_inserted)
{
//TIZEN_ONLY(20180607): Restore legacy focus
- efl_ui_widget_focused_object_clear(VIEW(after));
+ if (elm_widget_is_legacy(obj))
+ efl_ui_widget_focused_object_clear(VIEW(after));
//
elm_widget_tree_unfocusable_set(VIEW(after), EINA_TRUE);
_resize_object_reset(obj, it);
efl_event_callback_array_add(priv->notify, _notify_cb(), obj);
//TIZEN_ONLY(20180607): Restore legacy focus
- elm_widget_can_focus_set(obj, EINA_TRUE);
- elm_widget_can_focus_set(priv->main_layout, EINA_TRUE);
+ if (elm_widget_is_legacy(obj))
+ {
+ elm_widget_can_focus_set(obj, EINA_TRUE);
+ elm_widget_can_focus_set(priv->main_layout, EINA_TRUE);
+ }
//
_populate_theme_scroll(priv);
if (cursor_pos) elm_entry_cursor_pos_set(obj, cursor_pos);
- if (efl_ui_focus_object_focus_get(obj))
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ Eina_Bool focused;
+ if (elm_widget_is_legacy(obj))
+ focused = elm_widget_focus_get(obj);
+ else
+ focused = efl_ui_focus_object_focus_get(obj);
+
+ if (focused)
+ //if (efl_ui_focus_object_focus_get(obj))
+ //
{
edje_object_signal_emit(sd->entry_edje, "elm,action,focus", "elm");
if (sd->scroll)
if (top && efl_isa(top, EFL_UI_WIN_CLASS))
top_is_win = EINA_TRUE;
- if (efl_ui_focus_object_focus_get(obj) && sd->editable)
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ Eina_Bool focused = EINA_FALSE;
+ if (elm_widget_is_legacy(obj))
+ focused = elm_widget_focus_get(obj);
+ else
+ focused = efl_ui_focus_object_focus_get(obj);
+
+ if (focused && sd->editable)
+ //if (efl_ui_focus_object_focus_get(obj) && sd->editable)
+ //
{
evas_object_focus_set(sd->entry_edje, EINA_TRUE);
edje_object_signal_emit(sd->entry_edje, "elm,action,focus", "elm");
(sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN);
sd->cur_changed = EINA_TRUE;
- if (efl_ui_focus_object_focus_get(data))
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ Eina_Bool focused;
+ if (elm_widget_is_legacy(data))
+ focused = elm_widget_focus_get(data);
+ else
+ focused = efl_ui_focus_object_focus_get(data);
+ if (focused)
+ //if (efl_ui_focus_object_focus_get(data))
+ //
edje_object_signal_emit(sd->entry_edje, "elm,action,show,cursor", "elm");
_cursor_geometry_recalc(data);
efl_ui_widget_theme_apply(obj);
_elm_entry_focus_update(obj, sd);
- /* TIZEN_ONLY(20180607): Restore legacy focus
- //legacy focus event emission
- if (efl_ui_focus_object_focus_get(obj))
- evas_object_smart_callback_call(obj, "focused", NULL);
- else
- evas_object_smart_callback_call(obj, "unfocused", NULL);
- */
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(obj))
+ //
+ {
+ //legacy focus event emission
+ if (efl_ui_focus_object_focus_get(obj))
+ evas_object_smart_callback_call(obj, "focused", NULL);
+ else
+ evas_object_smart_callback_call(obj, "unfocused", NULL);
+ }
elm_drop_target_del(obj, sd->drop_format,
_dnd_enter_cb, NULL,
_dnd_leave_cb, NULL,
elm_object_focus_next(Evas_Object *obj,
Elm_Focus_Direction dir)
{
- //TIZEN_ONLY(20180607): Restore legacy focus
- /*
Eina_Bool legacy_focus_move = EINA_FALSE;
Efl_Ui_Widget *o = NULL, *top;
Efl_Ui_Focus_Object *logical;
Efl_Ui_Focus_Manager *manager_top;
API_ENTRY()
-
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ /*
top = elm_object_top_widget_get(obj);
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(top, EFL_UI_WIN_CLASS));
}
}
*/
- EINA_SAFETY_ON_NULL_RETURN(obj);
efl_ui_widget_focus_cycle(obj, dir);
//
}
elm_object_focus_next_object_get(const Evas_Object *obj,
Elm_Focus_Direction dir)
{
- //TIZEN_ONLY(20180607): Restore legacy focus
- /*
Efl_Ui_Widget *top = elm_object_top_widget_get(obj);
API_ENTRY_VAL(NULL)
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ /*
#define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) return pd->legacy_focus.field;
MAPPING()
return efl_ui_focus_manager_request_move(efl_ui_focus_util_active_manager(top), dir, NULL, EINA_FALSE);
*/
- EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
return efl_ui_widget_focus_next_object_get(obj, dir);
//
}
EAPI Eina_Bool
elm_object_focus_get(const Evas_Object *obj)
{
- /* TIZEN_ONLY(20180607): Restore legacy focus
- API_ENTRY_VAL(EINA_FALSE)
+ //TIZEN_ONLY(20181205): disable focus manager stuff
+ //API_ENTRY_VAL(EINA_FALSE)
if (!elm_widget_is(obj))
return evas_object_focus_get(obj);
- return _elm_widget_top_win_focused_get(obj) && (efl_ui_focus_object_child_focus_get(obj) | efl_ui_focus_object_focus_get(obj));
- */
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
- return elm_widget_focus_get(obj);
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj))
+ return elm_widget_focus_get(obj);
//
+
+ return _elm_widget_top_win_focused_get(obj) && (efl_ui_focus_object_child_focus_get(obj) | efl_ui_focus_object_focus_get(obj));
}
EAPI void
}
else if (elm_widget_is(obj))
{
- if (focus == elm_widget_focus_get(obj)) return;
+ if (elm_widget_is_legacy(obj))
+ {
+ if (focus == elm_widget_focus_get(obj)) return;
+
+ if (focus)
+ efl_ui_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
+ else
+ efl_ui_widget_focused_object_clear(obj);
+ return;
+ }
- if (focus)
- efl_ui_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
- else
- efl_ui_widget_focused_object_clear(obj);
- /* TIZEN_ONLY(20191021): disable focus manager
if (focus)
efl_ui_focus_util_focus(obj);
else
if (efl_ui_focus_manager_focus_get(efl_ui_focus_object_focus_manager_get(obj)) == obj)
efl_ui_focus_manager_pop_history_stack(efl_ui_focus_object_focus_manager_get(obj));
}
- */
}
else
{
legacy_efl_ui_focus_manager_widget_legacy_signals(Efl_Ui_Focus_Manager *manager, Efl_Ui_Focus_Manager *emittee)
{
//TIZEN_ONLY(20180607): disable focus manager stuff
- return;
+ if (elm_widget_is_legacy(manager))
+ return;
//
Legacy_Manager_Focus_State *state = calloc(1, sizeof(Legacy_Manager_Focus_State));
legacy_child_focus_handle(Efl_Ui_Focus_Object *object)
{
//TIZEN_ONLY(20180607): disable focus manager stuff
- return;
+ if (elm_widget_is_legacy(object))
+ return;
//
Legacy_Object_Focus_State *state = calloc(1, sizeof(Legacy_Object_Focus_State));
legacy_object_focus_handle(Efl_Ui_Focus_Object *object)
{
//TIZEN_ONLY(20180607): disable focus manager stuff
- return;
+ if (elm_widget_is_legacy(object))
+ return;
//
efl_event_callback_add(object, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _focus_event_changed, NULL);
static void
_flush_focus_on_realization(Eo *widget, Elm_Gen_Item *it)
{
- //TIZEN_ONLY(20191021): disable focus manager
- return;
- //
-
ELM_GENGRID_DATA_GET_OR_RETURN(widget, sd);
if (sd->focus_on_realization == it)
_elm_gengrid_item_index_update(it);
efl_event_callback_legacy_call
(WIDGET(it), ELM_GENGRID_EVENT_REALIZED, EO_OBJ(it));
- _flush_focus_on_realization(WIDGET(it), it);
+ //TIZEN_ONLY(20181205): disable focus manager stuff
+ //_flush_focus_on_realization(WIDGET(it), it);
+ if (!elm_widget_is_legacy(WIDGET(it)))
+ _flush_focus_on_realization(WIDGET(it), it);
}
if (it->parent)
{
_elm_gengrid_item_index_update(it);
efl_event_callback_legacy_call
(WIDGET(it), ELM_GENGRID_EVENT_REALIZED, EO_OBJ(it));
- _flush_focus_on_realization(WIDGET(it), it);
+ //TIZEN_ONLY(20181205): disable focus manager stuff
+ //_flush_focus_on_realization(WIDGET(it), it);
+ if (!elm_widget_is_legacy(WIDGET(it)))
+ _flush_focus_on_realization(WIDGET(it), it);
}
//TIZEN_ONLY(20170131): Group on Top Feature is not tizen UI.
/*
y += page_y;
}
}
+
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ else if (!elm_widget_is_legacy(obj))
+ {
+ if (_get_direction(dir, &direction))
+ {
+ if (mirrored)
+ {
+ if (direction == ELM_FOCUS_RIGHT || direction == ELM_FOCUS_LEFT)
+ direction = _direction_mirror(direction);
+ }
+ if (sd->reorder_mode)
+ {
+ return _reorder_helper(sd, direction);
+ }
+ else
+ {
+ Evas_Object *next = NULL;
+ next = elm_object_item_focus_next_object_get(sd->focused_item,
+ ELM_FOCUS_LEFT);
+ if (next)
+ {
+ elm_object_focus_set(next, EINA_TRUE);
+ return EINA_TRUE;
+ }
+ }
+ return _focus_move(obj, sd, direction);
+
+ }
+ else if (_get_multi_direction(dir, &direction))
+ {
+ if (mirrored)
+ {
+ if (direction == ELM_FOCUS_RIGHT || direction == ELM_FOCUS_LEFT)
+ direction = _direction_mirror(direction);
+ }
+ if (direction == ELM_FOCUS_LEFT || direction == ELM_FOCUS_RIGHT)
+ {
+ if (_elm_gengrid_item_edge_check(sd->focused_item, direction))
+ return EINA_FALSE;
+ }
+ if (_item_multi_select(sd, direction)) return EINA_TRUE;
+ else if (_selection_single_move(obj, sd, direction)) return EINA_TRUE;
+ else return EINA_FALSE;
+ }
+ else
+ return EINA_FALSE;
+ }
else if ((!strcmp(dir, "left") && !mirrored) ||
(!strcmp(dir, "right") && mirrored))
{
int_ret = efl_ui_focus_object_on_focus_update(efl_super(obj, MY_CLASS));
if (!int_ret) return EINA_FALSE;
+ //Fallback Legacy Focus
+ if (!elm_widget_is_legacy(obj)) return EINA_TRUE;
+
if (elm_widget_focus_get(obj) && (sd->selected) &&
(!sd->last_selected_item))
{
EOLIAN static Eina_Bool
_elm_gengrid_efl_ui_widget_focus_next_manager_is(Eo *obj, Elm_Gengrid_Data *_pd EINA_UNUSED)
{
- return _elm_gengrid_smart_focus_next_enable;
+ //Fallback Legacy Focus
+ if (elm_widget_is_legacy(obj)) return _elm_gengrid_smart_focus_next_enable;
+ else return efl_ui_widget_focus_next_manager_is(efl_super(obj, MY_CLASS));
}
EOLIAN static Eina_Bool
Eina_List *items = NULL;
Elm_Gen_Item *it;
+ //Fallback Legacy Focus
+ if (!elm_widget_is_legacy(obj))
+ return efl_ui_widget_focus_next(efl_super(obj, MY_CLASS), dir, next, next_item);
+
EINA_INLIST_FOREACH(sd->items, it)
{
if (it->realized)
EOLIAN static Eina_Bool
_elm_gengrid_efl_ui_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *_pd EINA_UNUSED)
{
- return EINA_TRUE;
+ //Fallback Legacy Focus
+ if (!elm_widget_is_legacy(obj))
+ return efl_ui_widget_focus_direction_manager_is(efl_super(obj, MY_CLASS));
+ else return EINA_TRUE;
}
EOLIAN static Eina_Bool
Eina_Bool ret = EINA_FALSE;
double c_weight = 0.0;
+ //Fallback Legacy Focus
+ if (!elm_widget_is_legacy(obj))
+ return efl_ui_widget_focus_direction(efl_super(obj, MY_CLASS), base, degree, direction, direction_item, weight);
+
items = elm_gengrid_realized_items_get(obj);
eo_item = elm_object_focused_item_get(base);
if (eo_item)
sd->focus_on_realization = it;
}
*/
- _elm_gengrid_item_focused(eo_it);
+ if (elm_widget_is_legacy(obj))
+ _elm_gengrid_item_focused(eo_it);
+ else
+ {
+ if (it->realized)
+ {
+ _elm_gengrid_item_focused(eo_it);
+ sd->focus_on_realization = NULL;
+ efl_ui_focus_manager_focus_set(obj, eo_it);
+ }
+ else
+ {
+ sd->focus_on_realization = it;
+ }
+ }
}
}
else
{
Elm_Object_Item *eo_it = NULL;
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj)) return;
+ //
+
if (!pd->items)
{
efl_ui_focus_manager_setup_on_first_touch(efl_super(obj, MY_CLASS), direction, entry);
obj = efl_constructor(efl_super(obj, MY_CLASS));
- sd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_GEN_CLASS, 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));
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(obj))
+ //
+ {
+ sd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_GEN_CLASS, 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_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _gengrid_element_focused, obj);
+ }
sd->obj = obj;
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_TREE_TABLE);
- efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _gengrid_element_focused, obj);
return obj;
}
Elm_Gen_Item *item;
Eina_List *order = NULL;
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj)) return;
+ //
+
if (!pd->order_dirty) return;
pd->order_dirty = EINA_FALSE;
EOLIAN static Eina_Bool
_elm_gengrid_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Gengrid_Data *pd EINA_UNUSED, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect EINA_UNUSED)
{
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj)) return EINA_FALSE;
+ //
+
return efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, obj);
}
Eina_List *n;
Efl_Ui_Widget *wid;
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj)) return;
+ //
+
EINA_LIST_FOREACH(pd->contents, n, wid)
{
if (efl_isa(wid, EFL_UI_WIDGET_CLASS))
if (content != old)
{
//TIZEN_ONLY(20180607): Restore legacy focus
- //eina_hash_add(sd->content_item_map, &content, it->base->eo_obj);
+ if (!elm_widget_is_legacy(sd->obj))
//
+ eina_hash_add(sd->content_item_map, &content, it->base->eo_obj);
// FIXME: Genlist item doesn't update its size when the size of
// content is changed, so deferred calculation for content should
// be performed before realization.
*contents = eina_list_remove(*contents, old);
evas_object_del(old);
//TIZEN_ONLY(20180607): Restore legacy focus
- //eina_hash_del_by_key(sd->content_item_map, &old);
+ if (!elm_widget_is_legacy(sd->obj))
//
+ eina_hash_del_by_key(sd->content_item_map, &old);
}
}
}
{
*cache = eina_list_append(*cache, content);
//TIZEN_ONLY(20180607): Restore legacy focus
- //eina_hash_del_by_key(pd->content_item_map, &content);
- //elm_widget_tree_unfocusable_set(content, EINA_TRUE);
+ if (!elm_widget_is_legacy(pd->obj))
+ {
+ eina_hash_del_by_key(pd->content_item_map, &content);
+ elm_widget_tree_unfocusable_set(content, EINA_TRUE);
+ }
//
}
Eina_Bool int_ret = EINA_FALSE;
Elm_Object_Item *eo_it = NULL;
Eina_Bool is_sel = EINA_FALSE;
+ Eina_Bool focused;
int_ret = efl_ui_focus_object_on_focus_update(efl_super(obj, MY_CLASS));
if (!int_ret) return EINA_FALSE;
sd->last_selected_item = eina_list_data_get(sd->selected);
}
*/
+ if (elm_widget_is_legacy(obj))
+ focused = elm_widget_focus_get(obj);
+ else
+ focused = efl_ui_focus_object_focus_get(obj);
- if (elm_widget_focus_get(obj) && (sd->items) && (sd->selected) &&
+ if (focused && (sd->items) && (sd->selected) &&
(!sd->last_selected_item))
{
sd->last_selected_item = eina_list_data_get(sd->selected);
}
- if (elm_widget_focus_get(obj) && !sd->mouse_down)
+ if (!elm_widget_is_legacy(obj))
+ return EINA_TRUE;
+
+ if (focused && !sd->mouse_down)
{
if (sd->last_focused_item)
eo_it = sd->last_focused_item;
else
elm_object_item_focus_set(eo_it, EINA_TRUE);
_elm_widget_focus_highlight_start(obj);
+ //set it again in the manager, there might be the case that the manager focus history and internal item foused logic are in different states
+ if (!elm_widget_is_legacy(obj) && efl_ui_focus_manager_request_subchild(obj, eo_it))
+ efl_ui_focus_manager_focus_set(obj, eo_it);
}
}
}
EOLIAN static Eina_Bool
_elm_genlist_efl_ui_widget_focus_next_manager_is(Eo *obj, Elm_Genlist_Data *_pd EINA_UNUSED)
{
- return _elm_genlist_smart_focus_next_enable;
+ //Fallback Legacy Focus
+ if (elm_widget_is_legacy(obj))
+ return _elm_genlist_smart_focus_next_enable;
+ else return efl_ui_widget_focus_next_manager_is(efl_super(obj, ELM_GENLIST_CLASS));
}
EOLIAN static Eina_Bool
_elm_genlist_efl_ui_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Genlist_Data *_pd EINA_UNUSED)
{
- return EINA_FALSE;
+ //Fallback Legacy Focus
+ if (elm_widget_is_legacy(obj))
+ return EINA_FALSE;
+ else return efl_ui_widget_focus_direction_manager_is(efl_super(obj, ELM_GENLIST_CLASS));
}
EOLIAN static Eina_Bool
Eina_Bool done = EINA_FALSE;
int ret;
+ //Fallback Legacy Focus
+ if (!elm_widget_is_legacy(obj))
+ return efl_ui_widget_focus_next(efl_super(obj, ELM_GENLIST_CLASS), dir, next, next_item);
+
evas_object_geometry_get(sd->obj, &sx, &sy, &sw, &sh);
EINA_INLIST_FOREACH(sd->blocks, itb)
legacy_efl_ui_focus_manager_widget_legacy_signals(obj, obj);
obj = efl_constructor(efl_super(obj, MY_CLASS));
- sd->content_item_map = eina_hash_pointer_new(NULL);
- sd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_GEN_CLASS, 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));
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(obj))
+ //
+ {
+ sd->content_item_map = eina_hash_pointer_new(NULL);
+ sd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_GEN_CLASS, 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_logical_mode_set(obj, EINA_TRUE);
+
+ efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _genlist_element_focused, obj);
+ }
sd->obj = obj;
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_LIST);
- efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _genlist_element_focused, obj);
-
return obj;
}
if (!(sd->focus_on_selection_enabled || _elm_config->item_select_on_focus_disable))
{
//TIZEN_ONLY(20180607): Restore legacy focus
- //efl_ui_focus_manager_focus_set(obj, it->base->eo_obj);
- Evas_Object *swallow_obj;
- Eina_List *l;
-
- EINA_LIST_FOREACH(it->contents, l, swallow_obj)
+ if (elm_widget_is_legacy(obj))
{
- if (elm_widget_is(swallow_obj) && elm_object_focus_get(swallow_obj))
+ Evas_Object *swallow_obj;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(it->contents, l, swallow_obj)
{
- elm_object_focus_set(obj, EINA_FALSE);
- elm_object_focus_set(obj, EINA_TRUE);
- break;
+ if (elm_widget_is(swallow_obj) && elm_object_focus_get(swallow_obj))
+ {
+ elm_object_focus_set(obj, EINA_FALSE);
+ elm_object_focus_set(obj, EINA_TRUE);
+ break;
+ }
}
+ goto item_deleted;
}
//
+ efl_ui_focus_manager_focus_set(obj, it->base->eo_obj);
}
item_deleted:
}
else
{
- if (!efl_ui_focus_object_focus_get(obj))
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ Eina_Bool focused;
+ if (elm_widget_is_legacy(obj))
+ focused = elm_widget_focus_get(obj);
+ else
+ focused = efl_ui_focus_object_focus_get(obj);
+ if (!focused)
+ //if (!efl_ui_focus_object_focus_get(obj))
+ //
return;
_elm_genlist_item_unfocused(eo_it);
}
_elm_genlist_efl_object_provider_find(const Eo *obj, Elm_Genlist_Data *pd, const Efl_Object *klass)
{
//TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(obj) && (klass == EFL_UI_FOCUS_PARENT_PROVIDER_INTERFACE))
//if (klass == EFL_UI_FOCUS_PARENT_PROVIDER_INTERFACE)
- // return pd->provider;
+ //
+ return pd->provider;
return efl_provider_find(efl_super(obj, ELM_GENLIST_CLASS), klass);
}
Eina_List *n;
Efl_Ui_Widget *wid;
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj)) return;
+ //
+
EINA_LIST_FOREACH(pd->contents, n, wid)
{
if (efl_isa(wid, EFL_UI_WIDGET_CLASS))
EOLIAN static Eina_Bool
_elm_genlist_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Genlist_Data *pd EINA_UNUSED, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect EINA_UNUSED)
{
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj)) return EINA_FALSE;
+ //
+
return efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, obj);
}
EOLIAN static Eina_Iterator*
_elm_interface_scrollable_efl_ui_focus_manager_border_elements_get(const Eo *obj, Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED)
{
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj)) return NULL;
+ //
Eina_Iterator *border_elements;
Eina_Rectangle *rect = calloc(1, sizeof(Eina_Rectangle));
implements {
class.constructor;
Efl.Object.constructor;
- @empty Efl.Ui.Focus.Manager.border_elements { get; }
- @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create;
+ Efl.Ui.Focus.Manager.border_elements { get; }
+ Efl.Ui.Widget_Focus_Manager.focus_manager_create;
Efl.Ui.I18n.mirrored { set; }
}
events {
if (!_elm_config->item_select_on_focus_disable && is_sel)
elm_list_item_selected_set(EO_OBJ(it), EINA_TRUE);
else
- //TIZEN_ONLY(20180607): Restore legacy focus
- //_elm_list_item_focused(EO_OBJ(it));
- elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
+ {
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(WIDGET(it)))
+ elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
+ else
+ //
+ _elm_list_item_focused(EO_OBJ(it));
+ }
}
}
}
(it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb,
obj);
//TIZEN_ONLY(20180607): Restore legacy focus
- //elm_widget_tree_unfocusable_set(it->icon, EINA_TRUE);
+ if (!elm_widget_is_legacy(obj))
//
+ elm_widget_tree_unfocusable_set(it->icon, EINA_TRUE);
}
if (it->end)
{
(it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb,
obj);
//TIZEN_ONLY(20180607): Restore legacy focus
- //elm_widget_tree_unfocusable_set(it->end, EINA_TRUE);
+ if (!elm_widget_is_legacy(obj))
//
+ elm_widget_tree_unfocusable_set(it->end, EINA_TRUE);
}
if (_elm_atspi_enabled())
#define TIZEN_PROFILE_WEARABLE (__builtin_expect(_tizen_profile_wearable != -1, 1)?_tizen_profile_wearable:tizen_util_probe_profile_wearable())
//
-//TIZEN_ONLY(20191021): disable focus manager
-#define efl_ui_focus_object_focus_get elm_widget_focus_get
-
/***********************************************************************************
* TIZEN_ONLY_FEATURE: apply Tizen's color_class features. *
***********************************************************************************/
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_SCROLL_PANE);
- efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _focused_element, obj);
- legacy_efl_ui_focus_manager_widget_legacy_signals(obj, obj);
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(obj))
+ {
+ efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _focused_element, obj);
+ legacy_efl_ui_focus_manager_widget_legacy_signals(obj, obj);
+ }
return obj;
}
if (!sd->entry_visible) return;
//TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(obj))
evas_object_smart_callback_del_full(sd->ent, "unfocused",
_entry_unfocused_cb, obj);
+ else
+ efl_event_callback_del(sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
+ _entry_focus_change, obj);
//
- efl_event_callback_del
- (sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _entry_focus_change, obj);
_entry_hide(obj);
str = elm_object_text_get(sd->ent);
if (!str) return;
_entry_show(sd);
elm_entry_select_all(sd->ent);
//TIZEN_ONLY(20180607): Restore legacy focus
- elm_widget_focus_set(sd->ent, EINA_TRUE);
+ if (elm_widget_is_legacy(sd->ent))
+ elm_widget_focus_set(sd->ent, EINA_TRUE);
//
sd->entry_visible = EINA_TRUE;
}
- efl_event_callback_add
- (sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _entry_focus_change, obj);
//TIZEN_ONLY(20180607): Restore legacy focus
- evas_object_smart_callback_add(sd->ent, "unfocused", _entry_unfocused_cb, obj);
+ if (elm_widget_is_legacy(sd->ent))
+ evas_object_smart_callback_add(sd->ent, "unfocused", _entry_unfocused_cb, obj);
+ else
//
+ efl_event_callback_add
+ (sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _entry_focus_change, obj);
sd->entry_visible = EINA_TRUE;
elm_layout_signal_emit(obj, "elm,state,entry,active", "elm");
evas_object_show(sd->ent);
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(obj))
+ //
{
Eina_List *items = NULL;
items = eina_list_append(items, sd->inc_button);
efl_ui_focus_composition_elements_set(obj, items);
+
+ efl_ui_focus_manager_focus_set(efl_ui_focus_object_focus_manager_get(obj), sd->ent);
}
- efl_ui_focus_manager_focus_set(efl_ui_focus_object_focus_manager_get(obj), sd->ent);
}
}
elm_layout_content_set(obj, "elm.swallow.dec_button", priv->dec_button);
elm_widget_sub_object_add(obj, priv->dec_button);
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (!elm_widget_is_legacy(obj))
+ //
{
Eina_List *items = NULL;
if (!int_ret) return EINA_FALSE;
if (!sd->items) return EINA_FALSE;
- if (efl_ui_focus_object_focus_get(obj))
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ Eina_Bool focused = EINA_FALSE;
+ if (elm_widget_is_legacy(obj))
+ focused = elm_widget_focus_get(obj);
+ else
+ focused = efl_ui_focus_object_focus_get(obj);
+
+ if (focused)
+ //if (efl_ui_focus_object_focus_get(obj))
+ //
{
evas_object_focus_set(wd->resize_obj, EINA_TRUE);
if (sd->mouse_down) return EINA_TRUE;
if (eo_it)
_elm_toolbar_item_unfocused(eo_it);
}
-
//TIZEN_ONLY(20180607): Restore legacy focus
- //evas_object_focus_set(VIEW(it), focused);
+ if (!elm_widget_is_legacy(obj))
//
+ evas_object_focus_set(VIEW(it), focused);
_elm_widget_item_highlight_in_theme(obj, EO_OBJ(it));
_elm_widget_highlight_in_theme_update(obj);
Eo *logical_child;
Elm_Widget_Item_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(wpd->widget)) return;
+ //
+
efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, MY_CLASS));
if (!pd->realized)
Elm_Widget_Item_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
Eo *ret = efl_constructor(efl_super(obj, MY_CLASS));
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(wpd->widget)) return ret;
+ //
+
if (efl_isa(wpd->widget, ELM_GENLIST_CLASS))
{
efl_event_callback_add(wpd->widget, ELM_GENLIST_EVENT_REALIZED, _list_realized_cb, obj);
_elm_widget_item_static_focus_efl_object_destructor(Eo *obj, Elm_Widget_Item_Static_Focus_Data *pd EINA_UNUSED)
{
Elm_Widget_Item_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
+
+ //TIZEN_ONLY(20180607): Restore legacy focus
+ if (elm_widget_is_legacy(wpd->widget))
+ return efl_destructor(efl_super(obj, MY_CLASS));
+ //
+
if (efl_isa(wpd->widget, ELM_GENLIST_CLASS))
{
efl_event_callback_del(wpd->widget, ELM_GENLIST_EVENT_REALIZED, _list_realized_cb, obj);
EOLIAN static void
_elm_genlist_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen_Item *pd)
{
- return;
+ Eina_List *n;
+ Efl_Ui_Widget*wid;
+
+ if (elm_widget_is_legacy(WIDGET(pd))) return;
+// _item_realize(pd, EINA_FALSE);
+
+ EINA_LIST_FOREACH(pd->contents, n, wid)
+ {
+ if (efl_isa(wid, EFL_UI_WIDGET_CLASS))
+ _elm_widget_full_eval(wid);
+ }
+
+ efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, ELM_GENLIST_ITEM_CLASS));
}
EOLIAN static Eina_Bool
_elm_genlist_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Genlist_Data *pd EINA_UNUSED, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect EINA_UNUSED)
{
- return EINA_FALSE;
+ return efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, obj);
}
// TIZEN only (20150914) : Accessibility: updated highlight change during genlist and list scroll