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
This commit is contained in:
Mike Blumenkrantz 2019-03-04 13:36:47 -05:00
parent 644b771fe4
commit 43ef483801
4 changed files with 12 additions and 39 deletions

View File

@ -2384,7 +2384,7 @@ _efl_ui_layout_base_efl_object_finalize(Eo *obj, Efl_Ui_Layout_Data *pd EINA_UNU
eo = efl_finalize(efl_super(obj, MY_CLASS));
efl_ui_widget_theme_apply(eo);
win = efl_ui_widget_top_get(obj);
win = elm_widget_top_get(obj);
if (efl_isa(win, EFL_UI_WIN_CLASS))
efl_ui_layout_theme_rotation_apply(obj, efl_ui_win_rotation_get(win));
@ -2578,7 +2578,7 @@ _efl_ui_layout_base_automatic_theme_rotation_set(Eo *obj, Efl_Ui_Layout_Data *pd
if (pd->automatic_orientation_apply == automatic) return;
pd->automatic_orientation_apply = automatic;
efl_ui_layout_theme_rotation_apply(obj, efl_ui_win_rotation_get(efl_ui_widget_top_get(obj)));
efl_ui_layout_theme_rotation_apply(obj, efl_ui_win_rotation_get(elm_widget_top_get(obj)));
}
EOLIAN static Eina_Bool

View File

@ -1838,25 +1838,25 @@ elm_widget_highlight_get(const Eo *obj)
return sd->highlighted;
}
EOLIAN static Evas_Object*
_efl_ui_widget_widget_top_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
EAPI Eina_Bool
elm_widget_is(const Evas_Object *obj)
{
return _elm_widget_is(obj);
}
EAPI Eo *
elm_widget_top_get(const Eo *obj)
{
Efl_Ui_Widget *parent = elm_widget_parent_get(obj);
if (parent)
{
if (!efl_isa(parent, EFL_UI_WIDGET_CLASS)) return NULL;
return efl_ui_widget_top_get(parent);
return elm_widget_top_get(parent);
}
/* XXX const */
return (Evas_Object *)obj;
}
EAPI Eina_Bool
elm_widget_is(const Evas_Object *obj)
{
return _elm_widget_is(obj);
}
EAPI Evas_Object *
elm_widget_parent_widget_get(const Evas_Object *obj)
{

View File

@ -208,8 +208,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
@Efl.Ui.Widget objects have a parent hierarchy that may differ slightly
from their @Efl.Object or @Efl.Canvas.Object hierarchy. This is
meant for internal handling.
See also @.widget_top.
]]
set {
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
parent: Efl.Ui.Widget @nullable; [[Widget parent object]]
}
}
@property widget_top {
[[Root widget in the widget hierarchy.
This returns the top widget, in terms of widget hierarchy. This is
usually a window (@Efl.Ui.Win). This function walks the list of
@.widget_parent.
If this widget has no parent (in terms of widget hierarchy) this
will return $null.
Note: This may not be a display manager window in case of nested
canvases. If a "real" window is required, then you might want to
verify that the returned object is a @Efl.Ui.Win_Inlined, and then
get @Efl.Ui.Win_Inlined.inlined_parent to find an object in the
master window.
See also @.widget_parent.
]]
get {
legacy: elm_widget_top_get; /* internal in legacy */
}
values {
top: Efl.Ui.Widget; [[Top widget, usually a window.]]
}
}
/* Accessibility */
@property access_info {

View File

@ -603,7 +603,7 @@ EAPI Eina_Bool elm_widget_highlight_in_theme_get(const Evas_Object *obj);
EAPI void elm_widget_access_highlight_in_theme_set(Evas_Object *obj, Eina_Bool highlight);
EAPI Eina_Bool elm_widget_access_highlight_in_theme_get(const Evas_Object *obj);
EAPI Eina_Bool elm_widget_highlight_get(const Evas_Object *obj);
EAPI Evas_Object *elm_widget_top_get(const Evas_Object *obj);
EAPI Eo *elm_widget_top_get(const Eo *obj);
EAPI Eina_Bool elm_widget_is(const Evas_Object *obj);
EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj);
EAPI void elm_widget_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data);