win: Move focus_highlight_enabled to widget (EO)
This was actually declared in the internal legacy API in widget. Forwards the calls to the window. Ref T
This commit is contained in:
parent
0972c49438
commit
94632f8a44
|
@ -6279,8 +6279,9 @@ _efl_ui_win_keygrab_unset(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled)
|
||||
_efl_ui_win_elm_widget_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;
|
||||
|
@ -6294,8 +6295,9 @@ _efl_ui_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_win_focus_highlight_enabled_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
|
||||
_efl_ui_win_elm_widget_focus_highlight_enabled_get(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;
|
||||
}
|
||||
|
||||
|
@ -8178,6 +8180,17 @@ 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)
|
||||
{
|
||||
elm_obj_widget_focus_highlight_enabled_set(obj, enabled);
|
||||
}
|
||||
|
||||
// deprecated
|
||||
|
||||
|
|
|
@ -268,27 +268,12 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
|
|||
constrain: bool; [[$true to restrict the window's maximum size.]]
|
||||
}
|
||||
}
|
||||
@property focus_highlight_enabled {
|
||||
set {
|
||||
[[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.
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Get the enabled value of the focus highlight for this window.]]
|
||||
}
|
||||
values {
|
||||
enabled: bool; [[The enabled value for the highlight.]]
|
||||
}
|
||||
}
|
||||
@property focus_highlight_animate {
|
||||
set {
|
||||
[[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, regardless of the
|
||||
highlight only for the given window, rof the
|
||||
global setting for it.
|
||||
]]
|
||||
}
|
||||
|
@ -885,6 +870,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
|
|||
Elm.Widget.theme_apply;
|
||||
Elm.Widget.focus { get; }
|
||||
Elm.Widget.focus_highlight_style { get; set; }
|
||||
Elm.Widget.focus_highlight_enabled { get; set; }
|
||||
Elm.Widget.on_focus_update;
|
||||
Elm.Widget.widget_event;
|
||||
Elm.Widget.focus_manager_factory;
|
||||
|
|
|
@ -190,16 +190,28 @@ _elm_widget_focus_highlight_object_get(const Evas_Object *obj)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_widget_focus_highlight_enabled_get(const Evas_Object *obj)
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_widget_focus_highlight_enabled_get(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
|
||||
_elm_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);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_tree_unfocusable(Eo *obj)
|
||||
{
|
||||
|
|
|
@ -530,6 +530,21 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
|
|||
style: string @nullable; [[The name of the focus highlight style.]]
|
||||
}
|
||||
}
|
||||
@property focus_highlight_enabled {
|
||||
set {
|
||||
[[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.
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Get the enabled value of the focus highlight for this window.]]
|
||||
}
|
||||
values {
|
||||
enabled: bool; [[The enabled value for the highlight.]]
|
||||
}
|
||||
}
|
||||
|
||||
/* Old focus API. FIXME: Needs massive clean up! */
|
||||
@property focus_order @beta {
|
||||
|
|
|
@ -1178,3 +1178,24 @@ EAPI void elm_win_focus_highlight_style_set(Elm_Win *obj, const char *style);
|
|||
* @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);
|
||||
|
|
Loading…
Reference in New Issue