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 | |
EOAPI void | elm_obj_image_editable_set (Eina_Bool set) |
Make the image 'editable'. More... | |
EOAPI Eina_Bool | elm_obj_image_editable_get (void) |
Check if the image is 'editable'. More... | |
EOAPI void | elm_obj_image_resize_down_set (Eina_Bool resize_down) |
Set whether the object's image can be resized to a size smaller than the original one. More... | |
EOAPI Eina_Bool | elm_obj_image_resize_down_get (void) |
Get whether the object's image can be resized to a size smaller than the original one. More... | |
EOAPI void | elm_obj_image_resize_up_set (Eina_Bool resize_up) |
Set whether the object's image can be resized to a size larget than the original one. More... | |
EOAPI Eina_Bool | elm_obj_image_resize_up_get (void) |
Get whether the object's image can be resized to a size larget than the original one. More... | |
EOAPI void | elm_obj_image_smooth_set (Eina_Bool smooth) |
Set the smooth effect for an image. More... | |
EOAPI Eina_Bool | elm_obj_image_smooth_get (void) |
Get the smooth effect for an image. More... | |
EOAPI void | elm_obj_image_no_scale_set (Eina_Bool no_scale) |
Disable scaling of this object. More... | |
EOAPI Eina_Bool | elm_obj_image_no_scale_get (void) |
Get whether scaling is disabled on the object. More... | |
EOAPI void | elm_obj_image_scale_set (double scale) |
Set the scale of the object's image. More... | |
EOAPI double | elm_obj_image_scale_get (void) |
Get the scale of the object's image. More... | |
EOAPI void | elm_obj_image_fill_inside_set (Eina_Bool fill_inside) |
Set the resize method for the object's internal image when maintaining a given aspect ratio. More... | |
EOAPI Eina_Bool | elm_obj_image_fill_inside_get (void) |
Set the resize method for the object's internal image when maintaining a given aspect ratio. More... | |
EOAPI void | elm_obj_image_aspect_fixed_set (Eina_Bool fixed) |
Set whether the original aspect ratio of the image should be kept on resize. More... | |
EOAPI Eina_Bool | elm_obj_image_aspect_fixed_get (void) |
Get if the object retains the original aspect ratio. More... | |
EOAPI void | elm_obj_image_orient_set (Elm_Image_Orient orient) |
Set the image orientation. More... | |
EOAPI Elm_Image_Orient | elm_obj_image_orient_get (void) |
Get the image orientation. More... | |
EOAPI void | elm_obj_image_fill_outside_set (Eina_Bool fill_outside) |
Set if the image fills the entire object area, when keeping the aspect ratio. More... | |
EOAPI Eina_Bool | elm_obj_image_fill_outside_get (void) |
Get if the object is filled outside. More... | |
EOAPI void | elm_obj_image_resizable_set (Eina_Bool up, Eina_Bool down) |
Set if the object is (up/down) resizable. More... | |
EOAPI void | elm_obj_image_resizable_get (Eina_Bool *up, Eina_Bool *down) |
Get if the object is (up/down) resizable. More... | |
EOAPI void | elm_obj_image_preload_disabled_set (Eina_Bool disabled) |
Enable or disable preloading of the image. More... | |
EOAPI Eina_Bool | elm_obj_image_mmap_set (const Eina_File *file, const char *group) |
Set the file that will be used as the image's source. More... | |
EOAPI Eina_Bool | elm_obj_image_memfile_set (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... | |
EOAPI Evas_Object * | elm_obj_image_object_get (void) |
Get the inlined image object of the image widget. More... | |
EOAPI void | elm_obj_image_object_size_get (int *w, int *h) |
Get the current size of the image. More... | |
EOAPI void | elm_obj_image_sizing_eval (void) |
Re-evaluate the object's final geometry. More... | |
bool | elm_image::editable_get () const |
Check if the image is 'editable'. More... | |
void | elm_image::editable_set (bool set_) const |
Check if the image is 'editable'. More... | |
bool | elm_image::animated_play_get () const |
Get whether an image object is under animation or not. More... | |
void | elm_image::animated_play_set (bool play_) const |
Get whether an image object is under animation or not. More... | |
bool | elm_image::smooth_get () const |
Get the smooth effect for an image. More... | |
void | elm_image::smooth_set (bool smooth_) const |
Get the smooth effect for an image. More... | |
bool | elm_image::no_scale_get () const |
Get whether scaling is disabled on the object. More... | |
void | elm_image::no_scale_set (bool no_scale_) const |
Get whether scaling is disabled on the object. More... | |
bool | elm_image::animated_get () const |
Get whether an image object has animation enabled or not. More... | |
void | elm_image::animated_set (bool anim_) const |
Get whether an image object has animation enabled or not. More... | |
bool | elm_image::aspect_fixed_get () const |
Get if the object retains the original aspect ratio. More... | |
void | elm_image::aspect_fixed_set (bool fixed_) const |
Get if the object retains the original aspect ratio. More... | |
Elm_Image_Orient | elm_image::orient_get () const |
Get the image orientation. More... | |
void | elm_image::orient_set (Elm_Image_Orient orient_) const |
Get the image orientation. More... | |
bool | elm_image::fill_outside_get () const |
Get if the object is filled outside. More... | |
void | elm_image::fill_outside_set (bool fill_outside_) const |
Get if the object is filled outside. More... | |
void | elm_image::resizable_get (Eina_Bool *up_, Eina_Bool *down_) const |
Get if the object is (up/down) resizable. More... | |
void | elm_image::resizable_set (bool up_, bool down_) const |
Get if the object is (up/down) resizable. More... | |
bool | elm_image::animated_available_get () const |
Get whether an image object supports animation or not. More... | |
evas::object | elm_image::object_get () const |
Get the inlined image object of the image widget. More... | |
void | elm_image::object_size_get (int *w_, int *h_) const |
Get the current size of the image. More... | |
void | elm_image_editable_set (Elm_Image *obj, Eina_Bool set) |
Make the image 'editable'. More... | |
Eina_Bool | elm_image_editable_get (const Elm_Image *obj) |
Check if the image is 'editable'. More... | |
void | elm_image_smooth_set (Elm_Image *obj, Eina_Bool smooth) |
Set the smooth effect for an image. More... | |
Eina_Bool | elm_image_smooth_get (const Elm_Image *obj) |
Get the smooth effect for an image. More... | |
void | elm_image_no_scale_set (Elm_Image *obj, Eina_Bool no_scale) |
Disable scaling of this object. More... | |
Eina_Bool | elm_image_no_scale_get (const Elm_Image *obj) |
Get whether scaling is disabled on the object. More... | |
void | elm_image_aspect_fixed_set (Elm_Image *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 Elm_Image *obj) |
Get if the object retains the original aspect ratio. More... | |
void | elm_image_orient_set (Elm_Image *obj, Elm_Image_Orient orient) |
Set the image orientation. More... | |
Elm_Image_Orient | elm_image_orient_get (const Elm_Image *obj) |
Get the image orientation. More... | |
void | elm_image_fill_outside_set (Elm_Image *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 Elm_Image *obj) |
Get if the object is filled outside. More... | |
void | elm_image_resizable_set (Elm_Image *obj, Eina_Bool up, Eina_Bool down) |
Set if the object is (up/down) resizable. More... | |
void | elm_image_resizable_get (const Elm_Image *obj, Eina_Bool *up, Eina_Bool *down) |
Get if the object is (up/down) resizable. More... | |
void | elm_image_preload_disabled_set (Elm_Image *obj, Eina_Bool disabled) |
Enable or disable preloading of the image. More... | |
Eina_Bool | elm_image_memfile_set (Elm_Image *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... | |
Evas_Object * | elm_image_object_get (const Elm_Image *obj) |
Get the inlined image object of the image widget. More... | |
void | elm_image_object_size_get (const Elm_Image *obj, int *w, int *h) |
Get the current size of the image. More... | |
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'.
|
inline |
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.
|
inline |
Get whether an image object has animation enabled or not.
EINA_TRUE
if the image has animation enabled, EINA_FALSE
otherwise.anim | EINA_TRUE if the object is to animate itself, EINA_FALSE otherwise. Default is EINA_FALSE . |
|
inline |
Get whether an image object is under animation or not.
EINA_TRUE
, if the image is being animated, EINA_FALSE
otherwise.play | EINA_TRUE to start the animation, EINA_FALSE otherwise. Default is EINA_FALSE . |
|
inline |
Get whether an image object is under animation or not.
EINA_TRUE
, if the image is being animated, EINA_FALSE
otherwise.play | EINA_TRUE to start the animation, EINA_FALSE otherwise. Default is EINA_FALSE . |
|
inline |
Get whether an image object has animation enabled or not.
EINA_TRUE
if the image has animation enabled, EINA_FALSE
otherwise.anim | EINA_TRUE if the object is to animate itself, EINA_FALSE otherwise. Default is EINA_FALSE . |
|
inline |
Get if the object retains the original aspect ratio.
EINA_TRUE
if the object keeps the original aspect, EINA_FALSE
otherwise.fixed | EINA_TRUE if the image should retain the aspect, EINA_FALSE otherwise. |
References elm_obj_image_aspect_fixed_get().
|
inline |
Get if the object retains the original aspect ratio.
EINA_TRUE
if the object keeps the original aspect, EINA_FALSE
otherwise.fixed | EINA_TRUE if the image should retain the aspect, EINA_FALSE otherwise. |
References elm_obj_image_aspect_fixed_set().
|
inline |
Check if the image is 'editable'.
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.
set | Turn on or off editability. Default is EINA_FALSE . |
References elm_obj_image_editable_get().
|
inline |
Check if the image is 'editable'.
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.
set | Turn on or off editability. Default is EINA_FALSE . |
References elm_obj_image_editable_set().
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().
Eina_Bool elm_image_aspect_fixed_get | ( | const Elm_Image * | obj | ) |
Get if the object retains the original aspect ratio.
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 | ( | Elm_Image * | obj, |
Eina_Bool | fixed | ||
) |
Set whether the original aspect ratio of the image should be kept on resize.
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().
[in] | fixed | EINA_TRUE if the image should retain the aspect, EINA_FALSE otherwise. |
References elm_obj_image_aspect_fixed_set().
Referenced by elm_icon_aspect_fixed_set().
Eina_Bool elm_image_editable_get | ( | const Elm_Image * | obj | ) |
Check if the image is 'editable'.
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 | ( | Elm_Image * | obj, |
Eina_Bool | set | ||
) |
Make the image 'editable'.
This means the image is a valid drag target for drag and drop, and can be cut or pasted too.
[in] | set | Turn on or off editability. Default is EINA_FALSE . |
References elm_obj_image_editable_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. References elm_obj_image_sizing_eval().
Eina_Bool elm_image_fill_outside_get | ( | const Elm_Image * | obj | ) |
Get if the object is filled outside.
EINA_TRUE
if the object is filled outside, EINA_FALSE
otherwise.References elm_obj_image_fill_outside_get().
Referenced by elm_icon_fill_outside_get().
void elm_image_fill_outside_set | ( | Elm_Image * | obj, |
Eina_Bool | fill_outside | ||
) |
Set if the image fills the entire object area, when keeping the aspect ratio.
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
).
EINA_FALSE
.[in] | fill_outside | EINA_TRUE if the object is filled outside, EINA_FALSE otherwise. Default is EINA_FALSE . |
References elm_obj_image_fill_outside_set().
Referenced by elm_icon_fill_outside_set().
Eina_Bool elm_image_memfile_set | ( | Elm_Image * | 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.
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.
EINA_TRUE
= success, EINA_FALSE
= error)[in] | img | The binary data that will be used as image source |
[in] | size | The size of binary data blob img |
[in] | format | (Optional) expected format of img bytes |
[in] | key | Optional indexing key of img to be passed to the image loader (eg. if img is a memory-mapped EET file) |
References elm_obj_image_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.
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. Eina_Bool elm_image_no_scale_get | ( | const Elm_Image * | obj | ) |
Get whether scaling is disabled on the object.
EINA_TRUE
if scaling is disabled, EINA_FALSE
otherwiseReferences elm_obj_image_no_scale_get().
Referenced by elm_icon_no_scale_get().
void elm_image_no_scale_set | ( | Elm_Image * | obj, |
Eina_Bool | no_scale | ||
) |
Disable scaling of this object.
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().
[in] | no_scale | EINA_TRUE if the object is not scalable, EINA_FALSE otherwise. Default is EINA_FALSE . |
References elm_obj_image_no_scale_set().
Referenced by elm_icon_no_scale_set().
Evas_Object* elm_image_object_get | ( | const Elm_Image * | obj | ) |
Get the inlined image object of the image widget.
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.
References elm_obj_image_object_get().
Referenced by elm_icon_object_get().
void elm_image_object_size_get | ( | const Elm_Image * | obj, |
int * | w, | ||
int * | h | ||
) |
Get the current size of the image.
This is the real size of the image, not the size of the object.
[out] | w | Pointer to store width, or NULL. |
[out] | h | Pointer to store height, or NULL. |
References elm_obj_image_object_size_get().
Referenced by elm_icon_size_get().
Elm_Image_Orient elm_image_orient_get | ( | const Elm_Image * | obj | ) |
Get the image orientation.
References elm_obj_image_orient_get().
void elm_image_orient_set | ( | Elm_Image * | obj, |
Elm_Image_Orient | orient | ||
) |
Set the image orientation.
This function allows to rotate or flip the given image.
[in] | orient | The image orientation Elm_Image_Orient Default is #ELM_IMAGE_ORIENT_NONE. |
References elm_obj_image_orient_set().
void elm_image_preload_disabled_set | ( | Elm_Image * | obj, |
Eina_Bool | disabled | ||
) |
Enable or disable preloading of the image.
[in] | 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.
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().
void elm_image_resizable_get | ( | const Elm_Image * | obj, |
Eina_Bool * | up, | ||
Eina_Bool * | down | ||
) |
Get if the object is (up/down) resizable.
[out] | up | A bool to set if the object is resizable up. Default is EINA_TRUE . |
[out] | down | A bool to set if the object is resizable down. Default is EINA_TRUE . |
References elm_obj_image_resizable_get().
Referenced by elm_icon_resizable_get().
void elm_image_resizable_set | ( | Elm_Image * | obj, |
Eina_Bool | up, | ||
Eina_Bool | down | ||
) |
Set if the object is (up/down) resizable.
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
.
[in] | up | A bool to set if the object is resizable up. Default is EINA_TRUE . |
[in] | down | A bool to set if the object is resizable down. Default is EINA_TRUE . |
References elm_obj_image_resizable_set().
Referenced by elm_icon_resizable_set().
Eina_Bool elm_image_smooth_get | ( | const Elm_Image * | obj | ) |
Get the smooth effect for an image.
EINA_TRUE
if smooth scaling is enabled, EINA_FALSE
otherwise.References elm_obj_image_smooth_get().
Referenced by elm_icon_smooth_get().
void elm_image_smooth_set | ( | Elm_Image * | obj, |
Eina_Bool | smooth | ||
) |
Set the smooth effect for an image.
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).
[in] | smooth | EINA_TRUE if smooth scaling should be used, EINA_FALSE otherwise. Default is EINA_TRUE . |
References elm_obj_image_smooth_set().
Referenced by elm_icon_smooth_set().
EOAPI Eina_Bool elm_obj_image_aspect_fixed_get | ( | void | ) |
Get if the object retains the original aspect ratio.
EINA_TRUE
if the object keeps the original aspect, EINA_FALSE
otherwise. Referenced by elm_image::aspect_fixed_get(), and elm_image_aspect_fixed_get().
EOAPI void elm_obj_image_aspect_fixed_set | ( | Eina_Bool | fixed | ) |
Set whether the original aspect ratio of the image should be kept on resize.
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().
[in] | fixed | EINA_TRUE if the image should retain the aspect, EINA_FALSE otherwise. |
Referenced by elm_image::aspect_fixed_set(), and elm_image_aspect_fixed_set().
EOAPI Eina_Bool elm_obj_image_editable_get | ( | void | ) |
Check if the image is 'editable'.
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.
Referenced by elm_image::editable_get(), and elm_image_editable_get().
EOAPI void elm_obj_image_editable_set | ( | Eina_Bool | set | ) |
Make the image 'editable'.
This means the image is a valid drag target for drag and drop, and can be cut or pasted too.
[in] | set | Turn on or off editability. Default is EINA_FALSE . |
Referenced by elm_image::editable_set(), and elm_image_editable_set().
EOAPI Eina_Bool elm_obj_image_fill_inside_get | ( | void | ) |
Set the resize method for the object's internal image when maintaining a given aspect ratio.
EOAPI void elm_obj_image_fill_inside_set | ( | Eina_Bool | fill_inside | ) |
Set the resize method for the object's internal image when maintaining a given aspect ratio.
If fill_inside
is true, image does not overflow the widget and blank spaces are added to fill the space that is still free. If it is false, the image overflows the image will fill all space and overflow in its larger dimension.
You can think of it as "fill: inside" or "fill: outside" and not as "fill the inside".
[in] | fill_inside | Resize method for the object's internal image. |
EOAPI Eina_Bool elm_obj_image_fill_outside_get | ( | void | ) |
Get if the object is filled outside.
EINA_TRUE
if the object is filled outside, EINA_FALSE
otherwise.Referenced by elm_image_fill_outside_get(), and elm_image::fill_outside_get().
EOAPI void elm_obj_image_fill_outside_set | ( | Eina_Bool | fill_outside | ) |
Set if the image fills the entire object area, when keeping the aspect ratio.
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
).
EINA_FALSE
.[in] | fill_outside | EINA_TRUE if the object is filled outside, EINA_FALSE otherwise. Default is EINA_FALSE . |
Referenced by elm_image_fill_outside_set(), and elm_image::fill_outside_set().
EOAPI Eina_Bool elm_obj_image_memfile_set | ( | 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.
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.
EINA_TRUE
= success, EINA_FALSE
= error)[in] | img | The binary data that will be used as image source |
[in] | size | The size of binary data blob img |
[in] | format | (Optional) expected format of img bytes |
[in] | key | Optional indexing key of img to be passed to the image loader (eg. if img is a memory-mapped EET file) |
Referenced by elm_icon_memfile_set(), and elm_image_memfile_set().
EOAPI Eina_Bool elm_obj_image_mmap_set | ( | const Eina_File * | file, |
const char * | group | ||
) |
Set the file that will be used as the image's source.
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.[in] | file | The handler to an Eina_File that will be used as image source |
[in] | 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. |
EOAPI Eina_Bool elm_obj_image_no_scale_get | ( | void | ) |
Get whether scaling is disabled on the object.
EINA_TRUE
if scaling is disabled, EINA_FALSE
otherwiseReferenced by elm_image_no_scale_get(), and elm_image::no_scale_get().
EOAPI void elm_obj_image_no_scale_set | ( | Eina_Bool | no_scale | ) |
Disable scaling of this object.
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().
[in] | no_scale | EINA_TRUE if the object is not scalable, EINA_FALSE otherwise. Default is EINA_FALSE . |
Referenced by elm_image_no_scale_set(), and elm_image::no_scale_set().
EOAPI Evas_Object* elm_obj_image_object_get | ( | void | ) |
Get the inlined image object of the image widget.
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.
Referenced by elm_image_object_get(), and elm_image::object_get().
EOAPI void elm_obj_image_object_size_get | ( | int * | w, |
int * | h | ||
) |
Get the current size of the image.
This is the real size of the image, not the size of the object.
[out] | w | Pointer to store width, or NULL. |
[out] | h | Pointer to store height, or NULL. |
Referenced by elm_image_object_size_get(), and elm_image::object_size_get().
EOAPI Elm_Image_Orient elm_obj_image_orient_get | ( | void | ) |
Get the image orientation.
Referenced by elm_image_orient_get(), and elm_image::orient_get().
EOAPI void elm_obj_image_orient_set | ( | Elm_Image_Orient | orient | ) |
Set the image orientation.
This function allows to rotate or flip the given image.
[in] | orient | The image orientation Elm_Image_Orient Default is #ELM_IMAGE_ORIENT_NONE. |
Referenced by elm_image_orient_set(), and elm_image::orient_set().
EOAPI void elm_obj_image_preload_disabled_set | ( | Eina_Bool | disabled | ) |
Enable or disable preloading of the image.
[in] | disabled | If EINA_TRUE, preloading will be disabled |
Referenced by elm_image_preload_disabled_set().
EOAPI void elm_obj_image_resizable_get | ( | Eina_Bool * | up, |
Eina_Bool * | down | ||
) |
Get if the object is (up/down) resizable.
[out] | up | A bool to set if the object is resizable up. Default is EINA_TRUE . |
[out] | down | A bool to set if the object is resizable down. Default is EINA_TRUE . |
Referenced by elm_image_resizable_get(), and elm_image::resizable_get().
EOAPI void elm_obj_image_resizable_set | ( | Eina_Bool | up, |
Eina_Bool | down | ||
) |
Set if the object is (up/down) resizable.
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
.
[in] | up | A bool to set if the object is resizable up. Default is EINA_TRUE . |
[in] | down | A bool to set if the object is resizable down. Default is EINA_TRUE . |
Referenced by elm_image_resizable_set(), and elm_image::resizable_set().
EOAPI Eina_Bool elm_obj_image_resize_down_get | ( | void | ) |
Get whether the object's image can be resized to a size smaller than the original one.
EOAPI void elm_obj_image_resize_down_set | ( | Eina_Bool | resize_down | ) |
Set whether the object's image can be resized to a size smaller than the original one.
[in] | resize_down | whether resizing down is allowed |
EOAPI Eina_Bool elm_obj_image_resize_up_get | ( | void | ) |
Get whether the object's image can be resized to a size larget than the original one.
EOAPI void elm_obj_image_resize_up_set | ( | Eina_Bool | resize_up | ) |
Set whether the object's image can be resized to a size larget than the original one.
[in] | resize_up | whether resizing up is allowed |
EOAPI double elm_obj_image_scale_get | ( | void | ) |
Get the scale of the object's image.
EOAPI void elm_obj_image_scale_set | ( | double | scale | ) |
Set the scale of the object's image.
[in] | scale | Object's image scale. |
EOAPI void elm_obj_image_sizing_eval | ( | void | ) |
EOAPI Eina_Bool elm_obj_image_smooth_get | ( | void | ) |
Get the smooth effect for an image.
EINA_TRUE
if smooth scaling is enabled, EINA_FALSE
otherwise.Referenced by elm_image_smooth_get(), and elm_image::smooth_get().
EOAPI void elm_obj_image_smooth_set | ( | Eina_Bool | smooth | ) |
Set the smooth effect for an image.
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).
[in] | smooth | EINA_TRUE if smooth scaling should be used, EINA_FALSE otherwise. Default is EINA_TRUE . |
Referenced by elm_image_smooth_set(), and elm_image::smooth_set().
|
inline |
Get if the object is filled outside.
EINA_TRUE
if the object is filled outside, EINA_FALSE
otherwise.fill_outside | EINA_TRUE if the object is filled outside, EINA_FALSE otherwise. Default is EINA_FALSE . |
References elm_obj_image_fill_outside_get().
|
inline |
Get if the object is filled outside.
EINA_TRUE
if the object is filled outside, EINA_FALSE
otherwise.fill_outside | EINA_TRUE if the object is filled outside, EINA_FALSE otherwise. Default is EINA_FALSE . |
References elm_obj_image_fill_outside_set().
|
inline |
Get whether scaling is disabled on the object.
EINA_TRUE
if scaling is disabled, EINA_FALSE
otherwiseno_scale | EINA_TRUE if the object is not scalable, EINA_FALSE otherwise. Default is EINA_FALSE . |
References elm_obj_image_no_scale_get().
|
inline |
Get whether scaling is disabled on the object.
EINA_TRUE
if scaling is disabled, EINA_FALSE
otherwiseno_scale | EINA_TRUE if the object is not scalable, EINA_FALSE otherwise. Default is EINA_FALSE . |
References elm_obj_image_no_scale_set().
|
inline |
Get the inlined image object of the image widget.
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.
References elm_obj_image_object_get().
|
inline |
Get the current size of the image.
This is the real size of the image, not the size of the object.
w | Pointer to store width, or NULL. |
h | Pointer to store height, or NULL. |
References elm_obj_image_object_size_get().
|
inline |
Get the image orientation.
orient | The image orientation Elm_Image_Orient Default is #ELM_IMAGE_ORIENT_NONE. |
References elm_obj_image_orient_get().
|
inline |
Get the image orientation.
orient | The image orientation Elm_Image_Orient Default is #ELM_IMAGE_ORIENT_NONE. |
References elm_obj_image_orient_set().
|
inline |
Get if the object is (up/down) resizable.
up | A bool to set if the object is resizable up. Default is EINA_TRUE . |
down | A bool to set if the object is resizable down. Default is EINA_TRUE . |
References elm_obj_image_resizable_get().
|
inline |
Get if the object is (up/down) resizable.
up | A bool to set if the object is resizable up. Default is EINA_TRUE . |
down | A bool to set if the object is resizable down. Default is EINA_TRUE . |
References elm_obj_image_resizable_set().
|
inline |
Get the smooth effect for an image.
EINA_TRUE
if smooth scaling is enabled, EINA_FALSE
otherwise.smooth | EINA_TRUE if smooth scaling should be used, EINA_FALSE otherwise. Default is EINA_TRUE . |
References elm_obj_image_smooth_get().
|
inline |
Get the smooth effect for an image.
EINA_TRUE
if smooth scaling is enabled, EINA_FALSE
otherwise.smooth | EINA_TRUE if smooth scaling should be used, EINA_FALSE otherwise. Default is EINA_TRUE . |
References elm_obj_image_smooth_set().