summaryrefslogtreecommitdiff
path: root/src/lib/evas/Evas_Loader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/Evas_Loader.h')
-rw-r--r--src/lib/evas/Evas_Loader.h77
1 files changed, 77 insertions, 0 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