diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/edje/src/bin/edje_cc.h | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to '')
-rw-r--r-- | libraries/edje/src/bin/edje_cc.h | 226 |
1 files changed, 226 insertions, 0 deletions
diff --git a/libraries/edje/src/bin/edje_cc.h b/libraries/edje/src/bin/edje_cc.h new file mode 100644 index 0000000..bcd31a1 --- /dev/null +++ b/libraries/edje/src/bin/edje_cc.h | |||
@@ -0,0 +1,226 @@ | |||
1 | #ifndef EDJE_CC_H | ||
2 | #define EDJE_CC_H | ||
3 | |||
4 | #include <edje_private.h> | ||
5 | |||
6 | extern Eina_Prefix *pfx; | ||
7 | |||
8 | /* | ||
9 | * On Windows, if the file is not opened in binary mode, | ||
10 | * read does not return the correct size, because of | ||
11 | * CR / LF translation. | ||
12 | */ | ||
13 | #ifndef O_BINARY | ||
14 | # define O_BINARY 0 | ||
15 | #endif | ||
16 | |||
17 | /* logging variables */ | ||
18 | extern int _edje_cc_log_dom ; | ||
19 | #define EDJE_CC_DEFAULT_LOG_COLOR EINA_COLOR_CYAN | ||
20 | #ifdef ERR | ||
21 | # undef ERR | ||
22 | #endif | ||
23 | #define ERR(...) EINA_LOG_DOM_ERR(_edje_cc_log_dom, __VA_ARGS__) | ||
24 | #ifdef INF | ||
25 | # undef INF | ||
26 | #endif | ||
27 | #define INF(...) EINA_LOG_DOM_INFO(_edje_cc_log_dom, __VA_ARGS__) | ||
28 | #ifdef WRN | ||
29 | # undef WRN | ||
30 | #endif | ||
31 | #define WRN(...) EINA_LOG_DOM_WARN(_edje_cc_log_dom, __VA_ARGS__) | ||
32 | |||
33 | |||
34 | /* types */ | ||
35 | typedef struct _New_Object_Handler New_Object_Handler; | ||
36 | typedef struct _New_Statement_Handler New_Statement_Handler; | ||
37 | typedef struct _External_List External_List; | ||
38 | typedef struct _External External; | ||
39 | typedef struct _Font_List Font_List; | ||
40 | typedef struct _Font Font; | ||
41 | typedef struct _Code Code; | ||
42 | typedef struct _Code_Program Code_Program; | ||
43 | typedef struct _SrcFile SrcFile; | ||
44 | typedef struct _SrcFile_List SrcFile_List; | ||
45 | |||
46 | typedef struct _Edje_Program_Parser Edje_Program_Parser; | ||
47 | typedef struct _Edje_Pack_Element_Parser Edje_Pack_Element_Parser; | ||
48 | typedef struct _Edje_Part_Parser Edje_Part_Parser; | ||
49 | |||
50 | struct _New_Object_Handler | ||
51 | { | ||
52 | const char *type; | ||
53 | void (*func)(void); | ||
54 | }; | ||
55 | |||
56 | struct _New_Statement_Handler | ||
57 | { | ||
58 | const char *type; | ||
59 | void (*func)(void); | ||
60 | }; | ||
61 | |||
62 | struct _External_List | ||
63 | { | ||
64 | Eina_List *list; | ||
65 | }; | ||
66 | |||
67 | struct _External | ||
68 | { | ||
69 | char *name; | ||
70 | }; | ||
71 | |||
72 | struct _Font_List | ||
73 | { | ||
74 | Eina_List *list; | ||
75 | }; | ||
76 | |||
77 | struct _Font | ||
78 | { | ||
79 | char *name; | ||
80 | char *file; | ||
81 | }; | ||
82 | |||
83 | struct _Code | ||
84 | { | ||
85 | int l1, l2; | ||
86 | char *shared; | ||
87 | char *original; | ||
88 | Eina_List *programs; | ||
89 | int is_lua; | ||
90 | }; | ||
91 | |||
92 | struct _Code_Program | ||
93 | { | ||
94 | int l1, l2; | ||
95 | int id; | ||
96 | char *script; | ||
97 | char *original; | ||
98 | }; | ||
99 | |||
100 | struct _SrcFile | ||
101 | { | ||
102 | char *name; | ||
103 | char *file; | ||
104 | }; | ||
105 | |||
106 | struct _SrcFile_List | ||
107 | { | ||
108 | Eina_List *list; | ||
109 | }; | ||
110 | |||
111 | struct _Edje_Program_Parser | ||
112 | { | ||
113 | Edje_Program common; | ||
114 | Eina_Bool can_override; | ||
115 | }; | ||
116 | |||
117 | struct _Edje_Pack_Element_Parser | ||
118 | { | ||
119 | Edje_Pack_Element common; | ||
120 | Eina_Bool can_override; | ||
121 | }; | ||
122 | |||
123 | struct _Edje_Part_Parser | ||
124 | { | ||
125 | Edje_Part common; | ||
126 | struct { | ||
127 | Eina_Bool done; | ||
128 | const char *insert_before; /* the part name for insertion in front of */ | ||
129 | const char *insert_after; /* the part name for insertion behind of */ | ||
130 | Edje_Part_Parser *before; | ||
131 | Edje_Part_Parser *after; | ||
132 | int linked_prev; /* the number linked previous part for reorder */ | ||
133 | int linked_next; /* the number linked next part for reorder */ | ||
134 | } reorder; | ||
135 | Eina_Bool can_override; | ||
136 | }; | ||
137 | |||
138 | /* global fn calls */ | ||
139 | void data_setup(void); | ||
140 | void data_write(void); | ||
141 | void data_queue_part_lookup(Edje_Part_Collection *pc, const char *name, int *dest); | ||
142 | void data_queue_copied_part_lookup(Edje_Part_Collection *pc, int *src, int *dest); | ||
143 | void data_queue_program_lookup(Edje_Part_Collection *pc, const char *name, int *dest); | ||
144 | void data_queue_copied_program_lookup(Edje_Part_Collection *pc, int *src, int *dest); | ||
145 | void data_queue_anonymous_lookup(Edje_Part_Collection *pc, Edje_Program *ep, int *dest); | ||
146 | void data_queue_copied_anonymous_lookup(Edje_Part_Collection *pc, int *src, int *dest); | ||
147 | void data_queue_image_lookup(char *name, int *dest, Eina_Bool *set); | ||
148 | void data_queue_copied_image_lookup(int *src, int *dest, Eina_Bool *set); | ||
149 | void data_queue_part_slave_lookup(int *master, int *slave); | ||
150 | void data_queue_image_slave_lookup(int *master, int *slave); | ||
151 | void data_queue_spectrum_lookup(char *name, int *dest); | ||
152 | void data_queue_spectrum_slave_lookup(int *master, int *slave); | ||
153 | void data_process_lookups(void); | ||
154 | void data_process_scripts(void); | ||
155 | void data_process_script_lookups(void); | ||
156 | |||
157 | |||
158 | int is_verbatim(void); | ||
159 | void track_verbatim(int on); | ||
160 | void set_verbatim(char *s, int l1, int l2); | ||
161 | char *get_verbatim(void); | ||
162 | int get_verbatim_line1(void); | ||
163 | int get_verbatim_line2(void); | ||
164 | void compile(void); | ||
165 | int is_param(int n); | ||
166 | int is_num(int n); | ||
167 | char *parse_str(int n); | ||
168 | int parse_enum(int n, ...); | ||
169 | int parse_flags(int n, ...); | ||
170 | int parse_int(int n); | ||
171 | int parse_int_range(int n, int f, int t); | ||
172 | int parse_bool(int n); | ||
173 | double parse_float(int n); | ||
174 | double parse_float_range(int n, double f, double t); | ||
175 | int get_arg_count(void); | ||
176 | void check_arg_count(int n); | ||
177 | void check_min_arg_count(int n); | ||
178 | |||
179 | int object_handler_num(void); | ||
180 | int statement_handler_num(void); | ||
181 | |||
182 | void reorder_parts(void); | ||
183 | void source_edd(void); | ||
184 | void source_fetch(void); | ||
185 | int source_append(Eet_File *ef); | ||
186 | SrcFile_List *source_load(Eet_File *ef); | ||
187 | int source_fontmap_save(Eet_File *ef, Eina_List *fonts); | ||
188 | Font_List *source_fontmap_load(Eet_File *ef); | ||
189 | |||
190 | void *mem_alloc(size_t size); | ||
191 | char *mem_strdup(const char *s); | ||
192 | #define SZ sizeof | ||
193 | |||
194 | void error_and_abort(Eet_File *ef, const char *fmt, ...); | ||
195 | |||
196 | /* global vars */ | ||
197 | extern Eina_List *ext_dirs; | ||
198 | extern Eina_List *img_dirs; | ||
199 | extern Eina_List *fnt_dirs; | ||
200 | extern Eina_List *snd_dirs; | ||
201 | extern char *file_in; | ||
202 | extern char *tmp_dir; | ||
203 | extern char *file_out; | ||
204 | extern char *progname; | ||
205 | extern int verbose; | ||
206 | extern int no_lossy; | ||
207 | extern int no_comp; | ||
208 | extern int no_raw; | ||
209 | extern int no_save; | ||
210 | extern int min_quality; | ||
211 | extern int max_quality; | ||
212 | extern int line; | ||
213 | extern Eina_List *stack; | ||
214 | extern Eina_List *params; | ||
215 | extern Edje_File *edje_file; | ||
216 | extern Eina_List *edje_collections; | ||
217 | extern Eina_List *externals; | ||
218 | extern Eina_List *fonts; | ||
219 | extern Eina_List *codes; | ||
220 | extern Eina_List *defines; | ||
221 | extern Eina_List *aliases; | ||
222 | extern New_Object_Handler object_handlers[]; | ||
223 | extern New_Statement_Handler statement_handlers[]; | ||
224 | |||
225 | |||
226 | #endif | ||