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)
{
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.]]
- }
- }
- //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
- part_access_object_get @const {
+ //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
+ part_access_object_get @const {
[[Get the access object of given part of the widget.
- @since 1.18]]
+ @since 1.18]]
return: Efl.Canvas.Object;
params {
@in part: string; [[The object's part name to get access object]]
}
- }
- //
+ }
+ //
//TIZEN_ONLY(20180607): Restore legacy focus
newest_focus_order_get @const {
[[Get newest focus in order]]
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);
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";
}
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;
}
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;
}
}
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;
}
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;
}
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 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)
{
}
return: iterator<const(Efl.Input.Pointer)>; [[Iterator to pointer positions]]
}
+ @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;
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;
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)
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);
{
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");
{
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)
(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
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);
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");
//Tizen Only(20160307)
{
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");
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))
(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");
{
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;
}
}
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");
{
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) ||
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
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 *
{
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;
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");
{
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 ||
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
EAPI Eina_Bool elm_win_keygrab_unset(Elm_Win *obj, const char *key, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
/**
- * @brief Gets the elm_win object from any child object
- *
+ * @brief Get the elm_win object from any child object
+ *
* @return The elm_win, or @c NULL on failure
* @since 1.20
*/
EAPI Eina_Bool elm_win_focus_highlight_animate_get(const Elm_Win *obj);
/**
- * @brief Raises a window object.
+ * @brief Raise a window object.
*
* Places the window pointed by @c obj at the top of the stack, so that it's
* not covered by any other window.