summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-04 13:36:47 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-03-04 13:36:47 -0500
commit43ef483801066ba103bf93de3eb01f7787e5150b (patch)
tree8c61162954b0c3fed75a824a1e162956c0d385ec /src
parent644b771fe43ad76a70de8f6e1a07ca9159c3458c (diff)
efl.ui.widget: remove widget_top property
Summary: this can be mimicked with efl_provider_find as the top widget should always be efl.ui.win ref T7553 Depends on D8063 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7553 Differential Revision: https://phab.enlightenment.org/D8064
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_layout.c4
-rw-r--r--src/lib/elementary/efl_ui_widget.c18
-rw-r--r--src/lib/elementary/efl_ui_widget.eo27
-rw-r--r--src/lib/elementary/elm_widget.h2
4 files changed, 12 insertions, 39 deletions
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 3e9001679c..d4d2323096 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2384,7 +2384,7 @@ _efl_ui_layout_base_efl_object_finalize(Eo *obj, Efl_Ui_Layout_Data *pd EINA_UNU
2384 eo = efl_finalize(efl_super(obj, MY_CLASS)); 2384 eo = efl_finalize(efl_super(obj, MY_CLASS));
2385 efl_ui_widget_theme_apply(eo); 2385 efl_ui_widget_theme_apply(eo);
2386 2386
2387 win = efl_ui_widget_top_get(obj); 2387 win = elm_widget_top_get(obj);
2388 if (efl_isa(win, EFL_UI_WIN_CLASS)) 2388 if (efl_isa(win, EFL_UI_WIN_CLASS))
2389 efl_ui_layout_theme_rotation_apply(obj, efl_ui_win_rotation_get(win)); 2389 efl_ui_layout_theme_rotation_apply(obj, efl_ui_win_rotation_get(win));
2390 2390
@@ -2578,7 +2578,7 @@ _efl_ui_layout_base_automatic_theme_rotation_set(Eo *obj, Efl_Ui_Layout_Data *pd
2578 if (pd->automatic_orientation_apply == automatic) return; 2578 if (pd->automatic_orientation_apply == automatic) return;
2579 pd->automatic_orientation_apply = automatic; 2579 pd->automatic_orientation_apply = automatic;
2580 2580
2581 efl_ui_layout_theme_rotation_apply(obj, efl_ui_win_rotation_get(efl_ui_widget_top_get(obj))); 2581 efl_ui_layout_theme_rotation_apply(obj, efl_ui_win_rotation_get(elm_widget_top_get(obj)));
2582} 2582}
2583 2583
2584EOLIAN static Eina_Bool 2584EOLIAN static Eina_Bool
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index cddeb68c63..473be09b2c 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -1838,25 +1838,25 @@ elm_widget_highlight_get(const Eo *obj)
1838 return sd->highlighted; 1838 return sd->highlighted;
1839} 1839}
1840 1840
1841EOLIAN static Evas_Object* 1841EAPI Eina_Bool
1842_efl_ui_widget_widget_top_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED) 1842elm_widget_is(const Evas_Object *obj)
1843{
1844 return _elm_widget_is(obj);
1845}
1846
1847EAPI Eo *
1848elm_widget_top_get(const Eo *obj)
1843{ 1849{
1844 Efl_Ui_Widget *parent = elm_widget_parent_get(obj); 1850 Efl_Ui_Widget *parent = elm_widget_parent_get(obj);
1845 if (parent) 1851 if (parent)
1846 { 1852 {
1847 if (!efl_isa(parent, EFL_UI_WIDGET_CLASS)) return NULL; 1853 if (!efl_isa(parent, EFL_UI_WIDGET_CLASS)) return NULL;
1848 return efl_ui_widget_top_get(parent); 1854 return elm_widget_top_get(parent);
1849 } 1855 }
1850 /* XXX const */ 1856 /* XXX const */
1851 return (Evas_Object *)obj; 1857 return (Evas_Object *)obj;
1852} 1858}
1853 1859
1854EAPI Eina_Bool
1855elm_widget_is(const Evas_Object *obj)
1856{
1857 return _elm_widget_is(obj);
1858}
1859
1860EAPI Evas_Object * 1860EAPI Evas_Object *
1861elm_widget_parent_widget_get(const Evas_Object *obj) 1861elm_widget_parent_widget_get(const Evas_Object *obj)
1862{ 1862{
diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo
index 35e0495cd7..5547a0bc3a 100644
--- a/src/lib/elementary/efl_ui_widget.eo
+++ b/src/lib/elementary/efl_ui_widget.eo
@@ -208,8 +208,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
208 @Efl.Ui.Widget objects have a parent hierarchy that may differ slightly 208 @Efl.Ui.Widget objects have a parent hierarchy that may differ slightly
209 from their @Efl.Object or @Efl.Canvas.Object hierarchy. This is 209 from their @Efl.Object or @Efl.Canvas.Object hierarchy. This is
210 meant for internal handling. 210 meant for internal handling.
211
212 See also @.widget_top.
213 ]] 211 ]]
214 set { 212 set {
215 legacy: elm_widget_parent_set; /* internal in legacy */ 213 legacy: elm_widget_parent_set; /* internal in legacy */
@@ -221,31 +219,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
221 parent: Efl.Ui.Widget @nullable; [[Widget parent object]] 219 parent: Efl.Ui.Widget @nullable; [[Widget parent object]]
222 } 220 }
223 } 221 }
224 @property widget_top {
225 [[Root widget in the widget hierarchy.
226
227 This returns the top widget, in terms of widget hierarchy. This is
228 usually a window (@Efl.Ui.Win). This function walks the list of
229 @.widget_parent.
230
231 If this widget has no parent (in terms of widget hierarchy) this
232 will return $null.
233
234 Note: This may not be a display manager window in case of nested
235 canvases. If a "real" window is required, then you might want to
236 verify that the returned object is a @Efl.Ui.Win_Inlined, and then
237 get @Efl.Ui.Win_Inlined.inlined_parent to find an object in the
238 master window.
239
240 See also @.widget_parent.
241 ]]
242 get {
243 legacy: elm_widget_top_get; /* internal in legacy */
244 }
245 values {
246 top: Efl.Ui.Widget; [[Top widget, usually a window.]]
247 }
248 }
249 222
250 /* Accessibility */ 223 /* Accessibility */
251 @property access_info { 224 @property access_info {
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index 994fd39388..a2e4756ec6 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -603,7 +603,7 @@ EAPI Eina_Bool elm_widget_highlight_in_theme_get(const Evas_Object *obj);
603EAPI void elm_widget_access_highlight_in_theme_set(Evas_Object *obj, Eina_Bool highlight); 603EAPI void elm_widget_access_highlight_in_theme_set(Evas_Object *obj, Eina_Bool highlight);
604EAPI Eina_Bool elm_widget_access_highlight_in_theme_get(const Evas_Object *obj); 604EAPI Eina_Bool elm_widget_access_highlight_in_theme_get(const Evas_Object *obj);
605EAPI Eina_Bool elm_widget_highlight_get(const Evas_Object *obj); 605EAPI Eina_Bool elm_widget_highlight_get(const Evas_Object *obj);
606EAPI Evas_Object *elm_widget_top_get(const Evas_Object *obj); 606EAPI Eo *elm_widget_top_get(const Eo *obj);
607EAPI Eina_Bool elm_widget_is(const Evas_Object *obj); 607EAPI Eina_Bool elm_widget_is(const Evas_Object *obj);
608EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj); 608EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj);
609EAPI void elm_widget_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data); 609EAPI void elm_widget_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data);