From 878a3d952cf1acdbe3f8bb9dd4b15fb039acc7c5 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 14 Apr 2016 18:33:25 +0100 Subject: [PATCH] Evas object: rename smart_parent to render_parent and mark as protected. --- src/lib/evas/canvas/evas_object.eo | 19 +++++++++++++------ src/lib/evas/canvas/evas_object_main.c | 4 +++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/lib/evas/canvas/evas_object.eo b/src/lib/evas/canvas/evas_object.eo index 628580f..65020c8 100644 --- a/src/lib/evas/canvas/evas_object.eo +++ b/src/lib/evas/canvas/evas_object.eo @@ -964,13 +964,20 @@ abstract Evas.Object (Eo.Base, Evas.Common_Interface, Efl.Gfx.Base, Efl.Gfx.Stac return: const(list)* @warn_unused; [[A list of objects being clipped by $obj.]] } } - @property smart_parent { + @property render_parent @protected { + [[Gets the parent smart object of a given Evas object, if it has one. + + This can be different from @Eo.Base.parent because this one is + used internally for rendering and the normal parent is what the + user expects to be the parent. + + @since 1.18 + ]] get { - [[Gets the parent smart object of a given Evas object, if it - has one. - ]] - return: Evas.Object * @warn_unused; [[The parent smart object - of $obj or $null.]] + legacy: evas_object_smart_parent_get; + } + values { + parent: Evas.Object *; [[The parent smart object of $obj or $null.]] } } @property size_hint_display_mode { diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 8085f41..6a1983f 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -1,3 +1,5 @@ +#define EVAS_OBJECT_PROTECTED + #include "evas_common_private.h" #include "evas_private.h" @@ -2065,7 +2067,7 @@ _evas_object_is_frame_object_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_ } EOLIAN static Evas_Object * -_evas_object_smart_parent_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) +_evas_object_render_parent_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) { if (!obj) return NULL; return obj->smart.parent; -- 2.7.4