Data Structures | |
struct | _Elm_Image_Progress |
Structure associated with smart callback 'download,progress'. More... | |
struct | _Elm_Image_Error |
Structure associated with smart callback 'download,progress'. More... | |
Typedefs | |
typedef Evas_Image_Orient | Elm_Image_Orient |
Using Evas_Image_Orient enums. More... | |
typedef struct _Elm_Image_Progress | Elm_Image_Progress |
Structure associated with smart callback 'download,progress'. More... | |
typedef struct _Elm_Image_Error | Elm_Image_Error |
Structre associated with smart callback 'download,error'. More... | |
Functions | |
Evas_Object * | elm_image_add (Evas_Object *parent) |
Add a new image to the parent. 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 Eo *obj, const char **file, const char **group) |
Get the file that will be used as 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... | |
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... | |
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... | |
void | elm_image_animated_set (Evas_Object *obj, Eina_Bool anim) |
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... | |
Eina_Bool | elm_image_animated_available_get (const Evas_Object *obj) |
Get whether an image object supports animation or not. More... | |
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:
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 imageAn example of usage for this API follows:
typedef struct _Elm_Image_Error Elm_Image_Error |
Structre associated with smart callback 'download,error'.
typedef Evas_Image_Orient Elm_Image_Orient |
Using Evas_Image_Orient enums.
typedef struct _Elm_Image_Progress Elm_Image_Progress |
Structure associated with smart callback 'download,progress'.
Evas_Object* elm_image_add | ( | Evas_Object * | parent | ) |
Add a new image to the parent.
parent | The parent object |
Eina_Bool elm_image_animated_available_get | ( | const Evas_Object * | obj | ) |
Get whether an image object supports animation or not.
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.
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.
EINA_TRUE
if the image has animation enabled, EINA_FALSE
otherwise.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.
EINA_TRUE
, if the image is being animated, EINA_FALSE
otherwise.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.
To actually start playing any image object's animation, if it supports it, one must do something like:
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.
[in] | play | EINA_TRUE to start the animation, EINA_FALSE otherwise. Default is EINA_FALSE . |
Referenced by elm_icon_animated_play_set().
void elm_image_animated_set | ( | Evas_Object * | obj, |
Eina_Bool | anim | ||
) |
Set whether an image object (which supports animation) is to animate itself or not.
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().
[in] | anim | EINA_TRUE if the object is to animate itself, EINA_FALSE otherwise. Default is EINA_FALSE . |
Referenced by elm_icon_animated_set().
void elm_image_file_get | ( | const Eo * | obj, |
const char ** | file, | ||
const char ** | group | ||
) |
Get the file that will be used as image.
[out] | file | The path to file that will be used as image source |
[out] | 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. |
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.
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. |
EINA_TRUE
= success, EINA_FALSE
= error)".edj"
, for this case).group
differently for each object. Or image objects will share one evas image cache entry and you will get unwanted frames. 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.
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. |
EINA_TRUE
= success, EINA_FALSE
= error)".edj"
, for this case).group
differently for each object. Or image objects will share one evas image cache entry and you will get unwanted frames. int elm_image_prescale_get | ( | const Evas_Object * | obj | ) |
Get the prescale size for the image.
obj | The image object |
Referenced by elm_icon_prescale_get().
void elm_image_prescale_set | ( | Evas_Object * | obj, |
int | size | ||
) |
Set the prescale size for the image.
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.
Referenced by elm_icon_prescale_set().