577 lines
18 KiB
Plaintext
577 lines
18 KiB
Plaintext
class Elm.Image (Elm.Widget, Efl.File, Efl.Image, Evas.Clickable_Interface,
|
|
Edje.Object,
|
|
Elm_Interface_Atspi_Image, Elm_Interface_Atspi_Widget_Action)
|
|
{
|
|
eo_prefix: elm_obj_image;
|
|
methods {
|
|
@property editable {
|
|
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.
|
|
|
|
@ingroup Image */
|
|
}
|
|
get {
|
|
/*@
|
|
Check if the image is 'editable'.
|
|
|
|
@return 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.
|
|
|
|
@ingroup Image */
|
|
}
|
|
values {
|
|
set: bool; /*@ Turn on or off editability. Default is @c EINA_FALSE. */
|
|
}
|
|
}
|
|
@property resize_down {
|
|
set {
|
|
/*@
|
|
Set whether the object's image can be resized to a size smaller than the original one.
|
|
|
|
@ingroup Image
|
|
@since 1.7
|
|
*/
|
|
legacy: null;
|
|
}
|
|
get {
|
|
/*@
|
|
Get whether the object's image can be resized to a size smaller than the original one.
|
|
|
|
@ingroup Image
|
|
@since 1.7
|
|
*/
|
|
legacy: null;
|
|
}
|
|
values {
|
|
resize_down: bool; /*@ whether resizing down is allowed */
|
|
}
|
|
}
|
|
@property animated_play {
|
|
set {
|
|
/*@
|
|
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:
|
|
|
|
@code
|
|
if (elm_image_animated_available_get(img))
|
|
{
|
|
elm_image_animated_set(img, EINA_TRUE);
|
|
elm_image_animated_play_set(img, EINA_TRUE);
|
|
}
|
|
@endcode
|
|
|
|
elm_image_animated_set() will enable animation on the image, <b>but
|
|
not start it yet</b>. This is the function one uses to start and
|
|
stop animations on image objects.
|
|
|
|
@see elm_image_animated_available_get()
|
|
@see elm_image_animated_set()
|
|
@see elm_image_animated_play_get()
|
|
|
|
@ingroup Image
|
|
@since 1.7 */
|
|
}
|
|
get {
|
|
/*@
|
|
Get whether an image object is under animation or not.
|
|
|
|
@return @c EINA_TRUE, if the image is being animated, @c EINA_FALSE
|
|
otherwise.
|
|
|
|
@see elm_image_animated_play_get()
|
|
|
|
@ingroup Image
|
|
@since 1.7 */
|
|
}
|
|
values {
|
|
play: bool; /*@ @c EINA_TRUE to start the animation, @c EINA_FALSE
|
|
otherwise. Default is @c EINA_FALSE. */
|
|
}
|
|
}
|
|
@property resize_up {
|
|
set {
|
|
/*@
|
|
Set whether the object's image can be resized to a size larget than the original one.
|
|
|
|
@ingroup Image
|
|
@since 1.7
|
|
*/
|
|
legacy: null;
|
|
}
|
|
get {
|
|
/*@
|
|
Get whether the object's image can be resized to a size larget than the original one.
|
|
|
|
@ingroup Image
|
|
@since 1.7
|
|
*/
|
|
legacy: null;
|
|
}
|
|
values {
|
|
resize_up: bool; /*@ whether resizing up is allowed */
|
|
}
|
|
}
|
|
@property smooth {
|
|
set {
|
|
/*@
|
|
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).
|
|
|
|
@see elm_image_smooth_get()
|
|
|
|
@ingroup Image */
|
|
}
|
|
get {
|
|
/*@
|
|
Get the smooth effect for an image.
|
|
|
|
@return @c EINA_TRUE if smooth scaling is enabled, @c EINA_FALSE otherwise.
|
|
|
|
@see elm_image_smooth_set()
|
|
|
|
@ingroup Image */
|
|
}
|
|
values {
|
|
smooth: bool; /*@ @c EINA_TRUE if smooth scaling should be used, @c EINA_FALSE
|
|
otherwise. Default is @c EINA_TRUE. */
|
|
}
|
|
}
|
|
@property no_scale {
|
|
set {
|
|
/*@
|
|
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().
|
|
|
|
@see elm_image_no_scale_get()
|
|
@see elm_image_resizable_set()
|
|
@see elm_object_scale_set()
|
|
|
|
@ingroup Image */
|
|
}
|
|
get {
|
|
/*@
|
|
Get whether scaling is disabled on the object.
|
|
|
|
@return @c EINA_TRUE if scaling is disabled, @c EINA_FALSE otherwise
|
|
|
|
@see elm_image_no_scale_set()
|
|
|
|
@ingroup Image */
|
|
}
|
|
values {
|
|
no_scale: bool; /*@ @c EINA_TRUE if the object is not scalable, @c EINA_FALSE
|
|
otherwise. Default is @c EINA_FALSE. */
|
|
}
|
|
}
|
|
@property animated {
|
|
set {
|
|
/*@
|
|
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 @a animated
|
|
set to @c EINA_TRUE to enable its animation. To start or stop the
|
|
animation, actually, use elm_image_animated_play_set().
|
|
|
|
@see elm_image_animated_get()
|
|
@see elm_image_animated_available_get()
|
|
@see elm_image_animated_play_set()
|
|
|
|
@ingroup Image
|
|
@since 1.7 */
|
|
}
|
|
get {
|
|
/*@
|
|
Get whether an image object has animation enabled or not.
|
|
|
|
@return @c EINA_TRUE if the image has animation enabled,
|
|
@c EINA_FALSE otherwise.
|
|
|
|
@see elm_image_animated_set()
|
|
|
|
@ingroup Image
|
|
@since 1.7 */
|
|
}
|
|
values {
|
|
anim: bool; /*@ @c EINA_TRUE if the object is to animate itself,
|
|
@c EINA_FALSE otherwise. Default is @c EINA_FALSE. */
|
|
}
|
|
}
|
|
@property scale {
|
|
set {
|
|
/*@
|
|
Set the scale of the object's image.
|
|
|
|
@ingroup Image
|
|
@since 1.7
|
|
*/
|
|
legacy: null;
|
|
}
|
|
get {
|
|
/*@
|
|
Get the scale of the object's image.
|
|
|
|
@ingroup Image
|
|
@since 1.7
|
|
*/
|
|
legacy: null;
|
|
}
|
|
values {
|
|
scale: double; /*@ Object's image scale. */
|
|
}
|
|
}
|
|
@property fill_inside {
|
|
set {
|
|
/*@
|
|
Set the resize method for the object's internal image when maintaining a given aspect ratio.
|
|
|
|
If @p 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".
|
|
|
|
@see elm_image_fill_inside_get()
|
|
@see elm_image_fill_outside_get()
|
|
@see elm_image_fill_outside_set()
|
|
@ingroup Image
|
|
@since 1.7
|
|
*/
|
|
legacy: null;
|
|
}
|
|
get {
|
|
/*@
|
|
Set the resize method for the object's internal image when maintaining a given aspect ratio.
|
|
|
|
@see elm_image_fill_inside_set()
|
|
@see elm_image_fill_outside_get()
|
|
@see elm_image_fill_outside_set()
|
|
@ingroup Image
|
|
@since 1.7
|
|
*/
|
|
legacy: null;
|
|
}
|
|
values {
|
|
fill_inside: bool; /*@ Resize method for the object's internal image. */
|
|
}
|
|
}
|
|
@property aspect_fixed {
|
|
set {
|
|
/*@
|
|
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().
|
|
|
|
@see elm_image_aspect_fixed_get()
|
|
@see elm_image_fill_outside_set()
|
|
|
|
@ingroup Image */
|
|
}
|
|
get {
|
|
/*@
|
|
Get if the object retains the original aspect ratio.
|
|
|
|
@return @c EINA_TRUE if the object keeps the original aspect, @c EINA_FALSE
|
|
otherwise.
|
|
|
|
@ingroup Image */
|
|
}
|
|
values {
|
|
fixed: bool; /*@ @c EINA_TRUE if the image should retain the aspect,
|
|
@c EINA_FALSE otherwise. */
|
|
}
|
|
}
|
|
@property orient {
|
|
set {
|
|
/*@
|
|
Set the image orientation.
|
|
|
|
This function allows to rotate or flip the given image.
|
|
|
|
@see elm_image_orient_get()
|
|
@see @ref Elm_Image_Orient
|
|
|
|
@ingroup Image */
|
|
}
|
|
get {
|
|
/*@
|
|
Get the image orientation.
|
|
|
|
@return The image orientation @ref Elm_Image_Orient
|
|
|
|
@see elm_image_orient_set()
|
|
@see @ref Elm_Image_Orient
|
|
|
|
@ingroup Image */
|
|
}
|
|
values {
|
|
orient: Elm_Image_Orient; /*@ The image orientation @ref Elm_Image_Orient
|
|
Default is #ELM_IMAGE_ORIENT_NONE. */
|
|
}
|
|
}
|
|
@property fill_outside {
|
|
set {
|
|
/*@
|
|
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 (@p fill_outside
|
|
is @c EINA_FALSE) or let the extra width or height go outside of the object,
|
|
and the image will fill the entire object (@p fill_outside is @c EINA_TRUE).
|
|
|
|
@note This option will have no effect if
|
|
elm_image_aspect_fixed_set() is set to @c EINA_FALSE.
|
|
|
|
@see elm_image_fill_inside_get()
|
|
@see elm_image_fill_inside_set()
|
|
@see elm_image_fill_outside_get()
|
|
@see elm_image_aspect_fixed_set()
|
|
|
|
@ingroup Image */
|
|
}
|
|
get {
|
|
/*@
|
|
Get if the object is filled outside
|
|
|
|
@return @c EINA_TRUE if the object is filled outside, @c EINA_FALSE otherwise.
|
|
|
|
@see elm_image_fill_inside_get()
|
|
@see elm_image_fill_inside_set()
|
|
@see elm_image_fill_outside_set()
|
|
|
|
@ingroup Image */
|
|
}
|
|
values {
|
|
fill_outside: bool; /*@ @c EINA_TRUE if the object is filled outside,
|
|
@c EINA_FALSE otherwise. Default is @c EINA_FALSE. */
|
|
}
|
|
}
|
|
@property resizable {
|
|
set {
|
|
/*@
|
|
Set if the object is (up/down) resizable.
|
|
|
|
This function limits the image resize ability. If @p size_up is set to
|
|
@c 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 @p size_down.
|
|
|
|
@see elm_image_resizable_get()
|
|
|
|
@ingroup Image */
|
|
}
|
|
get {
|
|
/*@
|
|
Get if the object is (up/down) resizable.
|
|
|
|
@see elm_image_resizable_set()
|
|
|
|
@ingroup Image */
|
|
}
|
|
values {
|
|
up: bool; /*@ A bool to set if the object is resizable up. Default is
|
|
@c EINA_TRUE. */
|
|
down: bool; /*@ A bool to set if the object is resizable down. Default
|
|
is @c EINA_TRUE. */
|
|
}
|
|
}
|
|
@property preload_disabled {
|
|
set {
|
|
/*@
|
|
Enable or disable preloading of the image
|
|
|
|
@ingroup Image */
|
|
}
|
|
values {
|
|
disabled: bool; /*@ If EINA_TRUE, preloading will be disabled */
|
|
}
|
|
}
|
|
@property mmap {
|
|
set {
|
|
/*@
|
|
Set the file that will be used as the image's source.
|
|
|
|
@return (@c EINA_TRUE = success, @c EINA_FALSE = error)
|
|
|
|
@see elm_image_file_set()
|
|
|
|
@note This function will trigger the Edje file case based on the
|
|
extension of the @a file string use to create the Eina_File (expects
|
|
@c ".edj", for this case).
|
|
|
|
@note If you use animated gif image and create multiple image objects with
|
|
one gif image file, you should set the @p group differently for each object.
|
|
Or image objects will share one evas image cache entry and you will get
|
|
unwanted frames.
|
|
|
|
@ingroup Image */
|
|
return: bool;
|
|
legacy: null;
|
|
}
|
|
values {
|
|
file: const(Eina_File)*; /*@ The handler to an Eina_File that will be used as image source */
|
|
group: const(char)* @optional; /*@ 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. */
|
|
}
|
|
}
|
|
@property memfile {
|
|
set {
|
|
/*@
|
|
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 @p format string should be something like @c "png", @c "jpg",
|
|
@c "tga", @c "tiff", @c "bmp" etc, when provided (@c 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.
|
|
|
|
@return (@c EINA_TRUE = success, @c EINA_FALSE = error)
|
|
|
|
@since 1.7
|
|
|
|
@ingroup Image */
|
|
return: bool;
|
|
}
|
|
values {
|
|
img: const(void)*; /*@ The binary data that will be used as image source */
|
|
size: size; /*@ The size of binary data blob @p img */
|
|
format: const(char)* @optional; /*@ (Optional) expected format of @p img bytes */
|
|
key: const(char)* @optional; /*@ Optional indexing key of @p img to be passed to the
|
|
image loader (eg. if @p img is a memory-mapped EET file) */
|
|
}
|
|
}
|
|
@property animated_available {
|
|
get {
|
|
/*@
|
|
Get whether an image object supports animation or not.
|
|
|
|
@return @c EINA_TRUE if the image supports animation,
|
|
@c 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 @b EINA_FALSE, other
|
|
@c elm_image_animated_xxx API calls won't work.
|
|
|
|
@see elm_image_animated_set()
|
|
|
|
@ingroup Image
|
|
@since 1.7 */
|
|
return: bool;
|
|
}
|
|
}
|
|
@property object {
|
|
get {
|
|
/*@
|
|
Get the inlined image object of the image widget.
|
|
|
|
@return The inlined image object, or NULL if none exists
|
|
|
|
This function allows one to get the underlying @c 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.
|
|
|
|
@ingroup Image */
|
|
return: Evas_Object *;
|
|
}
|
|
}
|
|
@property object_size {
|
|
get {
|
|
/*@
|
|
Get the current size of the image.
|
|
|
|
This is the real size of the image, not the size of the object.
|
|
|
|
@ingroup Image */
|
|
}
|
|
values {
|
|
w: int; /*@ Pointer to store width, or NULL. */
|
|
h: int; /*@ Pointer to store height, or NULL. */
|
|
}
|
|
}
|
|
sizing_eval {
|
|
/*@
|
|
Re-evaluate the object's final geometry.
|
|
|
|
@ingroup Image
|
|
@since 1.7 */
|
|
legacy: null;
|
|
}
|
|
}
|
|
implements {
|
|
class.constructor;
|
|
Eo.Base.constructor;
|
|
Efl.File.file.set;
|
|
Efl.File.file.get;
|
|
Efl.File.mmap.set;
|
|
Efl.File.async.set;
|
|
Efl.File.async.get;
|
|
Efl.File.async_wait;
|
|
Efl.Image.load_size.set;
|
|
Efl.Image.load_size.get;
|
|
Efl.Image.smooth_scale.set;
|
|
Efl.Image.smooth_scale.get;
|
|
Edje.Object.signal_emit;
|
|
Edje.Object.size_min.get;
|
|
Edje.Object.size_max.get;
|
|
Edje.Object.size_min_calc;
|
|
Edje.Object.calc_force;
|
|
Evas.Object_Smart.hide;
|
|
Evas.Object_Smart.clip.set;
|
|
Evas.Object_Smart.clip_unset;
|
|
Evas.Object_Smart.show;
|
|
Evas.Object_Smart.color.set;
|
|
Evas.Object_Smart.move;
|
|
Evas.Object_Smart.add;
|
|
Evas.Object_Smart.del;
|
|
Evas.Object_Smart.member_add;
|
|
Evas.Object_Smart.resize;
|
|
Elm.Widget.theme_apply;
|
|
Elm.Widget.event;
|
|
Elm_Interface_Atspi_Image.extents.get;
|
|
Elm_Interface_Atspi_Widget_Action.elm_actions.get;
|
|
}
|
|
events {
|
|
drop;
|
|
clicked;
|
|
download,start;
|
|
download,progress;
|
|
download,done;
|
|
download,error;
|
|
}
|
|
|
|
}
|