From 9250c3944898b215db73edad01bf210e5fc484b4 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 6 Nov 2011 15:56:31 +0000 Subject: [PATCH] add function to return image object for use with evas apis SVN revision: 64830 --- src/lib/Elementary.h.in | 9 +++++++++ src/lib/elm_icon.c | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index a9e78c1..d2ab8b2 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -5053,6 +5053,15 @@ extern "C" { */ EAPI int elm_icon_prescale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** + * Gets the image object of the icon. DO NOT MODIFY THIS. + * + * @param obj The icon object + * @return The internal icon object + * + * @ingroup Icon + */ + EAPI Evas_Object *elm_icon_object_get(Evas_Object *obj) EINA_ARG_NONNULL(1); + /** * Sets the icon lookup order used by elm_icon_standard_set(). * * @param obj The icon object diff --git a/src/lib/elm_icon.c b/src/lib/elm_icon.c index d4804f0..04427c5 100644 --- a/src/lib/elm_icon.c +++ b/src/lib/elm_icon.c @@ -1014,3 +1014,13 @@ elm_icon_prescale_get(const Evas_Object *obj) if (!wd) return 0; return _els_smart_icon_scale_size_get(wd->img); } + +EAPI Evas_Object * +elm_icon_object_get(Evas_Object *obj) +{ + ELM_CHECK_WIDTYPE(obj, widtype) 0; + Widget_Data *wd = elm_widget_data_get(obj); + + if (!wd) return NULL; + return wd->img; +} -- 2.7.4