summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-03-17 14:14:06 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-03-17 14:14:06 +0900
commit0ac87d6a917419f7b5b361235c8f33b310021201 (patch)
tree0ed3310c2a88d7d84904ac672c9cd0ae4eb5b5a9 /src
parentca65f66fc02af69b5b86d82b3b0f36bb3b6f00c2 (diff)
Efl.Canvas.Image: Add forgotten files!
Oh...
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.c580
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.eo37
2 files changed, 617 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c
new file mode 100644
index 0000000000..03ad9cf5f8
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -0,0 +1,580 @@
1#include "evas_image_private.h"
2
3static void _image_preload_internal(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool cancel);
4
5Eina_Bool
6_evas_image_mmap_set(Eo *eo_obj, const Eina_File *f, const char *key)
7{
8 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
9 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
10 Evas_Image_Load_Opts lo;
11
12 if (o->cur->u.f == f)
13 {
14 if ((!o->cur->key) && (!key))
15 return EINA_FALSE;
16 if ((o->cur->key) && (key) && (!strcmp(o->cur->key, key)))
17 return EINA_FALSE;
18 }
19 evas_object_async_block(obj);
20 _evas_image_init_set(f, NULL, key, eo_obj, obj, o, &lo);
21 o->engine_data = ENFN->image_mmap(ENDT, o->cur->u.f, o->cur->key, &o->load_error, &lo);
22 _evas_image_done_set(eo_obj, obj, o);
23
24 return EINA_TRUE;
25}
26
27EOLIAN static Eina_Bool
28_efl_canvas_image_efl_file_mmap_set(Eo *eo_obj, void *_pd EINA_UNUSED,
29 const Eina_File *f, const char *key)
30{
31 return _evas_image_mmap_set(eo_obj, f, key);
32}
33
34void
35_evas_image_mmap_get(const Eo *eo_obj, const Eina_File **f, const char **key)
36{
37 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
38
39 if (f)
40 *f = o->cur->mmaped_source ? o->cur->u.f : NULL;
41 if (key)
42 *key = o->cur->key;
43}
44
45EOLIAN static void
46_efl_canvas_image_efl_file_mmap_get(Eo *eo_obj, void *_pd EINA_UNUSED,
47 const Eina_File **f, const char **key)
48{
49 _evas_image_mmap_get(eo_obj, f, key);
50}
51
52Eina_Bool
53_evas_image_file_set(Eo *eo_obj, const char *file, const char *key)
54{
55 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
56 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
57 Evas_Image_Load_Opts lo;
58
59 if ((o->cur->u.file) && (file) && (!strcmp(o->cur->u.file, file)))
60 {
61 if ((!o->cur->key) && (!key))
62 return EINA_FALSE;
63 if ((o->cur->key) && (key) && (!strcmp(o->cur->key, key)))
64 return EINA_FALSE;
65 }
66
67 evas_object_async_block(obj);
68 _evas_image_init_set(NULL, file, key, eo_obj, obj, o, &lo);
69 o->engine_data = ENFN->image_load(ENDT, o->cur->u.file, o->cur->key, &o->load_error, &lo);
70 _evas_image_done_set(eo_obj, obj, o);
71
72 return EINA_TRUE;
73}
74
75EOLIAN static Eina_Bool
76_efl_canvas_image_efl_file_file_set(Eo *eo_obj, void *_pd EINA_UNUSED,
77 const char *file, const char *key)
78{
79 return _evas_image_file_set(eo_obj, file, key);
80}
81
82void
83_evas_image_file_get(const Eo *eo_obj, const char **file, const char **key)
84{
85 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
86
87 if (file)
88 {
89 if (o->cur->mmaped_source)
90 *file = eina_file_filename_get(o->cur->u.f);
91 else
92 *file = o->cur->u.file;
93 }
94 if (key) *key = o->cur->key;
95}
96
97EOLIAN static void
98_efl_canvas_image_efl_file_file_get(Eo *eo_obj, void *_pd EINA_UNUSED,
99 const char **file, const char **key)
100{
101 _evas_image_file_get(eo_obj, file, key);
102}
103
104Efl_Image_Load_Error
105_evas_image_load_error_get(const Eo *eo_obj)
106{
107 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
108
109 return (Efl_Image_Load_Error) o->load_error;
110}
111
112EOLIAN static Efl_Image_Load_Error
113_efl_canvas_image_efl_image_load_load_error_get(Eo *eo_obj, void *_pd EINA_UNUSED)
114{
115 return _evas_image_load_error_get(eo_obj);
116}
117
118void
119_evas_image_load_async_start(Eo *eo_obj)
120{
121 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
122 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
123
124 evas_object_async_block(obj);
125 _image_preload_internal(eo_obj, o, EINA_FALSE);
126}
127
128EOLIAN static void
129_efl_canvas_image_efl_image_load_load_async_start(Eo *eo_obj, void *_pd EINA_UNUSED)
130{
131 _evas_image_load_async_start(eo_obj);
132}
133
134void
135_evas_image_load_async_cancel(Eo *eo_obj)
136{
137 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
138 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
139
140 evas_object_async_block(obj);
141 _image_preload_internal(eo_obj, o, EINA_TRUE);
142}
143
144EOLIAN static void
145_efl_canvas_image_efl_image_load_load_async_cancel(Eo *eo_obj, void *_pd EINA_UNUSED)
146{
147 _evas_image_load_async_cancel(eo_obj);
148}
149
150void
151_evas_image_load_dpi_set(Eo *eo_obj, double dpi)
152{
153 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
154 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
155
156 if (dpi == o->load_opts->dpi) return;
157 evas_object_async_block(obj);
158 EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
159 low->dpi = dpi;
160 EINA_COW_LOAD_OPTS_WRITE_END(o, low);
161
162 if (o->cur->u.file)
163 {
164 _evas_image_unload(eo_obj, obj, 0);
165 evas_object_inform_call_image_unloaded(eo_obj);
166 _evas_image_load(eo_obj, obj, o);
167 o->changed = EINA_TRUE;
168 evas_object_change(eo_obj, obj);
169 }
170}
171
172EOLIAN static void
173_efl_canvas_image_efl_image_load_load_dpi_set(Eo *eo_obj, void *_pd EINA_UNUSED, double dpi)
174{
175 _evas_image_load_dpi_set(eo_obj, dpi);
176}
177
178double
179_evas_image_load_dpi_get(const Eo *eo_obj)
180{
181 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
182
183 return o->load_opts->dpi;
184}
185
186EOLIAN static double
187_efl_canvas_image_efl_image_load_load_dpi_get(Eo *eo_obj, void *_pd EINA_UNUSED)
188{
189 return _evas_image_load_dpi_get(eo_obj);
190}
191
192void
193_evas_image_load_size_set(Eo *eo_obj, int w, int h)
194{
195 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
196 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
197
198 if ((o->load_opts->w == w) && (o->load_opts->h == h)) return;
199 evas_object_async_block(obj);
200 EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
201 {
202 low->w = w;
203 low->h = h;
204 }
205 EINA_COW_LOAD_OPTS_WRITE_END(o, low);
206
207 if (o->cur->u.file)
208 {
209 _evas_image_unload(eo_obj, obj, 0);
210 evas_object_inform_call_image_unloaded(eo_obj);
211 _evas_image_load(eo_obj, obj, o);
212 o->changed = EINA_TRUE;
213 evas_object_change(eo_obj, obj);
214 }
215 o->proxyerror = 0;
216}
217
218EOLIAN static void
219_efl_canvas_image_efl_image_load_load_size_set(Eo *eo_obj, void *_pd EINA_UNUSED, int w, int h)
220{
221 _evas_image_load_size_set(eo_obj, w, h);
222}
223
224void
225_evas_image_load_size_get(const Eo *eo_obj, int *w, int *h)
226{
227 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
228
229 if (w) *w = o->load_opts->w;
230 if (h) *h = o->load_opts->h;
231}
232
233EOLIAN static void
234_efl_canvas_image_efl_image_load_load_size_get(Eo *eo_obj, void *_pd EINA_UNUSED, int *w, int *h)
235{
236 _evas_image_load_size_get(eo_obj, w, h);
237}
238
239void
240_evas_image_load_scale_down_set(Eo *eo_obj, int scale_down)
241{
242 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
243 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
244
245 if (o->load_opts->scale_down_by == scale_down) return;
246 evas_object_async_block(obj);
247 EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
248 low->scale_down_by = scale_down;
249 EINA_COW_LOAD_OPTS_WRITE_END(o, low);
250
251 if (o->cur->u.file)
252 {
253 _evas_image_unload(eo_obj, obj, 0);
254 evas_object_inform_call_image_unloaded(eo_obj);
255 _evas_image_load(eo_obj, obj, o);
256 o->changed = EINA_TRUE;
257 evas_object_change(eo_obj, obj);
258 }
259}
260
261EOLIAN static void
262_efl_canvas_image_efl_image_load_load_scale_down_set(Eo *eo_obj, void *_pd EINA_UNUSED, int scale_down)
263{
264 _evas_image_load_scale_down_set(eo_obj, scale_down);
265}
266
267int
268_evas_image_load_scale_down_get(const Eo *eo_obj)
269{
270 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
271
272 return o->load_opts->scale_down_by;
273}
274
275EOLIAN static int
276_efl_canvas_image_efl_image_load_load_scale_down_get(Eo *eo_obj, void *_pd EINA_UNUSED)
277{
278 return _evas_image_load_scale_down_get(eo_obj);
279}
280
281void
282_evas_image_load_region_set(Eo *eo_obj, int x, int y, int w, int h)
283{
284 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
285 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
286
287 if ((o->load_opts->region.x == x) && (o->load_opts->region.y == y) &&
288 (o->load_opts->region.w == w) && (o->load_opts->region.h == h)) return;
289 evas_object_async_block(obj);
290 EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
291 {
292 low->region.x = x;
293 low->region.y = y;
294 low->region.w = w;
295 low->region.h = h;
296 }
297 EINA_COW_LOAD_OPTS_WRITE_END(o, low);
298
299 if (o->cur->u.file)
300 {
301 _evas_image_unload(eo_obj, obj, 0);
302 evas_object_inform_call_image_unloaded(eo_obj);
303 _evas_image_load(eo_obj, obj, o);
304 o->changed = EINA_TRUE;
305 evas_object_change(eo_obj, obj);
306 }
307}
308
309EOLIAN static void
310_efl_canvas_image_efl_image_load_load_region_set(Eo *eo_obj, void *_pd EINA_UNUSED, int x, int y, int w, int h)
311{
312 _evas_image_load_region_set(eo_obj, x, y, w, h);
313}
314
315void
316_evas_image_load_region_get(const Eo *eo_obj, int *x, int *y, int *w, int *h)
317{
318 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
319
320 if (x) *x = o->load_opts->region.x;
321 if (y) *y = o->load_opts->region.y;
322 if (w) *w = o->load_opts->region.w;
323 if (h) *h = o->load_opts->region.h;
324}
325
326EOLIAN static void
327_efl_canvas_image_efl_image_load_load_region_get(Eo *eo_obj, void *_pd EINA_UNUSED, int *x, int *y, int *w, int *h)
328{
329 _evas_image_load_region_get(eo_obj, x, y, w, h);
330}
331
332void
333_evas_image_load_orientation_set(Eo *eo_obj, Eina_Bool enable)
334{
335 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
336 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
337
338 if (o->load_opts->orientation == !!enable) return;
339 evas_object_async_block(obj);
340
341 EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
342 low->orientation = !!enable;
343 EINA_COW_LOAD_OPTS_WRITE_END(o, low);
344}
345
346EOLIAN static void
347_efl_canvas_image_efl_image_load_load_orientation_set(Eo *eo_obj, void *_pd EINA_UNUSED, Eina_Bool enable)
348{
349 _evas_image_load_orientation_set(eo_obj, enable);
350}
351
352Eina_Bool
353_evas_image_load_orientation_get(const Eo *eo_obj)
354{
355 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
356
357 return o->load_opts->orientation;;
358}
359
360EOLIAN static Eina_Bool
361_efl_canvas_image_efl_image_load_load_orientation_get(Eo *eo_obj, void *_pd EINA_UNUSED)
362{
363 return _evas_image_load_orientation_get(eo_obj);
364}
365
366Eina_Bool
367_evas_image_load_region_support_get(const Eo *eo_obj)
368{
369 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
370 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
371
372 return ENFN->image_can_region_get(ENDT, o->engine_data);
373}
374
375EOLIAN static Eina_Bool
376_efl_canvas_image_efl_image_load_load_region_support_get(Eo *eo_obj, void *_pd EINA_UNUSED)
377{
378 return _evas_image_load_region_support_get(eo_obj);
379}
380
381/* animated feature */
382Eina_Bool
383_evas_image_animated_get(const Eo *eo_obj)
384{
385 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
386 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
387
388 if (!ENFN->image_animated_get)
389 return EINA_FALSE;
390
391 return ENFN->image_animated_get(ENDT, o->engine_data);
392}
393
394EOLIAN static Eina_Bool
395_efl_canvas_image_efl_image_animated_animated_get(Eo *eo_obj, void *_pd EINA_UNUSED)
396{
397 return _evas_image_animated_get(eo_obj);
398}
399
400int
401_evas_image_animated_frame_count_get(const Eo *eo_obj)
402{
403 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
404 Evas_Object_Protected_Data *obj;
405 int frame_count = -1;
406
407 if (!evas_object_image_animated_get(eo_obj)) return frame_count;
408
409 obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
410 if (ENFN->image_animated_frame_count_get)
411 frame_count = ENFN->image_animated_frame_count_get(ENDT, o->engine_data);
412
413 return frame_count;
414}
415
416EOLIAN static int
417_efl_canvas_image_efl_image_animated_animated_frame_count_get(Eo *eo_obj, void *_pd EINA_UNUSED)
418{
419 return _evas_image_animated_frame_count_get(eo_obj);
420}
421
422Efl_Image_Animated_Loop_Hint
423_evas_image_animated_loop_type_get(const Eo *eo_obj)
424{
425 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
426 Efl_Image_Animated_Loop_Hint hint = EFL_IMAGE_ANIMATED_LOOP_HINT_NONE;
427 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
428
429 if (!evas_object_image_animated_get(eo_obj)) return hint;
430
431 if (ENFN->image_animated_loop_type_get)
432 hint = (Efl_Image_Animated_Loop_Hint) ENFN->image_animated_loop_type_get(ENDT, o->engine_data);
433
434 return hint;
435}
436
437EOLIAN static Efl_Image_Animated_Loop_Hint
438_efl_canvas_image_efl_image_animated_animated_loop_type_get(Eo *eo_obj, void *_pd EINA_UNUSED)
439{
440 return _evas_image_animated_loop_type_get(eo_obj);
441}
442
443int
444_evas_image_animated_loop_count_get(const Eo *eo_obj)
445{
446 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
447 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
448
449 int loop_count;
450 loop_count = -1;
451 if (!evas_object_image_animated_get(eo_obj)) return loop_count;
452
453 loop_count =
454 ENFN->image_animated_loop_count_get ?
455 ENFN->image_animated_loop_count_get(ENDT, o->engine_data) :
456 -1;
457
458 return loop_count;
459}
460
461EOLIAN static int
462_efl_canvas_image_efl_image_animated_animated_loop_count_get(Eo *eo_obj, void *_pd EINA_UNUSED)
463{
464 return _evas_image_animated_loop_count_get(eo_obj);
465}
466
467double
468_evas_image_animated_frame_duration_get(const Eo *eo_obj, int start_frame, int frame_num)
469{
470 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
471 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
472 double frame_duration = -1;
473 int frame_count = 0;
474
475 if (!ENFN->image_animated_frame_count_get) return frame_duration;
476
477 frame_count = ENFN->image_animated_frame_count_get(ENDT, o->engine_data);
478
479 if ((start_frame + frame_num) > frame_count) return frame_duration;
480 if (ENFN->image_animated_frame_duration_get)
481 frame_duration = ENFN->image_animated_frame_duration_get(ENDT, o->engine_data, start_frame, frame_num);
482
483 return frame_duration;
484}
485
486EOLIAN static double
487_efl_canvas_image_efl_image_animated_animated_frame_duration_get(Eo *eo_obj, void *_pd EINA_UNUSED, int start_frame, int frame_num)
488{
489 return _evas_image_animated_frame_duration_get(eo_obj, start_frame, frame_num);
490}
491
492Eina_Bool
493_evas_image_animated_frame_set(Eo *eo_obj, int frame_index)
494{
495 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
496 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
497 int frame_count = 0;
498
499 if (!o->cur->u.file) return EINA_FALSE;
500 if (o->cur->frame == frame_index) return EINA_TRUE;
501
502 if (!evas_object_image_animated_get(eo_obj)) return EINA_FALSE;
503 evas_object_async_block(obj);
504 frame_count = evas_object_image_animated_frame_count_get(eo_obj);
505
506 /* limit the size of frame to FRAME_MAX */
507 if ((frame_count > FRAME_MAX) || (frame_count < 0) || (frame_index > frame_count))
508 return EINA_FALSE;
509
510 if (!ENFN->image_animated_frame_set) return EINA_FALSE;
511 ENFN->image_animated_frame_set(ENDT, o->engine_data, frame_index);
512 // if (!ENFN->image_animated_frame_set(ENDT, o->engine_data, frame_index)) return;
513
514 EINA_COW_WRITE_BEGIN(evas_object_image_state_cow, o->prev, Evas_Object_Image_State, prev_write)
515 prev_write->frame = o->cur->frame;
516 EINA_COW_WRITE_END(evas_object_image_state_cow, o->prev, prev_write);
517
518 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
519 state_write->frame = frame_index;
520 EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
521
522 o->changed = EINA_TRUE;
523 evas_object_change(eo_obj, obj);
524
525 return EINA_TRUE;
526}
527
528EOLIAN static Eina_Bool
529_efl_canvas_image_efl_image_animated_animated_frame_set(Eo *eo_obj, void *_pd EINA_UNUSED, int frame_index)
530{
531 return _evas_image_animated_frame_set(eo_obj, frame_index);
532}
533
534int
535_evas_image_animated_frame_get(const Eo *eo_obj)
536{
537 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
538
539 if (!o->cur->u.file) return EINA_FALSE;
540 if (!evas_object_image_animated_get(eo_obj)) return EINA_FALSE;
541 return o->cur->frame;
542}
543
544EOLIAN static int
545_efl_canvas_image_efl_image_animated_animated_frame_get(Eo *eo_obj, void *_pd EINA_UNUSED)
546{
547 return _evas_image_animated_frame_get(eo_obj);
548}
549
550static void
551_image_preload_internal(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool cancel)
552{
553 if (!o->engine_data)
554 {
555 o->preloading = EINA_TRUE;
556 evas_object_inform_call_image_preloaded(eo_obj);
557 return;
558 }
559 // FIXME: if already busy preloading, then dont request again until
560 // preload done
561 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
562 if (cancel)
563 {
564 if (o->preloading)
565 {
566 o->preloading = EINA_FALSE;
567 ENFN->image_data_preload_cancel(ENDT, o->engine_data, eo_obj);
568 }
569 }
570 else
571 {
572 if (!o->preloading)
573 {
574 o->preloading = EINA_TRUE;
575 ENFN->image_data_preload_request(ENDT, o->engine_data, eo_obj);
576 }
577 }
578}
579
580#include "efl_canvas_image.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_image.eo b/src/lib/evas/canvas/efl_canvas_image.eo
new file mode 100644
index 0000000000..19ab991ac8
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_image.eo
@@ -0,0 +1,37 @@
1class Efl.Canvas.Image (Evas.Image, Efl.Image_Load, Efl.Image_Animated)
2{
3 [[Low-level Image object.
4
5 This replaces the legacy Evas Object Image, with only image-related
6 interfaces: file and data images only. This object does not implement
7 any special features such as proxy, snapshot or GL.
8 ]]
9 data: null;
10 implements {
11 Efl.File.file.set;
12 Efl.File.file.get;
13 Efl.File.mmap.set;
14 Efl.File.mmap.get;
15 Efl.Image_Animated.animated.get;
16 Efl.Image_Animated.animated_frame.get;
17 Efl.Image_Animated.animated_frame.set;
18 Efl.Image_Animated.animated_frame_count.get;
19 Efl.Image_Animated.animated_loop_type.get;
20 Efl.Image_Animated.animated_loop_count.get;
21 Efl.Image_Animated.animated_frame_duration.get;
22 Efl.Image_Load.load_error.get;
23 Efl.Image_Load.load_async_start;
24 Efl.Image_Load.load_async_cancel;
25 Efl.Image_Load.load_dpi.get;
26 Efl.Image_Load.load_dpi.set;
27 Efl.Image_Load.load_size.set;
28 Efl.Image_Load.load_size.get;
29 Efl.Image_Load.load_orientation.get;
30 Efl.Image_Load.load_orientation.set;
31 Efl.Image_Load.load_scale_down.get;
32 Efl.Image_Load.load_scale_down.set;
33 Efl.Image_Load.load_region.get;
34 Efl.Image_Load.load_region.set;
35 Efl.Image_Load.load_region_support.get;
36 }
37}