From a813bda29d79b1723f599da9a1bba9d1351719e5 Mon Sep 17 00:00:00 2001 From: discomfitor Date: Wed, 27 Jul 2011 20:31:40 +0000 Subject: [PATCH] +elm_icon_size_get git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@61818 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/Elementary.h.in | 10 ++++++++++ src/lib/elm_icon.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index d43c87b..af715f9 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -2165,6 +2165,16 @@ extern "C" { */ EAPI void elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1); /** + * Get the object's image size + * + * @param obj The icon object + * @param w A pointer to store the width in + * @param h A pointer to store the height in + * + * @ingroup Icon + */ + EAPI void elm_icon_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); + /** * Set if the icon fill the entire object area. * * @param obj The icon object diff --git a/src/lib/elm_icon.c b/src/lib/elm_icon.c index f70473c..56eaaf7 100644 --- a/src/lib/elm_icon.c +++ b/src/lib/elm_icon.c @@ -814,6 +814,16 @@ elm_icon_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) _sizing_eval(obj); } +EAPI void +elm_icon_size_get(const Evas_Object *obj, int *w, int *h) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + + if (!wd) return; + _els_smart_icon_size_get(wd->img, w, h); +} + EAPI Eina_Bool elm_icon_fill_outside_get(const Evas_Object *obj) { -- 2.7.4