From 2d2ad135375642e273d20fd6cc7d9777b95967b8 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 6 Oct 2017 11:37:50 -0400 Subject: [PATCH] add comp object function to get the content of a util_add object --- src/bin/e_comp_object.c | 11 +++++++++++ src/bin/e_comp_object.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 3aa176b8f..79fb66ba8 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -3045,6 +3045,17 @@ e_comp_object_util_add(Evas_Object *obj, E_Comp_Object_Type type) return o; } +E_API Evas_Object * +e_comp_object_util_get(Evas_Object *obj) +{ + Evas_Object *z; + SOFT_ENTRY(NULL); + if (cw) return NULL; + z = edje_object_part_swallow_get(obj, "e.swallow.content"); + EINA_SAFETY_ON_NULL_RETURN_VAL(z, NULL); + return e_zoomap_child_get(z); +} + /* utility functions for deleting objects when their "owner" is deleted */ E_API void e_comp_object_util_del_list_append(Evas_Object *obj, Evas_Object *to_del) diff --git a/src/bin/e_comp_object.h b/src/bin/e_comp_object.h index 639d2ad4d..106b4e81b 100644 --- a/src/bin/e_comp_object.h +++ b/src/bin/e_comp_object.h @@ -41,6 +41,7 @@ E_API Evas_Object *e_comp_object_client_add(E_Client *ec); E_API Evas_Object *e_comp_object_util_mirror_add(Evas_Object *obj); E_API void e_comp_object_util_type_set(Evas_Object *obj, E_Comp_Object_Type type); E_API Evas_Object *e_comp_object_util_add(Evas_Object *obj, E_Comp_Object_Type type); +E_API Evas_Object *e_comp_object_util_get(Evas_Object *obj); E_API void e_comp_object_frame_xy_adjust(Evas_Object *obj, int x, int y, int *ax, int *ay); E_API void e_comp_object_frame_xy_unadjust(Evas_Object *obj, int x, int y, int *ax, int *ay); E_API void e_comp_object_frame_wh_adjust(Evas_Object *obj, int w, int h, int *aw, int *ah);