}
EOLIAN static Eina_Rect
-_efl_ui_text_elm_widget_focus_region_get(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
+_efl_ui_text_elm_widget_interest_region_get(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *sd)
{
Evas_Coord edje_x, edje_y, elm_x, elm_y;
Eina_Rect r = {};
Elm.Widget.on_access_activate;
Elm.Widget.theme_apply;
Elm.Widget.on_focus_update;
- Elm.Widget.focus_region { get; }
+ Elm.Widget.interest_region { get; }
Elm.Widget.on_disabled_update;
Elm.Widget.widget_sub_object_del;
Elm.Interface_Scrollable.policy { set; }
}
EOLIAN static Eina_Rect
-_elm_entry_elm_widget_focus_region_get(Eo *obj, Elm_Entry_Data *sd)
+_elm_entry_elm_widget_interest_region_get(Eo *obj, Elm_Entry_Data *sd)
{
Evas_Coord cx, cy, cw, ch;
Evas_Coord edx, edy;
Elm.Widget.on_access_activate;
Elm.Widget.theme_apply;
Elm.Widget.on_focus_update;
- Elm.Widget.focus_region { get; }
+ Elm.Widget.interest_region { get; }
Elm.Widget.on_disabled_update;
Elm.Widget.widget_sub_object_del;
Elm.Interface_Scrollable.policy { set; }
last = 6
}
-enum Elm.Focus.Region.Show_Mode
+enum Efl.Ui.Interest_Region_Mode
{
[[Focus region show mode.]]
- legacy: elm_focus_region_show;
widget, [[As a widget.]]
item, [[As an item.]]
}
ELM_OBJECT_LAYER_LAST /**< last layer known by Elementary */
} Elm_Object_Layer;
+/** How the focus region should be calculated (not related to input focus). */
+typedef Efl_Ui_Interest_Region_Mode Elm_Focus_Region_Show_Mode;
+#define ELM_FOCUS_REGION_SHOW_WIDGET EFL_UI_INTEREST_REGION_MODE_WIDGET
+#define ELM_FOCUS_REGION_SHOW_ITEM EFL_UI_INTEREST_REGION_MODE_ITEM
+
/**************************************************************************/
EAPI extern int ELM_ECORE_EVENT_ETHUMB_CONNECT;
}
EOLIAN static Eina_Rect
-_elm_gengrid_elm_widget_focus_region_get(Eo *obj, Elm_Gengrid_Data *sd)
+_elm_gengrid_elm_widget_interest_region_get(Eo *obj, Elm_Gengrid_Data *sd)
{
Eina_Rect r = {};
}
end:
- return elm_obj_widget_focus_region_get(efl_super(obj, MY_CLASS));
+ return elm_obj_widget_interest_region_get(efl_super(obj, MY_CLASS));
}
static Eina_Bool _elm_gengrid_smart_focus_next_enable = EINA_FALSE;
Elm.Widget.theme_apply;
Elm.Widget.on_access_update;
Elm.Widget.on_focus_update;
- Elm.Widget.focus_region { get; }
+ Elm.Widget.interest_region { get; }
Elm.Widget.widget_event;
Elm.Widget.focus_highlight_geometry { get; }
Elm.Widget.focused_item { get; }
}
EOLIAN static Eina_Rect
-_elm_panel_elm_widget_focus_region_get(Eo *obj, Elm_Panel_Data *sd)
+_elm_panel_elm_widget_interest_region_get(Eo *obj, Elm_Panel_Data *sd)
{
Eina_Rect r = {};
Elm.Widget.on_disabled_update;
Elm.Widget.on_access_update;
Elm.Widget.widget_event;
- Elm.Widget.focus_region { get; }
+ Elm.Widget.interest_region { get; }
Elm.Interface.Atspi_Widget_Action.elm_actions { get; }
Efl.Part.part;
}
* If elm_widget_focus_region_get() returns an empty rect (w or h <= 0),
* this function will ignore region show action.
*/
-EOLIAN static void
-_elm_widget_focus_region_show(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
+EAPI void
+elm_widget_focus_region_show(Eo *obj)
{
Evas_Coord ox, oy;
Eina_Rect r;
* @ingroup Widget
*/
EOLIAN static Eina_Rect
-_elm_widget_focus_region_get(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
+_elm_widget_interest_region_get(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
{
Eina_Rect r = {};
r.size = efl_gfx_size_get(obj);
}
EOLIAN static void
-_elm_widget_focus_region_show_mode_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd, Elm_Focus_Region_Show_Mode mode)
+_elm_widget_interest_region_mode_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd, Elm_Focus_Region_Show_Mode mode)
{
_pd->focus_region_show_mode = mode;
}
EOLIAN static Elm_Focus_Region_Show_Mode
-_elm_widget_focus_region_show_mode_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd)
+_elm_widget_interest_region_mode_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd)
{
return _pd->focus_region_show_mode;
}
unchanged.
]]
values {
- region: Eina.Rect; [[The region of interest.]]
+ region: Eina.Rect; [[The region to show.]]
force: bool; [[Set to $true to force show even if unchanged.]]
}
}
get {
- [[Returns the current region of interest.]]
+ [[Returns the current region to show.]]
values {
- region: Eina.Rect; [[The region of interest.]]
+ region: Eina.Rect; [[The region to show.]]
}
}
}
[[Pop scroller freeze]]
}
- /* FIXME: This is not 100% related to focus. This documentation needs
- * further fixing. */
- @property focus_region @protected {
- [[Region to show when focus changes within this widget.
+ /* Region of interest */
+ @property interest_region @protected {
+ [[Region of interest inside this widget, that should be given
+ priority to be visible inside a scroller.
When this widget or one of its subwidgets is given focus, this
region should be shown, which means any parent scroller should
widget. W,H must be greater or equal to 1 for this region to be
taken into account, otherwise it is ignored.
- See also @.focus_region_show.
+ See also @.interest_region_mode
]]
get {
+ legacy: elm_widget_focus_region_get;
}
values {
region: Eina.Rect;
will be ignored, and no action will be taken.]]
}
}
- focus_region_show @protected {
- [[Show the region of interest inside this widget.
+ @property interest_region_mode {
+ [[Defines how @.show_region should be calculated.
- See also @.focus_region.
+ It is up to the implementation of @.show_region.get to take this
+ value into account (or ignore it).
]]
- }
- @property focus_region_show_mode {
- [[Control the focus_region_show mode.]]
+ get {
+ legacy: elm_widget_focus_region_show_mode_get;
+ }
+ set {
+ legacy: elm_widget_focus_region_show_mode_set;
+ }
values {
- /* FIXME: This enum is in Elm namespace! */
- mode: Elm.Focus.Region.Show_Mode; [[Focus region show mode]]
+ mode: Efl.Ui.Interest_Region_Mode;
+ [[Whether to show a specific item or the widget as a whole.]]
}
}
+
+ /* Focus highlight (visual focus rectangle) properties */
@property focus_highlight_geometry @protected {
[[The rectangle region to be highlighted on focus.