2016-02-10 13:53:27 -08:00
|
|
|
import evas_image;
|
|
|
|
|
2016-05-31 03:38:21 -07:00
|
|
|
enum Efl.Ui.Image.Scale_Type
|
2016-04-28 19:50:59 -07:00
|
|
|
{
|
|
|
|
[[Enumeration that defines scale types for the object's internal image.
|
|
|
|
|
|
|
|
@since 1.18
|
|
|
|
]]
|
2016-05-27 19:38:06 -07:00
|
|
|
fill, [[Scale the internal image so that it matches
|
|
|
|
the object's area exactly.
|
|
|
|
The image's aspect ratio might be changed.]]
|
|
|
|
fit_inside, [[Scale the internal image
|
|
|
|
so that it fits inside the object's area
|
|
|
|
while maintaining the aspect ratio.
|
|
|
|
At least one of the dimensions of the image
|
|
|
|
should be equal to the corresponding dimension
|
|
|
|
of the object.]]
|
|
|
|
fit_outside, [[Scale the internal image
|
|
|
|
so that it covers the entire object area
|
|
|
|
while maintaining the aspect ratio.
|
|
|
|
At least one of the dimensions of the image
|
|
|
|
should be equal to the corresponding
|
|
|
|
dimension of the object.]]
|
|
|
|
none [[Not scale the internal image]]
|
2016-04-28 19:50:59 -07:00
|
|
|
}
|
|
|
|
|
2016-05-31 03:38:21 -07:00
|
|
|
struct Efl.Ui.Image.Progress
|
2016-02-04 12:08:14 -08:00
|
|
|
{
|
|
|
|
[[
|
|
|
|
Structure associated with smart callback 'download,progress'.
|
|
|
|
@since 1.8
|
|
|
|
]]
|
|
|
|
now: double;
|
|
|
|
total: double;
|
|
|
|
}
|
|
|
|
|
2016-05-31 03:38:21 -07:00
|
|
|
struct Efl.Ui.Image.Error
|
2016-02-04 12:08:14 -08:00
|
|
|
{
|
|
|
|
[[
|
|
|
|
Structure associated with smart callback 'download,progress'.
|
|
|
|
@since 1.8
|
|
|
|
]]
|
|
|
|
status: int;
|
2016-04-19 08:13:21 -07:00
|
|
|
open_error: bool;
|
2016-02-04 12:08:14 -08:00
|
|
|
}
|
|
|
|
|
2016-05-31 03:38:21 -07:00
|
|
|
class Efl.Ui.Image (Elm.Widget, Evas.Clickable_Interface, Evas.Draggable_Interface,
|
2016-05-23 08:01:30 -07:00
|
|
|
Efl.File, Efl.Image, Efl.Image.Load, Efl.Player, Efl.Gfx.View,
|
2016-05-12 03:37:43 -07:00
|
|
|
Elm.Interface.Atspi_Image, Elm.Interface.Atspi_Widget_Action,
|
2016-04-07 01:32:40 -07:00
|
|
|
Edje.Object, Efl.Orientation, Efl.Flipable)
|
2014-03-23 04:05:20 -07:00
|
|
|
{
|
2016-05-31 03:38:21 -07:00
|
|
|
event_prefix: efl_ui_image;
|
2015-05-07 09:32:53 -07:00
|
|
|
methods {
|
2016-04-28 19:50:59 -07:00
|
|
|
@property scale_type {
|
|
|
|
[[Control how the internal image is scaled.
|
2014-10-13 06:59:28 -07:00
|
|
|
|
2016-04-28 19:50:59 -07:00
|
|
|
@since 1.18]]
|
2015-08-10 10:37:13 -07:00
|
|
|
set {
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2016-05-31 03:38:21 -07:00
|
|
|
scale_type: Efl.Ui.Image.Scale_Type;
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
}
|
2016-04-28 19:50:59 -07:00
|
|
|
@property scalable {
|
|
|
|
[[Enable or disable scaling up or down the internal image.
|
2014-03-23 04:05:20 -07:00
|
|
|
|
2016-04-28 19:50:59 -07:00
|
|
|
@since 1.18]]
|
|
|
|
set {
|
2014-03-23 04:05:20 -07:00
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
2016-04-28 19:50:59 -07:00
|
|
|
scale_up: bool; [[If $true, the internal image might be scaled up
|
|
|
|
if necessary according to the scale type.
|
|
|
|
if $false, the internal image is not scaled up
|
|
|
|
no matter what the scale type is.]]
|
|
|
|
scale_down: bool; [[If $true, the internal image might be scaled down
|
|
|
|
if necessary according to the scale type.
|
|
|
|
if $false, the internal image is not scaled down
|
|
|
|
no matter what the scale type is.]]
|
2016-04-27 06:35:23 -07:00
|
|
|
}
|
2016-05-27 04:58:25 -07:00
|
|
|
}
|
|
|
|
@property align {
|
|
|
|
[[Control how the internal image is positioned inside an image object.
|
|
|
|
|
|
|
|
@since 1.18]]
|
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
align_x: double; [[Alignment in the horizontal axis (0 <= align_x <= 1).]]
|
|
|
|
align_y: double; [[Alignment in the vertical axis (0 <= align_y <= 1).]]
|
|
|
|
}
|
|
|
|
}
|
2016-04-27 06:35:23 -07:00
|
|
|
@property icon {
|
|
|
|
set {
|
|
|
|
[[Set the image by icon standards names.
|
|
|
|
|
|
|
|
For example, freedesktop.org defines standard icon names such
|
|
|
|
as "home", "network", etc. There can be different icon sets to
|
|
|
|
match those icon keys. The "name" given as parameter is one of
|
|
|
|
these "keys", and will be used to look in the freedesktop.org
|
|
|
|
paths and elementary theme.
|
|
|
|
|
|
|
|
If name is not found in any of the expected locations and it is
|
|
|
|
the absolute path of an image file, this image will be used.
|
|
|
|
|
|
|
|
Note: The image set by this function can be changed by
|
|
|
|
@Efl.File.file.set.
|
|
|
|
|
|
|
|
Note: This function does not accept relative icon path.
|
|
|
|
|
|
|
|
See also @.icon.get.
|
|
|
|
]]
|
|
|
|
return: bool; [[true on success, false on error]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Get the icon name of image set by icon standard names.
|
|
|
|
|
|
|
|
If the image was set using elm_image_file_set() instead of
|
|
|
|
@.icon.set, then this function will return null.
|
|
|
|
]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
name: const(char)*; [[The icon name]]
|
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-04-01 01:49:14 -07:00
|
|
|
Efl.Gfx.View.view_size.get;
|
2016-05-12 03:35:21 -07: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-04-05 18:46:04 -07:00
|
|
|
Efl.Orientation.orientation.set;
|
|
|
|
Efl.Orientation.orientation.get;
|
2016-04-07 01:32:40 -07:00
|
|
|
Efl.Flipable.flip.set;
|
|
|
|
Efl.Flipable.flip.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;
|
2016-05-12 03:12:08 -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-05-12 03:37:43 -07: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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|