elementary: add object_get to elm_image

SVN revision: 59543
This commit is contained in:
Michael BOUCHAUD 2011-05-19 20:02:16 +00:00
parent 2d88066300
commit 179252f378
2 changed files with 21 additions and 0 deletions

View 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
*/

View 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 :*/