From: yoz Date: Thu, 19 May 2011 20:02:16 +0000 (+0000) Subject: elementary: add object_get to elm_image X-Git-Tag: REL_F_I9500_20120323_1~17^2~2731 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7aadc0742c75cb39c5a3d4e1544ff2a7ce44d6f6;p=framework%2Fuifw%2Felementary.git elementary: add object_get to elm_image git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@59543 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 243af52..b5b7794 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -772,6 +772,7 @@ extern "C" { EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI void elm_image_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1); EAPI Eina_Bool elm_image_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); + EAPI Evas_Object *elm_image_object_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /* smart callbacks called: * "clicked" - the user clicked the image */ diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c index bc627ca..f63a7a3 100644 --- a/src/lib/elm_image.c +++ b/src/lib/elm_image.c @@ -488,5 +488,25 @@ elm_image_editable_get(const Evas_Object *obj) return _els_smart_icon_edit_get(wd->img); } +/** + * Get the image object + * + * When you create a image with elm_image_add(). You can get this object (be + * careful to not manipulate it as it is under control of elementary), and use + * it to do things like get pixel data, save the image to a file, etc. + * + * @param obj The image object to get the inlined image from + * @return The inlined image object, or NULL if none exists + * + * @ingroup Win + */ +EAPI Evas_Object * +elm_image_object_get(const Evas_Object *obj) +{ + ELM_CHECK_WIDTYPE(obj, widtype) NULL; + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return NULL; + return _els_smart_icon_object_get(wd->img); +} /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/