From c6c1751fe3b8d2a208803e6f7dd786fab68f4b15 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 29 Aug 2017 14:48:48 +0900 Subject: [PATCH] widget: Mark focus_region_show as protected (EO) This function is meant to be used by the widgets themselves, or internal features such as elm_access. Also remove const tag: this function call is definitely modifying the widget (panning around and all that). Ref T5363 --- src/lib/elementary/elm_widget.c | 2 +- src/lib/elementary/elm_widget.eo | 22 +++++++++++++--------- src/lib/elementary/elm_widget.h | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 0b2c7c1b85..6060c2f4dc 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -1029,7 +1029,7 @@ _propagate_event_legacy(Eo *parent, const Efl_Event *event, Eo *obj, Elm_Event_C * ignore region show action. */ EOLIAN static void -_elm_widget_focus_region_show(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED) +_elm_widget_focus_region_show(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED) { Evas_Coord ox, oy; Eina_Rectangle r; diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index 8c62d96bf0..ed640f828e 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -519,6 +519,19 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, region: Eina.Rectangle; [[The relative region to show.]] } } + focus_region_show @protected { + [[Show focus region. + + See also @.focus_region. + ]] + } + /* FIXME: This enum is in Elm namespace! */ + @property focus_region_show_mode { + [[Control the focus_region_show mode.]] + values { + mode: Elm.Focus.Region.Show_Mode; [[Focus region show mode]] + } + } /* Old focus API. FIXME: Needs massive clean up! */ @property focus_order { @@ -670,9 +683,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, @out weight: double; [[Weight]] } } - focus_region_show @const { - [[Show focus region]] - } focus_disabled_handle { [[Handle disable widget focus]] } @@ -748,12 +758,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, style: string; [[The name of the focus highlight style.]] } } - @property focus_region_show_mode { - [[Control the focus_region_show mode.]] - values { - mode: Elm.Focus.Region.Show_Mode; [[Focus region show mode]] - } - } /* Focus Manager API */ focus_register { diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index 89bdc94073..a089b35a83 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -722,7 +722,7 @@ EAPI Eina_Bool elm_widget_disabled_get(const Evas_Object *obj); EAPI void elm_widget_show_region_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool forceshow); EAPI void elm_widget_show_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); EAPI Eina_Bool elm_widget_focus_region_get(const Evas_Object *obj, Eina_Rectangle *r); -EAPI void elm_widget_focus_region_show(const Evas_Object *obj); +EAPI void elm_widget_focus_region_show(Evas_Object *obj); EAPI void elm_widget_scroll_hold_push(Evas_Object *obj); EAPI void elm_widget_scroll_hold_pop(Evas_Object *obj); EAPI int elm_widget_scroll_hold_get(const Evas_Object *obj);