From: Enlightenment S. <no-...@en...> - 2011-11-06 15:56:37
|
Log: add function to return image object for use with evas apis Author: discomfitor Date: 2011-11-06 07:56:31 -0800 (Sun, 06 Nov 2011) New Revision: 64830 Trac: http://trac.enlightenment.org/e/changeset/64830 Modified: trunk/elementary/src/lib/Elementary.h.in trunk/elementary/src/lib/elm_icon.c Modified: trunk/elementary/src/lib/Elementary.h.in =================================================================== --- trunk/elementary/src/lib/Elementary.h.in 2011-11-06 15:43:48 UTC (rev 64829) +++ trunk/elementary/src/lib/Elementary.h.in 2011-11-06 15:56:31 UTC (rev 64830) @@ -5053,6 +5053,15 @@ */ 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 Modified: trunk/elementary/src/lib/elm_icon.c =================================================================== --- trunk/elementary/src/lib/elm_icon.c 2011-11-06 15:43:48 UTC (rev 64829) +++ trunk/elementary/src/lib/elm_icon.c 2011-11-06 15:56:31 UTC (rev 64830) @@ -1014,3 +1014,13 @@ 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; +} |