elementary: add object_get to elm_image
authoryoz <yoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 19 May 2011 20:02:16 +0000 (20:02 +0000)
committeryoz <yoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 19 May 2011 20:02:16 +0000 (20:02 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@59543 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

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

index 243af52..b5b7794 100644 (file)
@@ -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
     */
index bc627ca..f63a7a3 100644 (file)
@@ -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 :*/