From b704db8f0780868c1a6f039c2e09e291f3387308 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 27 Feb 2019 14:00:39 -0500 Subject: [PATCH] efl_ui_widget: move focus_highlight to the window summary_: the widget implementation just redirected calls from efl_ui_widget to efl_ui_win. Which makes the properties unncessesary on the widget. This commit moves them now to the window. The legacy implementation of the window can now go away, as this is taken care of by eolian directly. ref T7553 Depends on D8017 Reviewers: woohyun Reviewed By: woohyun Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7553 Reviewed-by: WooHyun Jung Differential Revision: https://phab.enlightenment.org/D8025 --- src/lib/elementary/efl_ui_widget.c | 68 -------------------------- src/lib/elementary/efl_ui_widget.eo | 76 ----------------------------- src/lib/elementary/efl_ui_win.c | 67 +++---------------------- src/lib/elementary/efl_ui_win.eo | 61 +++++++++++++++++++++-- src/lib/elementary/elm_gengrid.c | 9 ++-- src/lib/elementary/elm_genlist.c | 9 ++-- src/lib/elementary/elm_list.c | 6 ++- src/lib/elementary/elm_main.c | 4 +- src/lib/elementary/elm_toolbar.c | 6 ++- src/lib/elementary/elm_win_legacy.h | 65 +----------------------- 10 files changed, 89 insertions(+), 282 deletions(-) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index d390d729a4..8d2310fd20 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -266,74 +266,6 @@ _efl_ui_widget_focus_highlight_object_get(const Evas_Object *obj) return NULL; } -EOLIAN static Eina_Bool -_efl_ui_widget_focus_highlight_enabled_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED) -{ - // Forward to closest parent Window - const Evas_Object *win = elm_widget_top_get(obj); - - if (win && efl_isa(win, EFL_UI_WIN_CLASS)) - return elm_win_focus_highlight_enabled_get(win); - - return EINA_FALSE; -} - -EOLIAN static void -_efl_ui_widget_focus_highlight_enabled_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, Eina_Bool enable) -{ - // Forward to closest parent Window - Evas_Object *win = elm_widget_top_get(obj); - - if (win && efl_isa(win, EFL_UI_WIN_CLASS)) - elm_win_focus_highlight_enabled_set(win, enable); -} - -EOLIAN static Eina_Bool -_efl_ui_widget_focus_highlight_animate_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED) -{ - // Forward to closest parent Window - const Evas_Object *win = elm_widget_top_get(obj); - - if (win && efl_isa(win, EFL_UI_WIN_CLASS)) - return elm_win_focus_highlight_animate_get(win); - - return EINA_FALSE; -} - -EOLIAN static void -_efl_ui_widget_focus_highlight_animate_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, Eina_Bool enable) -{ - // Forward to closest parent Window - Evas_Object *win = elm_widget_top_get(obj); - - if (win && efl_isa(win, EFL_UI_WIN_CLASS)) - elm_win_focus_highlight_animate_set(win, enable); -} - -EOLIAN static Eina_Bool -_efl_ui_widget_focus_highlight_style_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, const char *style) -{ - // Forward to closest parent Window - Evas_Object *win = elm_widget_top_get(obj); - - if (win && efl_isa(win, EFL_UI_WIN_CLASS)) - return efl_ui_widget_focus_highlight_style_set(win, style); - - return EINA_FALSE; -} - -EOLIAN static const char * -_efl_ui_widget_focus_highlight_style_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED) -{ - // Forward to closest parent Window - Evas_Object *win = elm_widget_top_get(obj); - - if (win && efl_isa(win, EFL_UI_WIN_CLASS)) - return elm_win_focus_highlight_style_get(win); - - return NULL; -} - static Eina_Bool _candidacy_exam(Eo *obj) { diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo index 63a5ea765e..815cb7761e 100644 --- a/src/lib/elementary/efl_ui_widget.eo +++ b/src/lib/elementary/efl_ui_widget.eo @@ -441,82 +441,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje region: Eina.Rect; [[The rectangle area.]] } } - @property focus_highlight_enabled { - [[Whether focus highlight is enabled or not. - - As of EFL 1.21 focus highlight properties apply to a single window, - not a single widget. As a consequence, calls to this function may - be forwarded to the parent window. Future versions of EFL may - implement widget-specific focus highlight properties. - - See also @.widget_top. - See also @.focus_highlight_style. - See also @.focus_highlight_animate. - ]] - set { - [[Set the enabled status for the focus highlight in a window. - - This function will enable or disable the focus highlight, - regardless of the global setting for it. - ]] - } - get { - [[Get the enabled value of the focus highlight for this window.]] - } - values { - enabled: bool; [[The enabled value for the highlight.]] - } - } - @property focus_highlight_style { - [[Control the widget focus highlight style. - - If $style is $null, the default will be used. - - As of EFL 1.21 focus highlight properties apply to a single window, - not a single widget. As a consequence, calls to this function may - be forwarded to the parent window. Future versions of EFL may - implement widget-specific focus highlight properties. - - See also @.widget_top. - See also @.focus_highlight_enabled. - See also @.focus_highlight_animate. - ]] - set { - /* FIXME: This is async... success here means nothing. */ - return: bool; [[$true on success, $false otherwise.]] - } - get { - } - values { - style: string @nullable; [[The name of the focus highlight style.]] - } - } - @property focus_highlight_animate { - [[Whether focus highlight should animate or not. - - As of EFL 1.21 focus highlight properties apply to a single window, - not a single widget. As a consequence, calls to this function may - be forwarded to the parent window. Future versions of EFL may - implement widget-specific focus highlight properties. - - See also @.widget_top. - See also @.focus_highlight_style. - See also @.focus_highlight_enabled. - ]] - set { - [[Set the animate status for the focus highlight for this window. - - This function will enable or disable the animation of focus - highlight. - ]] - } - get { - [[Get the animate value of the focus highlight for this window.]] - } - values { - animate: bool; [[The enabled value for the highlight animation.]] - } - } @property focus_move_policy @beta { [[The widget's focus move policy.]] values { diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 99ccf86705..ffba88329b 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -1187,8 +1187,6 @@ _elm_win_focus_highlight_reconfigure_job(void *data) Eina_Bool visible_changed; Eina_Bool common_visible; const char *sig = NULL; - const char *focus_style_target = NULL; - const char *focus_style_previous = NULL; _elm_win_focus_highlight_reconfigure_job_stop(sd); @@ -1254,18 +1252,11 @@ _elm_win_focus_highlight_reconfigure_job(void *data) goto the_end; } - if (previous) - focus_style_previous = elm_widget_focus_highlight_style_get(previous); - focus_style_target = elm_widget_focus_highlight_style_get(target); - - if (sd->focus_highlight.theme_changed || - (focus_style_target != focus_style_previous)) + if (sd->focus_highlight.theme_changed) { const char *str; - if (focus_style_target) - str = focus_style_target; - else if (sd->focus_highlight.style) + if (sd->focus_highlight.style) str = sd->focus_highlight.style; else str = "default"; @@ -6947,9 +6938,8 @@ _efl_ui_win_keygrab_unset(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char * } EOLIAN static void -_efl_ui_win_efl_ui_widget_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled) +_efl_ui_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled) { - // Do not call efl_super() here. Only Win handles this property. enabled = !!enabled; if (sd->focus_highlight.enabled == enabled) return; @@ -6963,9 +6953,8 @@ _efl_ui_win_efl_ui_widget_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_U } EOLIAN static Eina_Bool -_efl_ui_win_efl_ui_widget_focus_highlight_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) +_efl_ui_win_focus_highlight_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) { - // Do not call efl_super() here. Only Win handles this property. return sd->focus_highlight.enabled; } @@ -7012,9 +7001,8 @@ _efl_ui_win_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Win_Data *sd) } EOLIAN static Eina_Bool -_efl_ui_win_efl_ui_widget_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *style) +_efl_ui_win_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *style) { - // Do not call efl_super() here. Only Win handles this property. if (!eina_stringshare_replace(&sd->focus_highlight.style, style)) return EINA_TRUE; @@ -7024,16 +7012,14 @@ _efl_ui_win_efl_ui_widget_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_ } EOLIAN static const char* -_efl_ui_win_efl_ui_widget_focus_highlight_style_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) +_efl_ui_win_focus_highlight_style_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) { - // Do not call efl_super() here. Only Win handles this property. return sd->focus_highlight.style; } EOLIAN static void -_efl_ui_win_efl_ui_widget_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool animate) +_efl_ui_win_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool animate) { - // Do not call efl_super() here. Only Win handles this property. animate = !!animate; if (sd->focus_highlight.animate == animate) return; @@ -7044,9 +7030,8 @@ _efl_ui_win_efl_ui_widget_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_U } EOLIAN static Eina_Bool -_efl_ui_win_efl_ui_widget_focus_highlight_animate_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) +_efl_ui_win_focus_highlight_animate_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd) { - // Do not call efl_super() here. Only Win handles this property. return sd->focus_highlight.animate; } @@ -8888,42 +8873,6 @@ elm_win_focus_get(const Efl_Ui_Win *obj) return efl_ui_focus_object_focus_get(obj); } -EAPI void -elm_win_focus_highlight_style_set(Elm_Win *obj, const char *style) -{ - elm_widget_focus_highlight_style_set(obj, style); -} - -EAPI const char * -elm_win_focus_highlight_style_get(const Elm_Win *obj) -{ - return elm_widget_focus_highlight_style_get(obj); -} - -EAPI Eina_Bool -elm_win_focus_highlight_enabled_get(const Efl_Ui_Win *obj) -{ - return elm_widget_focus_highlight_enabled_get(obj); -} - -EAPI void -elm_win_focus_highlight_enabled_set(Efl_Ui_Win *obj, Eina_Bool enabled) -{ - efl_ui_widget_focus_highlight_enabled_set(obj, enabled); -} - -EAPI void -elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate) -{ - efl_ui_widget_focus_highlight_animate_set(obj, animate); -} - -EAPI Eina_Bool -elm_win_focus_highlight_animate_get(const Elm_Win *obj) -{ - return efl_ui_widget_focus_highlight_animate_get(obj); -} - EAPI Eina_Bool elm_win_available_profiles_get(const Elm_Win *obj, char ***profiles, unsigned int *count) { diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 6c43af09b2..0917e9ae50 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -862,6 +862,64 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac rotation : Efl.Orient; [[The rotation of the window]] } } + @property focus_highlight_enabled { + [[Whether focus highlight is enabled or not. + + See also @.focus_highlight_style. + See also @.focus_highlight_animate. + ]] + set { + [[Set the enabled status for the focus highlight in a window. + + This function will enable or disable the focus highlight, + regardless of the global setting for it. + ]] + } + get { + [[Get the enabled value of the focus highlight for this window.]] + } + values { + enabled: bool; [[The enabled value for the highlight.]] + } + } + @property focus_highlight_style { + [[Control the widget focus highlight style. + + If $style is $null, the default will be used. + + See also @.focus_highlight_enabled. + See also @.focus_highlight_animate. + ]] + set { + /* FIXME: This is async... success here means nothing. */ + return: bool; [[$true on success, $false otherwise.]] + } + get { + } + values { + style: string @nullable; [[The name of the focus highlight style.]] + } + } + @property focus_highlight_animate { + [[Whether focus highlight should animate or not. + + See also @.focus_highlight_style. + See also @.focus_highlight_enabled. + ]] + set { + [[Set the animate status for the focus highlight for this window. + + This function will enable or disable the animation of focus + highlight. + ]] + } + get { + [[Get the animate value of the focus highlight for this window.]] + } + values { + animate: bool; [[The enabled value for the highlight animation.]] + } + } } implements { class.constructor; @@ -878,9 +936,6 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac Efl.Gfx.Stack.lower_to_bottom; [[This action is ignored by the Window.]] Efl.Ui.Widget.theme_apply; Efl.Ui.Focus.Object.focus { get; } - Efl.Ui.Widget.focus_highlight_style { get; set; } - Efl.Ui.Widget.focus_highlight_enabled { get; set; } - Efl.Ui.Widget.focus_highlight_animate { get; set; } Efl.Ui.Focus.Object.on_focus_update; Efl.Ui.Widget.widget_event; Efl.Ui.Widget_Focus_Manager.focus_manager_create; diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index d4e0cf3449..6047ad8704 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -205,6 +205,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents) Item_Cache *itc = NULL; ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd); Evas_Object *obj = sd->obj; + Evas_Object *win = elm_widget_top_get(obj); evas_event_freeze(evas_object_evas_get(obj)); if (sd->item_cache_max > 0) @@ -230,7 +231,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents) if (elm_wdg_item_disabled_get(EO_OBJ(it))) edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm"); if ((EO_OBJ(it) == sd->focused_item) && - (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)) + (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)) edje_object_signal_emit(itc->base_view, "elm,state,unfocused", "elm"); ELM_SAFE_FREE(it->long_timer, ecore_timer_del); @@ -1560,9 +1561,10 @@ _elm_gengrid_item_focus_update(Elm_Gen_Item *it) { const char *focus_raise; Evas_Object *obj = WIDGET(it); + Evas_Object *win = elm_widget_top_get(obj); ELM_GENGRID_DATA_GET(obj, sd); - if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable) + if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable) { edje_object_signal_emit (VIEW(it), "elm,state,focused", "elm"); @@ -2357,6 +2359,7 @@ _elm_gengrid_item_unfocused(Elm_Object_Item *eo_it) { ELM_GENGRID_ITEM_DATA_GET(eo_it, it); Evas_Object *obj = WIDGET(it); + Evas_Object *win = elm_widget_top_get(obj); ELM_GENGRID_DATA_GET(obj, sd); if (it->generation < sd->generation) @@ -2369,7 +2372,7 @@ _elm_gengrid_item_unfocused(Elm_Object_Item *eo_it) (eo_it != sd->focused_item)) return; - if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable) + if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable) { ELM_GENGRID_ITEM_DATA_GET(sd->focused_item, focus_it); edje_object_signal_emit diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 86c3ab22eb..f224c0f14c 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -1598,6 +1598,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents) Item_Cache *itc = NULL; ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); Evas_Object *obj = sd->obj; + Evas_Object *win = elm_widget_top_get(obj); Evas *e = evas_object_evas_get(obj); evas_event_freeze(e); @@ -1629,7 +1630,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents) if (elm_wdg_item_disabled_get(EO_OBJ(it))) edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm"); if ((EO_OBJ(it) == sd->focused_item) && - (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)) + (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)) edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm"); ELM_SAFE_FREE(it->long_timer, ecore_timer_del); @@ -1807,9 +1808,10 @@ _elm_genlist_item_focus_update(Elm_Gen_Item *it) { const char *focus_raise; Evas_Object *obj = WIDGET(it); + Evas_Object *win = elm_widget_top_get(obj); ELM_GENLIST_DATA_GET(obj, sd); - if (elm_widget_focus_highlight_enabled_get(obj) + if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable) edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm"); @@ -2904,6 +2906,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it) ELM_GENLIST_ITEM_DATA_GET(eo_it, it); Evas_Object *obj = WIDGET(it); + Evas_Object *win = elm_widget_top_get(obj); ELM_GENLIST_DATA_GET(obj, sd); if (_is_no_select(it)) @@ -2913,7 +2916,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it) (eo_it != sd->focused_item)) return; - if (elm_widget_focus_highlight_enabled_get(obj)) + if (elm_win_focus_highlight_enabled_get(win)) { ELM_GENLIST_ITEM_DATA_GET(sd->focused_item, focus_it); edje_object_signal_emit(VIEW(focus_it), SIGNAL_UNFOCUSED, "elm"); diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index ff72abd991..b678bc1a34 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -1147,6 +1147,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it) { ELM_LIST_ITEM_DATA_GET(eo_it, it); ELM_LIST_DATA_GET_FROM_ITEM(it, sd); + Evas_Object *win = elm_widget_top_get(WIDGET(it)); Evas_Coord x, y, w, h, sx, sy, sw, sh; const char *focus_raise; @@ -1170,7 +1171,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it) } } sd->focused_item = eo_it; - if (elm_widget_focus_highlight_enabled_get(WIDGET(it)) || _elm_config->win_auto_focus_enable) + if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable) { edje_object_signal_emit (VIEW(it), "elm,state,focused", "elm"); @@ -1189,6 +1190,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it) { ELM_LIST_ITEM_DATA_GET(eo_it, it); Evas_Object *obj = WIDGET(it); + Evas_Object *win = elm_widget_top_get(obj); ELM_LIST_DATA_GET(obj, sd); if ((!sd) || (!sd->focused_item) || @@ -1198,7 +1200,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it) if (_is_no_select(it)) return; - if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable) + if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable) { ELM_LIST_ITEM_DATA_GET(sd->focused_item, focus_it); edje_object_signal_emit diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c index 661901511c..c9e48ff8fb 100644 --- a/src/lib/elementary/elm_main.c +++ b/src/lib/elementary/elm_main.c @@ -1568,14 +1568,14 @@ elm_object_focus_highlight_style_set(Evas_Object *obj, const char *style) { EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE); - return elm_widget_focus_highlight_style_set(obj, style); + return elm_win_focus_highlight_style_set(elm_widget_top_get(obj), style); } EAPI const char * elm_object_focus_highlight_style_get(const Evas_Object *obj) { EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL); - return elm_widget_focus_highlight_style_get(obj); + return elm_win_focus_highlight_style_get(elm_widget_top_get(obj)); } EAPI const char * diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index d79ae57b1e..c17f1c4cd9 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -621,6 +621,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it) { ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it); Evas_Object *obj = WIDGET(it); + Evas_Object *win = elm_widget_top_get(obj); ELM_TOOLBAR_DATA_GET(obj, sd); const char *focus_raise; @@ -643,7 +644,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it) break; } - if (elm_widget_focus_highlight_enabled_get(obj)) + if (elm_win_focus_highlight_enabled_get(win)) { elm_layout_signal_emit (VIEW(it), "elm,state,focused", "elm"); @@ -664,6 +665,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it) { ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it); Evas_Object *obj = WIDGET(it); + Evas_Object *win = elm_widget_top_get(obj); ELM_TOOLBAR_DATA_GET(obj, sd); if ((!sd) || !sd->focused_item || @@ -671,7 +673,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it) return; if (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) return; - if (elm_widget_focus_highlight_enabled_get(obj)) + if (elm_win_focus_highlight_enabled_get(win)) { ELM_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it); elm_layout_signal_emit diff --git a/src/lib/elementary/elm_win_legacy.h b/src/lib/elementary/elm_win_legacy.h index 89e5e150a0..ef4f74fa14 100644 --- a/src/lib/elementary/elm_win_legacy.h +++ b/src/lib/elementary/elm_win_legacy.h @@ -1164,7 +1164,7 @@ EAPI Eina_Bool elm_win_keygrab_unset(Elm_Win *obj, const char *key, Evas_Modifie /** * @brief Get the elm_win object from any child object - * + * * @return The elm_win, or @c NULL on failure * @since 1.20 */ @@ -1196,69 +1196,6 @@ EAPI Eina_Bool elm_win_socket_listen(Elm_Win *obj, const char *svcname, int svcn */ EAPI Eina_Bool elm_win_focus_get(const Elm_Win *obj); -/** - * @brief Set the style for the focus highlight on this window. - * - * Sets the style to use for theming the highlight of focused objects on the - * given window. If @c style is NULL, the default will be used. - * - * @param[in] style The style or @c null if none. - * - * @ingroup Efl_Ui_Win - */ -EAPI void elm_win_focus_highlight_style_set(Elm_Win *obj, const char *style); - -/** - * @brief Get the style set for the focus highlight object. - * - * @return The style or @c null if none. - * - * @ingroup Efl_Ui_Win - */ -EAPI const char *elm_win_focus_highlight_style_get(const Elm_Win *obj); - -/** - * @brief Set the enabled status for the focus highlight in a window. - * - * This function will enable or disable the focus highlight only for the given - * window, regardless of the global setting for it. - * - * @param[in] enabled The enabled value for the highlight. - * - * @ingroup Efl_Ui_Win - */ -EAPI void elm_win_focus_highlight_enabled_set(Elm_Win *obj, Eina_Bool enabled); - -/** - * @brief Get the enabled value of the focus highlight for this window. - * - * @return The enabled value for the highlight. - * - * @ingroup Efl_Ui_Win - */ -EAPI Eina_Bool elm_win_focus_highlight_enabled_get(const Elm_Win *obj); - -/** - * @brief Set the animate status for the focus highlight for this window. - * - * This function will enable or disable the animation of focus highlight only - * for the given window, rof the global setting for it. - * - * @param[in] animate The enabled value for the highlight animation. - * - * @ingroup Efl_Ui_Win - */ -EAPI void elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate); - -/** - * @brief Get the animate value of the focus highlight for this window. - * - * @return The enabled value for the highlight animation. - * - * @ingroup Efl_Ui_Win - */ -EAPI Eina_Bool elm_win_focus_highlight_animate_get(const Elm_Win *obj); - /** * @brief Raise a window object. *