+elm_icon_size_get
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 27 Jul 2011 20:31:40 +0000 (20:31 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 27 Jul 2011 20:31:40 +0000 (20:31 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@61818 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/Elementary.h.in
src/lib/elm_icon.c

index d43c87b..af715f9 100644 (file)
@@ -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
index f70473c..56eaaf7 100644 (file)
@@ -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)
 {