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 <woohyun0705@gmail.com> Differential Revision: https://phab.enlightenment.org/D8025
This commit is contained in:
parent
0b152734ba
commit
b704db8f07
|
@ -266,74 +266,6 @@ _efl_ui_widget_focus_highlight_object_get(const Evas_Object *obj)
|
||||||
return NULL;
|
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
|
static Eina_Bool
|
||||||
_candidacy_exam(Eo *obj)
|
_candidacy_exam(Eo *obj)
|
||||||
{
|
{
|
||||||
|
|
|
@ -441,82 +441,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
|
||||||
region: Eina.Rect; [[The rectangle area.]]
|
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 {
|
@property focus_move_policy @beta {
|
||||||
[[The widget's focus move policy.]]
|
[[The widget's focus move policy.]]
|
||||||
values {
|
values {
|
||||||
|
|
|
@ -1187,8 +1187,6 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
|
||||||
Eina_Bool visible_changed;
|
Eina_Bool visible_changed;
|
||||||
Eina_Bool common_visible;
|
Eina_Bool common_visible;
|
||||||
const char *sig = NULL;
|
const char *sig = NULL;
|
||||||
const char *focus_style_target = NULL;
|
|
||||||
const char *focus_style_previous = NULL;
|
|
||||||
|
|
||||||
_elm_win_focus_highlight_reconfigure_job_stop(sd);
|
_elm_win_focus_highlight_reconfigure_job_stop(sd);
|
||||||
|
|
||||||
|
@ -1254,18 +1252,11 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
|
||||||
goto the_end;
|
goto the_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (previous)
|
if (sd->focus_highlight.theme_changed)
|
||||||
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))
|
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
if (focus_style_target)
|
if (sd->focus_highlight.style)
|
||||||
str = focus_style_target;
|
|
||||||
else if (sd->focus_highlight.style)
|
|
||||||
str = sd->focus_highlight.style;
|
str = sd->focus_highlight.style;
|
||||||
else
|
else
|
||||||
str = "default";
|
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
|
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;
|
enabled = !!enabled;
|
||||||
if (sd->focus_highlight.enabled == enabled)
|
if (sd->focus_highlight.enabled == enabled)
|
||||||
return;
|
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
|
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;
|
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
|
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))
|
if (!eina_stringshare_replace(&sd->focus_highlight.style, style))
|
||||||
return EINA_TRUE;
|
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*
|
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;
|
return sd->focus_highlight.style;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
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;
|
animate = !!animate;
|
||||||
if (sd->focus_highlight.animate == animate)
|
if (sd->focus_highlight.animate == animate)
|
||||||
return;
|
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
|
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;
|
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);
|
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
|
EAPI Eina_Bool
|
||||||
elm_win_available_profiles_get(const Elm_Win *obj, char ***profiles, unsigned int *count)
|
elm_win_available_profiles_get(const Elm_Win *obj, char ***profiles, unsigned int *count)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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]]
|
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 {
|
implements {
|
||||||
class.constructor;
|
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.Gfx.Stack.lower_to_bottom; [[This action is ignored by the Window.]]
|
||||||
Efl.Ui.Widget.theme_apply;
|
Efl.Ui.Widget.theme_apply;
|
||||||
Efl.Ui.Focus.Object.focus { get; }
|
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.Focus.Object.on_focus_update;
|
||||||
Efl.Ui.Widget.widget_event;
|
Efl.Ui.Widget.widget_event;
|
||||||
Efl.Ui.Widget_Focus_Manager.focus_manager_create;
|
Efl.Ui.Widget_Focus_Manager.focus_manager_create;
|
||||||
|
|
|
@ -205,6 +205,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
|
||||||
Item_Cache *itc = NULL;
|
Item_Cache *itc = NULL;
|
||||||
ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
|
ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
|
||||||
Evas_Object *obj = sd->obj;
|
Evas_Object *obj = sd->obj;
|
||||||
|
Evas_Object *win = elm_widget_top_get(obj);
|
||||||
|
|
||||||
evas_event_freeze(evas_object_evas_get(obj));
|
evas_event_freeze(evas_object_evas_get(obj));
|
||||||
if (sd->item_cache_max > 0)
|
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)))
|
if (elm_wdg_item_disabled_get(EO_OBJ(it)))
|
||||||
edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm");
|
edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm");
|
||||||
if ((EO_OBJ(it) == sd->focused_item) &&
|
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");
|
edje_object_signal_emit(itc->base_view, "elm,state,unfocused", "elm");
|
||||||
|
|
||||||
ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
|
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;
|
const char *focus_raise;
|
||||||
Evas_Object *obj = WIDGET(it);
|
Evas_Object *obj = WIDGET(it);
|
||||||
|
Evas_Object *win = elm_widget_top_get(obj);
|
||||||
ELM_GENGRID_DATA_GET(obj, sd);
|
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
|
edje_object_signal_emit
|
||||||
(VIEW(it), "elm,state,focused", "elm");
|
(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);
|
ELM_GENGRID_ITEM_DATA_GET(eo_it, it);
|
||||||
Evas_Object *obj = WIDGET(it);
|
Evas_Object *obj = WIDGET(it);
|
||||||
|
Evas_Object *win = elm_widget_top_get(obj);
|
||||||
ELM_GENGRID_DATA_GET(obj, sd);
|
ELM_GENGRID_DATA_GET(obj, sd);
|
||||||
|
|
||||||
if (it->generation < sd->generation)
|
if (it->generation < sd->generation)
|
||||||
|
@ -2369,7 +2372,7 @@ _elm_gengrid_item_unfocused(Elm_Object_Item *eo_it)
|
||||||
(eo_it != sd->focused_item))
|
(eo_it != sd->focused_item))
|
||||||
return;
|
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);
|
ELM_GENGRID_ITEM_DATA_GET(sd->focused_item, focus_it);
|
||||||
edje_object_signal_emit
|
edje_object_signal_emit
|
||||||
|
|
|
@ -1598,6 +1598,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
|
||||||
Item_Cache *itc = NULL;
|
Item_Cache *itc = NULL;
|
||||||
ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
|
ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
|
||||||
Evas_Object *obj = sd->obj;
|
Evas_Object *obj = sd->obj;
|
||||||
|
Evas_Object *win = elm_widget_top_get(obj);
|
||||||
Evas *e = evas_object_evas_get(obj);
|
Evas *e = evas_object_evas_get(obj);
|
||||||
|
|
||||||
evas_event_freeze(e);
|
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)))
|
if (elm_wdg_item_disabled_get(EO_OBJ(it)))
|
||||||
edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm");
|
edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm");
|
||||||
if ((EO_OBJ(it) == sd->focused_item) &&
|
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");
|
edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm");
|
||||||
|
|
||||||
ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
|
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;
|
const char *focus_raise;
|
||||||
Evas_Object *obj = WIDGET(it);
|
Evas_Object *obj = WIDGET(it);
|
||||||
|
Evas_Object *win = elm_widget_top_get(obj);
|
||||||
ELM_GENLIST_DATA_GET(obj, sd);
|
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)
|
|| _elm_config->win_auto_focus_enable)
|
||||||
edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm");
|
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);
|
ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
|
||||||
Evas_Object *obj = WIDGET(it);
|
Evas_Object *obj = WIDGET(it);
|
||||||
|
Evas_Object *win = elm_widget_top_get(obj);
|
||||||
ELM_GENLIST_DATA_GET(obj, sd);
|
ELM_GENLIST_DATA_GET(obj, sd);
|
||||||
|
|
||||||
if (_is_no_select(it))
|
if (_is_no_select(it))
|
||||||
|
@ -2913,7 +2916,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
|
||||||
(eo_it != sd->focused_item))
|
(eo_it != sd->focused_item))
|
||||||
return;
|
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);
|
ELM_GENLIST_ITEM_DATA_GET(sd->focused_item, focus_it);
|
||||||
edje_object_signal_emit(VIEW(focus_it), SIGNAL_UNFOCUSED, "elm");
|
edje_object_signal_emit(VIEW(focus_it), SIGNAL_UNFOCUSED, "elm");
|
||||||
|
|
|
@ -1147,6 +1147,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
|
||||||
{
|
{
|
||||||
ELM_LIST_ITEM_DATA_GET(eo_it, it);
|
ELM_LIST_ITEM_DATA_GET(eo_it, it);
|
||||||
ELM_LIST_DATA_GET_FROM_ITEM(it, sd);
|
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;
|
Evas_Coord x, y, w, h, sx, sy, sw, sh;
|
||||||
const char *focus_raise;
|
const char *focus_raise;
|
||||||
|
|
||||||
|
@ -1170,7 +1171,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sd->focused_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
|
edje_object_signal_emit
|
||||||
(VIEW(it), "elm,state,focused", "elm");
|
(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);
|
ELM_LIST_ITEM_DATA_GET(eo_it, it);
|
||||||
Evas_Object *obj = WIDGET(it);
|
Evas_Object *obj = WIDGET(it);
|
||||||
|
Evas_Object *win = elm_widget_top_get(obj);
|
||||||
ELM_LIST_DATA_GET(obj, sd);
|
ELM_LIST_DATA_GET(obj, sd);
|
||||||
|
|
||||||
if ((!sd) || (!sd->focused_item) ||
|
if ((!sd) || (!sd->focused_item) ||
|
||||||
|
@ -1198,7 +1200,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it)
|
||||||
if (_is_no_select(it))
|
if (_is_no_select(it))
|
||||||
return;
|
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);
|
ELM_LIST_ITEM_DATA_GET(sd->focused_item, focus_it);
|
||||||
edje_object_signal_emit
|
edje_object_signal_emit
|
||||||
|
|
|
@ -1568,14 +1568,14 @@ elm_object_focus_highlight_style_set(Evas_Object *obj,
|
||||||
const char *style)
|
const char *style)
|
||||||
{
|
{
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
|
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 *
|
EAPI const char *
|
||||||
elm_object_focus_highlight_style_get(const Evas_Object *obj)
|
elm_object_focus_highlight_style_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
|
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 *
|
EAPI const char *
|
||||||
|
|
|
@ -621,6 +621,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
|
||||||
{
|
{
|
||||||
ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
|
ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
|
||||||
Evas_Object *obj = WIDGET(it);
|
Evas_Object *obj = WIDGET(it);
|
||||||
|
Evas_Object *win = elm_widget_top_get(obj);
|
||||||
ELM_TOOLBAR_DATA_GET(obj, sd);
|
ELM_TOOLBAR_DATA_GET(obj, sd);
|
||||||
const char *focus_raise;
|
const char *focus_raise;
|
||||||
|
|
||||||
|
@ -643,7 +644,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elm_widget_focus_highlight_enabled_get(obj))
|
if (elm_win_focus_highlight_enabled_get(win))
|
||||||
{
|
{
|
||||||
elm_layout_signal_emit
|
elm_layout_signal_emit
|
||||||
(VIEW(it), "elm,state,focused", "elm");
|
(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);
|
ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
|
||||||
Evas_Object *obj = WIDGET(it);
|
Evas_Object *obj = WIDGET(it);
|
||||||
|
Evas_Object *win = elm_widget_top_get(obj);
|
||||||
ELM_TOOLBAR_DATA_GET(obj, sd);
|
ELM_TOOLBAR_DATA_GET(obj, sd);
|
||||||
|
|
||||||
if ((!sd) || !sd->focused_item ||
|
if ((!sd) || !sd->focused_item ||
|
||||||
|
@ -671,7 +673,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
|
||||||
return;
|
return;
|
||||||
if (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
|
if (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
|
||||||
return;
|
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_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it);
|
||||||
elm_layout_signal_emit
|
elm_layout_signal_emit
|
||||||
|
|
|
@ -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);
|
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.
|
* @brief Raise a window object.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue