- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Enumerations | Functions
Image

## Enumerations
enum | Elm_Image_Orient { ELM_IMAGE_ORIENT_NONE = 0, ELM_IMAGE_ORIENT_0 = 0, ELM_IMAGE_ROTATE_90 = 1, ELM_IMAGE_ROTATE_180 = 2, ELM_IMAGE_ROTATE_270 = 3, ELM_IMAGE_FLIP_HORIZONTAL = 4, ELM_IMAGE_FLIP_VERTICAL = 5, ELM_IMAGE_FLIP_TRANSPOSE = 6, ELM_IMAGE_FLIP_TRANSVERSE = 7 }
| Possible orientation options for elm_image_orient_set(). More...

## Functions
Evas_Object * | elm_image_add (Evas_Object *parent)
| Add a new image to the parent. More...
Eina_Bool | elm_image_memfile_set (Evas_Object *obj, const void *img, size_t size, const char *format, const char *key)
| Set a location in memory to be used as an image object's source bitmap. More...
Eina_Bool | elm_image_mmap_set (Evas_Object *obj, const Eina_File *file, const char *group)
| Set the file that will be used as the image's source. More...
Eina_Bool | elm_image_file_set (Evas_Object *obj, const char *file, const char *group)
| Set the file that will be used as the image's source. More...
void | elm_image_file_get (const Evas_Object *obj, const char **file, const char **group)
| Get the file that will be used as image. More...
void | elm_image_smooth_set (Evas_Object *obj, Eina_Bool smooth)
| Set the smooth effect for an image. More...
Eina_Bool | elm_image_smooth_get (const Evas_Object *obj)
| Get the smooth effect for an image. More...
void | elm_image_object_size_get (const Evas_Object *obj, int *w, int *h)
| Get the current size of the image. More...
void | elm_image_no_scale_set (Evas_Object *obj, Eina_Bool no_scale)
| Disable scaling of this object. More...
Eina_Bool | elm_image_no_scale_get (const Evas_Object *obj)
| Get whether scaling is disabled on the object. More...
void | elm_image_resizable_set (Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down)
| Set if the object is (up/down) resizable. More...
void | elm_image_resizable_get (const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down)
| Get if the object is (up/down) resizable. More...
void | elm_image_fill_outside_set (Evas_Object *obj, Eina_Bool fill_outside)
| Set if the image fills the entire object area, when keeping the aspect ratio. More...
Eina_Bool | elm_image_fill_outside_get (const Evas_Object *obj)
| Get if the object is filled outside. More...
void | elm_image_preload_disabled_set (Evas_Object *obj, Eina_Bool disabled)
| Enable or disable preloading of the image. More...
void | elm_image_prescale_set (Evas_Object *obj, int size)
| Set the prescale size for the image. More...
int | elm_image_prescale_get (const Evas_Object *obj)
| Get the prescale size for the image. More...
void | elm_image_orient_set (Evas_Object *obj, Elm_Image_Orient orient)
| Set the image orientation. More...
Elm_Image_Orient | elm_image_orient_get (const Evas_Object *obj)
| Get the image orientation. More...
void | elm_image_editable_set (Evas_Object *obj, Eina_Bool set)
| Make the image 'editable'. More...
Eina_Bool | elm_image_editable_get (const Evas_Object *obj)
| Check if the image is 'editable'. More...
Evas_Object * | elm_image_object_get (const Evas_Object *obj)
| Get the inlined image object of the image widget. More...
void | elm_image_aspect_fixed_set (Evas_Object *obj, Eina_Bool fixed)
| Set whether the original aspect ratio of the image should be kept on resize. More...
Eina_Bool | elm_image_aspect_fixed_get (const Evas_Object *obj)
| Get if the object retains the original aspect ratio. More...
Eina_Bool | elm_image_animated_available_get (const Evas_Object *obj)
| Get whether an image object supports animation or not. More...
void | elm_image_animated_set (Evas_Object *obj, Eina_Bool animated)
| Set whether an image object (which supports animation) is to animate itself or not. More...
Eina_Bool | elm_image_animated_get (const Evas_Object *obj)
| Get whether an image object has animation enabled or not. More...
void | elm_image_animated_play_set (Evas_Object *obj, Eina_Bool play)
| Start or stop an image object's animation. More...
Eina_Bool | elm_image_animated_play_get (const Evas_Object *obj)
| Get whether an image object is under animation or not. More...
#define | elm_obj_image_memfile_set(img, size, format, key, ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_MEMFILE_SET), EO_TYPECHECK(const void *, img), EO_TYPECHECK(size_t, size), EO_TYPECHECK(const char *, format), EO_TYPECHECK(const char *, key), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_file_set(file, group, ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILE_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_mmap_set(file, group, ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_MMAP_SET), EO_TYPECHECK(const Eina_File *, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_file_get(file, group) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILE_GET), EO_TYPECHECK(const char **, file), EO_TYPECHECK(const char **, group)
#define | elm_obj_image_smooth_set(smooth) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SMOOTH_SET), EO_TYPECHECK(Eina_Bool, smooth)
#define | elm_obj_image_smooth_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SMOOTH_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_size_get(w, h) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_OBJECT_SIZE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h)
#define | elm_obj_image_no_scale_set(no_scale) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_NO_SCALE_SET), EO_TYPECHECK(Eina_Bool, no_scale)
#define | elm_obj_image_no_scale_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_NO_SCALE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_resizable_set(up, down) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZABLE_SET), EO_TYPECHECK(Eina_Bool, up), EO_TYPECHECK(Eina_Bool, down)
#define | elm_obj_image_resizable_get(size_up, size_down) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZABLE_GET), EO_TYPECHECK(Eina_Bool *, size_up), EO_TYPECHECK(Eina_Bool *, size_down)
#define | elm_obj_image_fill_outside_set(fill_outside) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILL_OUTSIDE_SET), EO_TYPECHECK(Eina_Bool, fill_outside)
#define | elm_obj_image_fill_outside_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILL_OUTSIDE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_preload_disabled_set(disabled) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_PRELOAD_DISABLED_SET), EO_TYPECHECK(Eina_Bool, disabled)
#define | elm_obj_image_orient_set(orient) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ORIENT_SET), EO_TYPECHECK(Elm_Image_Orient, orient)
#define | elm_obj_image_orient_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ORIENT_GET), EO_TYPECHECK(Elm_Image_Orient *, ret)
#define | elm_obj_image_editable_set(set, parent) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_EDITABLE_SET), EO_TYPECHECK(Eina_Bool, set), EO_TYPECHECK(Evas_Object *, parent)
#define | elm_obj_image_editable_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_EDITABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_object_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_OBJECT_GET), EO_TYPECHECK(Evas_Object **, ret)
#define | elm_obj_image_aspect_fixed_set(fixed) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ASPECT_FIXED_SET), EO_TYPECHECK(Eina_Bool, fixed)
#define | elm_obj_image_aspect_fixed_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ASPECT_FIXED_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_animated_available_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_AVAILABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_animated_set(anim) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_SET), EO_TYPECHECK(Eina_Bool, anim)
#define | elm_obj_image_animated_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_animated_play_set(play) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_PLAY_SET), EO_TYPECHECK(Eina_Bool, play)
#define | elm_obj_image_animated_play_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_PLAY_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_sizing_eval() ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SIZING_EVAL)
#define | elm_obj_image_smooth_scale_set(smooth) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SMOOTH_SCALE_SET), EO_TYPECHECK(Eina_Bool, smooth)
#define | elm_obj_image_smooth_scale_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SMOOTH_SCALE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_fill_inside_set(fill_inside) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILL_INSIDE_SET), EO_TYPECHECK(Eina_Bool, fill_inside)
#define | elm_obj_image_fill_inside_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILL_INSIDE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_load_size_set(size) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_LOAD_SIZE_SET), EO_TYPECHECK(int, size)
#define | elm_obj_image_load_size_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_LOAD_SIZE_GET), EO_TYPECHECK(int *, ret)
#define | elm_obj_image_resize_down_set(resize_down) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZE_DOWN_SET), EO_TYPECHECK(Eina_Bool, resize_down)
#define | elm_obj_image_resize_down_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZE_DOWN_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_resize_up_set(resize_up) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZE_UP_SET), EO_TYPECHECK(Eina_Bool, resize_up)
#define | elm_obj_image_resize_up_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZE_UP_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_image_scale_set(scale) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SCALE_SET), EO_TYPECHECK(double, scale)
#define | elm_obj_image_scale_get(ret) ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SCALE_GET), EO_TYPECHECK(double *, ret)

## Detailed Description

An Elementary image object is a direct realization of The Elementary Image Class, and it allows one to load and display an image file on it, be it from a disk file or from a memory region. Exceptionally, one may also load an Edje group as the contents of the image. In this case, though, most of the functions of the image API will act as a no-op.

One can tune various properties of the image, like:

- pre-scaling,
- smooth scaling,
- orientation,
- aspect ratio during resizes, etc.

An image object may also be made valid source and destination for drag and drop actions, through the elm_image_editable_set() call.

Signals that you can add callbacks for are:

- `"drop"` - This is called when a user has dropped an image typed object onto the object in question – the event info argument is the path to that image file
- `"clicked"` - This is called when a user has clicked the image

An example of usage for this API follows:

- Image example

## Macro Definition Documentation

#define elm_obj_image_animated_available_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_AVAILABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether an image object supports animation or not.

Parameters

  [out] | ret |

See Also
  elm_image_animated_available_get

Referenced by elm_image_animated_available_get().

#define elm_obj_image_animated_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether an image object has animation enabled or not.

Parameters

  [out] | ret |

See Also
  elm_image_animated_get

Referenced by elm_image_animated_get().

#define elm_obj_image_animated_play_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_PLAY_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether an image object is under animation or not.

Parameters

  [out] | ret |

See Also
  elm_image_animated_play_get

Referenced by elm_image_animated_play_get().

#define elm_obj_image_animated_play_set | ( |  | play | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_PLAY_SET), EO_TYPECHECK(Eina_Bool, play)

Since
  1.8

Start or stop an image object's animation.

Parameters

  [in] | play |

See Also
  elm_image_animated_play_set

Referenced by elm_image_animated_play_set().

#define elm_obj_image_animated_set | ( |  | anim | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ANIMATED_SET), EO_TYPECHECK(Eina_Bool, anim)

Since
  1.8

Set whether an image object (which supports animation) is to

Parameters

  [in] | anim |

See Also
  elm_image_animated_set

Referenced by elm_image_animated_set().

#define elm_obj_image_aspect_fixed_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ASPECT_FIXED_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get if the object retains the original aspect ratio.

Parameters

  [out] | ret |

See Also
  elm_image_aspect_fixed_get

Referenced by elm_image_aspect_fixed_get().

#define elm_obj_image_aspect_fixed_set | ( |  | fixed | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ASPECT_FIXED_SET), EO_TYPECHECK(Eina_Bool, fixed)

Since
  1.8

Set whether the original aspect ratio of the image should be kept on resize.

Parameters

  [in] | fixed |

See Also
  elm_image_aspect_fixed_set

Referenced by elm_image_aspect_fixed_set().

#define elm_obj_image_editable_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_EDITABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Check if the image is 'editable'.

Parameters

  [out] | ret |

See Also
  elm_image_editable_get

Referenced by elm_image_editable_get().

#define elm_obj_image_editable_set | ( |  | set,
|  |  | parent
| ) |  | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_EDITABLE_SET), EO_TYPECHECK(Eina_Bool, set), EO_TYPECHECK(Evas_Object *, parent)

Since
  1.8

Make the image 'editable'.

Parameters

  [in] | set |
  [in] | parent |

See Also
  elm_image_editable_set

Referenced by elm_image_editable_set().

#define elm_obj_image_file_get | ( |  | file,
|  |  | group
| ) |  | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILE_GET), EO_TYPECHECK(const char **, file), EO_TYPECHECK(const char **, group)

Since
  1.8

Get the file that will be used as image.

Parameters

  [out] | file |
  [out] | group |

See Also
  elm_image_file_get

Referenced by elm_image_file_get().

#define elm_obj_image_file_set | ( |  | file,
|  |  | group,
|  |  | ret
| ) |  | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILE_SET), EO_TYPECHECK(const char *, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Set the file that will be used as the image's source.

Parameters

  [in] | file |
  [in] | group |
  [out] | ret |

See Also
  elm_image_file_set

Referenced by elm_icon_file_set(), and elm_image_file_set().

#define elm_obj_image_fill_inside_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILL_INSIDE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [out] | ret |

See Also
  elm_image_fill_inside_get

#define elm_obj_image_fill_inside_set | ( |  | fill_inside | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILL_INSIDE_SET), EO_TYPECHECK(Eina_Bool, fill_inside)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [in] | fill_inside |

See Also
  elm_image_fill_inside_set

#define elm_obj_image_fill_outside_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILL_OUTSIDE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get if the object is filled outside

Parameters

  [out] | ret |

See Also
  elm_image_fill_outside_get

Referenced by elm_image_fill_outside_get().

#define elm_obj_image_fill_outside_set | ( |  | fill_outside | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_FILL_OUTSIDE_SET), EO_TYPECHECK(Eina_Bool, fill_outside)

Since
  1.8

Set if the image fills the entire object area, when keeping the aspect ratio.

Parameters

  [in] | fill_outside |

See Also
  elm_image_fill_outside_set

Referenced by elm_image_fill_outside_set().

#define elm_obj_image_load_size_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_LOAD_SIZE_GET), EO_TYPECHECK(int *, ret)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [out] | ret |

See Also
  elm_image_load_size_get

Referenced by elm_image_prescale_get().

#define elm_obj_image_load_size_set | ( |  | size | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_LOAD_SIZE_SET), EO_TYPECHECK(int, size)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [in] | size |

See Also
  elm_image_load_size_set

Referenced by elm_image_prescale_set().

#define elm_obj_image_memfile_set | ( |  | img,
|  |  | size,
|  |  | format,
|  |  | key,
|  |  | ret
| ) |  | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_MEMFILE_SET), EO_TYPECHECK(const void *, img), EO_TYPECHECK(size_t, size), EO_TYPECHECK(const char *, format), EO_TYPECHECK(const char *, key), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Set a location in memory to be used as an image object's source

Parameters

  [in] | img |
  [in] | size |
  [in] | format |
  [in] | key |
  [out] | ret |

See Also
  elm_image_memfile_set

Referenced by elm_icon_memfile_set(), and elm_image_memfile_set().

#define elm_obj_image_mmap_set | ( |  | file,
|  |  | group,
|  |  | ret
| ) |  | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_MMAP_SET), EO_TYPECHECK(const Eina_File *, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Set the file that will be used as the image's source.

Parameters

  [in] | file |
  [in] | group |
  [out] | ret |

See Also
  elm_image_mmap_set

Referenced by elm_image_mmap_set().

#define elm_obj_image_no_scale_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_NO_SCALE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether scaling is disabled on the object.

Parameters

  [out] | ret |

See Also
  elm_image_no_scale_get

Referenced by elm_image_no_scale_get().

#define elm_obj_image_no_scale_set | ( |  | no_scale | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_NO_SCALE_SET), EO_TYPECHECK(Eina_Bool, no_scale)

Since
  1.8

Disable scaling of this object.

Parameters

  [in] | no_scale |

See Also
  elm_image_no_scale_set

Referenced by elm_image_no_scale_set().

#define elm_obj_image_object_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_OBJECT_GET), EO_TYPECHECK(Evas_Object **, ret)

Since
  1.8

Get the inlined image object of the image widget.

Parameters

  [out] | ret |

See Also
  elm_image_object_get

Referenced by elm_image_object_get().

#define elm_obj_image_orient_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ORIENT_GET), EO_TYPECHECK(Elm_Image_Orient *, ret)

Since
  1.8

Get the image orientation.

Parameters

  [out] | ret |

See Also
  elm_image_orient_get

Referenced by elm_image_orient_get().

#define elm_obj_image_orient_set | ( |  | orient | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_ORIENT_SET), EO_TYPECHECK(Elm_Image_Orient, orient)

Since
  1.8

Set the image orientation.

Parameters

  [in] | orient |

See Also
  elm_image_orient_set

Referenced by elm_image_orient_set().

#define elm_obj_image_preload_disabled_set | ( |  | disabled | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_PRELOAD_DISABLED_SET), EO_TYPECHECK(Eina_Bool, disabled)

Since
  1.8

Enable or disable preloading of the image

Parameters

  [in] | disabled |

See Also
  elm_image_preload_disabled_set

Referenced by elm_image_preload_disabled_set().

#define elm_obj_image_resizable_get | ( |  | size_up,
|  |  | size_down
| ) |  | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZABLE_GET), EO_TYPECHECK(Eina_Bool *, size_up), EO_TYPECHECK(Eina_Bool *, size_down)

Since
  1.8

Get if the object is (up/down) resizable.

Parameters

  [out] | size_up |
  [out] | size_down |

See Also
  elm_image_resizable_get

Referenced by elm_image_resizable_get().

#define elm_obj_image_resizable_set | ( |  | up,
|  |  | down
| ) |  | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZABLE_SET), EO_TYPECHECK(Eina_Bool, up), EO_TYPECHECK(Eina_Bool, down)

Since
  1.8

Set if the object is (up/down) resizable.

Parameters

  [in] | up |
  [in] | down |

See Also
  elm_image_resizable_set

Referenced by elm_image_resizable_set().

#define elm_obj_image_resize_down_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZE_DOWN_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [out] | ret |

See Also
  elm_image_resize_down_get

#define elm_obj_image_resize_down_set | ( |  | resize_down | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZE_DOWN_SET), EO_TYPECHECK(Eina_Bool, resize_down)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [in] | resize_down |

See Also
  elm_image_resize_down_set

#define elm_obj_image_resize_up_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZE_UP_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [out] | ret |

See Also
  elm_image_resize_up_get

#define elm_obj_image_resize_up_set | ( |  | resize_up | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_RESIZE_UP_SET), EO_TYPECHECK(Eina_Bool, resize_up)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [in] | resize_up |

See Also
  elm_image_resize_up_set

#define elm_obj_image_scale_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SCALE_GET), EO_TYPECHECK(double *, ret)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [out] | ret |

See Also
  elm_image_scale_get

#define elm_obj_image_scale_set | ( |  | scale | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SCALE_SET), EO_TYPECHECK(double, scale)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [in] | scale |

See Also
  elm_image_scale_set

#define elm_obj_image_size_get | ( |  | w,
|  |  | h
| ) |  | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_OBJECT_SIZE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [out] | w |
  [out] | h |

See Also
  elm_image_size_get

Referenced by elm_image_object_size_get().

#define elm_obj_image_sizing_eval | ( |  | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SIZING_EVAL)

Since
  1.8

No description supplied by the EAPI.

Referenced by elm_image_file_set(), and elm_image_mmap_set().

#define elm_obj_image_smooth_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SMOOTH_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get the smooth effect for an image.

Parameters

  [out] | ret |

See Also
  elm_image_smooth_get

Referenced by elm_image_smooth_get().

#define elm_obj_image_smooth_scale_get | ( |  | ret | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SMOOTH_SCALE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [out] | ret |

See Also
  elm_image_smooth_scale_get

#define elm_obj_image_smooth_scale_set | ( |  | smooth | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SMOOTH_SCALE_SET), EO_TYPECHECK(Eina_Bool, smooth)

Since
  1.8

No description supplied by the EAPI.

Parameters

  [in] | smooth |

See Also
  elm_image_smooth_scale_set

#define elm_obj_image_smooth_set | ( |  | smooth | ) | ELM_OBJ_IMAGE_ID(ELM_OBJ_IMAGE_SUB_ID_SMOOTH_SET), EO_TYPECHECK(Eina_Bool, smooth)

Since
  1.8

Set the smooth effect for an image.

Parameters

  [in] | smooth |

See Also
  elm_image_smooth_set

Referenced by elm_image_smooth_set().

## Enumeration Type Documentation

enum Elm_Image_Orient

Possible orientation options for elm_image_orient_set().

Enumerator
ELM_IMAGE_ORIENT_NONE | no orientation change
ELM_IMAGE_ORIENT_0 | no orientation change
ELM_IMAGE_ROTATE_90 | rotate 90 degrees clockwise
ELM_IMAGE_ROTATE_180 | rotate 180 degrees clockwise
ELM_IMAGE_ROTATE_270 | rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)
ELM_IMAGE_FLIP_HORIZONTAL | flip image horizontally
ELM_IMAGE_FLIP_VERTICAL | flip image vertically
ELM_IMAGE_FLIP_TRANSPOSE | flip the image along the y = (width - x) line (bottom-left to top-right)
ELM_IMAGE_FLIP_TRANSVERSE | flip the image along the y = x line (top-left to bottom-right)

## Function Documentation

Evas_Object* elm_image_add | ( | Evas_Object * | parent | ) |

Add a new image to the parent.

Parameters

  parent | The parent object

Returns
  The new object or NULL if it cannot be created

See Also
  elm_image_file_set()

Eina_Bool elm_image_animated_available_get | ( | const Evas_Object * | obj | ) |

Get whether an image object supports animation or not.

Parameters

  obj | The image object

Returns
  `EINA_TRUE` if the image supports animation, `EINA_FALSE` otherwise.

This function returns if this Elementary image object's internal image can be animated. Currently Evas only supports GIF animation. If the return value is EINA_FALSE, other `elm_image_animated_xxx` API calls won't work.

See Also
  elm_image_animated_set()

Since
  1.7

References elm_obj_image_animated_available_get.

Referenced by elm_icon_animated_available_get().

Eina_Bool elm_image_animated_get | ( | const Evas_Object * | obj | ) |

Get whether an image object has animation enabled or not.

Parameters

  obj | The image object

Returns
  `EINA_TRUE` if the image has animation enabled, `EINA_FALSE` otherwise.

See Also
  elm_image_animated_set()

Since
  1.7

References elm_obj_image_animated_get.

Referenced by elm_icon_animated_get().

Eina_Bool elm_image_animated_play_get | ( | const Evas_Object * | obj | ) |

Get whether an image object is under animation or not.

Parameters

  obj | The image object

Returns
  `EINA_TRUE`, if the image is being animated, `EINA_FALSE` otherwise.

See Also
  elm_image_animated_play_get()

Since
  1.7

References elm_obj_image_animated_play_get.

Referenced by elm_icon_animated_play_get().

void elm_image_animated_play_set | ( | Evas_Object * | obj,
|  | Eina_Bool | play
| ) |  |

Start or stop an image object's animation.

Parameters

  obj | The image object
  play | `EINA_TRUE` to start the animation, `EINA_FALSE` otherwise. Default is `EINA_FALSE`.

To actually start playing any image object's animation, if it supports it, one must do something like:

if (elm_image_animated_available_get(img))
{
elm_image_animated_set(img, EINA_TRUE);
elm_image_animated_play_set(img, EINA_TRUE);
}

