Similar to the previous commits. Moved for consistency.
Ref T5363
Ref T5322
EOLIAN static Eina_Bool
_efl_ui_win_elm_widget_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;
EOLIAN static const char*
_efl_ui_win_elm_widget_focus_highlight_style_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.style;
}
EOLIAN static void
-_efl_ui_win_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool animate)
+_efl_ui_win_elm_widget_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;
}
EOLIAN static Eina_Bool
-_efl_ui_win_focus_highlight_animate_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
+_efl_ui_win_elm_widget_focus_highlight_animate_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.animate;
}
elm_obj_widget_focus_highlight_enabled_set(obj, enabled);
}
+EAPI void
+elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate)
+{
+ elm_obj_widget_focus_highlight_animate_set(obj, animate);
+}
+
+EAPI Eina_Bool
+elm_win_focus_highlight_animate_get(const Elm_Win *obj)
+{
+ return elm_obj_widget_focus_highlight_animate_get(obj);
+}
+
// deprecated
EAPI void
constrain: bool; [[$true to restrict the window's maximum size.]]
}
}
- @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, rof the
- global setting for it.
- ]]
- }
- get {
- [[Get the animate value of the focus highlight for this window.]]
- }
- values {
- animate: bool; [[The enabled value for the highlight animation.]]
- }
- }
@property prop_focus_skip {
set {
[[Set the window to be skipped by keyboard focus.
Elm.Widget.focus { get; }
Elm.Widget.focus_highlight_style { get; set; }
Elm.Widget.focus_highlight_enabled { get; set; }
+ Elm.Widget.focus_highlight_animate { get; set; }
Elm.Widget.on_focus_update;
Elm.Widget.widget_event;
Elm.Widget.focus_manager_factory;
elm_win_focus_highlight_enabled_set(win, enable);
}
+EOLIAN static Eina_Bool
+_elm_widget_focus_highlight_animate_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_animate_get(win);
+
+ return EINA_FALSE;
+}
+
+EOLIAN static void
+_elm_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);
+}
+
static Eina_Bool
_tree_unfocusable(Eo *obj)
{
}
}
@property focus_highlight_enabled {
+ [[Whether focus highlight is enabled or not.]]
set {
[[Set the enabled status for the focus highlight in a window.
enabled: bool; [[The enabled value for the highlight.]]
}
}
+ @property focus_highlight_animate {
+ [[Whether focus highlight should animate or not.]]
+ 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. If the widget is not a
+ window, then this call is forwarded to the window (using
+ @.widget_top).
+ ]]
+ }
+ get {
+ [[Get the animate value of the focus highlight for this window.]]
+ }
+ values {
+ animate: bool; [[The enabled value for the highlight animation.]]
+ }
+ }
/* Old focus API. FIXME: Needs massive clean up! */
@property focus_order @beta {
* @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);