2016-02-10 13:53:27 -08:00
|
|
|
import evas_image;
|
|
|
|
|
2016-02-12 14:35:00 -08:00
|
|
|
struct Elm.Image_Progress
|
2016-02-04 12:08:14 -08:00
|
|
|
{
|
|
|
|
[[
|
|
|
|
Structure associated with smart callback 'download,progress'.
|
|
|
|
@since 1.8
|
|
|
|
]]
|
|
|
|
now: double;
|
|
|
|
total: double;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Elm.Image.Error
|
|
|
|
{
|
|
|
|
[[
|
|
|
|
Structure associated with smart callback 'download,progress'.
|
|
|
|
@since 1.8
|
|
|
|
]]
|
|
|
|
status: int;
|
|
|
|
open_error: Eina.Bool;
|
|
|
|
}
|
|
|
|
|
2016-03-03 03:27:23 -08:00
|
|
|
class Elm.Image (Elm.Widget, Efl.File, Efl.Image_Load, Evas.Clickable_Interface,
|
2016-03-18 18:30:19 -07:00
|
|
|
Edje.Object, Efl.Image, Evas.Draggable_Interface,
|
2016-01-11 02:38:57 -08:00
|
|
|
Elm.Interface_Atspi_Image, Elm.Interface_Atspi_Widget_Action,
|
2015-06-17 02:17:19 -07:00
|
|
|
Efl.Player)
|
2014-03-23 04:05:20 -07:00
|
|
|
{
|
|
|
|
eo_prefix: elm_obj_image;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
|
|
|
@property resize_down {
|
2015-08-10 10:37:13 -07:00
|
|
|
[[Control whether the object's image can be resized to a size smaller than the original one.
|
2014-10-13 06:59:28 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
@since 1.7]]
|
|
|
|
set {
|
2014-08-11 07:46:11 -07:00
|
|
|
legacy: null;
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
get {
|
2014-08-11 07:46:11 -07:00
|
|
|
legacy: null;
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-10 10:37:13 -07:00
|
|
|
resize_down: bool; [[whether resizing down is allowed]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property resize_up {
|
2015-08-10 10:37:13 -07:00
|
|
|
[[Control whether the object's image can be resized to a size larget than the original one.
|
2014-10-13 06:59:28 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
@since 1.7]]
|
|
|
|
set {
|
2014-08-11 07:46:11 -07:00
|
|
|
legacy: null;
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
get {
|
2014-08-11 07:46:11 -07:00
|
|
|
legacy: null;
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-10 10:37:13 -07:00
|
|
|
resize_up: bool; [[whether resizing up is allowed]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property no_scale {
|
2015-08-10 10:37:13 -07:00
|
|
|
[[Control scaling behaviour of this object.
|
2014-03-23 04:05:20 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
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
|
|
|
|
@.resizable and @Elm.Widget.scale]]
|
|
|
|
set {
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2015-08-10 10:37:13 -07:00
|
|
|
no_scale: bool; [[$true if the object is not scalable, $false otherwise. Default is $false.]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property fill_inside {
|
2015-08-10 10:37:13 -07:00
|
|
|
[[Control the resize method for the object's internal image when maintaining a given aspect ratio.
|
2014-10-13 06:59:28 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
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.
|
2014-10-13 06:59:28 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
You can think of it as "fill: inside" or "fill: outside" and not as
|
|
|
|
"fill the inside".
|
2014-10-13 06:59:28 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
@since 1.7]]
|
|
|
|
set {
|
2014-08-11 07:46:11 -07:00
|
|
|
legacy: null;
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
get {
|
2014-08-11 07:46:11 -07:00
|
|
|
legacy: null;
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-10 10:37:13 -07:00
|
|
|
fill_inside: bool; [[Resize method for the object's internal image.]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property aspect_fixed {
|
2014-03-23 04:05:20 -07:00
|
|
|
set {
|
2015-08-10 10:37:13 -07:00
|
|
|
[[Control whether the original aspect ratio of the image should be kept on resize.
|
2014-03-23 04:05:20 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
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
|
2016-03-31 22:44:21 -07:00
|
|
|
area depends on the option set by @.fill_inside.]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2015-08-10 10:37:13 -07:00
|
|
|
fixed: bool; [[$true if the image should retain the aspect, $false otherwise.]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property resizable {
|
2015-08-10 10:37:13 -07:00
|
|
|
[[Control if the object is (up/down) resizable.
|
2014-03-23 04:05:20 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
This function limits the image resize ability. If $size_up is set to
|
|
|
|
$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.]]
|
|
|
|
set {
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2015-08-10 10:37:13 -07:00
|
|
|
up: bool; [[A bool to set if the object is resizable up. Default is $true.]]
|
|
|
|
down: bool; [[A bool to set if the object is resizable down. Default is $true.]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property object {
|
2014-03-23 04:05:20 -07:00
|
|
|
get {
|
2015-08-10 10:37:13 -07:00
|
|
|
[[Get the inlined image object of the image widget.
|
2014-03-23 04:05:20 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
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.
|
2014-03-23 04:05:20 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
Note: Be careful to not manipulate it, as it is under control of
|
|
|
|
elementary.]]
|
2014-03-23 04:05:20 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
return: Evas.Object *; [[The inlined image object, or NULL if none exists]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 09:32:53 -07:00
|
|
|
@property object_size {
|
2014-03-23 04:05:20 -07:00
|
|
|
get {
|
2015-08-10 10:37:13 -07:00
|
|
|
[[Get the current size of the image.
|
2014-03-23 04:05:20 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
This is the real size of the image, not the size of the object.]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-08-10 10:37:13 -07:00
|
|
|
w: int; [[Pointer to store width, or NULL.]]
|
|
|
|
h: int; [[Pointer to store height, or NULL.]]
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
sizing_eval {
|
2015-08-10 10:37:13 -07:00
|
|
|
[[Re-evaluate the object's final geometry.
|
2014-10-13 06:59:28 -07:00
|
|
|
|
2015-08-10 10:37:13 -07:00
|
|
|
@since 1.7]]
|
2014-08-11 07:46:11 -07:00
|
|
|
legacy: null;
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
2014-06-20 02:47:39 -07:00
|
|
|
class.constructor;
|
2014-06-27 15:36:05 -07:00
|
|
|
Eo.Base.constructor;
|
2014-07-22 07:38:33 -07:00
|
|
|
Efl.File.file.set;
|
|
|
|
Efl.File.file.get;
|
2015-04-05 23:16:25 -07:00
|
|
|
Efl.File.mmap.set;
|
2015-03-30 19:58:10 -07:00
|
|
|
Efl.File.async.set;
|
|
|
|
Efl.File.async.get;
|
|
|
|
Efl.File.async_wait;
|
2016-03-03 03:27:23 -08:00
|
|
|
Efl.Image_Load.load_size.set;
|
|
|
|
Efl.Image_Load.load_size.get;
|
2014-07-23 09:19:26 -07:00
|
|
|
Efl.Image.smooth_scale.set;
|
|
|
|
Efl.Image.smooth_scale.get;
|
2016-03-31 23:12:01 -07:00
|
|
|
Efl.Image.orientation.set;
|
|
|
|
Efl.Image.orientation.get;
|
2015-06-17 02:17:19 -07:00
|
|
|
Efl.Player.playable.get;
|
|
|
|
Efl.Player.play.set;
|
|
|
|
Efl.Player.play.get;
|
2015-01-06 12:19:00 -08:00
|
|
|
Edje.Object.signal_emit;
|
2015-01-21 12:15:43 -08:00
|
|
|
Edje.Object.size_min.get;
|
|
|
|
Edje.Object.size_max.get;
|
|
|
|
Edje.Object.size_min_calc;
|
|
|
|
Edje.Object.calc_force;
|
2014-06-27 15:36:05 -07:00
|
|
|
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;
|
2016-03-18 18:30:19 -07:00
|
|
|
Evas.Draggable_Interface.drag_target.set;
|
|
|
|
Evas.Draggable_Interface.drag_target.get;
|
2015-04-22 04:33:10 -07:00
|
|
|
Elm.Widget.theme_apply;
|
|
|
|
Elm.Widget.event;
|
2016-01-11 02:38:57 -08:00
|
|
|
Elm.Interface_Atspi_Image.extents.get;
|
|
|
|
Elm.Interface_Atspi_Widget_Action.elm_actions.get;
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
events {
|
|
|
|
drop;
|
|
|
|
download,start;
|
|
|
|
download,progress;
|
|
|
|
download,done;
|
|
|
|
download,error;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|