elm_image_animated_set() will enable animation on the image, but not start it yet. This is the function one uses to start and stop animations on image objects.

See Also
  elm_image_animated_available_get()
  elm_image_animated_set()
  elm_image_animated_play_get()

Since
  1.7

References elm_obj_image_animated_play_set.

Referenced by elm_icon_animated_play_set().

void elm_image_animated_set | ( | Evas_Object * | obj,
|  | Eina_Bool | animated
| ) |  |

Set whether an image object (which supports animation) is to animate itself or not.

Parameters

  obj | The image object
  animated | `EINA_TRUE` if the object is to animate itself, `EINA_FALSE` otherwise. Default is `EINA_FALSE`.

An image object, even if it supports animation, will be displayed by default without animation. Call this function with animated set to `EINA_TRUE` to enable its animation. To start or stop the animation, actually, use elm_image_animated_play_set().

See Also
  elm_image_animated_get()
  elm_image_animated_available_get()
  elm_image_animated_play_set()

Since
  1.7

References elm_obj_image_animated_set.

Referenced by elm_icon_animated_set().

Eina_Bool elm_image_aspect_fixed_get | ( | const Evas_Object * | obj | ) |

Get if the object retains the original aspect ratio.

Parameters

  obj | The image object.

Returns
  `EINA_TRUE` if the object keeps the original aspect, `EINA_FALSE` otherwise.

References elm_obj_image_aspect_fixed_get.

Referenced by elm_icon_aspect_fixed_get().

void elm_image_aspect_fixed_set | ( | Evas_Object * | obj,
|  | Eina_Bool | fixed
| ) |  |

Set whether the original aspect ratio of the image should be kept on resize.

Parameters

  obj | The image object.
  fixed | `EINA_TRUE` if the image should retain the aspect, `EINA_FALSE` otherwise.

The original aspect ratio (width / height) of the image is usually distorted to match the object's size. Enabling this option will retain this original aspect, and the way that the image is fit into the object's area depends on the option set by elm_image_fill_outside_set().

See Also
  elm_image_aspect_fixed_get()
  elm_image_fill_outside_set()

References elm_obj_image_aspect_fixed_set.

Referenced by elm_icon_aspect_fixed_set().

Eina_Bool elm_image_editable_get | ( | const Evas_Object * | obj | ) |

Check if the image is 'editable'.

Parameters

  obj | Image object.

Returns
  Editability.

A return value of EINA_TRUE means the image is a valid drag target for drag and drop, and can be cut or pasted too.

References elm_obj_image_editable_get.

void elm_image_editable_set | ( | Evas_Object * | obj,
|  | Eina_Bool | set
| ) |  |

Make the image 'editable'.

Parameters

  obj | Image object.
  set | Turn on or off editability. Default is `EINA_FALSE`.

This means the image is a valid drag target for drag and drop, and can be cut or pasted too.

References elm_obj_image_editable_set.

void elm_image_file_get | ( | const Evas_Object * | obj,
|  | const char ** | file,
|  | const char ** | group
| ) |  |

Get the file that will be used as image.

Parameters

  obj | The image object
  file | The path to file
  group | The group that the image belongs in edje file

See Also
  elm_image_file_set()

References elm_obj_image_file_get.

Referenced by elm_icon_file_get().

Eina_Bool elm_image_file_set | ( | Evas_Object * | obj,
|  | const char * | file,
|  | const char * | group
| ) |  |

Set the file that will be used as the image's source.

Parameters

  obj | The image object
  file | The path to file that will be used as image source
  group | The group that the image belongs to, in case it's an EET (including Edje case) file. This can be used as a key inside evas image cache if this is a normal image file not eet file.

Returns
  (`EINA_TRUE` = success, `EINA_FALSE` = error)

See Also
  elm_image_file_get()

Note
  This function will trigger the Edje file case based on the extension of the file string (expects `".edj"`, for this case). If one wants to force this type of file independently of the extension, elm_image_file_edje_set() must be used, instead.
  If you use animated gif image and create multiple image objects with one gif image file, you should set the differently for each object. Or image objects will share one evas image cache entry and you will get unwanted frames.

References elm_obj_image_file_set, and elm_obj_image_sizing_eval.

Referenced by elm_toolbar_item_icon_file_set().

Eina_Bool elm_image_fill_outside_get | ( | const Evas_Object * | obj | ) |

Get if the object is filled outside.

Parameters

  obj | The image object

Returns
  `EINA_TRUE` if the object is filled outside, `EINA_FALSE` otherwise.

See Also
  elm_image_fill_outside_set()

References elm_obj_image_fill_outside_get.

Referenced by elm_icon_fill_outside_get().

void elm_image_fill_outside_set | ( | Evas_Object * | obj,
|  | Eina_Bool | fill_outside
| ) |  |

Set if the image fills the entire object area, when keeping the aspect ratio.

Parameters

  obj | The image object
  fill_outside | `EINA_TRUE` if the object is filled outside, `EINA_FALSE` otherwise. Default is `EINA_FALSE`.

When the image should keep its aspect ratio even if resized to another aspect ratio, there are two possibilities to resize it: keep the entire image inside the limits of height and width of the object (`fill_outside` is `EINA_FALSE`) or let the extra width or height go outside of the object, and the image will fill the entire object (`fill_outside` is `EINA_TRUE`).

Note
  This option will have no effect if elm_image_aspect_fixed_set() is set to `EINA_FALSE`.

See Also
  elm_image_fill_outside_get()
  elm_image_aspect_fixed_set()

References elm_obj_image_fill_outside_set.

Referenced by elm_icon_fill_outside_set().

Eina_Bool elm_image_memfile_set | ( | Evas_Object * | obj,
|  | const void * | img,
|  | size_t | size,
|  | const char * | format,
|  | const char * | key
| ) |  |

Set a location in memory to be used as an image object's source bitmap.

Parameters

  obj | The image object
  img | The binary data that will be used as image source
  size | The size of binary data blob `img`
  format | (Optional) expected format of `img` bytes
  key | Optional indexing key of `img` to be passed to the image loader (eg. if `img` is a memory-mapped EET file)

This function is handy when the contents of an image file are mapped in memory, for example.

The `format` string should be something like `"png"`, `"jpg"`, `"tga"`, `"tiff"`, `"bmp"` etc, when provided (`NULL`, on the contrary). This improves the loader performance as it tries the "correct" loader first, before trying a range of other possible loaders until one succeeds.

Returns
  (`EINA_TRUE` = success, `EINA_FALSE` = error)

Since
  1.7

References elm_obj_image_memfile_set.

Referenced by elm_toolbar_item_icon_memfile_set().

Eina_Bool elm_image_mmap_set | ( | Evas_Object * | obj,
|  | const Eina_File * | file,
|  | const char * | group
| ) |  |

Set the file that will be used as the image's source.

Parameters

  obj | The image object
  file | The handler to an Eina_File that will be used as image source
  group | The group that the image belongs to, in case it's an EET (including Edje case) file. This can be used as a key inside evas image cache if this is a normal image file not eet file.

Returns
  (`EINA_TRUE` = success, `EINA_FALSE` = error)

See Also
  elm_image_file_set()

Note
  This function will trigger the Edje file case based on the extension of the file string use to create the Eina_File (expects `".edj"`, for this case). If one wants to force this type of file independently of the extension, elm_image_file_edje_set() must be used, instead.
  If you use animated gif image and create multiple image objects with one gif image file, you should set the differently for each object. Or image objects will share one evas image cache entry and you will get unwanted frames.

References elm_obj_image_mmap_set, and elm_obj_image_sizing_eval.

Eina_Bool elm_image_no_scale_get | ( | const Evas_Object * | obj | ) |

Get whether scaling is disabled on the object.

Parameters

  obj | The image object

Returns
  `EINA_TRUE` if scaling is disabled, `EINA_FALSE` otherwise

See Also
  elm_image_no_scale_set()

References elm_obj_image_no_scale_get.

Referenced by elm_icon_no_scale_get().

void elm_image_no_scale_set | ( | Evas_Object * | obj,
|  | Eina_Bool | no_scale
| ) |  |

Disable scaling of this object.

Parameters

  obj | The image object.
  no_scale | `EINA_TRUE` if the object is not scalable, `EINA_FALSE` otherwise. Default is `EINA_FALSE`.

This function disables scaling of the elm_image widget through the function elm_object_scale_set(). However, this does not affect the widget size/resize in any way. For that effect, take a look at elm_image_resizable_set().

See Also
  elm_image_no_scale_get()
  elm_image_resizable_set()
  elm_object_scale_set()

References elm_obj_image_no_scale_set.

Referenced by elm_icon_no_scale_set().

Evas_Object* elm_image_object_get | ( | const Evas_Object * | obj | ) |

Get the inlined image object of the image widget.

Parameters

  obj | The image object to get the inlined image from

Returns
  The inlined image object, or NULL if none exists

This function allows one to get the underlying `Evas_Object` of type Image from this elementary widget. It can be useful to do things like get the pixel data, save the image to a file, etc.

Note
  Be careful to not manipulate it, as it is under control of elementary.

References elm_obj_image_object_get.

Referenced by elm_icon_object_get().

void elm_image_object_size_get | ( | const Evas_Object * | obj,
|  | int * | w,
|  | int * | h
| ) |  |

Get the current size of the image.

Parameters

  obj | The image object.
  w | Pointer to store width, or NULL.
  h | Pointer to store height, or NULL.

This is the real size of the image, not the size of the object.

References elm_obj_image_size_get.

Referenced by elm_icon_size_get().

Elm_Image_Orient elm_image_orient_get | ( | const Evas_Object * | obj | ) |

Get the image orientation.

Parameters

  obj | The image object

Returns
  The image orientation Elm_Image_Orient

See Also
  elm_image_orient_set()
  Elm_Image_Orient

References ELM_IMAGE_ORIENT_NONE, and elm_obj_image_orient_get.

void elm_image_orient_set | ( | Evas_Object * | obj,
|  | Elm_Image_Orient | orient
| ) |  |

Set the image orientation.

Parameters

  obj | The image object
  orient | The image orientation Elm_Image_Orient Default is ELM_IMAGE_ORIENT_NONE.

This function allows to rotate or flip the given image.

See Also
  elm_image_orient_get()
  Elm_Image_Orient

References elm_obj_image_orient_set.

void elm_image_preload_disabled_set | ( | Evas_Object * | obj,
|  | Eina_Bool | disabled
| ) |  |

Enable or disable preloading of the image.

Parameters

  obj | The image object
  disabled | If EINA_TRUE, preloading will be disabled

References elm_obj_image_preload_disabled_set.

Referenced by elm_icon_preload_disabled_set().

int elm_image_prescale_get | ( | const Evas_Object * | obj | ) |

Get the prescale size for the image.

Parameters

  obj | The image object

Returns
  The prescale size

See Also
  elm_image_prescale_set()

References elm_obj_image_load_size_get.

Referenced by elm_icon_prescale_get().

void elm_image_prescale_set | ( | Evas_Object * | obj,
|  | int | size
| ) |  |

Set the prescale size for the image.

Parameters

  obj | The image object
  size | The prescale size. This value is used for both width and height.

This function sets a new size for pixmap representation of the given image. It allows the image to be loaded already in the specified size, reducing the memory usage and load time when loading a big image with load size set to a smaller size.

It's equivalent to the elm_bg_load_size_set() function for bg.

Note
  this is just a hint, the real size of the pixmap may differ depending on the type of image being loaded, being bigger than requested.

See Also
  elm_image_prescale_get()
  elm_bg_load_size_set()

References elm_obj_image_load_size_set.

Referenced by elm_icon_prescale_set().

void elm_image_resizable_get | ( | const Evas_Object * | obj,
|  | Eina_Bool * | size_up,
|  | Eina_Bool * | size_down
| ) |  |

Get if the object is (up/down) resizable.

Parameters

  obj | The image object
  size_up | A bool to set if the object is resizable up
  size_down | A bool to set if the object is resizable down

See Also
  elm_image_resizable_set()

References elm_obj_image_resizable_get.

Referenced by elm_icon_resizable_get().

void elm_image_resizable_set | ( | Evas_Object * | obj,
|  | Eina_Bool | size_up,
|  | Eina_Bool | size_down
| ) |  |

Set if the object is (up/down) resizable.

Parameters

  obj | The image object
  size_up | A bool to set if the object is resizable up. Default is `EINA_TRUE`.
  size_down | A bool to set if the object is resizable down. Default is `EINA_TRUE`.

This function limits the image resize ability. If `size_up` is set to `EINA_FALSE`, the object can't have its height or width resized to a value higher than the original image size. Same is valid for `size_down`.

See Also
  elm_image_resizable_get()

References elm_obj_image_resizable_set.

Referenced by elm_icon_resizable_set().

Eina_Bool elm_image_smooth_get | ( | const Evas_Object * | obj | ) |

Get the smooth effect for an image.

Parameters

  obj | The image object

Returns
  `EINA_TRUE` if smooth scaling is enabled, `EINA_FALSE` otherwise.

See Also
  elm_image_smooth_set()

References elm_obj_image_smooth_get.

Referenced by elm_icon_smooth_get().

void elm_image_smooth_set | ( | Evas_Object * | obj,
|  | Eina_Bool | smooth
| ) |  |

Set the smooth effect for an image.

Parameters

  obj | The image object
  smooth | `EINA_TRUE` if smooth scaling should be used, `EINA_FALSE` otherwise. Default is `EINA_TRUE`.

Set the scaling algorithm to be used when scaling the image. Smooth scaling provides a better resulting image, but is slower.

The smooth scaling should be disabled when making animations that change the image size, since it will be faster. Animations that don't require resizing of the image can keep the smooth scaling enabled (even if the image is already scaled, since the scaled image will be cached).

See Also
  elm_image_smooth_get()

References elm_obj_image_smooth_set.

Referenced by elm_icon_smooth_set().

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:13