diff options
Diffstat (limited to '')
-rw-r--r-- | src/Makefile_Efl.am | 2 | ||||
-rw-r--r-- | src/lib/efl/Efl.h | 4 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_gfx_buffer.eo | 165 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_gfx_types.eot | 24 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_gfx_view.eo | 4 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_image.eo | 124 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_image_load.eo | 203 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_interfaces_main.c | 2 | ||||
-rw-r--r-- | src/lib/emotion/emotion_object.eo | 4 | ||||
-rw-r--r-- | src/lib/emotion/emotion_smart.c | 2 | ||||
-rw-r--r-- | src/lib/evas/Evas_Legacy.h | 324 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_image.eo | 489 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_image.c | 306 |
13 files changed, 1172 insertions, 481 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index e3d5974d00..e507a38c5d 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am | |||
@@ -9,11 +9,13 @@ efl_eolian_files = \ | |||
9 | lib/efl/interfaces/efl_control.eo \ | 9 | lib/efl/interfaces/efl_control.eo \ |
10 | lib/efl/interfaces/efl_file.eo \ | 10 | lib/efl/interfaces/efl_file.eo \ |
11 | lib/efl/interfaces/efl_image.eo \ | 11 | lib/efl/interfaces/efl_image.eo \ |
12 | lib/efl/interfaces/efl_image_load.eo \ | ||
12 | lib/efl/interfaces/efl_player.eo \ | 13 | lib/efl/interfaces/efl_player.eo \ |
13 | lib/efl/interfaces/efl_text.eo \ | 14 | lib/efl/interfaces/efl_text.eo \ |
14 | lib/efl/interfaces/efl_text_properties.eo \ | 15 | lib/efl/interfaces/efl_text_properties.eo \ |
15 | lib/efl/interfaces/efl_gfx_stack.eo \ | 16 | lib/efl/interfaces/efl_gfx_stack.eo \ |
16 | lib/efl/interfaces/efl_gfx_view.eo \ | 17 | lib/efl/interfaces/efl_gfx_view.eo \ |
18 | lib/efl/interfaces/efl_gfx_buffer.eo \ | ||
17 | lib/efl/interfaces/efl_gfx_shape.eo \ | 19 | lib/efl/interfaces/efl_gfx_shape.eo \ |
18 | lib/efl/interfaces/efl_gfx_gradient_base.eo \ | 20 | lib/efl/interfaces/efl_gfx_gradient_base.eo \ |
19 | lib/efl/interfaces/efl_gfx_gradient_linear.eo \ | 21 | lib/efl/interfaces/efl_gfx_gradient_linear.eo \ |
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index bb7580a4b3..fccce5df31 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h | |||
@@ -59,6 +59,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; | |||
59 | #include "interfaces/efl_file.eo.h" | 59 | #include "interfaces/efl_file.eo.h" |
60 | #include "interfaces/efl_image.eo.h" | 60 | #include "interfaces/efl_image.eo.h" |
61 | #include "interfaces/efl_image_animated.eo.h" | 61 | #include "interfaces/efl_image_animated.eo.h" |
62 | #include "interfaces/efl_image_load.eo.h" | ||
62 | #include "interfaces/efl_player.eo.h" | 63 | #include "interfaces/efl_player.eo.h" |
63 | #include "interfaces/efl_text.eo.h" | 64 | #include "interfaces/efl_text.eo.h" |
64 | #include "interfaces/efl_text_properties.eo.h" | 65 | #include "interfaces/efl_text_properties.eo.h" |
@@ -73,6 +74,7 @@ EAPI extern const Eo_Event_Description _EFL_GFX_PATH_CHANGED; | |||
73 | #define EFL_GFX_PATH_CHANGED (&(_EFL_GFX_PATH_CHANGED)) | 74 | #define EFL_GFX_PATH_CHANGED (&(_EFL_GFX_PATH_CHANGED)) |
74 | 75 | ||
75 | #include "interfaces/efl_gfx_base.eo.h" | 76 | #include "interfaces/efl_gfx_base.eo.h" |
77 | #include "interfaces/efl_gfx_buffer.eo.h" | ||
76 | #include "interfaces/efl_gfx_stack.eo.h" | 78 | #include "interfaces/efl_gfx_stack.eo.h" |
77 | #include "interfaces/efl_gfx_fill.eo.h" | 79 | #include "interfaces/efl_gfx_fill.eo.h" |
78 | #include "interfaces/efl_gfx_view.eo.h" | 80 | #include "interfaces/efl_gfx_view.eo.h" |
@@ -99,9 +101,9 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color *color, | |||
99 | 101 | ||
100 | #ifndef EFL_NOLEGACY_API_SUPPORT | 102 | #ifndef EFL_NOLEGACY_API_SUPPORT |
101 | #include "interfaces/efl_gfx_types.eot.h" | 103 | #include "interfaces/efl_gfx_types.eot.h" |
102 | #include "interfaces/efl_image_animated.eo.legacy.h" | ||
103 | #include "interfaces/efl_gfx_fill.eo.legacy.h" | 104 | #include "interfaces/efl_gfx_fill.eo.legacy.h" |
104 | #include "interfaces/efl_gfx_base.eo.legacy.h" | 105 | #include "interfaces/efl_gfx_base.eo.legacy.h" |
106 | #include "interfaces/efl_image_animated.eo.legacy.h" | ||
105 | #endif | 107 | #endif |
106 | 108 | ||
107 | typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; | 109 | typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; |
diff --git a/src/lib/efl/interfaces/efl_gfx_buffer.eo b/src/lib/efl/interfaces/efl_gfx_buffer.eo new file mode 100644 index 0000000000..f74e8017dd --- /dev/null +++ b/src/lib/efl/interfaces/efl_gfx_buffer.eo | |||
@@ -0,0 +1,165 @@ | |||
1 | import efl_gfx_types; | ||
2 | |||
3 | /* FIXME: this is very very low level. expose to apps? */ | ||
4 | enum Efl.Gfx.Buffer.Access_Mode { | ||
5 | none = 0x0, | ||
6 | read = 0x1, | ||
7 | write = 0x2, | ||
8 | cow = 0x4, [[Forces copy-on-write if already mapped as read-only. Requires write.]] | ||
9 | } | ||
10 | |||
11 | interface Efl.Gfx.Buffer () | ||
12 | { | ||
13 | [[Common APIs for all objects representing images and 2D pixel buffers.]] | ||
14 | legacy_prefix: null; | ||
15 | |||
16 | methods { | ||
17 | @property buffer_size { | ||
18 | [[Rectangular size of the pixel buffer as allocated in memory.]] | ||
19 | set { | ||
20 | [[Potentially not implemented, @.buffer_size may be read-only.]] | ||
21 | } | ||
22 | get {} | ||
23 | values { | ||
24 | w: int; [[Width in pixels.]] | ||
25 | h: int; [[Height in pixels.]] | ||
26 | } | ||
27 | } | ||
28 | @property colorspace { | ||
29 | [[The colorspace defines how pixels are encoded in the image in memory. | ||
30 | |||
31 | By default, images are encoded in 32-bit BGRA, ie. each pixel takes | ||
32 | 4 bytes in memory, with each channel B,G,R,A encoding the color with | ||
33 | values from 0 to 255. | ||
34 | |||
35 | All images used in EFL use alpha-premultipied BGRA values, which | ||
36 | means that for each pixel, B <= A, G <= A and R <= A. | ||
37 | ]] | ||
38 | get { | ||
39 | [[Returns the current encoding of this buffer's pixels. | ||
40 | |||
41 | See @Efl.Gfx.Colorspace for more information on the supported | ||
42 | formats. | ||
43 | ]] | ||
44 | } | ||
45 | values { | ||
46 | cspace: Efl.Gfx.Colorspace; | ||
47 | } | ||
48 | } | ||
49 | |||
50 | @property buffer_stride { | ||
51 | [[Length in bytes of one row of pixels in memory. | ||
52 | |||
53 | Usually this will be equal to width * 4, with a plain BGRA image. | ||
54 | This may return 0 if the stride is not applicable. | ||
55 | |||
56 | When applicable, this will include the @.buffer_borders as well | ||
57 | as potential extra padding. | ||
58 | ]] | ||
59 | get {} | ||
60 | values { | ||
61 | stride: int; | ||
62 | } | ||
63 | } | ||
64 | |||
65 | buffer_update_region_add { | ||
66 | [[Mark a sub-region of the given image object to be redrawn. | ||
67 | |||
68 | This function schedules a particular rectangular region of an | ||
69 | image object to be updated (redrawn) at the next rendering cycle. | ||
70 | ]] | ||
71 | params { | ||
72 | @in x: int; [[X-offset of the region to be updated.]] | ||
73 | @in y: int; [[Y-offset of the region to be updated.]] | ||
74 | @in w: int; [[Width of the region to be updated.]] | ||
75 | @in h: int; [[Height of the region to be updated.]] | ||
76 | } | ||
77 | } | ||
78 | |||
79 | /* FIXME: too low-level? */ | ||
80 | @property buffer_borders { | ||
81 | [[Duplicated pixel borders inside this buffer. | ||
82 | |||
83 | Internally, EFL may require an image to have its border pixels | ||
84 | duplicated, in particular for GL textures. This property exposes | ||
85 | the internal duplicated borders to allow calling @.buffer_map | ||
86 | with the entire pixel data, including those edge pixels. | ||
87 | ]] | ||
88 | get {} | ||
89 | values { | ||
90 | l: uint(0); [[Left border pixels, usually 0 or 1]] | ||
91 | r: uint(0); [[Right border pixels, usually 0 or 1]] | ||
92 | t: uint(0); [[Top border pixels, usually 0 or 1]] | ||
93 | b: uint(0); [[Bottom border pixels, usually 0 or 1]] | ||
94 | } | ||
95 | } | ||
96 | |||
97 | /* FIXME: split into read-only and writeable methods? */ | ||
98 | /* FIXME: This was copy pasta from ector generic buffer. changed a bit. */ | ||
99 | buffer_map { | ||
100 | [[Map a region of this buffer for read or write access by the CPU. | ||
101 | |||
102 | Fetches data from the GPU if needed. This operation may be slow if | ||
103 | cpu_readable_fast or cpu_writeable_fast are not true, or if the | ||
104 | required colorspace is different from the internal one. | ||
105 | |||
106 | Note that if the buffer has @.buffer_borders, then $x and $y may | ||
107 | be negative. | ||
108 | ]] | ||
109 | params { | ||
110 | @out length: uint @nonull; [[Accessible buffer size in bytes, should not be $null.]] | ||
111 | @in mode: Efl.Gfx.Buffer.Access_Mode; [[Specifies whether to map for read-only, | ||
112 | write-only or read-write access (OR combinaison of flags).]] | ||
113 | @in x: int @optional; [[X position of the top-left pixel to map, defaults to 0.]] | ||
114 | @in y: int @optional; [[Y position of the top-left pixel to map, defaults to 0.]] | ||
115 | @in w: uint @optional; [[If 0, defaults to the buffer width.]] | ||
116 | @in h: uint @optional; [[If 0, defaults to the buffer height.]] | ||
117 | @in cspace: Efl.Gfx.Colorspace @optional; [[Requested colorspace. If differen from the internal cspace, | ||
118 | map should try to convert the data into a new buffer. | ||
119 | argb8888 by default.]] | ||
120 | @out stride: uint @optional; [[Returns the length in bytes of a mapped line]] | ||
121 | } | ||
122 | return: ubyte* @warn_unused; [[Pointer to the top-left pixel data. Returns $null in case of failure]] | ||
123 | } | ||
124 | buffer_unmap { | ||
125 | [[Unmap a region of this buffer, and update the internal data if needed. | ||
126 | |||
127 | EFL will update the internal image if the map had write access. | ||
128 | ]] | ||
129 | params { | ||
130 | @in data: ubyte*; [[Data pointer returned by a previous call to map]] | ||
131 | @in length: uint; [[Must be the same as returned by map.]] | ||
132 | } | ||
133 | } | ||
134 | buffer_set { | ||
135 | [[Set the pixels for this buffer, or allocate a new memory region. | ||
136 | |||
137 | EFL will copy the $pixels to an internal buffer, and update the | ||
138 | GPU-side texture if required. This will mark the image as dirty. | ||
139 | |||
140 | If $pixels is $null, then a new empty buffer will be allocated. | ||
141 | |||
142 | If the buffer already had pixel data, the previous image data will | ||
143 | be dropped and the internal buffer may be resized to fit the new | ||
144 | pixel data. | ||
145 | |||
146 | Note: Use @Efl.Gfx.Buffer.buffer_size.set and @.buffer_map to | ||
147 | request EFL to allocate the buffer itself, instead of using this | ||
148 | function. | ||
149 | ]] | ||
150 | params { | ||
151 | @in pixels: ubyte*; [[If $null, allocates an empty buffer]] | ||
152 | @in width: int; | ||
153 | @in height: int; | ||
154 | @in stride: int @optional; [[If 0, automatically guessed from the width.]] | ||
155 | @in cspace: Efl.Gfx.Colorspace @optional; [[argb8888 by default.]] | ||
156 | @in l: uint @optional; [[Left border pixels, usually 0 or 1]] | ||
157 | @in r: uint @optional; [[Right border pixels, usually 0 or 1]] | ||
158 | @in t: uint @optional; [[Top border pixels, usually 0 or 1]] | ||
159 | @in b: uint @optional; [[Bottom border pixels, usually 0 or 1]] | ||
160 | } | ||
161 | return: bool; | ||
162 | } | ||
163 | /* Note: border, span and buffer flags not imported from ector buffer */ | ||
164 | } | ||
165 | } | ||
diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot index 2f98951a5e..782ac9d191 100644 --- a/src/lib/efl/interfaces/efl_gfx_types.eot +++ b/src/lib/efl/interfaces/efl_gfx_types.eot | |||
@@ -133,3 +133,27 @@ struct Efl.Gfx.Shape.Public | |||
133 | { | 133 | { |
134 | stroke: Efl.Gfx.Stroke; | 134 | stroke: Efl.Gfx.Stroke; |
135 | } | 135 | } |
136 | |||
137 | enum Efl.Gfx.Border_Fill_Mode | ||
138 | { | ||
139 | [[How an image's center region (the complement to the border region) should be rendered by EFL]] | ||
140 | none = 0, [[Image's center region is $b not to be rendered]] | ||
141 | default = 1, [[Image's center region is to be $b blended with objects underneath it, if it has transparency. This is the default behavior for image objects]] | ||
142 | solid = 2 [[Image's center region is to be made solid, even if it has transparency on it]] | ||
143 | } | ||
144 | |||
145 | enum Efl.Gfx.Orientation | ||
146 | { | ||
147 | [[Orientation options for $Efl.Image.orientation | ||
148 | @since 1.14]] | ||
149 | /* FIXME: legacy: evas_image; */ | ||
150 | orient_none = 0, [[no orientation change]] | ||
151 | orient_0 = 0, [[no orientation change]] | ||
152 | orient_90 = 1, [[orient 90 degrees clockwise]] | ||
153 | orient_180 = 2, [[orient 180 degrees clockwise]] | ||
154 | orient_270 = 3, [[rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise)]] | ||
155 | flip_horizontal = 4, [[flip image horizontally]] | ||
156 | flip_vertical = 5, [[flip image vertically]] | ||
157 | flip_transpose = 6, [[flip image along the y = (width - x) line (bottom-left to top-right)]] | ||
158 | flip_transverse = 7 [[flip image along the y = x line (top-left to bottom-right)]] | ||
159 | } | ||
diff --git a/src/lib/efl/interfaces/efl_gfx_view.eo b/src/lib/efl/interfaces/efl_gfx_view.eo index d90f63bf7f..9e658cbe5a 100644 --- a/src/lib/efl/interfaces/efl_gfx_view.eo +++ b/src/lib/efl/interfaces/efl_gfx_view.eo | |||
@@ -5,6 +5,10 @@ interface Efl.Gfx.View { | |||
5 | @property view_size { | 5 | @property view_size { |
6 | [[The dimensions of this object's viewport. | 6 | [[The dimensions of this object's viewport. |
7 | 7 | ||
8 | FIXME | ||
9 | WRONG DOC!!! | ||
10 | USELESS API for image files | ||
11 | |||
8 | This property will scale down or crop the image so that it is | 12 | This property will scale down or crop the image so that it is |
9 | treated as if it were of the given size. If the given size is | 13 | treated as if it were of the given size. If the given size is |
10 | smaller than the image, it will be cropped. If it's larger, then | 14 | smaller than the image, it will be cropped. If it's larger, then |
diff --git a/src/lib/efl/interfaces/efl_image.eo b/src/lib/efl/interfaces/efl_image.eo index 2d5c01cc99..619d17c302 100644 --- a/src/lib/efl/interfaces/efl_image.eo +++ b/src/lib/efl/interfaces/efl_image.eo | |||
@@ -1,22 +1,9 @@ | |||
1 | interface Efl.Image { | 1 | interface Efl.Image () |
2 | { | ||
3 | [[Common APIs for all 2D images that can be rendered on the canvas.]] | ||
2 | legacy_prefix: null; | 4 | legacy_prefix: null; |
3 | methods { | ||
4 | @property load_size { | ||
5 | [[The loading size of an image. | ||
6 | 5 | ||
7 | The image will be loaded into memory as if it was the set size | 6 | methods { |
8 | instead of the original size. This can save a lot of memory, | ||
9 | and is important for scalable types like svg. | ||
10 | ]] | ||
11 | set { | ||
12 | [[Requests the canvas to load the image at the given size.]] | ||
13 | } | ||
14 | get {} | ||
15 | values { | ||
16 | w: int; [[Width of the image's load size.]] | ||
17 | h: int; [[Height of the image's load size.]] | ||
18 | } | ||
19 | } | ||
20 | @property smooth_scale { | 7 | @property smooth_scale { |
21 | [[Whether to use high-quality image scaling algorithm for this image. | 8 | [[Whether to use high-quality image scaling algorithm for this image. |
22 | 9 | ||
@@ -33,6 +20,30 @@ interface Efl.Image { | |||
33 | smooth_scale: bool; [[Whether to use smooth scale or not.]] | 20 | smooth_scale: bool; [[Whether to use smooth scale or not.]] |
34 | } | 21 | } |
35 | } | 22 | } |
23 | @property alpha { | ||
24 | [[Indicates whether the alpha channel should be used. | ||
25 | |||
26 | This does not indicate whether the image source file contains | ||
27 | an alpha channel, only whether to respect it or discard it. | ||
28 | ]] | ||
29 | set { | ||
30 | [[Change alpha channel usage for this object. | ||
31 | |||
32 | This function sets a flag on an image object indicating | ||
33 | whether or not to use alpha channel data. A value of $true | ||
34 | makes it use alpha channel data, and $false makes it ignore | ||
35 | that data. Note that this has nothing to do with an object's | ||
36 | color as manipulated by @Efl.Gfx.Base.color.set. | ||
37 | ]] | ||
38 | } | ||
39 | get { | ||
40 | [[Retrieve whether alpha channel data is used on this object.]] | ||
41 | } | ||
42 | values { | ||
43 | alpha: bool; [[Whether to use alpha channel ($true) data | ||
44 | or not ($false).]] | ||
45 | } | ||
46 | } | ||
36 | @property ratio { | 47 | @property ratio { |
37 | [[The native width/height ratio of the image.]] | 48 | [[The native width/height ratio of the image.]] |
38 | get { | 49 | get { |
@@ -42,5 +53,84 @@ interface Efl.Image { | |||
42 | ratio: double; [[The image's ratio.]] | 53 | ratio: double; [[The image's ratio.]] |
43 | } | 54 | } |
44 | } | 55 | } |
56 | @property orientation { | ||
57 | [[The image orientation allows rotating and flipping the image | ||
58 | at render time. | ||
59 | |||
60 | Default is @Efl.Gfx.Orientation.orient_none | ||
61 | |||
62 | @since 1.14 | ||
63 | ]] | ||
64 | set {} | ||
65 | get {} | ||
66 | values { | ||
67 | orient: Efl.Gfx.Orientation; | ||
68 | } | ||
69 | } | ||
70 | |||
71 | @property border { | ||
72 | [[Dimensions of this image's border, a region that does not scale | ||
73 | with the center area. | ||
74 | |||
75 | When EFL renders an image, its source may be scaled to fit | ||
76 | the size of the object. This function sets an area from | ||
77 | the borders of the image inwards which is not to be scaled. | ||
78 | This function is useful for making frames and for widget | ||
79 | theming, where, for example, buttons may be of varying | ||
80 | sizes, but their border size must remain constant. | ||
81 | |||
82 | The units used for $l, $r, $t and $b are canvas units (pixels). | ||
83 | |||
84 | Note: The border region itself may be scaled by the | ||
85 | @.border_scale.set function. | ||
86 | |||
87 | Note: By default, image objects have no borders set, i.e. | ||
88 | $l, $r, $t and $b start as 0. | ||
89 | |||
90 | Note: Similar to the concepts of 9-patch images or cap insets. | ||
91 | ]] | ||
92 | set {} | ||
93 | get {} | ||
94 | values { | ||
95 | l: int; [[The border's left width.]] | ||
96 | r: int; [[The border's right width.]] | ||
97 | t: int; [[The border's top height.]] | ||
98 | b: int; [[The border's bottom height.]] | ||
99 | } | ||
100 | } | ||
101 | @property border_scale { | ||
102 | [[Scaling factor applied to the image borders. | ||
103 | |||
104 | This value multiplies the size of the @.border when scaling an | ||
105 | object. | ||
106 | |||
107 | Default value is 1.0 (no scaling). | ||
108 | ]] | ||
109 | set {} | ||
110 | get {} | ||
111 | values { | ||
112 | scale: double; [[The scale factor.]] | ||
113 | } | ||
114 | } | ||
115 | @property border_center_fill { | ||
116 | [[Specifies how the center part of the object (not the borders) | ||
117 | should be drawn when EFL is rendering it. | ||
118 | |||
119 | This function sets how the center part of the image object's | ||
120 | source image is to be drawn, which must be one of the values | ||
121 | in @Efl.Gfx.Border_Fill_Mode. By center we mean the complementary | ||
122 | part of that defined by @.border.set. This is very useful for | ||
123 | making frames and decorations. You would most probably also be | ||
124 | using a filled image (as in @Efl.Gfx.Fill.filled) to use as a frame. | ||
125 | |||
126 | The default value is @Efl.Gfx.Border_Fill_Mode.default, ie. render | ||
127 | and scale the center area, respecting its transparency. | ||
128 | ]] | ||
129 | set {} | ||
130 | get {} | ||
131 | values { | ||
132 | fill: Efl.Gfx.Border_Fill_Mode; [[Fill mode of the center region.]] | ||
133 | } | ||
134 | } | ||
45 | } | 135 | } |
46 | } | 136 | } |
diff --git a/src/lib/efl/interfaces/efl_image_load.eo b/src/lib/efl/interfaces/efl_image_load.eo new file mode 100644 index 0000000000..4a6bd4ec39 --- /dev/null +++ b/src/lib/efl/interfaces/efl_image_load.eo | |||
@@ -0,0 +1,203 @@ | |||
1 | /* FIXME: maybe add error code for "currently running" or "pending" ? */ | ||
2 | enum Efl.Image_Load.Error | ||
3 | { | ||
4 | none = 0, [[No error on load]] | ||
5 | generic = 1, [[A non-specific error occurred]] | ||
6 | does_not_exist = 2, [[File (or file path) does not exist]] | ||
7 | permission_denied = 3, [[Permission denied to an existing file (or path)]] | ||
8 | resource_allocation_failed = 4, [[Allocation of resources failure prevented load]] | ||
9 | corrupt_file = 5, [[File corrupt (but was detected as a known format)]] | ||
10 | unknown_format = 6 [[File is not a known format]] | ||
11 | } | ||
12 | |||
13 | /* FIXME: state or status??? */ | ||
14 | enum Efl.Image_Load.State | ||
15 | { | ||
16 | none = 0, [[Not loading any image.]] | ||
17 | loaded = 1, [[Image data is loaded, nothing is pending.]] | ||
18 | pending = 2, [[The image has been queued for load, but actual loading may not have started yet.]] | ||
19 | loading = 3, [[The image is currently loading.]] | ||
20 | error = 4, [[Image load has failed. Call @Efl.Image_Load.load_error.get to know why.]] | ||
21 | cancelled = 5 [[Image load has been cancelled.]] | ||
22 | } | ||
23 | |||
24 | /* FIXME: Efl.Image.Load */ | ||
25 | interface Efl.Image_Load () | ||
26 | { | ||
27 | [[Common APIs for all loadable 2D images.]] | ||
28 | legacy_prefix: null; | ||
29 | |||
30 | methods { | ||
31 | load_async_start { | ||
32 | [[Begin preloading an image object's image data in the background. | ||
33 | |||
34 | Once the background task is done, the event $load,done will be | ||
35 | emitted. | ||
36 | ]] | ||
37 | } | ||
38 | load_async_cancel { | ||
39 | [[Cancel preloading an image object's image data in the background. | ||
40 | |||
41 | The event $load,cancelled should be triggered soon after | ||
42 | cancellation happened, and the object should be left in a state | ||
43 | where it has no image data. If cancel is called too late, the image | ||
44 | will be kept in memory. | ||
45 | ]] | ||
46 | } | ||
47 | @property load_state { | ||
48 | get { | ||
49 | [[Queries information on the current state of load of the image. | ||
50 | |||
51 | While more relevant to asynchronous load, this will also return | ||
52 | meaningful information about the last synchronous load. | ||
53 | ]] | ||
54 | } | ||
55 | values { | ||
56 | state: Efl.Image_Load.State; | ||
57 | } | ||
58 | } | ||
59 | @property load_size { | ||
60 | [[The load size of an image. | ||
61 | |||
62 | The image will be loaded into memory as if it was the specified | ||
63 | size instead of its original size. This can save a lot of memory, | ||
64 | and is important for scalable types like svg. | ||
65 | |||
66 | By default, the load size is not specified, so it is 0x0. | ||
67 | ]] | ||
68 | set { | ||
69 | [[Requests the canvas to load the image at the given size. | ||
70 | |||
71 | EFL will try to load the image at the requested size, but does | ||
72 | not garantee an exact match between the request and the loaded | ||
73 | image dimensions. | ||
74 | ]] | ||
75 | } | ||
76 | get { | ||
77 | [[Returns the requested load size.]] | ||
78 | } | ||
79 | values { | ||
80 | w: int; [[Width of the image's load size.]] | ||
81 | h: int; [[Height of the image's load size.]] | ||
82 | } | ||
83 | } | ||
84 | @property load_dpi { | ||
85 | set { | ||
86 | [[Set the DPI resolution of an image object's source image. | ||
87 | |||
88 | This function sets the DPI resolution of a given loaded canvas | ||
89 | image. Most useful for the SVG image loader. | ||
90 | ]] | ||
91 | } | ||
92 | get { | ||
93 | [[Get the DPI resolution of a loaded image object in the canvas. | ||
94 | |||
95 | This function returns the DPI resolution of the given canvas | ||
96 | image. | ||
97 | ]] | ||
98 | } | ||
99 | values { | ||
100 | dpi: double; [[The DPI resolution.]] | ||
101 | } | ||
102 | } | ||
103 | @property load_region_support { | ||
104 | [[Indicates whether the @.load_region property is supported for the | ||
105 | current file. | ||
106 | |||
107 | @since 1.2 | ||
108 | ]] | ||
109 | get {} | ||
110 | values { | ||
111 | support: bool; | ||
112 | } | ||
113 | } | ||
114 | @property load_region { | ||
115 | set { | ||
116 | [[Inform a given image object to load a selective region of its | ||
117 | source image. | ||
118 | |||
119 | This function is useful when one is not showing all of an | ||
120 | image's area on its image object. | ||
121 | |||
122 | Note: The image loader for the image format in question has | ||
123 | to support selective region loading in order to this function | ||
124 | to take effect. | ||
125 | ]] | ||
126 | } | ||
127 | get { | ||
128 | [[Retrieve the coordinates of a given image object's selective | ||
129 | (source image) load region. | ||
130 | |||
131 | Note: Use $null pointers on the coordinates you're not | ||
132 | interested in: they'll be ignored by the function. | ||
133 | ]] | ||
134 | } | ||
135 | values { | ||
136 | x: int; [[X-offset of the region to be loaded.]] | ||
137 | y: int; [[Y-offset of the region to be loaded.]] | ||
138 | w: int; [[Width of the region to be loaded.]] | ||
139 | h: int; [[Height of the region to be loaded.]] | ||
140 | } | ||
141 | } | ||
142 | @property load_orientation { | ||
143 | [[Defines whether the orientation information in the image file | ||
144 | should be honored. | ||
145 | |||
146 | The orientation can for instance be set in the EXIF tags of a | ||
147 | JPEG image. If this flag is $false, then the orientation will be | ||
148 | ignored at load time, otherwise the image will be loaded with the | ||
149 | proper orientation. | ||
150 | |||
151 | @since 1.1 | ||
152 | ]] | ||
153 | set {} | ||
154 | get {} | ||
155 | values { | ||
156 | enable: bool; [[$true means that it should honor the orientation | ||
157 | information.]] | ||
158 | } | ||
159 | } | ||
160 | @property load_scale_down { | ||
161 | [[The scale down factor is a divider on the original image size. | ||
162 | |||
163 | Setting the scale down factor can reduce load time and memory usage, | ||
164 | at the cost of having a scaled down image in memory. | ||
165 | |||
166 | This function sets the scale down factor of a given canvas | ||
167 | image. Most useful for the SVG image loader, but also applies | ||
168 | to JPEG, PNG and BMP. | ||
169 | |||
170 | Powers of two (2, 4, 8) are best supported (especially with JPEG) | ||
171 | ]] | ||
172 | set { | ||
173 | [[Requests the image loader to scale down by $div times. | ||
174 | Call this before starting the actual image load. | ||
175 | ]] | ||
176 | } | ||
177 | get {} | ||
178 | values { | ||
179 | div: int; [[The scale down dividing factor.]] | ||
180 | } | ||
181 | } | ||
182 | /* FIXME: do we want this? or only rely on the events? | ||
183 | * what if preload is currently running? | ||
184 | */ | ||
185 | @property load_error { | ||
186 | get { | ||
187 | [[Retrieves a number representing any error that occurred during | ||
188 | the last loading of the given image object's source image. | ||
189 | ]] | ||
190 | return: Efl.Image_Load.Error @warn_unused; [[ | ||
191 | A value giving the last error that occurred, one of | ||
192 | @Efl.Image_Load.Error values. @Efl.Image_Load.Error.none is | ||
193 | returned if there was no error. | ||
194 | ]] | ||
195 | } | ||
196 | } | ||
197 | } | ||
198 | events { | ||
199 | load,done; | ||
200 | load,error: Efl.Image_Load.Error; | ||
201 | load,cancelled; | ||
202 | } | ||
203 | } | ||
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index b0be0d21e5..2299022c3d 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c | |||
@@ -8,11 +8,13 @@ | |||
8 | #include "interfaces/efl_file.eo.c" | 8 | #include "interfaces/efl_file.eo.c" |
9 | #include "interfaces/efl_image.eo.c" | 9 | #include "interfaces/efl_image.eo.c" |
10 | #include "interfaces/efl_image_animated.eo.c" | 10 | #include "interfaces/efl_image_animated.eo.c" |
11 | #include "interfaces/efl_image_load.eo.c" | ||
11 | #include "interfaces/efl_player.eo.c" | 12 | #include "interfaces/efl_player.eo.c" |
12 | #include "interfaces/efl_text.eo.c" | 13 | #include "interfaces/efl_text.eo.c" |
13 | #include "interfaces/efl_text_properties.eo.c" | 14 | #include "interfaces/efl_text_properties.eo.c" |
14 | 15 | ||
15 | #include "interfaces/efl_gfx_base.eo.c" | 16 | #include "interfaces/efl_gfx_base.eo.c" |
17 | #include "interfaces/efl_gfx_buffer.eo.c" | ||
16 | #include "interfaces/efl_gfx_stack.eo.c" | 18 | #include "interfaces/efl_gfx_stack.eo.c" |
17 | #include "interfaces/efl_gfx_fill.eo.c" | 19 | #include "interfaces/efl_gfx_fill.eo.c" |
18 | #include "interfaces/efl_gfx_view.eo.c" | 20 | #include "interfaces/efl_gfx_view.eo.c" |
diff --git a/src/lib/emotion/emotion_object.eo b/src/lib/emotion/emotion_object.eo index 3486c5cef3..39ee910564 100644 --- a/src/lib/emotion/emotion_object.eo +++ b/src/lib/emotion/emotion_object.eo | |||
@@ -1,4 +1,4 @@ | |||
1 | class Emotion.Object (Evas.Object_Smart, Efl.File, Efl.Player, Efl.Image) { | 1 | class Emotion.Object (Evas.Object_Smart, Efl.File, Efl.Player, Efl.Image, Efl.Image_Load) { |
2 | eo_prefix: emotion_obj; | 2 | eo_prefix: emotion_obj; |
3 | methods { | 3 | methods { |
4 | @property option { | 4 | @property option { |
@@ -74,7 +74,7 @@ class Emotion.Object (Evas.Object_Smart, Efl.File, Efl.Player, Efl.Image) { | |||
74 | Efl.Player.audio_mute.get; | 74 | Efl.Player.audio_mute.get; |
75 | Efl.Player.length.get; | 75 | Efl.Player.length.get; |
76 | Efl.Player.seekable.get; | 76 | Efl.Player.seekable.get; |
77 | Efl.Image.load_size.get; | 77 | Efl.Image_Load.load_size.get; |
78 | Efl.Image.ratio.get; | 78 | Efl.Image.ratio.get; |
79 | Efl.Image.smooth_scale.set; | 79 | Efl.Image.smooth_scale.set; |
80 | Efl.Image.smooth_scale.get; | 80 | Efl.Image.smooth_scale.get; |
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index d0b0f327f8..804b865307 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c | |||
@@ -748,7 +748,7 @@ emotion_object_size_get(const Evas_Object *obj, int *iw, int *ih) | |||
748 | } | 748 | } |
749 | 749 | ||
750 | EOLIAN static void | 750 | EOLIAN static void |
751 | _emotion_object_efl_image_load_size_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, int *iw, int *ih) | 751 | _emotion_object_efl_image_load_load_size_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd, int *iw, int *ih) |
752 | { | 752 | { |
753 | if (iw) *iw = sd->video.w; | 753 | if (iw) *iw = sd->video.w; |
754 | if (ih) *ih = sd->video.h; | 754 | if (ih) *ih = sd->video.h; |
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index 668684845a..f5d91a4e4f 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h | |||
@@ -2853,6 +2853,25 @@ EAPI int evas_object_image_animated_loop_count_get(const Evas_Object *obj); | |||
2853 | EAPI double evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int frame_num); | 2853 | EAPI double evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int frame_num); |
2854 | 2854 | ||
2855 | /** | 2855 | /** |
2856 | * @brief Set the DPI resolution of an image object's source image. | ||
2857 | * | ||
2858 | * This function sets the DPI resolution of a given loaded canvas image. Most | ||
2859 | * useful for the SVG image loader. | ||
2860 | * | ||
2861 | * @param[in] dpi The DPI resolution. | ||
2862 | */ | ||
2863 | EAPI void evas_object_image_load_dpi_set(Evas_Object *obj, double dpi); | ||
2864 | |||
2865 | /** | ||
2866 | * @brief Get the DPI resolution of a loaded image object in the canvas. | ||
2867 | * | ||
2868 | * This function returns the DPI resolution of the given canvas image. | ||
2869 | * | ||
2870 | * @return The DPI resolution. | ||
2871 | */ | ||
2872 | EAPI double evas_object_image_load_dpi_get(const Evas_Object *obj); | ||
2873 | |||
2874 | /** | ||
2856 | * | 2875 | * |
2857 | * Set the load size of a given image object's source image. | 2876 | * Set the load size of a given image object's source image. |
2858 | * | 2877 | * |
@@ -2890,6 +2909,98 @@ EAPI void evas_object_image_load_size_set(Eo *obj, int w, int h); | |||
2890 | EAPI void evas_object_image_load_size_get(const Eo *obj, int *w, int *h); | 2909 | EAPI void evas_object_image_load_size_get(const Eo *obj, int *w, int *h); |
2891 | 2910 | ||
2892 | /** | 2911 | /** |
2912 | * @brief Inform a given image object to load a selective region of its source | ||
2913 | * image. | ||
2914 | * | ||
2915 | * This function is useful when one is not showing all of an image's area on | ||
2916 | * its image object. | ||
2917 | * | ||
2918 | * @note The image loader for the image format in question has to support | ||
2919 | * selective region loading in order to this function to take effect. | ||
2920 | * | ||
2921 | * @param[in] x X-offset of the region to be loaded. | ||
2922 | * @param[in] y Y-offset of the region to be loaded. | ||
2923 | * @param[in] w Width of the region to be loaded. | ||
2924 | * @param[in] h Height of the region to be loaded. | ||
2925 | */ | ||
2926 | EAPI void evas_object_image_load_region_set(Evas_Object *obj, int x, int y, int w, int h); | ||
2927 | |||
2928 | /** | ||
2929 | * @brief Retrieve the coordinates of a given image object's selective (source | ||
2930 | * image) load region. | ||
2931 | * | ||
2932 | * @note Use @c null pointers on the coordinates you're not interested in: | ||
2933 | * they'll be ignored by the function. | ||
2934 | * | ||
2935 | * @param[out] x X-offset of the region to be loaded. | ||
2936 | * @param[out] y Y-offset of the region to be loaded. | ||
2937 | * @param[out] w Width of the region to be loaded. | ||
2938 | * @param[out] h Height of the region to be loaded. | ||
2939 | */ | ||
2940 | EAPI void evas_object_image_load_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h); | ||
2941 | |||
2942 | /** | ||
2943 | * @brief Get the support state of a given image. | ||
2944 | * | ||
2945 | * @return The region support state. | ||
2946 | * | ||
2947 | * @since 1.2 | ||
2948 | * | ||
2949 | * @ingroup Evas_Image | ||
2950 | */ | ||
2951 | EAPI Eina_Bool evas_object_image_region_support_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT; | ||
2952 | |||
2953 | /** | ||
2954 | * @brief Define if the orientation information in the image file should be | ||
2955 | * honored. | ||
2956 | * | ||
2957 | * @param[in] enable @c true means that it should honor the orientation | ||
2958 | * information. | ||
2959 | * | ||
2960 | * @since 1.1 | ||
2961 | */ | ||
2962 | EAPI void evas_object_image_load_orientation_set(Evas_Object *obj, Eina_Bool enable); | ||
2963 | |||
2964 | /** | ||
2965 | * @brief Get if the orientation information in the image file should be | ||
2966 | * honored. | ||
2967 | * | ||
2968 | * @return @c true means that it should honor the orientation information. | ||
2969 | * | ||
2970 | * @since 1.1 | ||
2971 | */ | ||
2972 | EAPI Eina_Bool evas_object_image_load_orientation_get(const Evas_Object *obj); | ||
2973 | |||
2974 | /** | ||
2975 | * @brief Set the scale down factor of a given image object's source image, | ||
2976 | * when loading it. | ||
2977 | * | ||
2978 | * This function sets the scale down factor of a given canvas image. Most | ||
2979 | * useful for the SVG image loader. | ||
2980 | * | ||
2981 | * @param[in] scale_down The scale down factor. | ||
2982 | */ | ||
2983 | EAPI void evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down); | ||
2984 | |||
2985 | /** | ||
2986 | * @brief Get the scale down factor of a given image object's source image, | ||
2987 | * when loading it. | ||
2988 | * | ||
2989 | * @return The scale down factor. | ||
2990 | */ | ||
2991 | EAPI int evas_object_image_load_scale_down_get(const Evas_Object *obj); | ||
2992 | |||
2993 | /** | ||
2994 | * @brief Retrieves a number representing any error that occurred during the | ||
2995 | * last loading of the given image object's source image. | ||
2996 | * | ||
2997 | * @return A value giving the last error that occurred. It should be one of the | ||
2998 | * @ref Evas_Load_Error values. #EVAS_LOAD_ERROR_NONE is returned if there was | ||
2999 | * no error. | ||
3000 | */ | ||
3001 | EAPI Evas_Load_Error evas_object_image_load_error_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT; | ||
3002 | |||
3003 | /** | ||
2893 | * | 3004 | * |
2894 | * Sets whether to use high-quality image scaling algorithm on the | 3005 | * Sets whether to use high-quality image scaling algorithm on the |
2895 | * given image object. | 3006 | * given image object. |
@@ -3008,8 +3119,6 @@ EAPI void evas_object_image_fill_get(const Evas_Object *obj, Evas_Coord *x, Evas | |||
3008 | * | 3119 | * |
3009 | * @param[in] filled @c true to make the fill property follow object size or | 3120 | * @param[in] filled @c true to make the fill property follow object size or |
3010 | * @c false otherwise. | 3121 | * @c false otherwise. |
3011 | * | ||
3012 | * @ingroup Evas_Image | ||
3013 | */ | 3122 | */ |
3014 | EAPI void evas_object_image_filled_set(Evas_Object *obj, Eina_Bool filled); | 3123 | EAPI void evas_object_image_filled_set(Evas_Object *obj, Eina_Bool filled); |
3015 | 3124 | ||
@@ -3022,10 +3131,173 @@ EAPI void evas_object_image_filled_set(Evas_Object *obj, Eina_Bool filled); | |||
3022 | * | 3131 | * |
3023 | * @return @c true to make the fill property follow object size or @c false | 3132 | * @return @c true to make the fill property follow object size or @c false |
3024 | * otherwise. | 3133 | * otherwise. |
3134 | */ | ||
3135 | EAPI Eina_Bool evas_object_image_filled_get(const Evas_Object *obj); | ||
3136 | |||
3137 | /** | ||
3138 | * @brief Retrieve whether alpha channel data is being used on the given image | ||
3139 | * object. | ||
3140 | * | ||
3141 | * This function returns @c true if the image object's alpha channel is being | ||
3142 | * used, or @c false otherwise. | ||
3143 | * | ||
3144 | * @return Whether to use alpha channel ($true) data or not ($false). | ||
3025 | * | 3145 | * |
3026 | * @ingroup Evas_Image | 3146 | * @ingroup Evas_Image |
3027 | */ | 3147 | */ |
3028 | EAPI Eina_Bool evas_object_image_filled_get(const Evas_Object *obj); | 3148 | EAPI Eina_Bool evas_object_image_alpha_get(const Evas_Object *obj); |
3149 | |||
3150 | /** | ||
3151 | * @brief Enable or disable alpha channel usage on the given image object. | ||
3152 | * | ||
3153 | * This function sets a flag on an image object indicating whether or not to | ||
3154 | * use alpha channel data. A value of @c true makes it use alpha channel data, | ||
3155 | * and @c false makes it ignore that data. Note that this has nothing to do | ||
3156 | * with an object's color as manipulated by @ref evas_object_color_set. | ||
3157 | * | ||
3158 | * @param[in] alpha Whether to use alpha channel ($true) data or not ($false). | ||
3159 | */ | ||
3160 | EAPI void evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool alpha); | ||
3161 | |||
3162 | /** | ||
3163 | * @brief Dimensions of this image's border, a region that does not scale with | ||
3164 | * the center area. | ||
3165 | * | ||
3166 | * When EFL renders an image, its source may be scaled to fit the size of the | ||
3167 | * object. This function sets an area from the borders of the image inwards | ||
3168 | * which is not to be scaled. This function is useful for making frames and for | ||
3169 | * widget theming, where, for example, buttons may be of varying sizes, but | ||
3170 | * their border size must remain constant. | ||
3171 | * | ||
3172 | * The units used for @c l, @c r, @c t and @c b are canvas units (pixels). | ||
3173 | * | ||
3174 | * @note The border region itself may be scaled by the | ||
3175 | * @ref evas_object_image_border_scale_set function. | ||
3176 | * | ||
3177 | * @note By default, image objects have no borders set, i.e. @c l, @c r, @c t | ||
3178 | * and @c b start as 0. | ||
3179 | * | ||
3180 | * @note Similar to the concepts of 9-patch images or cap insets. | ||
3181 | * | ||
3182 | * @param[in] l The border's left width. | ||
3183 | * @param[in] r The border's right width. | ||
3184 | * @param[in] t The border's top height. | ||
3185 | * @param[in] b The border's bottom height. | ||
3186 | */ | ||
3187 | EAPI void evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b); | ||
3188 | |||
3189 | /** | ||
3190 | * @brief Dimensions of this image's border, a region that does not scale with | ||
3191 | * the center area. | ||
3192 | * | ||
3193 | * When EFL renders an image, its source may be scaled to fit the size of the | ||
3194 | * object. This function sets an area from the borders of the image inwards | ||
3195 | * which is not to be scaled. This function is useful for making frames and for | ||
3196 | * widget theming, where, for example, buttons may be of varying sizes, but | ||
3197 | * their border size must remain constant. | ||
3198 | * | ||
3199 | * The units used for @c l, @c r, @c t and @c b are canvas units (pixels). | ||
3200 | * | ||
3201 | * @note The border region itself may be scaled by the | ||
3202 | * @ref evas_object_image_border_scale_set function. | ||
3203 | * | ||
3204 | * @note By default, image objects have no borders set, i.e. @c l, @c r, @c t | ||
3205 | * and @c b start as 0. | ||
3206 | * | ||
3207 | * @note Similar to the concepts of 9-patch images or cap insets. | ||
3208 | * | ||
3209 | * @param[out] l The border's left width. | ||
3210 | * @param[out] r The border's right width. | ||
3211 | * @param[out] t The border's top height. | ||
3212 | * @param[out] b The border's bottom height. | ||
3213 | */ | ||
3214 | EAPI void evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b); | ||
3215 | |||
3216 | /** | ||
3217 | * @brief Scaling factor applied to the image borders. | ||
3218 | * | ||
3219 | * This value multiplies the size of the @ref evas_object_image_border_get when | ||
3220 | * scaling an object. | ||
3221 | * | ||
3222 | * Default value is 1.0 (no scaling). | ||
3223 | * | ||
3224 | * @param[in] scale The scale factor. | ||
3225 | */ | ||
3226 | EAPI void evas_object_image_border_scale_set(Evas_Object *obj, double scale); | ||
3227 | |||
3228 | /** | ||
3229 | * @brief Scaling factor applied to the image borders. | ||
3230 | * | ||
3231 | * This value multiplies the size of the @ref evas_object_image_border_get when | ||
3232 | * scaling an object. | ||
3233 | * | ||
3234 | * Default value is 1.0 (no scaling). | ||
3235 | * | ||
3236 | * @return The scale factor. | ||
3237 | */ | ||
3238 | EAPI double evas_object_image_border_scale_get(const Evas_Object *obj); | ||
3239 | |||
3240 | /** | ||
3241 | * @brief Specifies how the center part of the object (not the borders) should | ||
3242 | * be drawn when EFL is rendering it. | ||
3243 | * | ||
3244 | * This function sets how the center part of the image object's source image is | ||
3245 | * to be drawn, which must be one of the values in @ref Evas_Border_Fill_Mode. | ||
3246 | * By center we mean the complementary part of that defined by | ||
3247 | * @ref evas_object_image_border_set. This one is very useful for making frames | ||
3248 | * and decorations. You would most probably also be using a filled image (as in | ||
3249 | * @ref Efl.Gfx.Fill.filled) to use as a frame. | ||
3250 | * | ||
3251 | * The default value is | ||
3252 | * | ||
3253 | * @param[in] fill Fill mode of the center region of @c obj (a value in | ||
3254 | * #Evas_Border_Fill_Mode). | ||
3255 | */ | ||
3256 | EAPI void evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode fill); | ||
3257 | |||
3258 | /** | ||
3259 | * @brief Specifies how the center part of the object (not the borders) should | ||
3260 | * be drawn when EFL is rendering it. | ||
3261 | * | ||
3262 | * This function sets how the center part of the image object's source image is | ||
3263 | * to be drawn, which must be one of the values in @ref Evas_Border_Fill_Mode. | ||
3264 | * By center we mean the complementary part of that defined by | ||
3265 | * @ref evas_object_image_border_set. This one is very useful for making frames | ||
3266 | * and decorations. You would most probably also be using a filled image (as in | ||
3267 | * @ref Efl.Gfx.Fill.filled) to use as a frame. | ||
3268 | * | ||
3269 | * The default value is | ||
3270 | * | ||
3271 | * @return Fill mode of the center region of @c obj (a value in | ||
3272 | * #Evas_Border_Fill_Mode). | ||
3273 | */ | ||
3274 | EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get(const Evas_Object *obj); | ||
3275 | |||
3276 | /** | ||
3277 | * @brief Set the image orientation. | ||
3278 | * | ||
3279 | * This function allows to rotate or flip the image. | ||
3280 | * | ||
3281 | * @param[in] orient The image orientation @ref Evas_Image_Orient. Default is | ||
3282 | * #EVAS_IMAGE_ORIENT_NONE. | ||
3283 | * | ||
3284 | * @since 1.14 | ||
3285 | * | ||
3286 | * @ingroup Evas_Image | ||
3287 | */ | ||
3288 | EAPI void evas_object_image_orient_set(Evas_Object *obj, Evas_Image_Orient orient); | ||
3289 | |||
3290 | /** | ||
3291 | * @brief Get the image orientation. | ||
3292 | * | ||
3293 | * @return The image orientation @ref Evas_Image_Orient. Default is | ||
3294 | * #EVAS_IMAGE_ORIENT_NONE. | ||
3295 | * | ||
3296 | * @since 1.14 | ||
3297 | * | ||
3298 | * @ingroup Evas_Image | ||
3299 | */ | ||
3300 | EAPI Evas_Image_Orient evas_object_image_orient_get(const Evas_Object *obj); | ||
3029 | 3301 | ||
3030 | /** | 3302 | /** |
3031 | * | 3303 | * |
@@ -3053,6 +3325,52 @@ EAPI void evas_object_image_size_set(Evas_Object *obj, int w, int h); | |||
3053 | */ | 3325 | */ |
3054 | EAPI void evas_object_image_size_get(const Evas_Object *obj, int *w, int *h); | 3326 | EAPI void evas_object_image_size_get(const Evas_Object *obj, int *w, int *h); |
3055 | 3327 | ||
3328 | /** | ||
3329 | * @brief Set the colorspace of a given image of the canvas. | ||
3330 | * | ||
3331 | * This function sets the colorspace of given canvas image. | ||
3332 | * | ||
3333 | * @param[in] cspace The new color space. | ||
3334 | * | ||
3335 | * @ingroup Evas_Image | ||
3336 | */ | ||
3337 | EAPI void evas_object_image_colorspace_set(Evas_Object *obj, Evas_Colorspace cspace); | ||
3338 | |||
3339 | /** | ||
3340 | * @brief Get the colorspace of a given image of the canvas. | ||
3341 | * | ||
3342 | * This function returns the colorspace of given canvas image. | ||
3343 | * | ||
3344 | * @return The new color space. | ||
3345 | * | ||
3346 | * @ingroup Evas_Image | ||
3347 | */ | ||
3348 | EAPI Evas_Colorspace evas_object_image_colorspace_get(const Evas_Object *obj); | ||
3349 | |||
3350 | /** | ||
3351 | * @brief Retrieves the row stride of the given image object. | ||
3352 | * | ||
3353 | * The row stride is the number of bytes between the start of a row and the | ||
3354 | * start of the next row for image data. | ||
3355 | * | ||
3356 | * @return The stride of the image (in bytes). | ||
3357 | * | ||
3358 | * @ingroup Evas_Image | ||
3359 | */ | ||
3360 | EAPI int evas_object_image_stride_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT; | ||
3361 | |||
3362 | /** | ||
3363 | * @brief Mark a sub-region of the given image object to be redrawn. | ||
3364 | * | ||
3365 | * This function schedules a particular rectangular region of an image object | ||
3366 | * to be updated (redrawn) at the next rendering cycle. | ||
3367 | * | ||
3368 | * @param[in] y Y-offset of the region to be updated. | ||
3369 | * @param[in] w Width of the region to be updated. | ||
3370 | * @param[in] h Height of the region to be updated. | ||
3371 | */ | ||
3372 | EAPI void evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h); | ||
3373 | |||
3056 | /* | 3374 | /* |
3057 | * Converts the raw image data of the given image object to the | 3375 | * Converts the raw image data of the given image object to the |
3058 | * specified colorspace. | 3376 | * specified colorspace. |
diff --git a/src/lib/evas/canvas/evas_image.eo b/src/lib/evas/canvas/evas_image.eo index 42cfc12652..31acd3a79d 100644 --- a/src/lib/evas/canvas/evas_image.eo +++ b/src/lib/evas/canvas/evas_image.eo | |||
@@ -1,30 +1,11 @@ | |||
1 | type @extern Evas_Object_Image_Pixels_Get_Cb: __undefined_type; /* FIXME: func pointers are not supported. */ | 1 | type @extern Evas_Object_Image_Pixels_Get_Cb: __undefined_type; /* FIXME: func pointers are not supported. */ |
2 | 2 | ||
3 | class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx.Fill, Efl.Gfx.View, Evas.Filter) | 3 | class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Load, Efl.Image_Animated, Efl.Gfx.Buffer, Efl.Gfx.Fill, Efl.Gfx.View, Evas.Filter) |
4 | { | 4 | { |
5 | legacy_prefix: evas_object_image; | 5 | legacy_prefix: evas_object_image; |
6 | eo_prefix: evas_obj_image; | 6 | eo_prefix: evas_obj_image; |
7 | methods { | 7 | methods { |
8 | @property load_dpi { | 8 | /* PROXY stuff */ |
9 | set { | ||
10 | [[Set the DPI resolution of an image object's source image. | ||
11 | |||
12 | This function sets the DPI resolution of a given loaded canvas | ||
13 | image. Most useful for the SVG image loader. | ||
14 | ]] | ||
15 | } | ||
16 | get { | ||
17 | [[Get the DPI resolution of a loaded image object in the canvas. | ||
18 | |||
19 | This function returns the DPI resolution of the given canvas | ||
20 | image. | ||
21 | ]] | ||
22 | } | ||
23 | values { | ||
24 | dpi: double; [[The DPI resolution.]] | ||
25 | } | ||
26 | } | ||
27 | |||
28 | @property source_clip { | 9 | @property source_clip { |
29 | set { | 10 | set { |
30 | [[Clip the proxy object with the source object's clipper. | 11 | [[Clip the proxy object with the source object's clipper. |
@@ -71,149 +52,115 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
71 | src: Evas.Object *; [[Source object to use for the proxy.]] | 52 | src: Evas.Object *; [[Source object to use for the proxy.]] |
72 | } | 53 | } |
73 | } | 54 | } |
74 | @property content_hint { | 55 | @property source_visible { |
75 | set { | 56 | set { |
76 | [[Set the content hint setting of a given image object of the | 57 | [[Set the source object to be visible or not. |
77 | canvas. | ||
78 | 58 | ||
79 | This function sets the content hint value of the given image | 59 | If $visible is set to $false, the source object of the |
80 | of the canvas. For example, if you're on the GL engine and | 60 | proxy ($obj) will be invisible. |
81 | your driver implementation supports it, setting this hint to | ||
82 | #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need zero copies | ||
83 | at texture upload time, which is an "expensive" operation. | ||
84 | ]] | ||
85 | } | ||
86 | get { | ||
87 | [[Get the content hint setting of a given image object of the | ||
88 | canvas. | ||
89 | 61 | ||
90 | This returns #EVAS_IMAGE_CONTENT_HINT_NONE on error. | 62 | This API works differently to \@ref evas_object_show and |
91 | ]] | 63 | \@ref evas_object_hide. Once source object is hidden, the |
92 | } | 64 | proxy object will be hidden as well. Actually in this case |
93 | values { | 65 | both objects are excluded from the Evas internal update circle. |
94 | hint: Evas.Image_Content_Hint; [[The content hint value, one of | 66 | |
95 | the @Evas.Image_Content_Hint ones.]] | 67 | By this API, instead, one can toggle the visibility of a |
96 | } | 68 | proxy's source object remaining the proxy visibility untouched. |
97 | } | ||
98 | @property load_region { | ||
99 | set { | ||
100 | [[Inform a given image object to load a selective region of its | ||
101 | source image. | ||
102 | 69 | ||
103 | This function is useful when one is not showing all of an | 70 | Warning: If the all of proxies are deleted, then the source |
104 | image's area on its image object. | 71 | visibility of the source object will be cancelled. |
105 | 72 | ||
106 | Note: The image loader for the image format in question has | 73 | @since 1.8 |
107 | to support selective region loading in order to this function | ||
108 | to take effect. | ||
109 | ]] | 74 | ]] |
110 | } | 75 | } |
111 | get { | 76 | get { |
112 | [[Retrieve the coordinates of a given image object's selective | 77 | [[Get the state of the source object visibility. |
113 | (source image) load region. | ||
114 | 78 | ||
115 | Note: Use $null pointers on the coordinates you're not | 79 | @since 1.8 |
116 | interested in: they'll be ignored by the function. | ||
117 | ]] | 80 | ]] |
118 | } | 81 | } |
119 | values { | 82 | values { |
120 | x: int; [[X-offset of the region to be loaded.]] | 83 | visible: bool; [[$true is source object to be shown, $false |
121 | y: int; [[Y-offset of the region to be loaded.]] | 84 | otherwise.]] |
122 | w: int; [[Width of the region to be loaded.]] | ||
123 | h: int; [[Height of the region to be loaded.]] | ||
124 | } | 85 | } |
125 | } | 86 | } |
126 | @property alpha { | 87 | @property source_events { |
127 | set { | 88 | set { |
128 | [[Enable or disable alpha channel usage on the given image | 89 | [[Set whether an Evas object is to source events. |
129 | object. | 90 | |
130 | 91 | Set whether an Evas object is to repeat events to source. | |
131 | This function sets a flag on an image object indicating | 92 | |
132 | whether or not to use alpha channel data. A value of $true | 93 | If $source is $true, it will make events on $obj to also be |
133 | makes it use alpha channel data, and $false makes it ignore | 94 | repeated for the source object (see @.source.set). Even the |
134 | that data. Note that this has nothing to do with an object's | 95 | $obj and source geometries are different, the event position |
135 | color as manipulated by \@ref evas_object_color_set. | 96 | will be transformed to the source object's space. |
97 | |||
98 | If $source is $false, events occurring on $obj will be | ||
99 | processed only on it. | ||
100 | |||
101 | @since 1.8 | ||
136 | ]] | 102 | ]] |
137 | } | 103 | } |
138 | get { | 104 | get { |
139 | [[Retrieve whether alpha channel data is being used on the | 105 | [[Determine whether an object is set to source events. |
140 | given image object. | ||
141 | 106 | ||
142 | This function returns $true if the image object's alpha | 107 | @since 1.8 |
143 | channel is being used, or $false otherwise. | ||
144 | ]] | 108 | ]] |
145 | } | 109 | } |
146 | values { | 110 | values { |
147 | alpha: bool; [[Whether to use alpha channel ($true) data | 111 | source: bool; [[Whether $obj is to pass events ($true) or not |
148 | or not ($false).]] | 112 | ($false).]] |
149 | } | 113 | } |
150 | } | 114 | } |
151 | @property border { | ||
152 | set { | ||
153 | [[Set the dimensions for an image object's border, a region | ||
154 | which won't ever be scaled together with its center. | ||
155 | |||
156 | When Evas is rendering, an image source may be scaled to fit | ||
157 | the size of its image object. This function sets an area from | ||
158 | the borders of the image inwards which is not to be scaled. | ||
159 | This function is useful for making frames and for widget | ||
160 | theming, where, for example, buttons may be of varying | ||
161 | sizes, but their border size must remain constant. | ||
162 | 115 | ||
163 | The units used for $l, $r, $t and $b are canvas units. | 116 | /* weird stuff - hints */ |
164 | 117 | @property content_hint { | |
165 | Note: The border region itself may be scaled by the | 118 | set { |
166 | @.border_scale.set function. | 119 | [[Set the content hint setting of a given image object of the |
120 | canvas. | ||
167 | 121 | ||
168 | Note: By default, image objects have no borders set, i. e. | 122 | This function sets the content hint value of the given image |
169 | $l, $r, $t and $b start as 0. | 123 | of the canvas. For example, if you're on the GL engine and |
124 | your driver implementation supports it, setting this hint to | ||
125 | #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need zero copies | ||
126 | at texture upload time, which is an "expensive" operation. | ||
170 | ]] | 127 | ]] |
171 | /* FIXME-doc | ||
172 | See the following figures for visual explanation:\n | ||
173 | @htmlonly | ||
174 | <img src="image-borders.png" style="max-width: 100%;" /> | ||
175 | <a href="image-borders.png">Full-size</a> | ||
176 | @endhtmlonly | ||
177 | @image rtf image-borders.png | ||
178 | @image latex image-borders.eps width=\textwidth | ||
179 | @htmlonly | ||
180 | <img src="border-effect.png" style="max-width: 100%;" /> | ||
181 | <a href="border-effect.png">Full-size</a> | ||
182 | @endhtmlonly | ||
183 | @image rtf border-effect.png | ||
184 | @image latex border-effect.eps width=\textwidth | ||
185 | */ | ||
186 | } | 128 | } |
187 | get { | 129 | get { |
188 | [[Retrieve the dimensions for an image object's border, a | 130 | [[Get the content hint setting of a given image object of the |
189 | region which won't ever be scaled together with its center. | 131 | canvas. |
190 | 132 | ||
191 | Note: Use $null pointers on the border components you're not | 133 | This returns #EVAS_IMAGE_CONTENT_HINT_NONE on error. |
192 | interested in: they'll be ignored by the function. | ||
193 | ]] | 134 | ]] |
194 | } | 135 | } |
195 | values { | 136 | values { |
196 | l: int; [[The border's left width.]] | 137 | hint: Evas.Image_Content_Hint; [[The content hint value, one of |
197 | r: int; [[The border's right width.]] | 138 | the @Evas.Image_Content_Hint ones.]] |
198 | t: int; [[The border's top width.]] | ||
199 | b: int; [[The border's bottom width.]] | ||
200 | } | 139 | } |
201 | } | 140 | } |
202 | @property border_scale { | 141 | @property scale_hint { |
203 | set { | 142 | set { |
204 | [[Sets the scaling factor (multiplier) for the borders of an | 143 | [[Set the scale hint of a given image of the canvas. |
205 | image object. | 144 | |
145 | This function sets the scale hint value of the given image | ||
146 | object in the canvas, which will affect how Evas is to cache | ||
147 | scaled versions of its original source image. | ||
206 | ]] | 148 | ]] |
207 | } | 149 | } |
208 | get { | 150 | get { |
209 | [[Retrieves the scaling factor (multiplier) for the borders | 151 | [[Get the scale hint of a given image of the canvas. |
210 | of an image object. | 152 | |
153 | This function returns the scale hint value of the given image | ||
154 | object of the canvas. | ||
211 | ]] | 155 | ]] |
212 | } | 156 | } |
213 | values { | 157 | values { |
214 | scale: double; [[The scale factor (default is 1.0 - i.e. no scaling).]] | 158 | hint: Evas.Image_Scale_Hint; [[The scale hint, a value in |
159 | @Evas.Image_Scale_Hint.]] | ||
215 | } | 160 | } |
216 | } | 161 | } |
162 | |||
163 | /* GL View */ | ||
217 | @property pixels_dirty { | 164 | @property pixels_dirty { |
218 | set { | 165 | set { |
219 | [[Mark whether the given image object is dirty and needs to | 166 | [[Mark whether the given image object is dirty and needs to |
@@ -235,6 +182,21 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
235 | dirty: bool; [[Whether the image is dirty.]] | 182 | dirty: bool; [[Whether the image is dirty.]] |
236 | } | 183 | } |
237 | } | 184 | } |
185 | @property pixels_get_callback { | ||
186 | set { | ||
187 | [[Set the callback function to get pixels from a canvas' image. | ||
188 | |||
189 | This functions sets a function to be the callback function | ||
190 | that get pixels from a image of the canvas. | ||
191 | ]] | ||
192 | } | ||
193 | values { | ||
194 | func: Evas_Object_Image_Pixels_Get_Cb @nonull; [[The callback function.]] | ||
195 | data: void *; [[The data pointer to be passed to $func.]] | ||
196 | } | ||
197 | } | ||
198 | |||
199 | /* Video */ | ||
238 | @property video_surface { | 200 | @property video_surface { |
239 | set { | 201 | set { |
240 | [[Set the video surface linked to a given image of the canvas. | 202 | [[Set the video surface linked to a given image of the canvas. |
@@ -266,82 +228,8 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
266 | caps: uint; | 228 | caps: uint; |
267 | } | 229 | } |
268 | } | 230 | } |
269 | @property load_orientation { | ||
270 | set { | ||
271 | [[Define if the orientation information in the image file | ||
272 | should be honored. | ||
273 | |||
274 | @since 1.1 | ||
275 | ]] | ||
276 | } | ||
277 | get { | ||
278 | [[Get if the orientation information in the image file should | ||
279 | be honored. | ||
280 | |||
281 | @since 1.1 | ||
282 | ]] | ||
283 | } | ||
284 | values { | ||
285 | enable: bool; [[$true means that it should honor the orientation | ||
286 | information.]] | ||
287 | } | ||
288 | } | ||
289 | @property border_center_fill { | ||
290 | set { | ||
291 | [[Sets how the center part of the given image object (not the | ||
292 | borders) should be drawn when Evas is rendering it. | ||
293 | |||
294 | This function sets how the center part of the image object's | ||
295 | source image is to be drawn, which must be one of the values | ||
296 | in @Evas.Border_Fill_Mode. By center we mean the complementary | ||
297 | part of that defined by @.border.set. This one is very useful | ||
298 | for making frames and decorations. You would most probably | ||
299 | also be using a filled image (as in @Efl.Gfx.Fill.filled) to use | ||
300 | as a frame. | ||
301 | ]] | ||
302 | } | ||
303 | get { | ||
304 | [[Retrieves how the center part of the given image object (not | ||
305 | the borders) is to be drawn when Evas is rendering it. | ||
306 | ]] | ||
307 | } | ||
308 | values { | ||
309 | fill: Evas.Border_Fill_Mode; [[Fill mode of the center region | ||
310 | of $obj (a value in #Evas_Border_Fill_Mode).]] | ||
311 | } | ||
312 | } | ||
313 | @property source_visible { | ||
314 | set { | ||
315 | [[Set the source object to be visible or not. | ||
316 | |||
317 | If $visible is set to $false, the source object of the | ||
318 | proxy ($obj) will be invisible. | ||
319 | |||
320 | This API works differently to \@ref evas_object_show and | ||
321 | \@ref evas_object_hide. Once source object is hidden, the | ||
322 | proxy object will be hidden as well. Actually in this case | ||
323 | both objects are excluded from the Evas internal update circle. | ||
324 | |||
325 | By this API, instead, one can toggle the visibility of a | ||
326 | proxy's source object remaining the proxy visibility untouched. | ||
327 | 231 | ||
328 | Warning: If the all of proxies are deleted, then the source | 232 | /* native surface */ |
329 | visibility of the source object will be cancelled. | ||
330 | |||
331 | @since 1.8 | ||
332 | ]] | ||
333 | } | ||
334 | get { | ||
335 | [[Get the state of the source object visibility. | ||
336 | |||
337 | @since 1.8 | ||
338 | ]] | ||
339 | } | ||
340 | values { | ||
341 | visible: bool; [[$true is source object to be shown, $false | ||
342 | otherwise.]] | ||
343 | } | ||
344 | } | ||
345 | @property native_surface { | 233 | @property native_surface { |
346 | set { | 234 | set { |
347 | [[Set the native surface of a given image of the canvas | 235 | [[Set the native surface of a given image of the canvas |
@@ -361,103 +249,6 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
361 | surf: Evas.Native_Surface* @nonull; [[The native surface.]] | 249 | surf: Evas.Native_Surface* @nonull; [[The native surface.]] |
362 | } | 250 | } |
363 | } | 251 | } |
364 | @property load_scale_down { | ||
365 | set { | ||
366 | [[Set the scale down factor of a given image object's source | ||
367 | image, when loading it. | ||
368 | |||
369 | This function sets the scale down factor of a given canvas | ||
370 | image. Most useful for the SVG image loader. | ||
371 | ]] | ||
372 | } | ||
373 | get { | ||
374 | [[Get the scale down factor of a given image object's source | ||
375 | image, when loading it. | ||
376 | ]] | ||
377 | } | ||
378 | values { | ||
379 | scale_down: int; [[The scale down factor.]] | ||
380 | } | ||
381 | } | ||
382 | @property scale_hint { | ||
383 | set { | ||
384 | [[Set the scale hint of a given image of the canvas. | ||
385 | |||
386 | This function sets the scale hint value of the given image | ||
387 | object in the canvas, which will affect how Evas is to cache | ||
388 | scaled versions of its original source image. | ||
389 | ]] | ||
390 | } | ||
391 | get { | ||
392 | [[Get the scale hint of a given image of the canvas. | ||
393 | |||
394 | This function returns the scale hint value of the given image | ||
395 | object of the canvas. | ||
396 | ]] | ||
397 | } | ||
398 | values { | ||
399 | hint: Evas.Image_Scale_Hint; [[The scale hint, a value in | ||
400 | @Evas.Image_Scale_Hint.]] | ||
401 | } | ||
402 | } | ||
403 | @property source_events { | ||
404 | set { | ||
405 | [[Set whether an Evas object is to source events. | ||
406 | |||
407 | Set whether an Evas object is to repeat events to source. | ||
408 | |||
409 | If $source is $true, it will make events on $obj to also be | ||
410 | repeated for the source object (see @.source.set). Even the | ||
411 | $obj and source geometries are different, the event position | ||
412 | will be transformed to the source object's space. | ||
413 | |||
414 | If $source is $false, events occurring on $obj will be | ||
415 | processed only on it. | ||
416 | |||
417 | @since 1.8 | ||
418 | ]] | ||
419 | } | ||
420 | get { | ||
421 | [[Determine whether an object is set to source events. | ||
422 | |||
423 | @since 1.8 | ||
424 | ]] | ||
425 | } | ||
426 | values { | ||
427 | source: bool; [[Whether $obj is to pass events ($true) or not | ||
428 | ($false).]] | ||
429 | } | ||
430 | } | ||
431 | @property colorspace { | ||
432 | set { | ||
433 | [[Set the colorspace of a given image of the canvas. | ||
434 | |||
435 | This function sets the colorspace of given canvas image. | ||
436 | ]] | ||
437 | } | ||
438 | get { | ||
439 | [[Get the colorspace of a given image of the canvas. | ||
440 | |||
441 | This function returns the colorspace of given canvas image. | ||
442 | ]] | ||
443 | } | ||
444 | values { | ||
445 | cspace: Evas_Colorspace; [[The new color space.]] | ||
446 | } | ||
447 | } | ||
448 | @property pixels_get_callback { | ||
449 | set { | ||
450 | [[Set the callback function to get pixels from a canvas' image. | ||
451 | |||
452 | This functions sets a function to be the callback function | ||
453 | that get pixels from a image of the canvas. | ||
454 | ]] | ||
455 | } | ||
456 | values { | ||
457 | func: Evas_Object_Image_Pixels_Get_Cb @nonull; [[The callback function.]] | ||
458 | data: void *; [[The data pointer to be passed to $func.]] | ||
459 | } | ||
460 | } | ||
461 | @property data_copy { | 252 | @property data_copy { |
462 | set { | 253 | set { |
463 | [[Replaces the raw image data of the given image object. | 254 | [[Replaces the raw image data of the given image object. |
@@ -482,38 +273,8 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
482 | data: void *; [[The raw data to replace.]] | 273 | data: void *; [[The raw data to replace.]] |
483 | } | 274 | } |
484 | } | 275 | } |
485 | @property region_support { | ||
486 | get { | ||
487 | [[Get the support state of a given image. | ||
488 | |||
489 | @since 1.2 | ||
490 | ]] | ||
491 | return: bool @warn_unused; [[The region support state.]] | ||
492 | } | ||
493 | } | ||
494 | @property load_error { | ||
495 | get { | ||
496 | [[Retrieves a number representing any error that occurred during | ||
497 | the last loading of the given image object's source image. | ||
498 | ]] | ||
499 | return: Evas.Load_Error @warn_unused; [[ | ||
500 | A value giving the last error that occurred. It should be | ||
501 | one of the @Evas.Load_Error values. #EVAS_LOAD_ERROR_NONE | ||
502 | is returned if there was no error. | ||
503 | ]] | ||
504 | } | ||
505 | } | ||
506 | @property stride { | ||
507 | get { | ||
508 | [[Retrieves the row stride of the given image object. | ||
509 | |||
510 | The row stride is the number of bytes between the start of a | ||
511 | row and the start of the next row for image data. | ||
512 | ]] | ||
513 | return: int @warn_unused; [[The stride of the image (in bytes).]] | ||
514 | } | ||
515 | } | ||
516 | 276 | ||
277 | /* 3d */ | ||
517 | @property scene { | 278 | @property scene { |
518 | set { | 279 | set { |
519 | [[Set the 3D scene of a given image of the canvas. | 280 | [[Set the 3D scene of a given image of the canvas. |
@@ -522,7 +283,7 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
522 | 283 | ||
523 | @since 1.10 | 284 | @since 1.10 |
524 | ]] | 285 | ]] |
525 | legacy: null; | 286 | legacy: null; |
526 | } | 287 | } |
527 | get { | 288 | get { |
528 | [[Get the 3D scene of a given image of the canvas. | 289 | [[Get the 3D scene of a given image of the canvas. |
@@ -537,26 +298,6 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
537 | scene: Evas.Canvas3D.Scene *; [[3D scene on an image object.]] | 298 | scene: Evas.Canvas3D.Scene *; [[3D scene on an image object.]] |
538 | } | 299 | } |
539 | } | 300 | } |
540 | @property orient { | ||
541 | set { | ||
542 | [[Set the image orientation. | ||
543 | |||
544 | This function allows to rotate or flip the image. | ||
545 | |||
546 | @since 1.14 | ||
547 | ]] | ||
548 | } | ||
549 | get { | ||
550 | [[Get the image orientation. | ||
551 | |||
552 | @since 1.14 | ||
553 | ]] | ||
554 | } | ||
555 | values { | ||
556 | orient: Evas.Image_Orient; [[The image orientation \@ref Evas_Image_Orient. | ||
557 | Default is #EVAS_IMAGE_ORIENT_NONE.]] | ||
558 | } | ||
559 | } | ||
560 | @property snapshot { | 301 | @property snapshot { |
561 | set { | 302 | set { |
562 | [[The content below the Evas_Object_Image will be rendered | 303 | [[The content below the Evas_Object_Image will be rendered |
@@ -578,29 +319,12 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
578 | the Evas_Object_Image.]] | 319 | the Evas_Object_Image.]] |
579 | } | 320 | } |
580 | } | 321 | } |
581 | preload_begin { | ||
582 | [[Begin preloading an image object's image data in the background.]] | ||
583 | legacy: null; | ||
584 | } | ||
585 | data_update_add { | ||
586 | [[Mark a sub-region of the given image object to be redrawn. | ||
587 | |||
588 | This function schedules a particular rectangular region of an | ||
589 | image object to be updated (redrawn) at the next rendering cycle. | ||
590 | ]] | ||
591 | params { | ||
592 | @in x: int; [[X-offset of the region to be updated.]] | ||
593 | @in y: int; [[Y-offset of the region to be updated.]] | ||
594 | @in w: int; [[Width of the region to be updated.]] | ||
595 | @in h: int; [[Height of the region to be updated.]] | ||
596 | } | ||
597 | } | ||
598 | data_set { | 322 | data_set { |
599 | [[Sets the raw image data of the given image object. | 323 | [[Sets the raw image data of the given image object. |
600 | 324 | ||
601 | Note that the raw data must be of the same size (see | 325 | Note that the raw data must be of the same size (see |
602 | \@ref evas_object_image_size_set, which has to be called before | 326 | \@ref evas_object_image_size_set, which has to be called before |
603 | this one) and colorspace (see @.colorspace.set) of the image. | 327 | this one) and colorspace (see \@.colorspace.set) of the image. |
604 | If data is $null, the current image data will be freed. | 328 | If data is $null, the current image data will be freed. |
605 | Naturally, if one does not set an image object's data | 329 | Naturally, if one does not set an image object's data |
606 | manually, it will still have one, allocated by Evas. | 330 | manually, it will still have one, allocated by Evas. |
@@ -627,7 +351,7 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
627 | Note: The contents' format returned by it depend on the color | 351 | Note: The contents' format returned by it depend on the color |
628 | space of the given image object. | 352 | space of the given image object. |
629 | 353 | ||
630 | Note: You may want to use @.data_update_add to inform data | 354 | Note: You may want to use \@.data_update_add to inform data |
631 | changes, if you did any. | 355 | changes, if you did any. |
632 | ]] | 356 | ]] |
633 | return: void * @warn_unused; [[ The raw image data.]] | 357 | return: void * @warn_unused; [[ The raw image data.]] |
@@ -636,10 +360,6 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
636 | be modified ($true) or not ($false).]] | 360 | be modified ($true) or not ($false).]] |
637 | } | 361 | } |
638 | } | 362 | } |
639 | preload_cancel { | ||
640 | [[Cancel preloading an image object's image data in the background.]] | ||
641 | legacy: null; | ||
642 | } | ||
643 | } | 363 | } |
644 | implements { | 364 | implements { |
645 | Eo.Base.constructor; | 365 | Eo.Base.constructor; |
@@ -651,6 +371,19 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
651 | Efl.File.mmap.set; | 371 | Efl.File.mmap.set; |
652 | Efl.File.mmap.get; | 372 | Efl.File.mmap.get; |
653 | Efl.File.save; | 373 | Efl.File.save; |
374 | Efl.Image.orientation.get; | ||
375 | Efl.Image.orientation.set; | ||
376 | Efl.Image.alpha.get; | ||
377 | Efl.Image.alpha.set; | ||
378 | Efl.Image.smooth_scale.set; | ||
379 | Efl.Image.smooth_scale.get; | ||
380 | Efl.Image.ratio.get; | ||
381 | Efl.Image.border.get; | ||
382 | Efl.Image.border.set; | ||
383 | Efl.Image.border_scale.get; | ||
384 | Efl.Image.border_scale.set; | ||
385 | Efl.Image.border_center_fill.get; | ||
386 | Efl.Image.border_center_fill.set; | ||
654 | Efl.Image_Animated.animated.get; | 387 | Efl.Image_Animated.animated.get; |
655 | Efl.Image_Animated.animated_frame.get; | 388 | Efl.Image_Animated.animated_frame.get; |
656 | Efl.Image_Animated.animated_frame.set; | 389 | Efl.Image_Animated.animated_frame.set; |
@@ -658,11 +391,23 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Image_Animated, Efl.Gfx. | |||
658 | Efl.Image_Animated.animated_loop_type.get; | 391 | Efl.Image_Animated.animated_loop_type.get; |
659 | Efl.Image_Animated.animated_loop_count.get; | 392 | Efl.Image_Animated.animated_loop_count.get; |
660 | Efl.Image_Animated.animated_frame_duration.get; | 393 | Efl.Image_Animated.animated_frame_duration.get; |
661 | Efl.Image.load_size.set; | 394 | Efl.Image_Load.load_error.get; |
662 | Efl.Image.load_size.get; | 395 | Efl.Image_Load.load_async_start; |
663 | Efl.Image.smooth_scale.set; | 396 | Efl.Image_Load.load_async_cancel; |
664 | Efl.Image.smooth_scale.get; | 397 | Efl.Image_Load.load_dpi.get; |
665 | Efl.Image.ratio.get; | 398 | Efl.Image_Load.load_dpi.set; |
399 | Efl.Image_Load.load_size.set; | ||
400 | Efl.Image_Load.load_size.get; | ||
401 | Efl.Image_Load.load_orientation.get; | ||
402 | Efl.Image_Load.load_orientation.set; | ||
403 | Efl.Image_Load.load_scale_down.get; | ||
404 | Efl.Image_Load.load_scale_down.set; | ||
405 | Efl.Image_Load.load_region.get; | ||
406 | Efl.Image_Load.load_region.set; | ||
407 | Efl.Image_Load.load_region_support.get; | ||
408 | Efl.Gfx.Buffer.buffer_update_region_add; | ||
409 | Efl.Gfx.Buffer.buffer_stride.get; | ||
410 | Efl.Gfx.Buffer.colorspace.get; | ||
666 | Efl.Gfx.Fill.fill.set; | 411 | Efl.Gfx.Fill.fill.set; |
667 | Efl.Gfx.Fill.fill.get; | 412 | Efl.Gfx.Fill.fill.get; |
668 | Efl.Gfx.Fill.filled.get; | 413 | Efl.Gfx.Fill.filled.get; |
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 60802326b1..10fa5e8208 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include "../common/evas_convert_colorspace.h" | 17 | #include "../common/evas_convert_colorspace.h" |
18 | #include "../common/evas_convert_yuv.h" | 18 | #include "../common/evas_convert_yuv.h" |
19 | 19 | ||
20 | #include "../efl/interfaces/efl_gfx_filter.eo.h" | ||
21 | #include "evas_filter.eo.h" | 20 | #include "evas_filter.eo.h" |
22 | #include "evas_filter.h" | 21 | #include "evas_filter.h" |
23 | 22 | ||
@@ -662,9 +661,10 @@ _evas_image_source_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | |||
662 | } | 661 | } |
663 | 662 | ||
664 | EOLIAN static void | 663 | EOLIAN static void |
665 | _evas_image_orient_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orient orient) | 664 | _evas_image_efl_image_orientation_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Gfx_Orientation _orient) |
666 | { | 665 | { |
667 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 666 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
667 | Evas_Image_Orient orient = (Evas_Image_Orient) _orient; | ||
668 | int iw, ih; | 668 | int iw, ih; |
669 | 669 | ||
670 | if (o->cur->orient == orient) return; | 670 | if (o->cur->orient == orient) return; |
@@ -710,10 +710,10 @@ _evas_image_orient_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orient orient) | |||
710 | evas_object_change(eo_obj, obj); | 710 | evas_object_change(eo_obj, obj); |
711 | } | 711 | } |
712 | 712 | ||
713 | EOLIAN static Evas_Image_Orient | 713 | EOLIAN static Efl_Gfx_Orientation |
714 | _evas_image_orient_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 714 | _evas_image_efl_image_orientation_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
715 | { | 715 | { |
716 | return o->cur->orient; | 716 | return (Efl_Gfx_Orientation) o->cur->orient; |
717 | } | 717 | } |
718 | 718 | ||
719 | EAPI Eina_Bool | 719 | EAPI Eina_Bool |
@@ -792,7 +792,7 @@ _evas_image_eo_base_dbg_info_get(Eo *eo_obj, Evas_Image_Data *o, Eo_Dbg_Info *ro | |||
792 | if (evas_object_image_load_error_get(eo_obj) != EVAS_LOAD_ERROR_NONE) | 792 | if (evas_object_image_load_error_get(eo_obj) != EVAS_LOAD_ERROR_NONE) |
793 | { | 793 | { |
794 | Evas_Load_Error error = EVAS_LOAD_ERROR_GENERIC; | 794 | Evas_Load_Error error = EVAS_LOAD_ERROR_GENERIC; |
795 | error = evas_obj_image_load_error_get(eo_obj); | 795 | error = (Evas_Load_Error) efl_image_load_error_get(eo_obj); |
796 | EO_DBG_INFO_APPEND(group, "Load Error", EINA_VALUE_TYPE_STRING, | 796 | EO_DBG_INFO_APPEND(group, "Load Error", EINA_VALUE_TYPE_STRING, |
797 | evas_load_error_str(error)); | 797 | evas_load_error_str(error)); |
798 | } | 798 | } |
@@ -862,7 +862,7 @@ _evas_image_scene_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | |||
862 | } | 862 | } |
863 | 863 | ||
864 | EOLIAN static void | 864 | EOLIAN static void |
865 | _evas_image_border_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int b) | 865 | _evas_image_efl_image_border_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int b) |
866 | { | 866 | { |
867 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 867 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
868 | 868 | ||
@@ -889,7 +889,7 @@ _evas_image_border_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int | |||
889 | } | 889 | } |
890 | 890 | ||
891 | EOLIAN static void | 891 | EOLIAN static void |
892 | _evas_image_border_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int *r, int *t, int *b) | 892 | _evas_image_efl_image_border_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int *r, int *t, int *b) |
893 | { | 893 | { |
894 | if (l) *l = o->cur->border.l; | 894 | if (l) *l = o->cur->border.l; |
895 | if (r) *r = o->cur->border.r; | 895 | if (r) *r = o->cur->border.r; |
@@ -898,9 +898,11 @@ _evas_image_border_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int * | |||
898 | } | 898 | } |
899 | 899 | ||
900 | EOLIAN static void | 900 | EOLIAN static void |
901 | _evas_image_border_center_fill_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Border_Fill_Mode fill) | 901 | _evas_image_efl_image_border_center_fill_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Gfx_Border_Fill_Mode _fill) |
902 | { | 902 | { |
903 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 903 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
904 | Evas_Border_Fill_Mode fill = (Evas_Border_Fill_Mode) _fill; | ||
905 | |||
904 | if (fill == o->cur->border.fill) return; | 906 | if (fill == o->cur->border.fill) return; |
905 | evas_object_async_block(obj); | 907 | evas_object_async_block(obj); |
906 | EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) | 908 | EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) |
@@ -911,10 +913,10 @@ _evas_image_border_center_fill_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Border_F | |||
911 | evas_object_change(eo_obj, obj); | 913 | evas_object_change(eo_obj, obj); |
912 | } | 914 | } |
913 | 915 | ||
914 | EOLIAN static Evas_Border_Fill_Mode | 916 | EOLIAN static Efl_Gfx_Border_Fill_Mode |
915 | _evas_image_border_center_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 917 | _evas_image_efl_image_border_center_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
916 | { | 918 | { |
917 | return o->cur->border.fill; | 919 | return (Efl_Gfx_Border_Fill_Mode) o->cur->border.fill; |
918 | } | 920 | } |
919 | 921 | ||
920 | EOLIAN static void | 922 | EOLIAN static void |
@@ -950,7 +952,7 @@ _evas_image_efl_gfx_fill_filled_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | |||
950 | } | 952 | } |
951 | 953 | ||
952 | EOLIAN static void | 954 | EOLIAN static void |
953 | _evas_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale) | 955 | _evas_image_efl_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale) |
954 | { | 956 | { |
955 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 957 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
956 | 958 | ||
@@ -965,19 +967,11 @@ _evas_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale) | |||
965 | } | 967 | } |
966 | 968 | ||
967 | EOLIAN static double | 969 | EOLIAN static double |
968 | _evas_image_border_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 970 | _evas_image_efl_image_border_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
969 | { | 971 | { |
970 | return o->cur->border.scale; | 972 | return o->cur->border.scale; |
971 | } | 973 | } |
972 | 974 | ||
973 | EAPI void | ||
974 | evas_object_image_fill_set(Evas_Image *obj, | ||
975 | Evas_Coord x, Evas_Coord y, | ||
976 | Evas_Coord w, Evas_Coord h) | ||
977 | { | ||
978 | efl_gfx_fill_set((Evas_Image *)obj, x, y, w, h); | ||
979 | } | ||
980 | |||
981 | EOLIAN static void | 975 | EOLIAN static void |
982 | _evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o, | 976 | _evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o, |
983 | int x, int y, int w, int h) | 977 | int x, int y, int w, int h) |
@@ -1083,12 +1077,6 @@ _evas_image_efl_gfx_view_view_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, in | |||
1083 | evas_object_change(eo_obj, obj); | 1077 | evas_object_change(eo_obj, obj); |
1084 | } | 1078 | } |
1085 | 1079 | ||
1086 | EAPI void | ||
1087 | evas_object_image_size_get(const Evas_Image *obj, int *w, int *h) | ||
1088 | { | ||
1089 | efl_gfx_view_size_get((Evas_Image *)obj, w, h); | ||
1090 | } | ||
1091 | |||
1092 | EOLIAN static void | 1080 | EOLIAN static void |
1093 | _evas_image_efl_gfx_view_view_size_get(Eo *eo_obj, Evas_Image_Data *o, int *w, int *h) | 1081 | _evas_image_efl_gfx_view_view_size_get(Eo *eo_obj, Evas_Image_Data *o, int *w, int *h) |
1094 | { | 1082 | { |
@@ -1132,15 +1120,15 @@ _evas_image_efl_gfx_view_view_size_get(Eo *eo_obj, Evas_Image_Data *o, int *w, i | |||
1132 | } | 1120 | } |
1133 | 1121 | ||
1134 | EOLIAN static int | 1122 | EOLIAN static int |
1135 | _evas_image_stride_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 1123 | _evas_image_efl_gfx_buffer_buffer_stride_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
1136 | { | 1124 | { |
1137 | return o->cur->image.stride;; | 1125 | return o->cur->image.stride; |
1138 | } | 1126 | } |
1139 | 1127 | ||
1140 | EOLIAN static Evas_Load_Error | 1128 | EOLIAN static Efl_Image_Load_Error |
1141 | _evas_image_load_error_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 1129 | _evas_image_efl_image_load_load_error_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
1142 | { | 1130 | { |
1143 | return o->load_error; | 1131 | return (Efl_Image_Load_Error) o->load_error; |
1144 | } | 1132 | } |
1145 | 1133 | ||
1146 | /* deprecated */ | 1134 | /* deprecated */ |
@@ -1311,18 +1299,6 @@ _evas_image_data_get(const Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED, Eina_Bo | |||
1311 | return data; | 1299 | return data; |
1312 | } | 1300 | } |
1313 | 1301 | ||
1314 | EAPI void | ||
1315 | evas_object_image_preload(Evas_Object *eo_obj, Eina_Bool cancel) | ||
1316 | { | ||
1317 | MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); | ||
1318 | return; | ||
1319 | MAGIC_CHECK_END(); | ||
1320 | if (cancel) | ||
1321 | evas_obj_image_preload_cancel(eo_obj); | ||
1322 | else | ||
1323 | evas_obj_image_preload_begin(eo_obj); | ||
1324 | } | ||
1325 | |||
1326 | static void | 1302 | static void |
1327 | _image_preload_internal(Eo *eo_obj, void *_pd, Eina_Bool cancel) | 1303 | _image_preload_internal(Eo *eo_obj, void *_pd, Eina_Bool cancel) |
1328 | { | 1304 | { |
@@ -1356,7 +1332,7 @@ _image_preload_internal(Eo *eo_obj, void *_pd, Eina_Bool cancel) | |||
1356 | } | 1332 | } |
1357 | 1333 | ||
1358 | EOLIAN static void | 1334 | EOLIAN static void |
1359 | _evas_image_preload_begin(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED) | 1335 | _evas_image_efl_image_load_load_async_start(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED) |
1360 | { | 1336 | { |
1361 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1337 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1362 | evas_object_async_block(obj); | 1338 | evas_object_async_block(obj); |
@@ -1364,7 +1340,7 @@ _evas_image_preload_begin(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED) | |||
1364 | } | 1340 | } |
1365 | 1341 | ||
1366 | EOLIAN static void | 1342 | EOLIAN static void |
1367 | _evas_image_preload_cancel(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED) | 1343 | _evas_image_efl_image_load_load_async_cancel(Eo *eo_obj, Evas_Image_Data *_pd EINA_UNUSED) |
1368 | { | 1344 | { |
1369 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1345 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1370 | evas_object_async_block(obj); | 1346 | evas_object_async_block(obj); |
@@ -1417,7 +1393,7 @@ _evas_image_data_copy_set(Eo *eo_obj, Evas_Image_Data *o, void *data) | |||
1417 | } | 1393 | } |
1418 | 1394 | ||
1419 | EOLIAN static void | 1395 | EOLIAN static void |
1420 | _evas_image_data_update_add(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h) | 1396 | _evas_image_efl_gfx_buffer_buffer_update_region_add(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h) |
1421 | { | 1397 | { |
1422 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1398 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1423 | Eina_Rectangle *r; | 1399 | Eina_Rectangle *r; |
@@ -1460,7 +1436,7 @@ _evas_image_data_update_add(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, | |||
1460 | } | 1436 | } |
1461 | 1437 | ||
1462 | EOLIAN static void | 1438 | EOLIAN static void |
1463 | _evas_image_alpha_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool has_alpha) | 1439 | _evas_image_efl_image_alpha_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool has_alpha) |
1464 | { | 1440 | { |
1465 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1441 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1466 | 1442 | ||
@@ -1506,7 +1482,7 @@ _evas_image_alpha_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool has_alpha) | |||
1506 | } | 1482 | } |
1507 | 1483 | ||
1508 | EOLIAN static Eina_Bool | 1484 | EOLIAN static Eina_Bool |
1509 | _evas_image_alpha_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 1485 | _evas_image_efl_image_alpha_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
1510 | { | 1486 | { |
1511 | return o->cur->has_alpha; | 1487 | return o->cur->has_alpha; |
1512 | } | 1488 | } |
@@ -1868,7 +1844,7 @@ _evas_image_pixels_dirty_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | |||
1868 | } | 1844 | } |
1869 | 1845 | ||
1870 | EOLIAN static void | 1846 | EOLIAN static void |
1871 | _evas_image_load_dpi_set(Eo *eo_obj, Evas_Image_Data *o, double dpi) | 1847 | _evas_image_efl_image_load_load_dpi_set(Eo *eo_obj, Evas_Image_Data *o, double dpi) |
1872 | { | 1848 | { |
1873 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1849 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1874 | if (dpi == o->load_opts->dpi) return; | 1850 | if (dpi == o->load_opts->dpi) return; |
@@ -1888,13 +1864,13 @@ _evas_image_load_dpi_set(Eo *eo_obj, Evas_Image_Data *o, double dpi) | |||
1888 | } | 1864 | } |
1889 | 1865 | ||
1890 | EOLIAN static double | 1866 | EOLIAN static double |
1891 | _evas_image_load_dpi_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 1867 | _evas_image_efl_image_load_load_dpi_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
1892 | { | 1868 | { |
1893 | return o->load_opts->dpi; | 1869 | return o->load_opts->dpi; |
1894 | } | 1870 | } |
1895 | 1871 | ||
1896 | EOLIAN static void | 1872 | EOLIAN static void |
1897 | _evas_image_efl_image_load_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h) | 1873 | _evas_image_efl_image_load_load_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h) |
1898 | { | 1874 | { |
1899 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1875 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1900 | if ((o->load_opts->w == w) && (o->load_opts->h == h)) return; | 1876 | if ((o->load_opts->w == w) && (o->load_opts->h == h)) return; |
@@ -1918,14 +1894,14 @@ _evas_image_efl_image_load_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h | |||
1918 | } | 1894 | } |
1919 | 1895 | ||
1920 | EOLIAN static void | 1896 | EOLIAN static void |
1921 | _evas_image_efl_image_load_size_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *w, int *h) | 1897 | _evas_image_efl_image_load_load_size_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *w, int *h) |
1922 | { | 1898 | { |
1923 | if (w) *w = o->load_opts->w; | 1899 | if (w) *w = o->load_opts->w; |
1924 | if (h) *h = o->load_opts->h; | 1900 | if (h) *h = o->load_opts->h; |
1925 | } | 1901 | } |
1926 | 1902 | ||
1927 | EOLIAN static void | 1903 | EOLIAN static void |
1928 | _evas_image_load_scale_down_set(Eo *eo_obj, Evas_Image_Data *o, int scale_down) | 1904 | _evas_image_efl_image_load_load_scale_down_set(Eo *eo_obj, Evas_Image_Data *o, int scale_down) |
1929 | { | 1905 | { |
1930 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1906 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1931 | if (o->load_opts->scale_down_by == scale_down) return; | 1907 | if (o->load_opts->scale_down_by == scale_down) return; |
@@ -1945,13 +1921,13 @@ _evas_image_load_scale_down_set(Eo *eo_obj, Evas_Image_Data *o, int scale_down) | |||
1945 | } | 1921 | } |
1946 | 1922 | ||
1947 | EOLIAN static int | 1923 | EOLIAN static int |
1948 | _evas_image_load_scale_down_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 1924 | _evas_image_efl_image_load_load_scale_down_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
1949 | { | 1925 | { |
1950 | return o->load_opts->scale_down_by; | 1926 | return o->load_opts->scale_down_by; |
1951 | } | 1927 | } |
1952 | 1928 | ||
1953 | EOLIAN static void | 1929 | EOLIAN static void |
1954 | _evas_image_load_region_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h) | 1930 | _evas_image_efl_image_load_load_region_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h) |
1955 | { | 1931 | { |
1956 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1932 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1957 | if ((o->load_opts->region.x == x) && (o->load_opts->region.y == y) && | 1933 | if ((o->load_opts->region.x == x) && (o->load_opts->region.y == y) && |
@@ -1977,7 +1953,7 @@ _evas_image_load_region_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, | |||
1977 | } | 1953 | } |
1978 | 1954 | ||
1979 | EOLIAN static void | 1955 | EOLIAN static void |
1980 | _evas_image_load_region_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *x, int *y, int *w, int *h) | 1956 | _evas_image_efl_image_load_load_region_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *x, int *y, int *w, int *h) |
1981 | { | 1957 | { |
1982 | if (x) *x = o->load_opts->region.x; | 1958 | if (x) *x = o->load_opts->region.x; |
1983 | if (y) *y = o->load_opts->region.y; | 1959 | if (y) *y = o->load_opts->region.y; |
@@ -1986,7 +1962,7 @@ _evas_image_load_region_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *x, | |||
1986 | } | 1962 | } |
1987 | 1963 | ||
1988 | EOLIAN static void | 1964 | EOLIAN static void |
1989 | _evas_image_load_orientation_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Eina_Bool enable) | 1965 | _evas_image_efl_image_load_load_orientation_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Eina_Bool enable) |
1990 | { | 1966 | { |
1991 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1967 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1992 | if (o->load_opts->orientation == !!enable) return; | 1968 | if (o->load_opts->orientation == !!enable) return; |
@@ -1998,15 +1974,17 @@ _evas_image_load_orientation_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Ein | |||
1998 | } | 1974 | } |
1999 | 1975 | ||
2000 | EOLIAN static Eina_Bool | 1976 | EOLIAN static Eina_Bool |
2001 | _evas_image_load_orientation_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 1977 | _evas_image_efl_image_load_load_orientation_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
2002 | { | 1978 | { |
2003 | return o->load_opts->orientation;; | 1979 | return o->load_opts->orientation;; |
2004 | } | 1980 | } |
2005 | 1981 | ||
2006 | EOLIAN static void | 1982 | /* FIXME: This should be deprecated and a legacy binding for pixel_set should be added */ |
2007 | _evas_image_colorspace_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Colorspace cspace) | 1983 | EAPI void |
1984 | evas_object_image_colorspace_set(Evas_Object *eo_obj, Evas_Colorspace cspace) | ||
2008 | { | 1985 | { |
2009 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 1986 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
1987 | Evas_Image_Data *o = eo_data_scope_get(eo_obj, MY_CLASS); | ||
2010 | evas_object_async_block(obj); | 1988 | evas_object_async_block(obj); |
2011 | 1989 | ||
2012 | _evas_object_image_cleanup(eo_obj, obj, o); | 1990 | _evas_object_image_cleanup(eo_obj, obj, o); |
@@ -2019,10 +1997,10 @@ _evas_image_colorspace_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Colorspace cspac | |||
2019 | ENFN->image_colorspace_set(ENDT, o->engine_data, cspace); | 1997 | ENFN->image_colorspace_set(ENDT, o->engine_data, cspace); |
2020 | } | 1998 | } |
2021 | 1999 | ||
2022 | EOLIAN static Evas_Colorspace | 2000 | EOLIAN static Efl_Gfx_Colorspace |
2023 | _evas_image_colorspace_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | 2001 | _evas_image_efl_gfx_buffer_colorspace_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) |
2024 | { | 2002 | { |
2025 | return o->cur->cspace; | 2003 | return (Efl_Gfx_Colorspace) o->cur->cspace; |
2026 | } | 2004 | } |
2027 | 2005 | ||
2028 | EOLIAN static void | 2006 | EOLIAN static void |
@@ -2243,14 +2221,11 @@ _evas_image_content_hint_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) | |||
2243 | } | 2221 | } |
2244 | 2222 | ||
2245 | EOLIAN static Eina_Bool | 2223 | EOLIAN static Eina_Bool |
2246 | _evas_image_region_support_get(Eo *eo_obj, Evas_Image_Data *o) | 2224 | _evas_image_efl_image_load_load_region_support_get(Eo *eo_obj, Evas_Image_Data *o) |
2247 | { | 2225 | { |
2248 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); | 2226 | Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); |
2249 | 2227 | ||
2250 | Eina_Bool region; | 2228 | return ENFN->image_can_region_get(ENDT, o->engine_data); |
2251 | region = ENFN->image_can_region_get(ENDT, o->engine_data); | ||
2252 | |||
2253 | return region; | ||
2254 | } | 2229 | } |
2255 | 2230 | ||
2256 | /* animated feature */ | 2231 | /* animated feature */ |
@@ -4887,15 +4862,32 @@ evas_object_image_filled_add(Evas *eo_e) | |||
4887 | } | 4862 | } |
4888 | 4863 | ||
4889 | EAPI void | 4864 | EAPI void |
4890 | evas_object_image_filled_set(Evas_Object *eo_obj, Eina_Bool value) | 4865 | evas_object_image_fill_set(Evas_Image *obj, |
4866 | Evas_Coord x, Evas_Coord y, | ||
4867 | Evas_Coord w, Evas_Coord h) | ||
4891 | { | 4868 | { |
4892 | efl_gfx_fill_filled_set(eo_obj, value); | 4869 | efl_gfx_fill_set((Evas_Image *)obj, x, y, w, h); |
4870 | } | ||
4871 | |||
4872 | EAPI void | ||
4873 | evas_object_image_preload(Evas_Object *eo_obj, Eina_Bool cancel) | ||
4874 | { | ||
4875 | if (cancel) | ||
4876 | efl_image_load_async_cancel(eo_obj); | ||
4877 | else | ||
4878 | efl_image_load_async_start(eo_obj); | ||
4893 | } | 4879 | } |
4894 | 4880 | ||
4895 | EAPI Eina_Bool | 4881 | EAPI Eina_Bool |
4896 | evas_object_image_filled_get(const Evas_Object *eo_obj) | 4882 | evas_object_image_filled_get(const Evas_Object *eo_obj) |
4897 | { | 4883 | { |
4898 | return efl_gfx_fill_filled_get((Eo *) eo_obj); | 4884 | return efl_gfx_fill_filled_get(eo_obj); |
4885 | } | ||
4886 | |||
4887 | EAPI void | ||
4888 | evas_object_image_filled_set(Evas_Object *eo_obj, Eina_Bool value) | ||
4889 | { | ||
4890 | efl_gfx_fill_filled_set(eo_obj, value); | ||
4899 | } | 4891 | } |
4900 | 4892 | ||
4901 | EAPI void | 4893 | EAPI void |
@@ -4903,7 +4895,7 @@ evas_object_image_fill_get(const Evas_Image *obj, | |||
4903 | Evas_Coord *x, Evas_Coord *y, | 4895 | Evas_Coord *x, Evas_Coord *y, |
4904 | Evas_Coord *w, Evas_Coord *h) | 4896 | Evas_Coord *w, Evas_Coord *h) |
4905 | { | 4897 | { |
4906 | efl_gfx_fill_get((Evas_Image *)obj, x, y, w, h); | 4898 | efl_gfx_fill_get(obj, x, y, w, h); |
4907 | } | 4899 | } |
4908 | 4900 | ||
4909 | EAPI void | 4901 | EAPI void |
@@ -4921,45 +4913,117 @@ evas_object_image_fill_spread_get(const Evas_Image *obj EINA_UNUSED) | |||
4921 | } | 4913 | } |
4922 | 4914 | ||
4923 | EAPI void | 4915 | EAPI void |
4916 | evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool alpha) | ||
4917 | { | ||
4918 | efl_image_alpha_set(obj, alpha); | ||
4919 | } | ||
4920 | |||
4921 | EAPI Eina_Bool | ||
4922 | evas_object_image_alpha_get(const Evas_Object *obj) | ||
4923 | { | ||
4924 | return efl_image_alpha_get(obj); | ||
4925 | } | ||
4926 | |||
4927 | EAPI void | ||
4928 | evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b) | ||
4929 | { | ||
4930 | efl_image_border_set(obj, l, r, t, b); | ||
4931 | } | ||
4932 | |||
4933 | EAPI void | ||
4934 | evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) | ||
4935 | { | ||
4936 | efl_image_border_get(obj, l, r, t, b); | ||
4937 | } | ||
4938 | |||
4939 | EAPI void | ||
4940 | evas_object_image_border_scale_set(Evas_Object *obj, double scale) | ||
4941 | { | ||
4942 | efl_image_border_scale_set(obj, scale); | ||
4943 | } | ||
4944 | |||
4945 | EAPI double | ||
4946 | evas_object_image_border_scale_get(const Evas_Object *obj) | ||
4947 | { | ||
4948 | return efl_image_border_scale_get(obj); | ||
4949 | } | ||
4950 | |||
4951 | EAPI void | ||
4952 | evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode fill) | ||
4953 | { | ||
4954 | efl_image_border_center_fill_set(obj, (Efl_Gfx_Border_Fill_Mode) fill); | ||
4955 | } | ||
4956 | |||
4957 | EAPI Evas_Border_Fill_Mode | ||
4958 | evas_object_image_border_center_fill_get(const Evas_Object *obj) | ||
4959 | { | ||
4960 | return (Evas_Border_Fill_Mode) efl_image_border_center_fill_get(obj); | ||
4961 | } | ||
4962 | |||
4963 | EAPI void | ||
4964 | evas_object_image_size_get(const Evas_Image *obj, int *w, int *h) | ||
4965 | { | ||
4966 | efl_gfx_view_size_get((Evas_Image *)obj, w, h); | ||
4967 | } | ||
4968 | |||
4969 | EAPI void | ||
4924 | evas_object_image_size_set(Evas_Image *obj, int w, int h) | 4970 | evas_object_image_size_set(Evas_Image *obj, int w, int h) |
4925 | { | 4971 | { |
4926 | efl_gfx_view_size_set((Evas_Image *)obj, w, h); | 4972 | efl_gfx_view_size_set(obj, w, h); |
4973 | } | ||
4974 | |||
4975 | EAPI Evas_Colorspace | ||
4976 | evas_object_image_colorspace_get(const Evas_Object *obj) | ||
4977 | { | ||
4978 | return (Evas_Colorspace) efl_gfx_buffer_colorspace_get(obj); | ||
4979 | } | ||
4980 | |||
4981 | EAPI int | ||
4982 | evas_object_image_stride_get(const Evas_Object *obj) | ||
4983 | { | ||
4984 | return efl_gfx_buffer_stride_get(obj); | ||
4985 | } | ||
4986 | |||
4987 | EAPI void | ||
4988 | evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h) | ||
4989 | { | ||
4990 | efl_gfx_buffer_update_region_add(obj, x, y, w, h); | ||
4927 | } | 4991 | } |
4928 | 4992 | ||
4929 | EAPI void | 4993 | EAPI void |
4930 | evas_object_image_file_set(Eo *obj, const char *file, const char *key) | 4994 | evas_object_image_file_set(Eo *obj, const char *file, const char *key) |
4931 | { | 4995 | { |
4932 | efl_file_set((Eo *) obj, file, key); | 4996 | efl_file_set(obj, file, key); |
4933 | } | 4997 | } |
4934 | 4998 | ||
4935 | EAPI void | 4999 | EAPI void |
4936 | evas_object_image_file_get(const Eo *obj, const char **file, const char **key) | 5000 | evas_object_image_file_get(const Eo *obj, const char **file, const char **key) |
4937 | { | 5001 | { |
4938 | efl_file_get((Eo *) obj, file, key); | 5002 | efl_file_get(obj, file, key); |
4939 | } | 5003 | } |
4940 | 5004 | ||
4941 | EAPI void | 5005 | EAPI void |
4942 | evas_object_image_mmap_set(Evas_Image *obj, const Eina_File *f, const char *key) | 5006 | evas_object_image_mmap_set(Evas_Image *obj, const Eina_File *f, const char *key) |
4943 | { | 5007 | { |
4944 | efl_file_mmap_set((Evas_Image *)obj, f, key); | 5008 | efl_file_mmap_set(obj, f, key); |
4945 | } | 5009 | } |
4946 | 5010 | ||
4947 | EAPI void | 5011 | EAPI void |
4948 | evas_object_image_mmap_get(const Evas_Image *obj, const Eina_File **f, const char **key) | 5012 | evas_object_image_mmap_get(const Evas_Image *obj, const Eina_File **f, const char **key) |
4949 | { | 5013 | { |
4950 | efl_file_mmap_get((Evas_Image *)obj, f, key); | 5014 | efl_file_mmap_get(obj, f, key); |
4951 | } | 5015 | } |
4952 | 5016 | ||
4953 | EAPI Eina_Bool | 5017 | EAPI Eina_Bool |
4954 | evas_object_image_save(const Eo *obj, const char *file, const char *key, const char *flags) | 5018 | evas_object_image_save(const Eo *obj, const char *file, const char *key, const char *flags) |
4955 | { | 5019 | { |
4956 | return efl_file_save((Eo *) obj, file, key, flags); | 5020 | return efl_file_save(obj, file, key, flags); |
4957 | } | 5021 | } |
4958 | 5022 | ||
4959 | EAPI Eina_Bool | 5023 | EAPI Eina_Bool |
4960 | evas_object_image_animated_get(const Eo *obj) | 5024 | evas_object_image_animated_get(const Eo *obj) |
4961 | { | 5025 | { |
4962 | return efl_image_animated_get((Eo *) obj); | 5026 | return efl_image_animated_get(obj); |
4963 | } | 5027 | } |
4964 | 5028 | ||
4965 | EAPI void | 5029 | EAPI void |
@@ -4995,25 +5059,97 @@ evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_ | |||
4995 | EAPI void | 5059 | EAPI void |
4996 | evas_object_image_load_size_set(Eo *obj, int w, int h) | 5060 | evas_object_image_load_size_set(Eo *obj, int w, int h) |
4997 | { | 5061 | { |
4998 | efl_image_load_size_set((Eo *) obj, w, h); | 5062 | efl_image_load_size_set(obj, w, h); |
4999 | } | 5063 | } |
5000 | 5064 | ||
5001 | EAPI void | 5065 | EAPI void |
5002 | evas_object_image_load_size_get(const Eo *obj, int *w, int *h) | 5066 | evas_object_image_load_size_get(const Eo *obj, int *w, int *h) |
5003 | { | 5067 | { |
5004 | efl_image_load_size_get((Eo *) obj, w, h); | 5068 | efl_image_load_size_get(obj, w, h); |
5069 | } | ||
5070 | |||
5071 | EAPI void | ||
5072 | evas_object_image_load_dpi_set(Evas_Object *obj, double dpi) | ||
5073 | { | ||
5074 | efl_image_load_dpi_set(obj, dpi); | ||
5075 | } | ||
5076 | |||
5077 | EAPI double | ||
5078 | evas_object_image_load_dpi_get(const Evas_Object *obj) | ||
5079 | { | ||
5080 | return efl_image_load_dpi_get(obj); | ||
5081 | } | ||
5082 | |||
5083 | EAPI void | ||
5084 | evas_object_image_load_region_set(Evas_Object *obj, int x, int y, int w, int h) | ||
5085 | { | ||
5086 | efl_image_load_region_set(obj, x, y, w, h); | ||
5087 | } | ||
5088 | |||
5089 | EAPI void | ||
5090 | evas_object_image_load_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) | ||
5091 | { | ||
5092 | efl_image_load_region_get(obj, x, y, w, h); | ||
5093 | } | ||
5094 | |||
5095 | EAPI Eina_Bool | ||
5096 | evas_object_image_region_support_get(const Evas_Image *obj) | ||
5097 | { | ||
5098 | return efl_image_load_region_support_get(obj); | ||
5099 | } | ||
5100 | |||
5101 | EAPI void | ||
5102 | evas_object_image_load_orientation_set(Evas_Object *obj, Eina_Bool enable) | ||
5103 | { | ||
5104 | efl_image_load_orientation_set(obj, enable); | ||
5105 | } | ||
5106 | |||
5107 | EAPI Eina_Bool | ||
5108 | evas_object_image_load_orientation_get(const Evas_Object *obj) | ||
5109 | { | ||
5110 | return efl_image_load_orientation_get(obj); | ||
5111 | } | ||
5112 | |||
5113 | EAPI void | ||
5114 | evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down) | ||
5115 | { | ||
5116 | efl_image_load_scale_down_set(obj, scale_down); | ||
5117 | } | ||
5118 | |||
5119 | EAPI int | ||
5120 | evas_object_image_load_scale_down_get(const Evas_Object *obj) | ||
5121 | { | ||
5122 | return efl_image_load_scale_down_get(obj); | ||
5123 | } | ||
5124 | |||
5125 | EAPI Evas_Load_Error | ||
5126 | evas_object_image_load_error_get(const Evas_Object *obj) | ||
5127 | { | ||
5128 | return (Evas_Load_Error) efl_image_load_error_get(obj); | ||
5005 | } | 5129 | } |
5006 | 5130 | ||
5007 | EAPI void | 5131 | EAPI void |
5008 | evas_object_image_smooth_scale_set(Eo *obj, Eina_Bool smooth_scale) | 5132 | evas_object_image_smooth_scale_set(Eo *obj, Eina_Bool smooth_scale) |
5009 | { | 5133 | { |
5010 | efl_image_smooth_scale_set((Eo *) obj, smooth_scale); | 5134 | efl_image_smooth_scale_set(obj, smooth_scale); |
5011 | } | 5135 | } |
5012 | 5136 | ||
5013 | EAPI Eina_Bool | 5137 | EAPI Eina_Bool |
5014 | evas_object_image_smooth_scale_get(const Eo *obj) | 5138 | evas_object_image_smooth_scale_get(const Eo *obj) |
5015 | { | 5139 | { |
5016 | return efl_image_smooth_scale_get((Eo *) obj); | 5140 | return efl_image_smooth_scale_get(obj); |
5141 | } | ||
5142 | |||
5143 | EAPI void | ||
5144 | evas_object_image_orient_set(Evas_Image *obj, Evas_Image_Orient orient) | ||
5145 | { | ||
5146 | efl_image_orientation_set(obj, (Efl_Gfx_Orientation) orient); | ||
5147 | } | ||
5148 | |||
5149 | EAPI Evas_Image_Orient | ||
5150 | evas_object_image_orient_get(const Evas_Image *obj) | ||
5151 | { | ||
5152 | return (Evas_Image_Orient) efl_image_orientation_get(obj); | ||
5017 | } | 5153 | } |
5018 | 5154 | ||
5019 | #include "canvas/evas_image.eo.c" | 5155 | #include "canvas/evas_image.eo.c" |