widget: Rename top to widget_top (EO)

Ref T5363
This commit is contained in:
Jean-Philippe Andre 2017-08-23 16:24:05 +09:00
parent ec264c5002
commit 53c966b790
2 changed files with 45 additions and 27 deletions

View File

@ -1913,16 +1913,14 @@ _elm_widget_focused_object_get(Eo *obj, Elm_Widget_Smart_Data *sd)
}
EOLIAN static Evas_Object*
_elm_widget_top_get(Eo *obj, Elm_Widget_Smart_Data *sd)
_elm_widget_widget_top_get(Eo *obj, Elm_Widget_Smart_Data *sd)
{
if (sd->parent_obj)
{
Evas_Object *ret = NULL;
if (!efl_isa(sd->parent_obj, ELM_WIDGET_CLASS)) return NULL;
ret = elm_obj_widget_top_get((Eo *) sd->parent_obj);
return ret;
return elm_obj_widget_top_get(sd->parent_obj);
}
return (Evas_Object *)obj;
return obj;
}
EAPI Eina_Bool

View File

@ -177,6 +177,48 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
can_focus: bool; [[Whether the object is focusable.]]
}
}
@property widget_parent @protected {
[[The internal parent of this widget.
@Elm.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 {}
get {
legacy: elm_widget_parent_get; /* internal in legacy */
}
values {
parent: Elm.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: Elm.Widget; [[Top widget, usually a window.]]
}
}
/* Not sure if the following are internal only? */
@property on_show_region_hook {
@ -252,16 +294,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
highlight: bool; [[$true if widget gets hightlight, $false otherwise]]
}
}
@property widget_parent @protected {
[[The internal widget parent]]
set {}
get {
legacy: elm_widget_parent_get; /* Needed because we don't do duplication removal for legacy names. */
}
values {
parent: Efl.Canvas.Object @nullable; [[Widget parent object]]
}
}
@property access_info {
[[Accessibility information]]
values {
@ -385,12 +417,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
h: int; [[Height]]
}
}
@property top {
[[Top widget property]]
get {
return: Efl.Canvas.Object; [[Top widget]]
}
}
@property focus_order {
[[Focus order property]]
get {
@ -732,12 +758,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
@in sobj: Efl.Canvas.Object; [[Object to be deleted]]
}
}
tooltip_add {
[[Add tooltip to widget]]
params {
@in tt: ptr(Elm.Tooltip); [[Tooltip]]
}
}
focus_region_show @const {
[[Show focus region]]
}