diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h index 70fccb5598..3a802d4707 100644 --- a/src/lib/edje/Edje_Legacy.h +++ b/src/lib/edje/Edje_Legacy.h @@ -480,6 +480,29 @@ EAPI Eina_Bool edje_object_part_external_param_set(Edje_Object *obj, const char */ EAPI Eina_Bool edje_object_part_external_param_get(const Edje_Object *obj, const char *part, Edje_External_Param *param); +/** + * @brief Gets the object created by this external part. + * + * Parts of type external creates the part object using information provided by + * external plugins. It's somehow like "swallow" (edje_object_part_swallow()), + * but it's all set automatically. + * + * This function returns the part created by such external plugins and being + * currently managed by this Edje. + * + * @note Almost all swallow rules apply: you should not move, resize, hide, + * show, set the color or clipper of such part. It's a bit more restrictive as + * one must never delete this object! + * + * @param[in] part The part name + * + * @return The externally created object, or @c null if there is none or part + * is not an external. + * + * @ingroup Edje_Object + */ +EAPI Evas_Object *edje_object_part_external_object_get(const Edje_Object *obj, const char * part); + /** * @brief Gets an object contained in an part of type EXTERNAL * diff --git a/src/lib/edje/edje_external.c b/src/lib/edje/edje_external.c index b067b5ca38..87ef983737 100644 --- a/src/lib/edje/edje_external.c +++ b/src/lib/edje/edje_external.c @@ -28,8 +28,8 @@ edje_external_param_type_str(Edje_External_Param_Type type) } } -EOLIAN Evas_Object * -_edje_object_part_external_object_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part) +Evas_Object * +_edje_object_part_external_object_get(Edje *ed, const char *part) { Edje_Real_Part *rp; diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c index 5bbb3848b0..5773b58cdf 100644 --- a/src/lib/edje/edje_legacy.c +++ b/src/lib/edje/edje_legacy.c @@ -119,6 +119,13 @@ edje_object_part_external_param_type_get(const Eo *obj, const char *part, const return _edje_object_part_external_param_type_get(ed, part, param); } +EAPI Evas_Object * +edje_object_part_external_object_get(const Edje_Object *obj, const char *part) +{ + Edje *ed = _edje_fetch(obj); + return _edje_object_part_external_object_get(ed, part); +} + /* Legacy only. Shall we deprecate this API? */ EAPI Evas_Object * edje_object_part_external_content_get(const Edje_Object *obj, const char *part, const char *content) diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo index 84482c5ec9..7db36ceb86 100644 --- a/src/lib/edje/edje_object.eo +++ b/src/lib/edje/edje_object.eo @@ -1006,27 +1006,6 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part, @in dy: double; [[The y step]] } } - @property part_external_object { - get { - [[Gets the object created by this external part. - - Parts of type external creates the part object using information - provided by external plugins. It's somehow like "swallow" - (edje_object_part_swallow()), but it's all set automatically. - - This function returns the part created by such external plugins and - being currently managed by this Edje. - - Note: Almost all swallow rules apply: you should not move, resize, - hide, show, set the color or clipper of such part. It's a bit - more restrictive as one must never delete this object!]] - return: Efl.Canvas.Object; [[The externally created object, or $null if there is none or - part is not an external.]] - } - keys { - part: string; [[The part name]] - } - } @property text_change_cb { set { [[Sets the object text callback. diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index 531ec16a16..347873a104 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -3125,6 +3125,7 @@ Eo *_edje_external_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part Eina_Bool _edje_object_part_external_param_set(Edje *ed, const char *part, const Edje_External_Param *param); Eina_Bool _edje_object_part_external_param_get(Edje *ed, const char *part, Edje_External_Param *param); Edje_External_Param_Type _edje_object_part_external_param_type_get(Edje *ed, const char *part, const char *param); +Evas_Object *_edje_object_part_external_object_get(Edje *ed, const char *part); Evas_Object *_edje_object_part_external_content_get(Edje *ed, const char *part, const char *content); void _edje_internal_proxy_shutdown(void);