summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-05-07 10:50:57 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-05-08 18:16:59 +0900
commitc3f9d3b8b8f2530923353beff4e67661a75f7614 (patch)
tree976fd19448c0ddf755686308335cd427e9ba6ae3 /src/lib/evas
parent559b1b33012d0577216303ebf127733bf80aea1d (diff)
evas: Make Evas_Loader API public.
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/Evas_Loader.h77
-rw-r--r--src/lib/evas/cache/evas_cache.h6
-rw-r--r--src/lib/evas/cache/evas_cache_engine_image.c2
-rw-r--r--src/lib/evas/cache/evas_cache_image.c4
-rw-r--r--src/lib/evas/cache2/evas_cache2.c15
-rw-r--r--src/lib/evas/cache2/evas_cache2.h2
-rw-r--r--src/lib/evas/common/evas_image.h2
-rw-r--r--src/lib/evas/common/evas_image_main.c2
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c4
-rw-r--r--src/lib/evas/cserve2/evas_cs2_private.h2
-rw-r--r--src/lib/evas/include/evas_common.h51
-rw-r--r--src/lib/evas/include/evas_private.h26
12 files changed, 101 insertions, 92 deletions
diff --git a/src/lib/evas/Evas_Loader.h b/src/lib/evas/Evas_Loader.h
new file mode 100644
index 0000000000..4f53b7ddb1
--- /dev/null
+++ b/src/lib/evas/Evas_Loader.h
@@ -0,0 +1,77 @@
1#ifndef _EVAS_LOADER_H
2#define _EVAS_LOADER_H
3
4#include <Eina.h>
5
6typedef struct _Evas_Image_Load_Opts Evas_Image_Load_Opts;
7typedef struct _Evas_Image_Animated Evas_Image_Animated;
8typedef struct _Evas_Image_Property Evas_Image_Property;
9typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func;
10
11struct _Evas_Image_Property
12{
13 unsigned int w;
14 unsigned int h;
15
16 unsigned char scale;
17
18 Eina_Bool rotated;
19 Eina_Bool alpha;
20 Eina_Bool premul;
21 Eina_Bool alpha_sparse;
22};
23
24struct _Evas_Image_Animated
25{
26 Eina_List *frames;
27
28 Evas_Image_Animated_Loop_Hint loop_hint;
29
30 int frame_count;
31 int loop_count;
32 int cur_frame;
33
34 Eina_Bool animated;
35};
36
37struct _Evas_Image_Load_Opts
38{
39 struct {
40 unsigned int x, y, w, h;
41 } region;
42 struct {
43 int src_x, src_y, src_w, src_h;
44 int dst_w, dst_h;
45 int smooth;
46 Evas_Image_Scale_Hint scale_hint;
47 } scale_load;
48 double dpi; // if > 0.0 use this
49 unsigned int w, h; // if > 0 use this
50 unsigned int degree;//if>0 there is some info related with rotation
51 int scale_down_by; // if > 1 then use this
52
53 Eina_Bool orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info)
54};
55
56struct _Evas_Image_Load_Func
57{
58 void *(*file_open) (Eina_File *f, const char *key,
59 Evas_Image_Load_Opts *opts,
60 Evas_Image_Animated *animated,
61 int *error);
62 void (*file_close) (void *loader_data);
63
64 Eina_Bool (*file_head) (void *loader_data,
65 Evas_Image_Property *prop,
66 int *error);
67 Eina_Bool (*file_data) (void *loader_data,
68 Evas_Image_Property *prop,
69 void *pixels, int *error);
70 double (*frame_duration) (void *loader_data,
71 int start, int frame_num);
72
73 Eina_Bool threadable;
74 Eina_Bool do_region;
75};
76
77#endif
diff --git a/src/lib/evas/cache/evas_cache.h b/src/lib/evas/cache/evas_cache.h
index 8b851c33e3..8fca866f1f 100644
--- a/src/lib/evas/cache/evas_cache.h
+++ b/src/lib/evas/cache/evas_cache.h
@@ -65,7 +65,7 @@ struct _Evas_Cache_Image
65struct _Evas_Cache_Engine_Image_Func 65struct _Evas_Cache_Engine_Image_Func
66{ 66{
67 /* Must return a char* allocated with eina_stringshare_add. */ 67 /* Must return a char* allocated with eina_stringshare_add. */
68 char* (*key)(Image_Entry *im, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); 68 char* (*key)(Image_Entry *im, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
69 69
70 Engine_Image_Entry* (*alloc)(void); 70 Engine_Image_Entry* (*alloc)(void);
71 void (*dealloc)(Engine_Image_Entry *eim); 71 void (*dealloc)(Engine_Image_Entry *eim);
@@ -113,7 +113,7 @@ extern "C" {
113 113
114EAPI Evas_Cache_Image* evas_cache_image_init(const Evas_Cache_Image_Func *cb); 114EAPI Evas_Cache_Image* evas_cache_image_init(const Evas_Cache_Image_Func *cb);
115EAPI void evas_cache_image_shutdown(Evas_Cache_Image *cache); 115EAPI void evas_cache_image_shutdown(Evas_Cache_Image *cache);
116EAPI Image_Entry* evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); 116EAPI Image_Entry* evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
117EAPI void evas_cache_image_ref(Image_Entry *im); 117EAPI void evas_cache_image_ref(Image_Entry *im);
118EAPI void evas_cache_image_drop(Image_Entry *im); 118EAPI void evas_cache_image_drop(Image_Entry *im);
119EAPI void evas_cache_image_data_not_needed(Image_Entry *im); 119EAPI void evas_cache_image_data_not_needed(Image_Entry *im);
@@ -147,7 +147,7 @@ EAPI int evas_cache_engine_image_usage_get(Evas_Cache_Engin
147EAPI int evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache); 147EAPI int evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache);
148EAPI void evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit); 148EAPI void evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit);
149 149
150EAPI Engine_Image_Entry* evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, void *engine_data, int *error); 150EAPI Engine_Image_Entry* evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, const char *file, const char *key, Evas_Image_Load_Opts *lo, void *engine_data, int *error);
151EAPI void evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim); 151EAPI void evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim);
152EAPI Engine_Image_Entry* evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data); 152EAPI Engine_Image_Entry* evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data);
153EAPI void evas_cache_engine_image_drop(Engine_Image_Entry *eim); 153EAPI void evas_cache_engine_image_drop(Engine_Image_Entry *eim);
diff --git a/src/lib/evas/cache/evas_cache_engine_image.c b/src/lib/evas/cache/evas_cache_engine_image.c
index a7a9905e9d..c0c4a6e6db 100644
--- a/src/lib/evas/cache/evas_cache_engine_image.c
+++ b/src/lib/evas/cache/evas_cache_engine_image.c
@@ -301,7 +301,7 @@ evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache)
301EAPI Engine_Image_Entry * 301EAPI Engine_Image_Entry *
302evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, 302evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache,
303 const char *file, const char *key, 303 const char *file, const char *key,
304 RGBA_Image_Loadopts *lo, void *data, int *error) 304 Evas_Image_Load_Opts *lo, void *data, int *error)
305{ 305{
306 Engine_Image_Entry *eim; 306 Engine_Image_Entry *eim;
307 Image_Entry *im; 307 Image_Entry *im;
diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c
index 42afdf8f6d..6765f6ba8a 100644
--- a/src/lib/evas/cache/evas_cache_image.c
+++ b/src/lib/evas/cache/evas_cache_image.c
@@ -215,7 +215,7 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache,
215 Image_Timestamp *tstamp, 215 Image_Timestamp *tstamp,
216 const char *file, 216 const char *file,
217 const char *key, 217 const char *key,
218 RGBA_Image_Loadopts *lo, 218 Evas_Image_Load_Opts *lo,
219 int *error) 219 int *error)
220{ 220{
221 Image_Entry *ie; 221 Image_Entry *ie;
@@ -565,7 +565,7 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
565 565
566EAPI Image_Entry * 566EAPI Image_Entry *
567evas_cache_image_request(Evas_Cache_Image *cache, const char *file, 567evas_cache_image_request(Evas_Cache_Image *cache, const char *file,
568 const char *key, RGBA_Image_Loadopts *lo, int *error) 568 const char *key, Evas_Image_Load_Opts *lo, int *error)
569{ 569{
570 const char *ckey = "(null)"; 570 const char *ckey = "(null)";
571 char *hkey; 571 char *hkey;
diff --git a/src/lib/evas/cache2/evas_cache2.c b/src/lib/evas/cache2/evas_cache2.c
index e16c5cb880..a819e385ea 100644
--- a/src/lib/evas/cache2/evas_cache2.c
+++ b/src/lib/evas/cache2/evas_cache2.c
@@ -222,7 +222,7 @@ _evas_cache_image_entry_new(Evas_Cache2 *cache,
222 Image_Timestamp *tstamp, 222 Image_Timestamp *tstamp,
223 const char *file, 223 const char *file,
224 const char *key, 224 const char *key,
225 RGBA_Image_Loadopts *lo, 225 Evas_Image_Load_Opts *lo,
226 int *error) 226 int *error)
227{ 227{
228 Image_Entry *ie; 228 Image_Entry *ie;
@@ -534,7 +534,7 @@ evas_cache2_shutdown(Evas_Cache2 *cache)
534} 534}
535 535
536static void 536static void
537_create_hash_key(char *hkey, const char *path, size_t pathlen, const char *key, size_t keylen, RGBA_Image_Loadopts *lo) 537_create_hash_key(char *hkey, const char *path, size_t pathlen, const char *key, size_t keylen, Evas_Image_Load_Opts *lo)
538{ 538{
539 const char *ckey = "(null)"; 539 const char *ckey = "(null)";
540 size_t size; 540 size_t size;
@@ -618,7 +618,7 @@ _create_hash_key(char *hkey, const char *path, size_t pathlen, const char *key,
618} 618}
619 619
620EAPI Image_Entry * 620EAPI Image_Entry *
621evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, RGBA_Image_Loadopts *lo, int *error) 621evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, Evas_Image_Load_Opts *lo, int *error)
622{ 622{
623 size_t size; 623 size_t size;
624 size_t pathlen; 624 size_t pathlen;
@@ -628,8 +628,7 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, RG
628 int stat_done = 0, stat_failed = 0; 628 int stat_done = 0, stat_failed = 0;
629 struct stat st; 629 struct stat st;
630 Image_Timestamp tstamp; 630 Image_Timestamp tstamp;
631 Evas_Image_Load_Opts prevent = { 0, 0.0, 0, 0, 0, { 0, 0, 0, 0 }, 631 Evas_Image_Load_Opts prevent;
632 { 0, 0, 0, 0, 0, 0, 0, 0 }, EINA_FALSE };
633 632
634 if ((!path) || ((!path) && (!key))) 633 if ((!path) || ((!path) && (!key)))
635 { 634 {
@@ -637,6 +636,8 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, RG
637 return NULL; 636 return NULL;
638 } 637 }
639 638
639 memset(&prevent, 0, sizeof (Evas_Image_Load_Opts));
640
640 pathlen = strlen(path); 641 pathlen = strlen(path);
641 keylen = key ? strlen(key) : 6; 642 keylen = key ? strlen(key) : 6;
642 size = pathlen + keylen + HKEY_LOAD_OPTS_STR_LEN; 643 size = pathlen + keylen + HKEY_LOAD_OPTS_STR_LEN;
@@ -775,7 +776,7 @@ _scaled_image_find(Image_Entry *im, int src_x, int src_y, int src_w, int src_h,
775{ 776{
776 size_t pathlen, keylen, size; 777 size_t pathlen, keylen, size;
777 char *hkey; 778 char *hkey;
778 RGBA_Image_Loadopts lo; 779 Evas_Image_Load_Opts lo;
779 Image_Entry *ret; 780 Image_Entry *ret;
780 781
781 if (((!im->file) || ((!im->file) && (!im->key))) || (!im->data1) || 782 if (((!im->file) || ((!im->file) && (!im->key))) || (!im->data1) ||
@@ -837,7 +838,7 @@ evas_cache2_image_scale_load(Image_Entry *im, int src_x, int src_y, int src_w, i
837{ 838{
838 size_t pathlen, keylen, size; 839 size_t pathlen, keylen, size;
839 char *hkey; 840 char *hkey;
840 RGBA_Image_Loadopts lo; 841 Evas_Image_Load_Opts lo;
841 int error = EVAS_LOAD_ERROR_NONE; 842 int error = EVAS_LOAD_ERROR_NONE;
842 Image_Entry *ret; 843 Image_Entry *ret;
843 844
diff --git a/src/lib/evas/cache2/evas_cache2.h b/src/lib/evas/cache2/evas_cache2.h
index 5fddd1708e..f6ba8f881e 100644
--- a/src/lib/evas/cache2/evas_cache2.h
+++ b/src/lib/evas/cache2/evas_cache2.h
@@ -58,7 +58,7 @@ extern "C" {
58 58
59EAPI Evas_Cache2* evas_cache2_init(const Evas_Cache2_Image_Func *cb); 59EAPI Evas_Cache2* evas_cache2_init(const Evas_Cache2_Image_Func *cb);
60EAPI void evas_cache2_shutdown(Evas_Cache2 *cache); 60EAPI void evas_cache2_shutdown(Evas_Cache2 *cache);
61EAPI Image_Entry * evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, RGBA_Image_Loadopts *lo, int *error); 61EAPI Image_Entry * evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, Evas_Image_Load_Opts *lo, int *error);
62EAPI Image_Entry *evas_cache2_image_scale_load(Image_Entry *im, int src_x, int src_y, int src_w, int src_h, int dst_w, int dst_h, int smooth); 62EAPI Image_Entry *evas_cache2_image_scale_load(Image_Entry *im, int src_x, int src_y, int src_w, int src_h, int dst_w, int dst_h, int smooth);
63EAPI int evas_cache2_image_open_wait(Image_Entry *im); 63EAPI int evas_cache2_image_open_wait(Image_Entry *im);
64EAPI void evas_cache2_image_ref(Image_Entry *im); 64EAPI void evas_cache2_image_ref(Image_Entry *im);
diff --git a/src/lib/evas/common/evas_image.h b/src/lib/evas/common/evas_image.h
index d9ca581818..79f1a29c33 100644
--- a/src/lib/evas/common/evas_image.h
+++ b/src/lib/evas/common/evas_image.h
@@ -32,7 +32,7 @@ EAPI RGBA_Image *evas_common_image_alpha_line_buffer_obtain (int len);
32EAPI void evas_common_image_alpha_line_buffer_release (RGBA_Image *im); 32EAPI void evas_common_image_alpha_line_buffer_release (RGBA_Image *im);
33EAPI void evas_common_image_alpha_line_buffer_free (RGBA_Image *im); 33EAPI void evas_common_image_alpha_line_buffer_free (RGBA_Image *im);
34 34
35EAPI RGBA_Image *evas_common_load_image_from_file (const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); 35EAPI RGBA_Image *evas_common_load_image_from_file (const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
36EAPI int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress); 36EAPI int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
37 37
38EAPI void evas_common_rgba_image_scalecache_init(Image_Entry *ie); 38EAPI void evas_common_rgba_image_scalecache_init(Image_Entry *ie);
diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c
index d8e3559ac2..8a7e21fd59 100644
--- a/src/lib/evas/common/evas_image_main.c
+++ b/src/lib/evas/common/evas_image_main.c
@@ -755,7 +755,7 @@ evas_common_image_get_cache(void)
755} 755}
756 756
757EAPI RGBA_Image * 757EAPI RGBA_Image *
758evas_common_load_image_from_file(const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error) 758evas_common_load_image_from_file(const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error)
759{ 759{
760 if (!file) 760 if (!file)
761 { 761 {
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index d3e41d52ca..b1997a8e6b 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -483,7 +483,7 @@ _build_absolute_path(const char *path, char buf[], int size)
483} 483}
484 484
485static unsigned int 485static unsigned int
486_image_open_server_send(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt EINA_UNUSED) 486_image_open_server_send(Image_Entry *ie, const char *file, const char *key, Evas_Image_Load_Opts *lopt EINA_UNUSED)
487{ 487{
488 int flen, klen; 488 int flen, klen;
489 int size; 489 int size;
@@ -727,7 +727,7 @@ _image_unload_server_send(Image_Entry *ie)
727} 727}
728 728
729Eina_Bool 729Eina_Bool
730evas_cserve2_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt) 730evas_cserve2_image_load(Image_Entry *ie, const char *file, const char *key, Evas_Image_Load_Opts *lopt)
731{ 731{
732 unsigned int rid; 732 unsigned int rid;
733 733
diff --git a/src/lib/evas/cserve2/evas_cs2_private.h b/src/lib/evas/cserve2/evas_cs2_private.h
index ab9b432d01..5ffbff3b93 100644
--- a/src/lib/evas/cserve2/evas_cs2_private.h
+++ b/src/lib/evas/cserve2/evas_cs2_private.h
@@ -23,7 +23,7 @@ typedef struct _Font_Entry Font_Entry;
23int evas_cserve2_init(void); 23int evas_cserve2_init(void);
24int evas_cserve2_shutdown(void); 24int evas_cserve2_shutdown(void);
25EAPI int evas_cserve2_use_get(void); 25EAPI int evas_cserve2_use_get(void);
26Eina_Bool evas_cserve2_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt); 26Eina_Bool evas_cserve2_image_load(Image_Entry *ie, const char *file, const char *key, Evas_Image_Load_Opts *lopt);
27int evas_cserve2_image_load_wait(Image_Entry *ie); 27int evas_cserve2_image_load_wait(Image_Entry *ie);
28Eina_Bool evas_cserve2_image_data_load(Image_Entry *ie); 28Eina_Bool evas_cserve2_image_data_load(Image_Entry *ie);
29void evas_cserve2_image_load_data_wait(Image_Entry *ie); 29void evas_cserve2_image_load_data_wait(Image_Entry *ie);
diff --git a/src/lib/evas/include/evas_common.h b/src/lib/evas/include/evas_common.h
index a1b94fcc20..03a2777d58 100644
--- a/src/lib/evas/include/evas_common.h
+++ b/src/lib/evas/include/evas_common.h
@@ -50,6 +50,7 @@
50#include <Eina.h> 50#include <Eina.h>
51#include "Evas.h" 51#include "Evas.h"
52//#include "Evas_GL.h" 52//#include "Evas_GL.h"
53#include "Evas_Loader.h"
53 54
54#ifndef HAVE_LROUND 55#ifndef HAVE_LROUND
55/* right now i dont care about rendering bugs on platforms without lround 56/* right now i dont care about rendering bugs on platforms without lround
@@ -352,8 +353,6 @@ typedef unsigned short DATA16;
352typedef unsigned char DATA8; 353typedef unsigned char DATA8;
353 354
354typedef struct _Image_Entry Image_Entry; 355typedef struct _Image_Entry Image_Entry;
355typedef struct _Image_Entry_Property Image_Entry_Property;
356typedef struct _Image_Entry_Animated Image_Entry_Animated;
357typedef struct _Image_Entry_Flags Image_Entry_Flags; 356typedef struct _Image_Entry_Flags Image_Entry_Flags;
358typedef struct _Image_Entry_Frame Image_Entry_Frame; 357typedef struct _Image_Entry_Frame Image_Entry_Frame;
359typedef struct _Image_Timestamp Image_Timestamp; 358typedef struct _Image_Timestamp Image_Timestamp;
@@ -361,7 +360,6 @@ typedef struct _Engine_Image_Entry Engine_Image_Entry;
361typedef struct _Evas_Cache_Target Evas_Cache_Target; 360typedef struct _Evas_Cache_Target Evas_Cache_Target;
362typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread; 361typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
363 362
364typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
365#ifdef BUILD_PIPE_RENDER 363#ifdef BUILD_PIPE_RENDER
366typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op; 364typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
367typedef struct _RGBA_Pipe RGBA_Pipe; 365typedef struct _RGBA_Pipe RGBA_Pipe;
@@ -495,25 +493,6 @@ typedef enum _Font_Rend_Flags
495 493
496/*****************************************************************************/ 494/*****************************************************************************/
497 495
498struct _RGBA_Image_Loadopts
499{
500 int scale_down_by; // if > 1 then use this
501 double dpi; // if > 0.0 use this
502 unsigned int w, h; // if > 0 use this
503 unsigned int degree;//if>0 there is some info related with rotation
504 struct {
505 unsigned int x, y, w, h;
506 } region;
507 struct {
508 int src_x, src_y, src_w, src_h;
509 int dst_w, dst_h;
510 int smooth;
511 Evas_Image_Scale_Hint scale_hint;
512 } scale_load;
513
514 Eina_Bool orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info)
515};
516
517struct _Image_Entry_Flags 496struct _Image_Entry_Flags
518{ 497{
519 Eina_Bool loaded : 1; 498 Eina_Bool loaded : 1;
@@ -544,17 +523,6 @@ struct _Image_Entry_Frame
544 Eina_Bool loaded : 1; 523 Eina_Bool loaded : 1;
545}; 524};
546 525
547struct _Image_Entry_Animated
548{
549 Eina_List *frames;
550 Evas_Image_Animated_Loop_Hint loop_hint;
551 int frame_count;
552 int loop_count;
553 int cur_frame;
554
555 Eina_Bool animated : 1;
556};
557
558struct _Evas_Cache_Target 526struct _Evas_Cache_Target
559{ 527{
560 EINA_INLIST; 528 EINA_INLIST;
@@ -572,19 +540,6 @@ struct _Image_Timestamp
572#endif 540#endif
573}; 541};
574 542
575struct _Image_Entry_Property
576{
577 unsigned int w;
578 unsigned int h;
579
580 unsigned char scale;
581
582 Eina_Bool rotated;
583 Eina_Bool alpha;
584 Eina_Bool premul;
585 Eina_Bool alpha_sparse;
586};
587
588struct _Image_Entry 543struct _Image_Entry
589{ 544{
590 EINA_INLIST; 545 EINA_INLIST;
@@ -610,7 +565,7 @@ struct _Image_Entry
610 RGBA_Pipe *pipe; 565 RGBA_Pipe *pipe;
611#endif 566#endif
612 567
613 RGBA_Image_Loadopts load_opts; 568 Evas_Image_Load_Opts load_opts;
614 int space; 569 int space;
615 570
616 unsigned int w; 571 unsigned int w;
@@ -634,7 +589,7 @@ struct _Image_Entry
634 LK(lock_cancel); 589 LK(lock_cancel);
635 590
636 /* for animation feature */ 591 /* for animation feature */
637 Image_Entry_Animated animated; 592 Evas_Image_Animated animated;
638 593
639 /* Reference to the file */ 594 /* Reference to the file */
640 Eina_File *f; 595 Eina_File *f;
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index bc3805e7cf..82a0211833 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -9,6 +9,7 @@
9#include <eina_safety_checks.h> 9#include <eina_safety_checks.h>
10 10
11#include "Evas.h" 11#include "Evas.h"
12#include "Evas_Loader.h"
12 13
13#include "../file/evas_module.h" 14#include "../file/evas_module.h"
14#include "../file/evas_path.h" 15#include "../file/evas_path.h"
@@ -32,11 +33,7 @@ typedef struct _Evas_Font Evas_Font;
32typedef struct _Evas_Font_Alias Evas_Font_Alias; 33typedef struct _Evas_Font_Alias Evas_Font_Alias;
33typedef struct _Evas_Font_Description Evas_Font_Description; 34typedef struct _Evas_Font_Description Evas_Font_Description;
34typedef struct _Evas_Data_Node Evas_Data_Node; 35typedef struct _Evas_Data_Node Evas_Data_Node;
35typedef RGBA_Image_Loadopts Evas_Image_Load_Opts;
36typedef Image_Entry_Animated Evas_Image_Animated;
37typedef Image_Entry_Property Evas_Image_Property;
38typedef struct _Evas_Func Evas_Func; 36typedef struct _Evas_Func Evas_Func;
39typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func;
40typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func; 37typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func;
41typedef struct _Evas_Object_Func Evas_Object_Func; 38typedef struct _Evas_Object_Func Evas_Object_Func;
42typedef struct _Evas_Intercept_Func Evas_Intercept_Func; 39typedef struct _Evas_Intercept_Func Evas_Intercept_Func;
@@ -900,27 +897,6 @@ struct _Evas_Func
900 Eina_Bool (*pixel_alpha_get) (void *image, int x, int y, DATA8 *alpha, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); 897 Eina_Bool (*pixel_alpha_get) (void *image, int x, int y, DATA8 *alpha, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
901}; 898};
902 899
903struct _Evas_Image_Load_Func
904{
905 Eina_Bool threadable;
906 void *(*file_open) (Eina_File *f, const char *key,
907 Evas_Image_Load_Opts *opts,
908 Evas_Image_Animated *animated,
909 int *error);
910 void (*file_close) (void *loader_data);
911
912 Eina_Bool (*file_head) (void *loader_data,
913 Evas_Image_Property *prop,
914 int *error);
915 Eina_Bool (*file_data) (void *loader_data,
916 Evas_Image_Property *prop,
917 void *pixels, int *error);
918 double (*frame_duration) (void *loader_data,
919 int start, int frame_num);
920
921 Eina_Bool do_region;
922};
923
924struct _Evas_Image_Save_Func 900struct _Evas_Image_Save_Func
925{ 901{
926 int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress); 902 int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress);