1 
2 #ifndef _EDJE_PRIVATE_H
3 #define _EDJE_PRIVATE_H
4 
5 #ifdef HAVE_CONFIG_H
6 # include <config.h>
7 #endif
8 
9 #ifdef STDC_HEADERS
10 # include <stdlib.h>
11 # include <stddef.h>
12 #else
13 # ifdef HAVE_STDLIB_H
14 #  include <stdlib.h>
15 # endif
16 #endif
17 
18 #ifdef ENABLE_NLS
19 # include <libintl.h>
20 #endif
21 
22 #include <locale.h>
23 #include <libgen.h>
24 #include <string.h>
25 #include <limits.h>
26 #include <sys/stat.h>
27 #include <time.h>
28 #include <sys/time.h>
29 #include <errno.h>
30 #include <unistd.h>
31 
32 #include <fcntl.h>
33 
34 #include <lua.h>
35 #include <lualib.h>
36 #include <lauxlib.h>
37 #include <setjmp.h>
38 
39 // auto_unref
40 #define EFL_CANVAS_OBJECT_PROTECTED
41 #define EFL_LAYOUT_CALC_PROTECTED
42 
43 #include <Eina.h>
44 #include <Eet.h>
45 #include <Eo.h>
46 #include <Evas.h>
47 #include <Ecore.h>
48 #include <Ecore_Evas.h>
49 #include <Ecore_File.h>
50 #include <Ecore_Input.h>
51 #ifdef HAVE_ECORE_IMF
52 # include <Ecore_IMF.h>
53 # include <Ecore_IMF_Evas.h>
54 #endif
55 #include <Embryo.h>
56 #include <Efreet.h>
57 
58 #ifdef HAVE_EIO
59 # include <Eio.h>
60 #endif
61 
62 #ifdef HAVE_EPHYSICS
63 # include <EPhysics.h>
64 #endif
65 
66 #include "Edje.h"
67 #define EFL_INTERNAL_UNSTABLE
68 #include <Evas_Internal.h>
69 
70 #ifdef EAPI
71 # undef EAPI
72 #endif
73 
74 #ifdef _WIN32
75 # ifdef EFL_BUILD
76 #  ifdef DLL_EXPORT
77 #   define EAPI __declspec(dllexport)
78 #  else
79 #   define EAPI
80 #  endif
81 # else
82 #  define EAPI __declspec(dllimport)
83 # endif
84 #else
85 # ifdef __GNUC__
86 #  if __GNUC__ >= 4
87 #   define EAPI __attribute__ ((visibility("default")))
88 #  else
89 #   define EAPI
90 #  endif
91 # else
92 #  define EAPI
93 # endif
94 #endif
95 
96 // This object is internal, only the interface needs to be exposed.
97 #include "edje_global.eo.h"
98 
99 EAPI extern int _edje_default_log_dom ;
100 
101 #ifdef EDJE_DEFAULT_LOG_COLOR
102 # undef EDJE_DEFAULT_LOG_COLOR
103 #endif
104 #define EDJE_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
105 #ifdef ERR
106 # undef ERR
107 #endif
108 #define ERR(...) EINA_LOG_DOM_ERR(_edje_default_log_dom, __VA_ARGS__)
109 #ifdef INF
110 # undef INF
111 #endif
112 #define INF(...) EINA_LOG_DOM_INFO(_edje_default_log_dom, __VA_ARGS__)
113 #ifdef WRN
114 # undef WRN
115 #endif
116 #define WRN(...) EINA_LOG_DOM_WARN(_edje_default_log_dom, __VA_ARGS__)
117 #ifdef CRI
118 # undef CRI
119 #endif
120 #define CRI(...) EINA_LOG_DOM_CRIT(_edje_default_log_dom, __VA_ARGS__)
121 #ifdef DBG
122 # undef DBG
123 #endif
124 #define DBG(...) EINA_LOG_DOM_DBG(_edje_default_log_dom, __VA_ARGS__)
125 #ifdef __GNUC__
126 # if __GNUC__ >= 4
127 // BROKEN in gcc 4 on amd64
128 //#  pragma GCC visibility push(hidden)
129 # endif
130 #endif
131 
132 #ifndef ABS
133 #define ABS(x) ((x) < 0 ? -(x) : (x))
134 #endif
135 
136 #ifndef CLAMP
137 #define CLAMP(x, min, max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x)))
138 #endif
139 
140 
141 #ifdef BUILD_EDJE_FP
142 
143 #define FLOAT_T Eina_F32p32
144 #define EDJE_T_FLOAT EET_T_F32P32
145 #define MUL(a, b) eina_f32p32_mul(a, b)
146 #define SCALE(a, b) eina_f32p32_scale(a, b)
147 #define DIV(a, b) eina_f32p32_div(a, b)
148 #define DIV2(a) ((a) >> 1)
149 #define ADD(a, b) eina_f32p32_add(a, b)
150 #define SUB(a, b) eina_f32p32_sub(a, b)
151 #define SQRT(a) eina_f32p32_sqrt(a)
152 #define TO_DOUBLE(a) eina_f32p32_double_to(a)
153 #define FROM_DOUBLE(a) eina_f32p32_double_from(a)
154 #define FROM_INT(a) eina_f32p32_int_from(a)
155 #define TO_INT(a) eina_f32p32_int_to(a)
156 #define TO_INT_ROUND(a) eina_f32p32_int_to(ADD(a, FROM_DOUBLE(0.5)))
157 #define ZERO 0
158 #define COS(a) eina_f32p32_cos(a)
159 #define SIN(a) eina_f32p32_sin(a)
160 #define PI EINA_F32P32_PI
161 #define EQ(a, b) a == b
162 #define NEQ(a, b) a != b
163 
164 #else
165 
166 #define FLOAT_T double
167 #define EDJE_T_FLOAT EET_T_DOUBLE
168 #define MUL(a, b) ((a) * (b))
169 #define SCALE(a, b) ((a) * (double)(b))
170 #define DIV(a, b) ((a) / (b))
171 #define DIV2(a) ((a) / 2.0)
172 #define ADD(a, b) ((a) + (b))
173 #define SUB(a, b) ((a) - (b))
174 #define SQRT(a) sqrt(a)
175 #define TO_DOUBLE(a) (double)(a)
176 #define FROM_DOUBLE(a) (a)
177 #define FROM_INT(a) (double)(a)
178 #define TO_INT(a) (int)(a)
179 #define TO_INT_ROUND(a) (int)(a + 0.5)
180 #define ZERO 0.0
181 #define COS(a) cos(a)
182 #define SIN(a) sin(a)
183 #define PI 3.14159265358979323846
184 #define EQ(a, b) EINA_DBL_EQ(a, b)
185 #define NEQ(a, b) !EINA_DBL_EQ(a, b)
186 
187 #endif
188 
189 #define EDJE_ENTRY_NUM_CURSOR_OBJS 3
190 
191 /* Inheritable Edje Smart API. For now private so only Edje Edit makes
192  * use of this, but who knows what will be possible in the future */
193 #define EDJE_SMART_API_VERSION 1
194 
195 /* Basic macro to init the Edje Smart API */
196 #define EDJE_SMART_API_INIT(smart_class_init) {smart_class_init, EDJE_SMART_API_VERSION, NULL}
197 
198 #define EDJE_SMART_API_INIT_NULL EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
199 #define EDJE_SMART_API_INIT_VERSION EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
200 #define EDJE_SMART_API_INIT_NAME_VERSION(name) EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
201 
202 /* increment this when the EET data descriptors have changed and old
203  * EETs cannot be loaded/used correctly anymore.
204  */
205 #define EDJE_FILE_VERSION 3
206 /* increment this when you add new feature to edje file format without
207  * breaking backward compatibility.
208  */
209 #define EDJE_FILE_MINOR 6
210 
211 /* FIXME:
212  *
213  * More example Edje files
214  *
215  * ? programs can do multiple actions from one signal
216  * ? add containering (hbox, vbox, table, wrapping multi-line hbox & vbox)
217  * ? text entry widget (single line only)
218  *
219  * ? recursions, unsafe callbacks outside Edje etc. with freeze, ref/unref and block/unblock and break_programs needs to be redesigned & fixed
220  * ? all unsafe calls that may result in callbacks must be marked and dealt with
221  */
222 
223 typedef enum
224 {
225    EDJE_ASPECT_PREFER_NONE,
226    EDJE_ASPECT_PREFER_VERTICAL,
227    EDJE_ASPECT_PREFER_HORIZONTAL,
228    EDJE_ASPECT_PREFER_BOTH,
229    EDJE_ASPECT_PREFER_SOURCE
230 } Edje_Internal_Aspect;
231 
232 struct _Edje_Perspective
233 {
234    Evas_Object *obj;
235    Evas        *e;
236    Evas_Coord   px, py, z0, foc;
237    Eina_List   *users;
238    Eina_Bool    global : 1;
239 };
240 
241 struct _Edje_Position_Scale
242 {
243    FLOAT_T x, y;
244 };
245 
246 struct _Edje_Position
247 {
248    int x, y;
249 };
250 
251 struct _Edje_Size
252 {
253    int w, h;
254    Eina_Bool limit; /* should we limit ourself to the size of the source */
255 };
256 
257 struct _Edje_Rectangle
258 {
259    int x, y, w, h;
260 };
261 
262 struct _Edje_Color
263 {
264    unsigned char  r, g, b, a;
265 };
266 
267 struct _Edje_Map_Color
268 {
269    int idx;
270    unsigned char r;
271    unsigned char g;
272    unsigned char b;
273    unsigned char a;
274 };
275 
276 struct _Edje_Aspect_Prefer
277 {
278    FLOAT_T min, max;
279    char prefer;
280 };
281 
282 struct _Edje_Aspect
283 {
284    int w, h;
285    Edje_Aspect_Control mode;
286 };
287 
288 struct _Edje_String
289 {
290    const char *str;
291    const char *translated;
292    unsigned int id;
293 };
294 
295 
296 typedef struct _Edje_Position_Scale                  Edje_Alignment;
297 typedef struct _Edje_Position_Scale                  Edje_Position_Scale;
298 typedef struct _Edje_Position                        Edje_Position;
299 typedef struct _Edje_Size                            Edje_Size;
300 typedef struct _Edje_Rectangle                       Edje_Rectangle;
301 typedef struct _Edje_Color                           Edje_Color;
302 typedef struct _Edje_Map_Color                       Edje_Map_Color;
303 typedef struct _Edje_Aspect_Prefer                   Edje_Aspect_Prefer;
304 typedef struct _Edje_Aspect                          Edje_Aspect;
305 typedef struct _Edje_String                          Edje_String;
306 
307 typedef struct _Edje_File                            Edje_File;
308 typedef struct _Edje_Style                           Edje_Style;
309 typedef struct _Edje_Style_Tag                       Edje_Style_Tag;
310 typedef struct _Edje_External_Directory              Edje_External_Directory;
311 typedef struct _Edje_External_Directory_Entry        Edje_External_Directory_Entry;
312 typedef struct _Edje_Font_Directory_Entry            Edje_Font_Directory_Entry;
313 typedef struct _Edje_Image_Directory                 Edje_Image_Directory;
314 typedef struct _Edje_Image_Directory_Entry           Edje_Image_Directory_Entry;
315 typedef struct _Edje_Image_Directory_Set             Edje_Image_Directory_Set;
316 typedef struct _Edje_Image_Directory_Set_Entry       Edje_Image_Directory_Set_Entry;
317 typedef struct _Edje_Model_Directory                 Edje_Model_Directory;
318 typedef struct _Edje_Model_Directory_Entry           Edje_Model_Directory_Entry;
319 typedef struct _Edje_Limit                           Edje_Limit;
320 typedef struct _Edje_Plugin                          Edje_Plugin;
321 typedef struct _Edje_Sound_Sample                    Edje_Sound_Sample;
322 typedef struct _Edje_Sound_Tone                      Edje_Sound_Tone;
323 typedef struct _Edje_Sound_Directory                 Edje_Sound_Directory;
324 typedef struct _Edje_Mo                              Edje_Mo;
325 typedef struct _Edje_Mo_Directory                    Edje_Mo_Directory;
326 typedef struct _Edje_Gfx_Filter                      Edje_Gfx_Filter;
327 typedef struct _Edje_Gfx_Filter_Directory            Edje_Gfx_Filter_Directory;
328 typedef struct _Edje_Color_Tree_Node                 Edje_Color_Tree_Node;
329 typedef struct _Edje_Vector_Directory_Entry          Edje_Vector_Directory_Entry;
330 
331 
332 typedef struct _Edje_Vibration_Sample                Edje_Vibration_Sample;
333 typedef struct _Edje_Vibration_Directory             Edje_Vibration_Directory;
334 typedef struct _Edje_Program                         Edje_Program;
335 typedef struct _Edje_Program_Target                  Edje_Program_Target;
336 typedef struct _Edje_Program_After                   Edje_Program_After;
337 typedef struct _Edje_Part_Collection_Directory_Entry Edje_Part_Collection_Directory_Entry;
338 typedef struct _Edje_Pack_Element                    Edje_Pack_Element;
339 typedef struct _Edje_Part_Collection                 Edje_Part_Collection;
340 typedef struct _Edje_Part                            Edje_Part;
341 typedef struct _Edje_Part_Api                        Edje_Part_Api;
342 typedef struct _Edje_Part_Dragable		     Edje_Part_Dragable;
343 typedef struct _Edje_Part_Image_Id                   Edje_Part_Image_Id;
344 typedef struct _Edje_Part_Description_Image          Edje_Part_Description_Image;
345 typedef struct _Edje_Part_Description_Proxy          Edje_Part_Description_Proxy;
346 typedef struct _Edje_Part_Description_Text           Edje_Part_Description_Text;
347 typedef struct _Edje_Part_Description_Box            Edje_Part_Description_Box;
348 typedef struct _Edje_Part_Description_Table          Edje_Part_Description_Table;
349 typedef struct _Edje_Part_Description_External       Edje_Part_Description_External;
350 typedef struct _Edje_Part_Description_Snapshot       Edje_Part_Description_Snapshot;
351 typedef struct _Edje_Part_Description_Common         Edje_Part_Description_Common;
352 typedef struct _Edje_Part_Description_Spec_Fill      Edje_Part_Description_Spec_Fill;
353 typedef struct _Edje_Part_Description_Spec_Border    Edje_Part_Description_Spec_Border;
354 typedef struct _Edje_Part_Description_Spec_Image     Edje_Part_Description_Spec_Image;
355 typedef struct _Edje_Part_Description_Spec_Proxy     Edje_Part_Description_Spec_Proxy;
356 typedef struct _Edje_Part_Description_Spec_Text      Edje_Part_Description_Spec_Text;
357 typedef struct _Edje_Part_Description_Spec_Box       Edje_Part_Description_Spec_Box;
358 typedef struct _Edje_Part_Description_Spec_Table     Edje_Part_Description_Spec_Table;
359 typedef struct _Edje_Part_Description_Spec_Filter    Edje_Part_Description_Spec_Filter;
360 typedef struct _Edje_Part_Description_Spec_Filter_Data Edje_Part_Description_Spec_Filter_Data;
361 typedef struct _Edje_Physics_Face                    Edje_Physics_Face;
362 typedef struct _Edje_Patterns                        Edje_Patterns;
363 typedef struct _Edje_Part_Box_Animation              Edje_Part_Box_Animation;
364 typedef struct _Edje_Part_Limit                      Edje_Part_Limit;
365 typedef struct _Edje_Part_Description_Vector         Edje_Part_Description_Vector;
366 typedef struct _Edje_Part_Description_Spec_Svg       Edje_Part_Description_Spec_Svg;
367 typedef struct _Edje_Part_Allowed_Seat               Edje_Part_Allowed_Seat;
368 
369 typedef struct _Edje Edje;
370 typedef struct _Edje_Real_Part_Text Edje_Real_Part_Text;
371 typedef struct _Edje_Real_Part_Swallow Edje_Real_Part_Swallow;
372 typedef struct _Edje_Real_Part_Container Edje_Real_Part_Container;
373 typedef struct _Edje_Real_Part_State Edje_Real_Part_State;
374 typedef struct _Edje_Real_Part_Drag Edje_Real_Part_Drag;
375 typedef struct _Edje_Real_Part_Set Edje_Real_Part_Set;
376 typedef struct _Edje_Real_Part_Vector Edje_Real_Part_Vector;
377 typedef struct _Edje_Real_Part Edje_Real_Part;
378 typedef struct _Edje_Running_Program Edje_Running_Program;
379 typedef struct _Edje_Signal_Callback Edje_Signal_Callback;
380 typedef struct _Edje_Calc_Params Edje_Calc_Params;
381 typedef struct _Edje_Calc_Params_Map Edje_Calc_Params_Map;
382 typedef struct _Edje_Calc_Params_Physics Edje_Calc_Params_Physics;
383 typedef struct _Edje_Pending_Program Edje_Pending_Program;
384 typedef struct _Edje_Text_Style Edje_Text_Style;
385 typedef struct _Edje_Var Edje_Var;
386 typedef struct _Edje_Var_Int Edje_Var_Int;
387 typedef struct _Edje_Var_Float Edje_Var_Float;
388 typedef struct _Edje_Var_String Edje_Var_String;
389 typedef struct _Edje_Var_List Edje_Var_List;
390 typedef struct _Edje_Var_Hash Edje_Var_Hash;
391 typedef struct _Edje_Var_Animator Edje_Var_Animator;
392 typedef struct _Edje_Var_Timer Edje_Var_Timer;
393 typedef struct _Edje_Var_Pool Edje_Var_Pool;
394 typedef struct _Edje_Signal_Source_Char Edje_Signal_Source_Char;
395 typedef struct _Edje_Text_Insert_Filter_Callback Edje_Text_Insert_Filter_Callback;
396 typedef struct _Edje_Markup_Filter_Callback Edje_Markup_Filter_Callback;
397 typedef struct _Edje_Signals_Sources_Patterns Edje_Signals_Sources_Patterns;
398 typedef struct _Edje_Signal_Callback_Flags Edje_Signal_Callback_Flags;
399 typedef struct _Edje_Signal_Callback_Group Edje_Signal_Callback_Group;
400 typedef struct _Edje_Signal_Callback_Match Edje_Signal_Callback_Match;
401 typedef struct _Edje_Signal_Callback_Matches Edje_Signal_Callback_Matches;
402 typedef struct _Edje_Signal_Callback_Custom Edje_Signal_Callback_Custom;
403 
404 #define EDJE_INF_MAX_W 100000
405 #define EDJE_INF_MAX_H 100000
406 
407 #define EDJE_IMAGE_SOURCE_TYPE_NONE                 0
408 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT       1
409 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY         2
410 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY_ETC1    3
411 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY_ETC2    4
412 #define EDJE_IMAGE_SOURCE_TYPE_USER             5
413 #define EDJE_IMAGE_SOURCE_TYPE_EXTERNAL             6
414 #define EDJE_IMAGE_SOURCE_TYPE_LAST                 7
415 
416 #define EDJE_SOUND_SOURCE_TYPE_NONE           0
417 #define EDJE_SOUND_SOURCE_TYPE_INLINE_RAW     1
418 #define EDJE_SOUND_SOURCE_TYPE_INLINE_COMP    2
419 #define EDJE_SOUND_SOURCE_TYPE_INLINE_LOSSY   3
420 #define EDJE_SOUND_SOURCE_TYPE_INLINE_AS_IS   4
421 
422 #define EDJE_VAR_NONE   0
423 #define EDJE_VAR_INT    1
424 #define EDJE_VAR_FLOAT  2
425 #define EDJE_VAR_STRING 3
426 #define EDJE_VAR_LIST   4
427 #define EDJE_VAR_HASH   5
428 
429 #define EDJE_VAR_MAGIC_BASE 0x12fe84ba
430 
431 #define EDJE_STATE_PARAM_NONE            0
432 #define EDJE_STATE_PARAM_ALIGNMENT       1
433 #define EDJE_STATE_PARAM_MIN             2
434 #define EDJE_STATE_PARAM_MAX             3
435 #define EDJE_STATE_PARAM_STEP            4
436 #define EDJE_STATE_PARAM_ASPECT          5
437 #define EDJE_STATE_PARAM_ASPECT_PREF     6
438 #define EDJE_STATE_PARAM_COLOR           7
439 #define EDJE_STATE_PARAM_COLOR2          8
440 #define EDJE_STATE_PARAM_COLOR3          9
441 #define EDJE_STATE_PARAM_COLOR_CLASS    10
442 #define EDJE_STATE_PARAM_REL1           11
443 #define EDJE_STATE_PARAM_REL1_TO        12
444 #define EDJE_STATE_PARAM_REL1_OFFSET    13
445 #define EDJE_STATE_PARAM_REL2           14
446 #define EDJE_STATE_PARAM_REL2_TO        15
447 #define EDJE_STATE_PARAM_REL2_OFFSET    16
448 #define EDJE_STATE_PARAM_IMAGE          17
449 #define EDJE_STATE_PARAM_BORDER         18
450 #define EDJE_STATE_PARAM_FILL_SMOOTH    19
451 #define EDJE_STATE_PARAM_FILL_POS       20
452 #define EDJE_STATE_PARAM_FILL_SIZE      21
453 #define EDJE_STATE_PARAM_TEXT           22
454 #define EDJE_STATE_PARAM_TEXT_CLASS     23
455 #define EDJE_STATE_PARAM_TEXT_FONT      24
456 #define EDJE_STATE_PARAM_TEXT_STYLE     25
457 #define EDJE_STATE_PARAM_TEXT_SIZE      26
458 #define EDJE_STATE_PARAM_TEXT_FIT       27
459 #define EDJE_STATE_PARAM_TEXT_MIN       28
460 #define EDJE_STATE_PARAM_TEXT_MAX       29
461 #define EDJE_STATE_PARAM_TEXT_ALIGN     30
462 #define EDJE_STATE_PARAM_VISIBLE        31
463 #define EDJE_STATE_PARAM_MAP_ON         32
464 #define EDJE_STATE_PARAM_MAP_PERSP      33
465 #define EDJE_STATE_PARAM_MAP_LIGHT      34
466 #define EDJE_STATE_PARAM_MAP_ROT_CENTER 35
467 #define EDJE_STATE_PARAM_MAP_ROT_X      36
468 #define EDJE_STATE_PARAM_MAP_ROT_Y      37
469 #define EDJE_STATE_PARAM_MAP_ROT_Z      38
470 #define EDJE_STATE_PARAM_MAP_BACK_CULL  39
471 #define EDJE_STATE_PARAM_MAP_PERSP_ON   40
472 #define EDJE_STATE_PARAM_PERSP_ZPLANE   41
473 #define EDJE_STATE_PARAM_PERSP_FOCAL    42
474 #define EDJE_STATE_PARAM_PHYSICS_MASS   43
475 #define EDJE_STATE_PARAM_PHYSICS_FRICTION 44
476 #define EDJE_STATE_PARAM_PHYSICS_RESTITUTION 45
477 #define EDJE_STATE_PARAM_PHYSICS_DAMPING 46
478 #define EDJE_STATE_PARAM_PHYSICS_SLEEP  47
479 #define EDJE_STATE_PARAM_PHYSICS_MATERIAL 48
480 #define EDJE_STATE_PARAM_PHYSICS_DENSITY 49
481 #define EDJE_STATE_PARAM_PHYSICS_IGNORE_PART_POS 50
482 #define EDJE_STATE_PARAM_PHYSICS_LIGHT_ON 51
483 #define EDJE_STATE_PARAM_PHYSICS_HARDNESS 52
484 #define EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_LIN 53
485 #define EDJE_STATE_PARAM_PHYSICS_MOV_FREEDOM_ANG 54
486 #define EDJE_STATE_PARAM_PHYSICS_BACK_CULL 55
487 #define EDJE_STATE_PARAM_PHYSICS_Z      56
488 #define EDJE_STATE_PARAM_PHYSICS_DEPTH  57
489 #define EDJE_STATE_PARAM_PROXY_SRC_VISIBLE 58
490 #define EDJE_STATE_PARAM_PROXY_SRC_CLIP 59
491 #define EDJE_STATE_PARAM_BOX_LAYOUT     60
492 #define EDJE_STATE_PARAM_BOX_FALLBACK_LAYOUT 61
493 #define EDJE_STATE_PARAM_BOX_ALIGN      62
494 #define EDJE_STATE_PARAM_BOX_PADDING    63
495 #define EDJE_STATE_PARAM_BOX_MIN        64
496 #define EDJE_STATE_PARAM_LAST           65
497 
498 #define EDJE_ENTRY_EDIT_MODE_NONE 0
499 #define EDJE_ENTRY_EDIT_MODE_SELECTABLE 1
500 #define EDJE_ENTRY_EDIT_MODE_EDITABLE 2
501 #define EDJE_ENTRY_EDIT_MODE_PASSWORD 3
502 
503 #define EDJE_ENTRY_SELECTION_MODE_DEFAULT 0
504 #define EDJE_ENTRY_SELECTION_MODE_EXPLICIT 1
505 
506 #define EDJE_ENTRY_CURSOR_MODE_UNDER 0
507 #define EDJE_ENTRY_CURSOR_MODE_BEFORE 1
508 
509 #define EDJE_ORIENTATION_AUTO  0
510 #define EDJE_ORIENTATION_LTR   1
511 #define EDJE_ORIENTATION_RTL   2
512 
513 #define EDJE_PART_PATH_SEPARATOR ':'
514 #define EDJE_PART_PATH_SEPARATOR_STRING ":"
515 #define EDJE_PART_PATH_SEPARATOR_INDEXL '['
516 #define EDJE_PART_PATH_SEPARATOR_INDEXR ']'
517 
518 #define FLAG_NONE 0
519 #define FLAG_X    0x01
520 #define FLAG_Y    0x02
521 #define FLAG_XY   (FLAG_X | FLAG_Y)
522 
523 #define EDJE_DESC_NO_RENDER_IS_SET(d) (((d)->no_render & 0x2) != 0)
524 #define EDJE_DESC_NO_RENDER_SET(d, v) do { (d)->no_render = (!!v) | 0x2; } while (0)
525 #define EDJE_DESC_NO_RENDER_VALUE(d) (((d)->no_render & 0x1) != 0)
526 
527 /*----------*/
528 
529 typedef struct Edje_Image_Hash
530 {
531    int id;
532 } Edje_Image_Hash;
533 
534 struct _Edje_File
535 {
536    const char                     *path;
537 
538    Edje_External_Directory        *external_dir;
539    Edje_Image_Directory           *image_dir;
540    Edje_Model_Directory           *model_dir;
541    Edje_Sound_Directory           *sound_dir;
542    Edje_Vibration_Directory       *vibration_dir;
543    Edje_Mo_Directory              *mo_dir;
544    Edje_Gfx_Filter_Directory      *filter_dir;
545 
546    Eina_Hash                      *image_id_hash;
547    Eina_Stringshare              **requires;
548    unsigned int                    requires_count;
549 
550    Eina_List                      *styles;
551    Eina_Hash                      *style_hash;
552 
553    Eina_List                      *color_tree;
554    Eina_Hash                      *color_tree_hash;
555 
556    Eina_List                      *color_classes;
557    Eina_Hash                      *color_hash;
558 
559    Eina_List                      *text_classes;
560    Eina_Hash                      *text_hash;
561 
562    Eina_List                      *size_classes;
563    Eina_Hash                      *size_hash;
564 
565    const char                     *compiler;
566 
567    Eina_Hash                      *data;
568    Eina_Hash			  *fonts;
569 
570    Eina_Hash			  *collection;
571    Eina_List			  *collection_cache;
572 
573    Edje_Patterns		  *collection_patterns;
574 
575    Eet_File                       *ef;
576    Eina_File                      *f;
577 
578    time_t                          mtime;
579 
580    int                             references;
581    int                             version;
582    int                             minor;
583    int                             feature_ver;
584    struct {
585       int                          major;
586       int                          minor;
587    } efl_version;
588    Eina_Stringshare               *id;
589 
590    FLOAT_T                         base_scale;
591 
592    char                            fid[8+8+8+2];
593 
594    unsigned char                   free_strings : 1;
595    unsigned char                   allocated_strings : 1;
596    unsigned char                   dangling : 1;
597    unsigned char                   warning : 1;
598    unsigned char                   has_textblock_min_max : 1;
599 };
600 
601 struct _Edje_Style
602 {
603    char                           *name;
604    Eina_List                      *tags;
605    Evas_Textblock_Style           *style;
606 
607    Eina_Bool                       cache : 1;
608    /* * read only * true if no text_class and no color_class exits in the style.
609     * added for performace as we don't have to check all tags to decide if we need to update
610     * this style or not.
611     */
612    Eina_Bool                       readonly : 1;
613 };
614 
615 struct _Edje_Style_Tag
616 {
617    const char                     *key;
618    const char                     *value;
619    const char                     *font;
620    const char                     *text_class;
621    double                          font_size;
622 };
623 
624 /*----------*/
625 
626 
627 struct _Edje_Font_Directory_Entry
628 {
629    const char *entry; /* the name of the font */
630    const char *file; /* the name of the file */
631 };
632 
633 /*----------*/
634 
635 struct _Edje_External_Directory
636 {
637    Edje_External_Directory_Entry *entries; /* a list of Edje_External_Directory_Entry */
638    unsigned int entries_count;
639 };
640 
641 struct _Edje_External_Directory_Entry
642 {
643    const char *entry; /* the name of the external */
644 };
645 
646 
647 /*----------*/
648 
649 
650 
651 /*----------*/
652 
653 struct _Edje_Image_Directory
654 {
655    Edje_Image_Directory_Entry *entries; /* an array of Edje_Image_Directory_Entry */
656    Edje_Image_Directory_Set *sets; /* an array of Edje_Image_Directory_Set */
657    Edje_Vector_Directory_Entry *vectors; /* an array of Edje_Image_Directory_Entry */
658 
659    unsigned int entries_count;
660    unsigned int sets_count;
661    unsigned int vectors_count;
662 };
663 
664 typedef enum _Edje_Vector_File_Type
665 {
666    EDJE_VECTOR_FILE_TYPE_SVG = 0,
667    EDJE_VECTOR_FILE_TYPE_LOTTIE
668 } Edje_Vector_File_Type;
669 
670 struct _Edje_Vector_Directory_Entry
671 {
672    const char *entry; /* the nominal name of the vector image - if any */
673    int   id; /* the id no. of the image */
674    Edje_Vector_File_Type type;
675 };
676 
677 struct _Edje_Image_Directory_Entry
678 {
679    const char *entry; /* the nominal name of the image - if any */
680    int   source_type; /* alternate source mode. 0 = none */
681    int   source_param; /* extra params on encoding */
682    Eina_Stringshare *external_id;
683    int   id; /* the id no. of the image */
684 };
685 
686 struct _Edje_Image_Directory_Set
687 {
688    char *name;
689    Eina_List *entries;
690 
691    int id;
692 };
693 
694 struct _Edje_Image_Directory_Set_Entry
695 {
696    const char *name;
697    int id;
698 
699    struct {
700       int w;
701       int h;
702       struct {
703          int w;
704          int h;
705       } min, max;
706    } size;
707 
708    struct {
709       int l, r, t, b;
710       FLOAT_T scale_by;
711    } border;
712 };
713 
714 struct _Edje_Model_Directory
715 {
716    Edje_Model_Directory_Entry *entries; /* an array of Edje_Model_Directory_Entry */
717    unsigned int entries_count;
718 };
719 
720 struct _Edje_Model_Directory_Entry
721 {
722    const char *entry; /* the nominal name of the model - if any */
723    int   id; /* the id no. of the image */
724 };
725 
726 struct _Edje_Sound_Sample /*Sound Sample*/
727 {
728    const char *name; /* the nominal name of the sound */
729    const char *snd_src;  /* Sound source Wav file */
730    int   compression;  /* Compression - RAW, LOSSLESS COMP ,  LOSSY ) */
731    int   mode; /* alternate source mode. 0 = none */
732    double quality;
733    int   id; /* the id no. of the sound */
734 };
735 
736 struct _Edje_Sound_Tone /*Sound Sample*/
737 {
738    const char *name; /* the nominal name of the sound - if any */
739    int   value; /* alternate source mode. 0 = none */
740    int   id; /* the id no. of the sound */
741 };
742 
743 struct _Edje_Sound_Directory
744 {
745 
746    Edje_Sound_Sample *samples;  /* an array of Edje_Sound_Sample entries */
747    Edje_Sound_Tone *tones;  /* an array of Edje_Sound_Tone entries */
748 
749    unsigned int samples_count;
750    unsigned int tones_count;
751 };
752 
753 struct _Edje_Mo /*Mo Sample*/
754 {
755    const char *locale; /* the nominal name of the Mo */
756    char *mo_src;  /* Mo source file */
757    int   id; /* the id no. of the Mo file */
758 };
759 
760 struct _Edje_Mo_Directory
761 {
762    Edje_Mo *mo_entries;  /* an array of Edje_Mo entries */
763    unsigned int mo_entries_count;
764 };
765 
766 struct _Edje_Vibration_Sample
767 {
768    const char *name;
769    const char *src;
770    int   id;
771 };
772 
773 struct _Edje_Vibration_Directory
774 {
775    Edje_Vibration_Sample *samples;  /* an array of Edje_Sound_Sample entries */
776    unsigned int samples_count;
777 };
778 
779 struct _Edje_Gfx_Filter
780 {
781    const char *name;
782    const char *script;
783 };
784 
785 struct _Edje_Gfx_Filter_Directory
786 {
787    Edje_Gfx_Filter *filters; /* sorted array (by strcmp() on name) */
788    int              filters_count;
789 };
790 
791 struct _Edje_Color_Tree_Node
792 {
793    const char *name;
794    Eina_List  *color_classes;
795 };
796 
797 /*----------*/
798 
799 struct _Edje_Program /* a conditional program to be run */
800 {
801    int         id; /* id of program */
802 
803    const char *name; /* name of the action */
804 
805    const char *signal; /* if signal emission name matches the glob here... */
806    const char *source; /* if part that emitted this (name) matches this glob */
807    const char *sample_name;
808    const char *tone_name;
809    const char *vibration_name;
810    double      duration;
811    double      speed;
812 
813    struct {
814       const char *part;
815       const char *state; /* if state is not set, we will try with source */
816    } filter; /* the part filter.part should be in state filter.state for signal to be accepted */
817 
818    struct {
819       double   from;
820       double   range;
821    } in;
822 
823    const char *seat; /* which seat to focus, NULL = default seat */
824 
825    const char *state; /* what state of alternates to apply, NULL = default */
826    const char *state2; /* what other state to use - for signal emit action */
827    double      value; /* value of state to apply (if multiple names match) */
828    double      value2; /* other value for drag actions */
829 
830    Eina_List  *targets; /* list of target parts to apply the state to */
831    Eina_List  *after; /* list of actions to run at the end of this, for looping */
832 
833    struct {
834       const char *name;
835       const char *description;
836    } api;
837 
838    int         vibration_repeat;
839    int         action; /* type - set state, stop action, set drag pos etc. */
840 
841    /* used for PARAM_COPY (param names in state and state2 above!) */
842    struct {
843       int src; /* part where parameter is being retrieved */
844       int dst; /* part where parameter is being stored */
845    } param;
846 
847    struct {
848       int      mode; /* how to tween - linear, sinusoidal etc. */
849       FLOAT_T  time; /* time to graduate between current and new state */
850       FLOAT_T  v1; /* other value for drag actions */
851       FLOAT_T  v2; /* other value for drag actions */
852       FLOAT_T  v3; /* other value for drag actions */
853       FLOAT_T  v4; /* other value for drag actions */
854       Eina_Bool use_duration_factor; /* use duration factor or not */
855    } tween;
856 
857 #ifdef HAVE_EPHYSICS
858    /* used for actions related to physics, as physics impulses and forces */
859    struct {
860       double w;
861       double x;
862       double y;
863       double z;
864    } physics;
865 #endif
866    unsigned char channel;
867    Eina_Bool exec : 1;
868 };
869 
870 struct _Edje_Program_Target /* the target of an action */
871 {
872    int id; /* just the part id no, or action id no */
873 };
874 
875 struct _Edje_Program_After /* the action to run after another action */
876 {
877    int id;
878 };
879 
880 /*----------*/
881 struct _Edje_Limit
882 {
883    const char *name;
884    int value;
885 };
886 
887 /*----------*/
888 #define PART_TYPE_FIELDS(TYPE)    \
889       TYPE      RECTANGLE;        \
890       TYPE      TEXT;             \
891       TYPE      IMAGE;            \
892       TYPE      PROXY;            \
893       TYPE      SWALLOW;          \
894       TYPE      TEXTBLOCK;        \
895       TYPE      GROUP;            \
896       TYPE      BOX;              \
897       TYPE      TABLE;            \
898       TYPE      SPACER;           \
899       TYPE      EXTERNAL;         \
900       TYPE      SNAPSHOT;         \
901       TYPE      VECTOR;
902 
903 typedef struct _Edje_Part_Collection_Directory_Entry_Mp Edje_Part_Collection_Directory_Entry_Mp;
904 
905 struct _Edje_Part_Collection_Directory_Entry_Mp
906 {
907    struct
908    {
909       PART_TYPE_FIELDS(Eina_Mempool *)
910       Eina_Mempool *part;
911    } mp;
912 
913    struct
914    {
915       PART_TYPE_FIELDS(Eina_Mempool *)
916    } mp_rtl; /* For Right To Left interface */
917 };
918 
919 struct _Edje_Part_Collection_Directory_Entry
920 {
921    const char *entry; /* the nominal name of the part collection */
922    Edje_Part_Collection *ref;
923 
924    Edje_Part_Collection_Directory_Entry_Mp *mp;
925 
926    struct
927    {
928       PART_TYPE_FIELDS(int)
929       int      part;
930    } count;
931 
932    int         id; /* the id of this named part collection */
933 
934    Eina_Bool group_alias;
935 };
936 
937 /*----------*/
938 
939 /*----------*/
940 
941 struct _Edje_Pack_Element
942 {
943    Edje_Real_Part  *parent; /* pointer to the table/box that hold it, set at runtime */
944    const char      *name; /* if != NULL, will be set with evas_object_name_set */
945    const char      *source; /* group name to use as source for this element */
946    const char      *options; /* extra options for custom objects */
947    Edje_Size        min, prefer, max;
948    struct {
949       int l, r, t, b;
950    } padding;
951    struct {
952       int w, h;
953    } spread;
954    Edje_Alignment   align;
955    Edje_Alignment   weight;
956    Edje_Aspect      aspect;
957    /* table specific follows */
958    int              col, row;
959    unsigned short   colspan, rowspan;
960    unsigned char    type; /* only GROUP supported for now */
961 };
962 
963 struct _Edje_Physics_Face
964 {
965    const char      *source; /* group name to use as source for this element */
966    unsigned char    type; /* BOX_FRONT BOX_BACK BOX_RIGHT CYLINDER_BACK ... */
967 };
968 
969 typedef enum {
970   EDJE_PART_LIMIT_UNKNOWN = 0,
971   EDJE_PART_LIMIT_BELOW,
972   EDJE_PART_LIMIT_ZERO,
973   EDJE_PART_LIMIT_OVER
974 } Edje_Part_Limit_State;
975 
976 typedef enum {
977   EDJE_STATE_LIMIT_NONE   = 0,
978   EDJE_STATE_LIMIT_WIDTH  = 1,
979   EDJE_STATE_LIMIT_HEIGHT = 2,
980   EDJE_STATE_LIMIT_BOTH   = 3,
981   EDJE_STATE_LIMIT_LAST   = 4
982 } Edje_Edit_State_Limit;
983 
984 #ifdef HAVE_EPHYSICS
985 typedef enum {
986   EDJE_PART_PHYSICS_BODY_NONE= 0,
987   EDJE_PART_PHYSICS_BODY_RIGID_BOX,
988   EDJE_PART_PHYSICS_BODY_RIGID_SPHERE,
989   EDJE_PART_PHYSICS_BODY_RIGID_CYLINDER,
990   EDJE_PART_PHYSICS_BODY_SOFT_BOX,
991   EDJE_PART_PHYSICS_BODY_SOFT_SPHERE,
992   EDJE_PART_PHYSICS_BODY_SOFT_CYLINDER,
993   EDJE_PART_PHYSICS_BODY_CLOTH,
994   EDJE_PART_PHYSICS_BODY_BOUNDARY_TOP,
995   EDJE_PART_PHYSICS_BODY_BOUNDARY_BOTTOM,
996   EDJE_PART_PHYSICS_BODY_BOUNDARY_RIGHT,
997   EDJE_PART_PHYSICS_BODY_BOUNDARY_LEFT,
998   EDJE_PART_PHYSICS_BODY_BOUNDARY_FRONT,
999   EDJE_PART_PHYSICS_BODY_BOUNDARY_BACK
1000 } Edje_Part_Physics_Body;
1001 #endif
1002 
1003 struct _Edje_Part_Limit
1004 {
1005    int part;
1006 
1007    Edje_Part_Limit_State width; /* -1, 0 or 1 */
1008    Edje_Part_Limit_State height; /* -1, 0, or 1 */
1009 };
1010 
1011 struct _Edje_Signals_Sources_Patterns
1012 {
1013    EINA_REFCOUNT;
1014    Edje_Patterns *signals_patterns;
1015    Edje_Patterns *sources_patterns;
1016 
1017    Eina_Rbtree   *exact_match;
1018 
1019    union {
1020       struct {
1021 	 Edje_Program **globing;
1022 	 unsigned int  count;
1023       } programs;
1024       struct {
1025          Eina_Inarray   globing;
1026       } callbacks;
1027    } u;
1028 };
1029 
1030 struct _Edje_Signal_Callback_Match
1031 {
1032    const char     *signal;
1033    const char     *source;
1034    union {
1035       Edje_Signal_Cb  legacy;
1036       EflLayoutSignalCb eo;
1037    };
1038 };
1039 
1040 struct _Edje_Signal_Callback_Matches
1041 {
1042    Edje_Signal_Callback_Match *matches;
1043    Eina_Free_Cb *free_cb;
1044 
1045    Edje_Signals_Sources_Patterns *patterns;
1046 
1047    unsigned int matches_count;
1048    EINA_REFCOUNT;
1049 
1050    Eina_Bool hashed : 1;
1051 };
1052 
1053 struct _Edje_Signal_Callback_Flags
1054 {
1055    Eina_Bool legacy:1;
1056    Eina_Bool delete_me:1;
1057    Eina_Bool just_added:1;
1058    Eina_Bool propagate:1;
1059 };
1060 
1061 struct _Edje_Signal_Callback_Group
1062 {
1063    const Edje_Signal_Callback_Matches *matches;
1064 
1065    void **custom_data;
1066 
1067    Edje_Signal_Callback_Flags *flags;
1068 };
1069 
1070 /*----------*/
1071 
1072 struct _Edje_Part_Collection
1073 {
1074    Edje_Part **parts; /* an array of Edje_Part */
1075    Eina_Hash *data;
1076 
1077    Eina_Hash *alias; /* aliasing part */
1078    Eina_Hash *aliased; /* invert match of alias */
1079 
1080    Embryo_Program   *script; /* all the embryo script code for this group */
1081    const char       *part;
1082 
1083 #ifdef EDJE_PROGRAM_CACHE
1084    struct {
1085       Eina_Hash                   *no_matches;
1086       Eina_Hash                   *matches;
1087    } prog_cache;
1088 #endif
1089 
1090    struct { /* list of Edje_Program */
1091       Edje_Program **fnmatch; /* complex match with "*?[\" */
1092       Edje_Program **strcmp; /* No special caractere, plain strcmp does the work */
1093       Edje_Program **strncmp; /* Finish by * or ?, plain strncmp does the work */
1094       Edje_Program **strrncmp; /* Start with * or ?, reverse strncmp will do the job */
1095       Edje_Program **nocmp; /* Empty signal/source that will never match */
1096 
1097       unsigned int fnmatch_count;
1098       unsigned int strcmp_count;
1099       unsigned int strncmp_count;
1100       unsigned int strrncmp_count;
1101       unsigned int nocmp_count;
1102       unsigned int total_count;
1103    } programs;
1104 
1105    struct { /* list of limit that need to be monitored */
1106       Edje_Limit **vertical;
1107       Edje_Limit **horizontal;
1108       Edje_Part_Limit *parts;
1109 
1110       unsigned int vertical_count;
1111       unsigned int horizontal_count;
1112       unsigned int parts_count;
1113    } limits;
1114 
1115    unsigned int parts_count;
1116    int          id; /* the collection id */
1117    int          references;
1118 
1119    struct {
1120       Eina_Size2D min, max;
1121       unsigned char orientation;
1122    } prop;
1123 
1124 
1125 #ifdef HAVE_EPHYSICS
1126    struct {
1127       struct {
1128          double rate;
1129          Evas_Coord z;
1130          Evas_Coord depth;
1131          struct {
1132               Evas_Coord x;
1133               Evas_Coord y;
1134               Evas_Coord z;
1135          } gravity;
1136       } world;
1137    } physics;
1138 #endif
1139 
1140    /* *** generated at runtime *** */
1141    struct {
1142       Edje_Signals_Sources_Patterns programs;
1143 
1144       Edje_Program **table_programs;
1145       int            table_programs_size;
1146    } patterns;
1147    /* *** *** */
1148 
1149    unsigned char    lua_script_only;
1150    unsigned char    broadcast_signal;
1151    unsigned char    physics_enabled; /* will be 1 if a body is declared */
1152    unsigned char    script_recursion; /* permits unsafe Embryo->EDC->Embryo scripting */
1153    unsigned char    use_custom_seat_names;
1154    unsigned char    checked : 1;
1155    unsigned char    need_seat : 1; /* will be one when the collection use seat in any of its part */
1156 };
1157 
1158 struct _Edje_Part_Dragable
1159 {
1160    int                 step_x; /* drag jumps n pixels (0 = no limit) */
1161    int                 step_y; /* drag jumps n pixels (0 = no limit) */
1162 
1163    int                 count_x; /* drag area divided by n (0 = no limit) */
1164    int                 count_y; /* drag area divided by n (0 = no limit) */
1165 
1166    int                 confine_id; /* dragging within this bit, -1 = no */
1167    int                 threshold_id; /* dragging outside this bit, -1 = no */
1168 
1169    /* davinchi */
1170    int                 event_id; /* If it is used as scrollbar */
1171 
1172    signed char         x; /* can u click & drag this bit in x dir */
1173    signed char         y; /* can u click & drag this bit in y dir */
1174 };
1175 
1176 struct _Edje_Part_Api
1177 {
1178    const char         *name;
1179    const char         *description;
1180 };
1181 
1182 typedef struct _Edje_Part_Description_List Edje_Part_Description_List;
1183 struct _Edje_Part_Description_List
1184 {
1185    Edje_Part_Description_Common **desc;
1186    Edje_Part_Description_Common **desc_rtl; /* desc for Right To Left interface */
1187    unsigned int desc_count;
1188 };
1189 
1190 struct _Edje_Part
1191 {
1192    const char                   *name; /* the name if any of the part */
1193    Edje_Part_Description_Common *default_desc; /* the part descriptor for default */
1194    Edje_Part_Description_Common *default_desc_rtl; /* default desc for Right To Left interface */
1195 
1196    Edje_Part_Description_List    other; /* other possible descriptors */
1197 
1198    const char            *source, *source2, *source3, *source4, *source5, *source6;
1199    int                    id; /* its id number */
1200    int                    clip_to_id; /* the part id to clip this one to */
1201    Edje_Part_Dragable     dragable;
1202    Edje_Pack_Element    **items; /* packed items for box and table */
1203    Evas_Event_Flags       ignore_flags;
1204    Evas_Event_Flags       mask_flags;
1205    unsigned int           items_count;
1206    Edje_Part_Api          api;
1207    Edje_Part_Allowed_Seat **allowed_seats;
1208    unsigned int           allowed_seats_count;
1209    unsigned char          type; /* what type (image, rect, text) */
1210 #ifdef HAVE_EPHYSICS
1211    unsigned char          physics_body; /* body (none, rigid box, soft circle, ...) */
1212 #endif
1213    unsigned char          effect; /* 0 = plain... */
1214    unsigned char          mouse_events; /* it will affect/respond to mouse events */
1215    unsigned char          repeat_events; /* it will repeat events to objects below */
1216    unsigned char          anti_alias;
1217    unsigned char          scale; /* should certain properties scale with edje scale factor? */
1218    unsigned char          precise_is_inside;
1219    unsigned char          use_alternate_font_metrics;
1220    unsigned char          pointer_mode;
1221    unsigned char          entry_mode;
1222    unsigned char          select_mode;
1223    unsigned char          cursor_mode;
1224    unsigned char          multiline;
1225    unsigned char          access; /* it will be used accessibility feature */
1226    unsigned char          nested_children_count;
1227    unsigned char          no_render; /* for proxy sources and masks, since 1.15 */
1228    unsigned char          required; /* required part, since 1.18 */
1229 };
1230 
1231 struct _Edje_Part_Image_Id
1232 {
1233    int id;
1234    Eina_Bool set;
1235 };
1236 
1237 struct _Edje_Part_Description_Common
1238 {
1239    struct {
1240       double         value; /* the value of the state (for ranges) */
1241       const char    *name; /* the named state if any */
1242    } state;
1243 
1244    Edje_Alignment align; /* 0 <-> 1.0 alignment within allocated space */
1245 
1246    struct {
1247       unsigned char  w, h; /* width or height is fixed in side (cannot expand with Edje object size) */
1248    } fixed;
1249 
1250    struct { // only during recalc
1251       unsigned char have;
1252       FLOAT_T w, h;
1253    } minmul;
1254 
1255    Edje_Size min, max;
1256    Edje_Position step; /* size stepping by n pixels, 0 = none */
1257    Edje_Aspect_Prefer aspect;
1258 
1259    const char      *color_class; /* how to modify the color */
1260    const char       *size_class;
1261 
1262    Edje_Color color;
1263    Edje_Color color2;
1264 
1265    int        clip_to_id; /* state clip override @since 1.15 */
1266 
1267    struct {
1268       FLOAT_T        relative_x;
1269       FLOAT_T        relative_y;
1270       int            offset_x;
1271       int            offset_y;
1272       int            id_x; /* -1 = whole part collection, or part ID */
1273       int            id_y; /* -1 = whole part collection, or part ID */
1274    } rel1, rel2;
1275 
1276    struct {
1277       int id_persp;
1278       int id_light;
1279       struct {
1280          int id_center;
1281          FLOAT_T x, y, z;
1282       } rot;
1283       struct {
1284          FLOAT_T x, y;
1285          int id_center;
1286       } zoom;
1287       Edje_Map_Color **colors;    /* List of the Edje_Map_Color */
1288       unsigned int colors_count;
1289       Eina_Bool backcull;
1290       Eina_Bool on;
1291       Eina_Bool persp_on;
1292       Eina_Bool smooth;
1293       Eina_Bool alpha;
1294    } map;
1295 
1296    struct {
1297       int zplane;
1298       int focal;
1299    } persp;
1300 
1301 #ifdef HAVE_EPHYSICS
1302    // XXX: the eblow struct SHOULD be optional -ie a pointer to a sub struct
1303    // XXX: but due to eet encoding we can't do that, but just note this for
1304    // XXX: the future to come up with a way to do this
1305    struct {
1306       double mass;
1307       double restitution;
1308       double friction;
1309       double density;
1310       double hardness;
1311       struct {
1312          double linear;
1313          double angular;
1314       } damping;
1315       struct {
1316          double linear;
1317          double angular;
1318       } sleep;
1319       int z;
1320       int depth;
1321       Eina_List *faces; /* faces for 3d effects */
1322       struct {
1323          struct {
1324             unsigned char x;
1325             unsigned char y;
1326             unsigned char z;
1327          } lin;
1328          struct {
1329             unsigned char x;
1330             unsigned char y;
1331             unsigned char z;
1332          } ang;
1333       } mov_freedom;
1334       unsigned char backcull;
1335       unsigned char material; /* (custom, iron, wood, ...) */
1336       unsigned char light_on;
1337       unsigned char ignore_part_pos;
1338    } physics;
1339 #endif
1340 
1341    unsigned char     visible; /* is it shown */
1342    unsigned char     limit; /* 0 == no, 1 = width, 2 = height, 3 = both */
1343    unsigned char     no_render; /* no_render override @since 1.19 */
1344    unsigned char     offset_is_scaled;
1345 
1346    struct {
1347       Eina_Bool fixed;
1348    } user_set;
1349 };
1350 
1351 struct _Edje_Part_Description_Spec_Fill
1352 {
1353    FLOAT_T        pos_rel_x; /* fill offset x relative to area */
1354    FLOAT_T        rel_x; /* relative size compared to area */
1355    FLOAT_T        pos_rel_y; /* fill offset y relative to area */
1356    FLOAT_T        rel_y; /* relative size compared to area */
1357    int            pos_abs_x; /* fill offset x added to fill offset */
1358    int            abs_x; /* size of fill added to relative fill */
1359    int            pos_abs_y; /* fill offset y added to fill offset */
1360    int            abs_y; /* size of fill added to relative fill */
1361    char           smooth; /* fill with smooth scaling or not */
1362    unsigned char  type; /* fill coordinate from container (SCALE) or from source image (TILE) */
1363 };
1364 
1365 struct _Edje_Part_Description_Spec_Border
1366 {
1367    int            l, r, t, b; /* border scaling on image fill */
1368    unsigned char  no_fill; /* do we fill the center of the image if bordered? 1 == NO!!!! */
1369    unsigned char  scale; /* scale image border by same as scale factor */
1370    FLOAT_T        scale_by; /* when border scale above is enabled, border width OUTPUT is scaled by the object or global scale factor. this value adds another multiplier that the global scale is multiplued by first. if <= 0.0 it is not used, and if 1.0 it i s "ineffective" */
1371 };
1372 
1373 struct _Edje_Part_Description_Spec_Filter_Data
1374 {
1375    Eina_Stringshare *name;
1376    Eina_Stringshare *value;
1377    // below data not in edj
1378    Eina_Bool         invalid_cc : 1;
1379 };
1380 
1381 struct _Edje_Part_Description_Spec_Filter
1382 {
1383    const char    *code;
1384    const char    *name;
1385    Eina_List     *sources; /* "part" or "buffer:part" */
1386    Edje_Part_Description_Spec_Filter_Data *data; /* array */
1387    unsigned int   data_count;
1388    // below data not in edj
1389    Eina_Bool      checked_data : 1; // checked whether this is a data item or embedded string
1390    Eina_Bool      sources_set : 1;
1391    Eina_Bool      no_free : 1;
1392 };
1393 
1394 struct _Edje_Part_Description_Spec_Image
1395 {
1396    Edje_Part_Description_Spec_Fill   fill;
1397 
1398    Edje_Part_Image_Id **tweens; /* list of Edje_Part_Image_Id */
1399    unsigned int         tweens_count; /* number of tweens */
1400 
1401    int            id; /* the image id to use */
1402    int            scale_hint; /* evas scale hint */
1403    Eina_Bool      set; /* if image condition it's content */
1404 
1405    Edje_Part_Description_Spec_Border border;
1406 };
1407 
1408 struct _Edje_Part_Description_Spec_Proxy
1409 {
1410    Edje_Part_Description_Spec_Fill   fill;
1411 
1412    int id; /* the part id to use as a source for this state */
1413    Eina_Bool source_visible;  /* source object visibility */
1414    Eina_Bool source_clip;     /* source object clip */
1415 };
1416 
1417 struct _Edje_Part_Description_Spec_Text
1418 {
1419    char          *domain;
1420    char          *text_class; /* how to apply/modify the font */
1421    Edje_String    text; /* if "" or NULL, then leave text unchanged */
1422    Edje_String    style; /* the text style if a textblock */
1423    Edje_String    font; /* if a specific font is asked for */
1424    Edje_String    repch; /* replacement char for password mode entry */
1425 
1426    Edje_Alignment align; /* text alignment within bounds */
1427    Edje_Color     color3;
1428 
1429    double         ellipsis; /* 0.0 - 1.0 defining where the ellipsis align */
1430    char          *id_source_part;
1431    char          *id_text_source_part;
1432    int            size; /* 0 = use user set size */
1433    int            id_source; /* -1 if none */
1434    int            id_text_source; /* -1 if none */
1435    int            size_range_min;
1436    int            size_range_max; /* -1 means, no bound. */
1437    unsigned int   fit_step;
1438    /*FIXME THIS SHOULD BE EINA_LIST*/
1439    Eina_List     *fit_size_array;
1440 
1441    unsigned char  fit_x; /* resize font size down to fit in x dir */
1442    unsigned char  fit_y; /* resize font size down to fit in y dir */
1443    unsigned char  min_x; /* if text size should be part min size */
1444    unsigned char  min_y; /* if text size should be part min size */
1445    unsigned char  max_x; /* if text size should be part max size */
1446    unsigned char  max_y; /* if text size should be part max size */
1447 };
1448 
1449 struct _Edje_Part_Description_Spec_Box
1450 {
1451    char          *layout, *alt_layout;
1452    Edje_Alignment align;
1453    struct {
1454       int x, y;
1455    } padding;
1456    struct {
1457       unsigned char h, v;
1458    } min;
1459 };
1460 
1461 struct _Edje_Part_Description_Spec_Table
1462 {
1463    unsigned char  homogeneous;
1464    Edje_Alignment align;
1465    struct {
1466       int x, y;
1467    } padding;
1468    struct {
1469       unsigned char h, v;
1470    } min;
1471 };
1472 
1473 struct _Edje_Part_Description_Spec_Svg
1474 {
1475    int                   id; /* the svg id to use */
1476    Eina_Bool             set; /* if vg condition it's content */
1477    Edje_Vector_File_Type type;
1478    double                frame;
1479 };
1480 
1481 struct _Edje_Part_Description_Image
1482 {
1483    Edje_Part_Description_Common common;
1484    Edje_Part_Description_Spec_Image image;
1485    Edje_Part_Description_Spec_Filter filter;
1486 };
1487 
1488 struct _Edje_Part_Description_Proxy
1489 {
1490    Edje_Part_Description_Common common;
1491    Edje_Part_Description_Spec_Proxy proxy;
1492    Edje_Part_Description_Spec_Filter filter;
1493 };
1494 
1495 struct _Edje_Part_Description_Snapshot
1496 {
1497    Edje_Part_Description_Common common;
1498    Edje_Part_Description_Spec_Filter filter;
1499 };
1500 
1501 struct _Edje_Part_Description_Text
1502 {
1503    Edje_Part_Description_Common common;
1504    Edje_Part_Description_Spec_Text text;
1505    Edje_Part_Description_Spec_Filter filter;
1506 };
1507 
1508 struct _Edje_Part_Description_Box
1509 {
1510    Edje_Part_Description_Common common;
1511    Edje_Part_Description_Spec_Box box;
1512 };
1513 
1514 struct _Edje_Part_Description_Table
1515 {
1516    Edje_Part_Description_Common common;
1517    Edje_Part_Description_Spec_Table table;
1518 };
1519 
1520 struct _Edje_Part_Description_External
1521 {
1522    Edje_Part_Description_Common common;
1523    Eina_List *external_params; /* parameters for external objects */
1524 };
1525 
1526 struct _Edje_Part_Description_Vector
1527 {
1528    Edje_Part_Description_Common common;
1529    Edje_Part_Description_Spec_Svg vg;
1530 };
1531 
1532 struct _Edje_Part_Allowed_Seat
1533 {
1534    const char *name;
1535 };
1536 
1537 
1538 /*----------*/
1539 
1540 struct _Edje_Signal_Source_Char
1541 {
1542    EINA_RBTREE;
1543 
1544    const char *signal;
1545    const char *source;
1546 
1547    Eina_Inarray  list;
1548 };
1549 
1550 struct _Edje
1551 {
1552    EINA_INLIST;
1553 
1554    struct {
1555       Evas_Object       *clipper;
1556       Evas              *evas;
1557    } base;
1558    const char           *path;
1559    const char           *group;
1560    const char           *parent;
1561    const char           *language;
1562 
1563    Evas_Object          *obj; /* the smart object */
1564    Edje_File            *file; /* the file the data comes form */
1565    Edje_Part_Collection *collection; /* the description being used */
1566    Eina_List            *actions; /* currently running actions */
1567    Eina_List            *pending_actions;
1568    Eina_Hash            *color_classes;
1569    Eina_Hash            *text_classes;
1570    Eina_Hash            *size_classes;
1571    /* variable pool for Edje Embryo scripts */
1572    Edje_Var_Pool        *var_pool;
1573    /* for faster lookups to avoid nth list walks */
1574    Edje_Real_Part      **table_parts;
1575    Eina_List            *seats;
1576    Eina_List            *subobjs;
1577    Eina_List            *text_insert_filter_callbacks;
1578    Eina_List            *markup_filter_callbacks;
1579 
1580    Eina_List            *groups;
1581 
1582    Eina_Hash            *styles;
1583    Edje_Perspective     *persp;
1584 
1585    Ecore_Animator       *animator;
1586 
1587    const Edje_Signal_Callback_Group *callbacks;
1588 
1589    struct {
1590       Edje_Text_Change_Cb  func;
1591       void                *data;
1592    } text_change;
1593 
1594    struct {
1595       Edje_Message_Handler_Cb  func;
1596       void                    *data;
1597       int                      num;
1598    } message;
1599 
1600    struct {
1601       Edje_Item_Provider_Cb  func;
1602       void                  *data;
1603    } item_provider;
1604 
1605 #ifdef HAVE_EPHYSICS
1606    EPhysics_World       *world;
1607 #endif
1608    double                duration_scale;
1609    double                paused_at;
1610    Eina_Hash            *user_defined;
1611    lua_State            *L;
1612    Eina_Inlist          *lua_objs;
1613 
1614    Eina_Inlist          *messages;
1615 
1616    int                   lua_ref;
1617    int                   processing_messages;
1618    int                   references;
1619 
1620    FLOAT_T               scale;
1621 
1622    Evas_Coord            x, y, w, h;
1623    Edje_Size             min;
1624 
1625    unsigned short        table_parts_size;
1626    unsigned short        preload_count;
1627 
1628    unsigned short        walking_callbacks;
1629    unsigned short        freeze;
1630 
1631    unsigned short        block;
1632    unsigned short        state;
1633 
1634    unsigned short        seats_count;
1635 
1636    unsigned char         load_error;
1637 
1638    Eina_Bool          is_rtl : 1;
1639    Eina_Bool          dirty : 1;
1640    Eina_Bool          recalc : 1;
1641    Eina_Bool          delete_callbacks : 1;
1642    Eina_Bool          just_added_callbacks : 1;
1643    Eina_Bool          have_objects : 1;
1644    Eina_Bool          paused : 1;
1645    Eina_Bool          no_anim : 1;
1646 
1647    Eina_Bool          calc_only : 1;
1648    Eina_Bool          walking_actions : 1;
1649    Eina_Bool          block_break : 1;
1650    Eina_Bool          delete_me : 1;
1651    Eina_Bool          freeze_calc : 1;
1652    Eina_Bool          has_entries : 1;
1653    Eina_Bool          entries_inited : 1;
1654 
1655    Eina_Bool          have_mapped_part : 1;
1656    Eina_Bool          recalc_call : 1;
1657    Eina_Bool          update_hints : 1;
1658    Eina_Bool          recalc_hints : 1;
1659    Eina_Bool          need_map_update : 1;
1660    Eina_Bool          canvas_animator : 1;
1661    Eina_Bool          has_state_clip : 1;
1662    Eina_Bool          has_recalc_event_cb : 1;
1663 
1664    Eina_Bool          has_content_change_event_cb : 1;
1665    Eina_Bool          need_seat : 1; /* Will be true when an event handler that expect seat is registered on the object. */
1666 #ifdef EDJE_CALC_CACHE
1667    Eina_Bool          text_part_change : 1;
1668    Eina_Bool          all_part_change : 1;
1669 #endif
1670    Eina_Bool          has_size : 1;
1671 };
1672 
1673 struct _Edje_Calc_Params_Map
1674 {
1675    struct {
1676       int x, y, z;
1677    } center; // 12
1678    struct {
1679       int x, y;
1680    } zoom_center; // 12
1681    struct {
1682       FLOAT_T x, y, z;
1683    } rotation; // 24
1684    struct {
1685       int x, y, z;
1686       int r, g, b;
1687       int ar, ag, ab;
1688    } light; // 36
1689    struct {
1690       int x, y, z;
1691       int focal;
1692    } persp; // 16
1693    struct {
1694       FLOAT_T x, y;
1695    } zoom; //16
1696    Edje_Map_Color **colors;
1697    unsigned int colors_count;
1698 };
1699 
1700 struct _Edje_Calc_Params_Physics
1701 {
1702    double mass; // 8
1703    double restitution; // 8
1704    double friction; // 8
1705    double density; // 8
1706    double hardness; // 8
1707    struct {
1708       double linear; //8
1709       double angular; //8
1710    } damping; // 16
1711    struct {
1712       double linear; //8
1713       double angular; //8
1714    } sleep; // 16
1715    int z; // 4
1716    int depth; // 4
1717    struct {
1718       struct {
1719          unsigned char x;
1720          unsigned char y;
1721          unsigned char z;
1722       } lin; // 3
1723       struct {
1724          unsigned char x;
1725          unsigned char y;
1726          unsigned char z;
1727       } ang; // 3
1728    } mov_freedom; // 6
1729    unsigned char backcull;
1730    unsigned char material; // 1
1731    unsigned char light_on; // 1
1732    unsigned char ignore_part_pos; //1
1733 };
1734 
1735 typedef struct _Edje_Calc_Params_Type_Common Edje_Calc_Params_Type_Common;
1736 typedef struct _Edje_Calc_Params_Type_Text Edje_Calc_Params_Type_Text;
1737 
1738 struct _Edje_Calc_Params_Type_Common
1739 {
1740    Eina_Rectangle fill; // 16
1741    union {
1742       struct {
1743          unsigned short l, r, t, b; // 8
1744          FLOAT_T        border_scale_by; // 8
1745       } image; // 16
1746    } spec; // 16
1747 }; // 32
1748 
1749 struct _Edje_Calc_Params_Type_Text
1750 {
1751    Edje_Alignment align; /* text alignment within bounds */ // 16
1752    double         ellipsis; // 8
1753    int            size; // 4
1754    Edje_Color     color2, color3; // 8
1755 }; // 36
1756 
1757 typedef struct _Edje_Calc_Params_Ext Edje_Calc_Params_Ext;
1758 
1759 struct _Edje_Calc_Params_Ext
1760 {
1761    Edje_Rectangle                  req_drag; // 16
1762    const Edje_Calc_Params_Map     *map; // 4/8
1763 #ifdef HAVE_EPHYSICS
1764    const Edje_Calc_Params_Physics *physics; // 4/8
1765 #endif
1766    Edje_Real_Part                 *clip_to; /* clip override @since 1.15 */ // 4/8
1767 };
1768 
1769 struct _Edje_Calc_Params
1770 {
1771    union {
1772       Edje_Calc_Params_Type_Common *common;
1773       Edje_Calc_Params_Type_Text *text;
1774    } type; // 4/8
1775    Edje_Calc_Params_Ext *ext; // 4/8
1776    struct {
1777       FLOAT_T       x, y, w, h; // 32
1778    } eval;
1779    Edje_Rectangle   final; // 16
1780    Edje_Rectangle   req; // 16
1781    Edje_Color       color; // 4
1782    unsigned char    persp_on : 1;
1783    unsigned char    lighted : 1;
1784    unsigned char    mapped : 1;
1785    unsigned char    visible : 1;
1786    unsigned char    smooth : 1; // 1
1787    unsigned char    no_render : 1;
1788    unsigned char    no_render_apply : 1;
1789 }; // 77/85(rounded up for alignment: 80/88)
1790 
1791 struct _Edje_Real_Part_Set
1792 {
1793   Edje_Image_Directory_Set_Entry *entry; // 4
1794   Edje_Image_Directory_Set       *set; // 4
1795 
1796   int                             id; // 4
1797 };
1798 
1799 struct _Edje_Real_Part_State
1800 {
1801    Edje_Part_Description_Common *description; // 4
1802    Edje_Part_Description_Common *description_rtl; // 4
1803    void                  *external_params; // 4
1804    Edje_Real_Part_Set    *set; // 4
1805 #ifdef EDJE_CALC_CACHE
1806    int                    state; // 4
1807    Edje_Calc_Params       p; // 271
1808 #endif
1809 }; // 32
1810 // WITH EDJE_CALC_CACHE 307
1811 
1812 struct _Edje_Real_Part_Drag
1813 {
1814    Edje_Real_Part       *confine_to; // 4
1815    Edje_Real_Part       *threshold; // 4
1816    FLOAT_T		 x, y; // 16
1817    Edje_Position_Scale	 val, size, step, page; // 64
1818    struct {
1819       unsigned int	 count; // 4
1820       int		 x, y; // 8
1821    } down;
1822    struct {
1823       int		 x, y; // 8
1824    } tmp;
1825    Eina_Bool             need_reset : 1; // 4
1826    Eina_Bool             threshold_started_x : 1;
1827    Eina_Bool             threshold_started_y : 1;
1828    Eina_Bool             threshold_x : 1;
1829    Eina_Bool             threshold_y : 1;
1830    Eina_Bool             started : 1;
1831 }; // 104
1832 
1833 #define EDJE_RP_TYPE_NONE 0
1834 #define EDJE_RP_TYPE_TEXT 1
1835 #define EDJE_RP_TYPE_CONTAINER 2
1836 #define EDJE_RP_TYPE_SWALLOW 3
1837 #define EDJE_RP_TYPE_VECTOR 4
1838 
1839 struct _Edje_Real_Part_Text
1840 {
1841    void                  *entry_data; // 4
1842    Edje_Real_Part        *source; // 4
1843    Edje_Real_Part        *text_source; // 4
1844    const char            *text; // 4
1845    const char            *font; // 4
1846    const char            *style; // 4
1847    Edje_Position          offset; // 8
1848    short                  size; // 2
1849    Efl_Canvas_Layout_Part_Text_Expand expand;
1850    struct {
1851       unsigned char       fit_x, fit_y; // 2
1852       short               in_size; // 2
1853       short               out_size; // 2
1854       float               ellipsis; // 4
1855       Evas_Coord          in_w, in_h; // 8
1856       const char         *in_str; // 4
1857       const char         *out_str; // 4
1858       const char         *in_font; // 4
1859       FLOAT_T             align_x, align_y; // 16
1860    } cache;
1861    Edje_Part_Description_Spec_Filter filter; // 8
1862 }; // 88
1863 // FIXME make text a potiner to struct and alloc at end
1864 // if part type is TEXT move common members textblock +
1865 // text to front and have smaller struct for textblock
1866 
1867 struct _Edje_Real_Part_Container
1868 {
1869    Eina_List                *items; // 4 //FIXME: only if table/box
1870    Edje_Part_Box_Animation  *anim; // 4 //FIXME: Used only if box
1871 };
1872 
1873 struct _Edje_Real_Part_Swallow
1874 {
1875    Evas_Object        *swallowed_object; // 4 // FIXME: move with swallow_params data
1876    struct {
1877       Edje_Size min, max; // 16
1878       Edje_Aspect aspect; // 12
1879    } swallow_params; // 28 // FIXME: only if type SWALLOW
1880 };
1881 
1882 struct _Edje_Real_Part_Vector
1883 {
1884    Eo        *anim;
1885    Eina_File *lottie_virtual_file;
1886    char      *lottie_data;
1887    int        start_frame;
1888    int        current_id;
1889    Eina_Bool  backward : 1;
1890    Eina_Bool  loop : 1;
1891    Eina_Bool  is_playing : 1;
1892 };
1893 
1894 struct _Edje_Real_Part
1895 {
1896    Edje_Real_Part_State      param1; // 32
1897    Edje_Real_Part_State     *param2, *custom; // 8
1898    Edje_Part                *part; // 4
1899    Evas_Object              *object; // 4
1900    Evas_Object              *nested_smart; // 4
1901    Edje_Real_Part_Drag      *drag; // 4
1902    Edje_Part_Description_Common *chosen_description; // 4
1903    // WITH EDJE_CALC_CACHE: 307
1904    Edje_Running_Program     *program; // 4
1905    Edje_Calc_Params         *current; // 4
1906    Edje_Part_Description_Common *prev_description; // 4
1907 #ifdef HAVE_EPHYSICS
1908    EPhysics_Body            *body; // 4
1909    Eina_List                *body_faces; // 4
1910 #endif
1911    union {
1912       Edje_Real_Part_Text      *text;
1913       Edje_Real_Part_Container *container;
1914       Edje_Real_Part_Swallow   *swallow;
1915       Edje_Real_Part_Vector    *vector;
1916    } typedata; // 4
1917    FLOAT_T                   description_pos; // 8
1918    Edje_Rectangle            req; // 16
1919    union {
1920       struct {
1921          int                 x, y, w, h; // 16
1922       };
1923       Eina_Rectangle         rect;
1924    };
1925    Evas_Object_Pointer_Mode  pointer_mode;
1926 #ifdef EDJE_CALC_CACHE
1927    unsigned short            state; // 2
1928 #endif
1929    char                      clicked_button; // 1
1930    unsigned char             type; // 1
1931    Evas_Event_Flags          ignore_flags;
1932    Evas_Event_Flags          mask_flags;
1933    unsigned char             calculated : 2; // 1
1934    unsigned char             calculating : 2; // 0
1935    Eina_Bool                 still_in   : 1; // 0
1936    unsigned char             mouse_events : 1;
1937    unsigned char             repeat_events : 1;
1938 #ifdef EDJE_CALC_CACHE
1939    Eina_Bool                 invalidate : 1; // 0
1940 #endif
1941 }; // 128
1942 // WITH EDJE_CALC_CACHE: 407
1943 
1944 struct _Edje_Running_Program
1945 {
1946    Edje           *edje;
1947    Edje_Program   *program;
1948    double          start_time;
1949    unsigned short  ref;
1950    Eina_Bool       delete_me : 1;
1951 };
1952 
1953 struct _Edje_Signal_Callback
1954 {
1955    const char	  *signal;
1956    const char	  *source;
1957    Edje_Signal_Cb  func;
1958    void           *data;
1959    Eina_Bool       just_added : 1;
1960    Eina_Bool       delete_me : 1;
1961    Eina_Bool       propagate : 1;
1962 };
1963 
1964 typedef enum
1965 {
1966    EDJE_TEXT_TYPE_NORMAL,
1967    EDJE_TEXT_TYPE_MARKUP,
1968    EDJE_TEXT_TYPE_ESCAPED,
1969    EDJE_TEXT_TYPE_UNESCAPED
1970 } Edje_Text_Type;
1971 
1972 struct _Edje_Text_Insert_Filter_Callback
1973 {
1974    const char  *part;
1975    Edje_Text_Filter_Cb func;
1976    void        *data;
1977 };
1978 
1979 struct _Edje_Markup_Filter_Callback
1980 {
1981    const char  *part;
1982    Edje_Markup_Filter_Cb func;
1983    void        *data;
1984 };
1985 
1986 struct _Edje_Pending_Program
1987 {
1988    Edje         *edje;
1989    Edje_Program *program;
1990    Ecore_Timer  *timer;
1991 };
1992 
1993 struct _Edje_Text_Style
1994 {
1995    struct {
1996       unsigned char x, y;
1997    } offset;
1998    struct {
1999       unsigned char l, r, t, b;
2000    } pad;
2001    int num;
2002    struct {
2003       unsigned char color; /* 0 = color, 1, 2 = color2, color3 */
2004       signed   char x, y; /* offset */
2005       unsigned char alpha;
2006    } members[32];
2007 };
2008 
2009 struct _Edje_Var_Int
2010 {
2011    int      v;
2012 };
2013 
2014 struct _Edje_Var_Float
2015 {
2016    double   v;
2017 };
2018 
2019 struct _Edje_Var_String
2020 {
2021    char    *v;
2022 };
2023 
2024 struct _Edje_Var_List
2025 {
2026    Eina_List *v;
2027 };
2028 
2029 struct _Edje_Var_Hash
2030 {
2031    Eina_Hash *v;
2032 };
2033 
2034 struct _Edje_Var_Timer
2035 {
2036    EINA_INLIST;
2037    Edje           *edje;
2038    int             id;
2039    Embryo_Function func;
2040    int             val;
2041    Ecore_Timer    *timer;
2042 };
2043 
2044 struct _Edje_Var_Animator
2045 {
2046    Edje           *edje;
2047    int             id;
2048    Embryo_Function func;
2049    int             val;
2050    double          start, len;
2051    char            delete_me;
2052 };
2053 
2054 struct _Edje_Var_Pool
2055 {
2056    int          id_count;
2057    Eina_Inlist *timers;
2058    Eina_List   *animators;
2059    int          size;
2060    Edje_Var    *vars;
2061    int          walking_list;
2062 };
2063 
2064 struct _Edje_Var
2065 {
2066    union {
2067       Edje_Var_Int    i;
2068       Edje_Var_Float  f;
2069       Edje_Var_String s;
2070       Edje_Var_List   l;
2071       Edje_Var_Hash   h;
2072    } data;
2073    unsigned char type;
2074 };
2075 
2076 typedef enum _Edje_Queue
2077 {
2078    EDJE_QUEUE_APP,
2079      EDJE_QUEUE_SCRIPT
2080 } Edje_Queue;
2081 
2082 typedef struct _Edje_Message_Signal Edje_Message_Signal;
2083 typedef struct _Edje_Message        Edje_Message;
2084 
2085 typedef struct _Edje_Message_Signal_Data Edje_Message_Signal_Data;
2086 struct _Edje_Message_Signal_Data
2087 {
2088    int ref;
2089    void *data;
2090    void (*free_func)(void *);
2091    void *seat_data;
2092    void (*seat_free_func)(void *);
2093 };
2094 
2095 struct _Edje_Message_Signal
2096 {
2097    const char *sig;
2098    const char *src;
2099    Edje_Message_Signal_Data *data;
2100 };
2101 
2102 struct _Edje_Message
2103 {
2104    Eina_Inlist        inlist_main; // msgq or tmp_msgq - mut exclusive
2105    Eina_Inlist        inlist_edje;
2106    Edje              *edje;
2107    unsigned char     *msg;
2108    int                id;
2109    Eina_Bool          in_tmp_msgq :  1;
2110    Eina_Bool          propagated  :  1;
2111    Edje_Queue         queue       :  2;
2112    Edje_Message_Type  type        : 28;
2113 };
2114 
2115 typedef enum _Edje_Fill
2116 {
2117    EDJE_FILL_TYPE_SCALE = 0,
2118    EDJE_FILL_TYPE_TILE  = 1,
2119    EDJE_FILL_TYPE_LAST  = 2
2120 } Edje_Fill;
2121 
2122 typedef enum _Edje_Match_Error
2123 {
2124    EDJE_MATCH_OK,
2125      EDJE_MATCH_ALLOC_ERROR,
2126      EDJE_MATCH_SYNTAX_ERROR
2127 
2128 } Edje_Match_Error;
2129 
2130 typedef struct _Edje_States     Edje_States;
2131 struct _Edje_Patterns
2132 {
2133    const char    **patterns;
2134 
2135    Edje_States    *states;
2136 
2137    int             ref;
2138    Eina_Bool       delete_me : 1;
2139 
2140    size_t          patterns_size;
2141    size_t          max_length;
2142    unsigned int    finals[];
2143 };
2144 
2145 typedef enum
2146 {
2147   EDJE_PART_TEXT_PROP_NONE =                   0, // never used
2148   EDJE_PART_TEXT_PROP_BACKING_TYPE =           1,
2149   EDJE_PART_TEXT_PROP_COLOR_BACKING =          1 << 2,
2150   EDJE_PART_TEXT_PROP_COLOR_GLOW =             1 << 3,
2151   EDJE_PART_TEXT_PROP_COLOR_GLOW2 =            1 << 4,
2152   EDJE_PART_TEXT_PROP_COLOR_NORMAL =           1 << 5,
2153   EDJE_PART_TEXT_PROP_COLOR_OUTLINE =          1 << 6,
2154   EDJE_PART_TEXT_PROP_COLOR_SHADOW =           1 << 7,
2155   EDJE_PART_TEXT_PROP_COLOR_STRIKETHROUGH =    1 << 8,
2156   EDJE_PART_TEXT_PROP_COLOR_UNDERLINE =        1 << 9,
2157   EDJE_PART_TEXT_PROP_COLOR_UNDERLINE2 =       1 << 10,
2158   EDJE_PART_TEXT_PROP_COLOR_UNDERLINE_DASHED = 1 << 11,
2159   EDJE_PART_TEXT_PROP_EFFECT_TYPE =            1 << 12,
2160   EDJE_PART_TEXT_PROP_ELLIPSIS =               1 << 13,
2161   EDJE_PART_TEXT_PROP_FONT =                   1 << 14,
2162   EDJE_PART_TEXT_PROP_SHADOW_DIRECTION   =     1 << 15,
2163   EDJE_PART_TEXT_PROP_STRIKETHROUGH_TYPE =     1 << 16,
2164   EDJE_PART_TEXT_PROP_UNDERLINE_DASHED_GAP =   1 << 17,
2165   EDJE_PART_TEXT_PROP_UNDERLINE_DASHED_WIDTH = 1 << 18,
2166   EDJE_PART_TEXT_PROP_UNDERLINE_TYPE =         1 << 19,
2167   EDJE_PART_TEXT_PROP_UNDERLINE_HEIGHT =       1 << 20,
2168   EDJE_PART_TEXT_PROP_WRAP =                   1 << 21
2169 } Edje_Part_Text_Prop_Type;
2170 
2171 typedef struct
2172 {
2173   Edje_Part_Text_Prop_Type type;
2174   union
2175   {
2176     int ni; // number integer
2177     int nd; // number double
2178     Efl_Text_Format_Wrap wrap;
2179     Efl_Text_Style_Background_Type backing;
2180     Efl_Text_Style_Underline_Type underline;
2181     struct
2182     {
2183       unsigned char r, g, b, a;
2184     } color;
2185     struct
2186     {
2187       const char *font;
2188       Efl_Font_Size size;
2189     } font;
2190     Efl_Text_Style_Effect_Type effect;
2191     Efl_Text_Style_Shadow_Direction shadow;
2192     Efl_Text_Style_Strikethrough_Type strikethrough_type;
2193     Efl_Text_Style_Underline_Type underline_type;
2194   } val;
2195 } Edje_Part_Text_Prop;
2196 
2197 typedef enum _Edje_User_Defined_Type
2198 {
2199    EDJE_USER_SWALLOW,
2200    EDJE_USER_BOX_PACK,
2201    EDJE_USER_TABLE_PACK,
2202    EDJE_USER_STRING,
2203    EDJE_USER_DRAG_STEP,
2204    EDJE_USER_DRAG_PAGE,
2205    EDJE_USER_DRAG_VALUE,
2206    EDJE_USER_DRAG_SIZE,
2207    EDJE_USER_TEXT_STYLE,
2208    EDJE_USER_TEXT_EXPAND,
2209 } Edje_User_Defined_Type;
2210 
2211 typedef struct _Edje_User_Defined Edje_User_Defined;
2212 struct _Edje_User_Defined
2213 {
2214    Edje_User_Defined_Type type;
2215    const char *part;
2216    Edje *ed;
2217 
2218    union {
2219       struct {
2220          const char *text;
2221          Edje_Text_Type type;
2222       } string;
2223       struct {
2224          Evas_Object *child;
2225       } swallow;
2226       struct {
2227          Evas_Object *child;
2228          int index;
2229       } box;
2230       struct {
2231          Evas_Object *child;
2232          unsigned short col;
2233          unsigned short row;
2234          unsigned short colspan;
2235          unsigned short rowspan;
2236       } table;
2237       struct {
2238          double x, y;
2239       } drag_position;
2240       struct {
2241          double w, h;
2242       } drag_size;
2243       struct {
2244         Eina_List *props;
2245         Edje_Part_Text_Prop_Type types;
2246       } text_style;
2247       struct {
2248         Efl_Canvas_Layout_Part_Text_Expand expand;
2249       } text_expand;
2250    } u;
2251 };
2252 
2253 typedef struct _Edje_Font_List             Edje_Font_List;
2254 typedef struct _Edje_Font                  Edje_Font;
2255 
2256 struct _Edje_Font_List
2257 {
2258    Eina_List *list;
2259 };
2260 
2261 struct _Edje_Font
2262 {
2263    char *name;
2264    char *file;
2265 };
2266 
2267 typedef struct _Edje_Seat Edje_Seat;
2268 struct _Edje_Seat
2269 {
2270    Edje_Real_Part *focused_part;
2271    Efl_Input_Device *device;
2272    Eina_Stringshare *name;
2273 };
2274 
2275 Edje_Patterns   *edje_match_collection_dir_init(const Eina_List *lst);
2276 Edje_Patterns   *edje_match_programs_signal_init(Edje_Program * const *array,
2277 						 unsigned int count);
2278 Edje_Patterns   *edje_match_programs_source_init(Edje_Program * const *array,
2279 						 unsigned int count);
2280 Edje_Patterns   *edje_match_callback_signal_init(const Eina_Inarray *lst,
2281                                                  const Edje_Signal_Callback_Match *matches);
2282 Edje_Patterns   *edje_match_callback_source_init(const Eina_Inarray *lst,
2283                                                  const Edje_Signal_Callback_Match *matches);
2284 
2285 Eina_Bool        edje_match_collection_dir_exec(const Edje_Patterns      *ppat,
2286 						const char               *string);
2287 Eina_Bool        edje_match_programs_exec(const Edje_Patterns    *ppat_signal,
2288 					  const Edje_Patterns    *ppat_source,
2289 					  const char             *signal,
2290 					  const char             *source,
2291 					  Edje_Program          **programs,
2292 					  Eina_Bool (*func)(Edje_Program *pr, void *data),
2293 					  void                   *data,
2294                                           Eina_Bool               prop);
2295 int edje_match_callback_exec(const Edje_Signals_Sources_Patterns *ssp,
2296 			     const Edje_Signal_Callback_Match *matches,
2297 			     const char *sig,
2298 			     const char *source,
2299 			     Edje *ed,
2300 			     Eina_Bool prop);
2301 
2302 void             edje_match_patterns_free(Edje_Patterns *ppat);
2303 
2304 Eina_List *edje_match_program_hash_build(Edje_Program * const * programs,
2305 					 unsigned int count,
2306 					 Eina_Rbtree **tree);
2307 void edje_match_callback_hash_build(const Edje_Signal_Callback_Match *callback,
2308 				    int callbacks_count,
2309 				    Eina_Rbtree **tree,
2310 				    Eina_Inarray *result);
2311 const Eina_Inarray *edje_match_signal_source_hash_get(const char *signal,
2312 						      const char *source,
2313 						      const Eina_Rbtree *tree);
2314 void edje_match_signal_source_free(Edje_Signal_Source_Char *key, void *data);
2315 Eina_Bool _edje_object_signal_callback_add(Evas_Object *obj, Edje *ed,
2316                                            const char *emission, const char *source,
2317                                            Edje_Signal_Cb func_legacy,
2318                                            Efl_Signal_Cb func_eo, Eina_Free_Cb func_free_cb, void *data);
2319 
2320 // FIXME remove below 3 eapi decls when edje_convert goes
2321 EAPI void _edje_edd_init(void);
2322 EAPI void _edje_data_font_list_desc_make(Eet_Data_Descriptor **_font_list_edd, Eet_Data_Descriptor **_font_edd);
2323 EAPI void _edje_edd_shutdown(void);
2324 
2325 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_file;
2326 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_part_collection;
2327 
2328 extern Eina_Inlist     *_edje_edjes;
2329 
2330 extern char            *_edje_fontset_append;
2331 extern char            *_edje_fontset_append_escaped;
2332 extern FLOAT_T          _edje_scale;
2333 extern int              _edje_util_freeze_val;
2334 extern int              _edje_util_freeze_calc_count;
2335 extern Eina_List       *_edje_util_freeze_calc_list;
2336 
2337 extern Eina_Bool        _edje_password_show_last;
2338 extern FLOAT_T          _edje_password_show_last_timeout;
2339 
2340 extern Eina_Mempool *_edje_real_part_mp;
2341 extern Eina_Mempool *_edje_real_part_state_mp;
2342 
2343 extern Eina_Cow *_edje_calc_params_map_cow;
2344 extern Eina_Cow *_edje_calc_params_physics_cow;
2345 
2346 extern Eina_Hash       *_edje_file_hash;
2347 extern Eina_Hash       *_edje_id_hash;
2348 
2349 extern const char      *_edje_language;
2350 extern const char      *_edje_cache_path;
2351 
2352 EAPI extern Eina_Mempool *_emp_RECTANGLE;
2353 EAPI extern Eina_Mempool *_emp_TEXT;
2354 EAPI extern Eina_Mempool *_emp_IMAGE;
2355 EAPI extern Eina_Mempool *_emp_PROXY;
2356 EAPI extern Eina_Mempool *_emp_SWALLOW;
2357 EAPI extern Eina_Mempool *_emp_TEXTBLOCK;
2358 EAPI extern Eina_Mempool *_emp_GROUP;
2359 EAPI extern Eina_Mempool *_emp_BOX;
2360 EAPI extern Eina_Mempool *_emp_TABLE;
2361 EAPI extern Eina_Mempool *_emp_EXTERNAL;
2362 EAPI extern Eina_Mempool *_emp_SPACER;
2363 EAPI extern Eina_Mempool *_emp_SNAPSHOT;
2364 EAPI extern Eina_Mempool *_emp_part;
2365 EAPI extern Eina_Mempool *_emp_VECTOR;
2366 
2367 static inline Edje_Global *
_edje_global(void)2368 _edje_global(void)
2369 {
2370 #ifndef NDEBUG
2371    return efl_provider_find(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_MIXIN);
2372 #else
2373    extern Edje_Global *_edje_global_obj;
2374    return _edje_global_obj;
2375 #endif
2376 }
2377 
2378 static inline void
_edje_calc_params_need_type_common(Edje_Calc_Params * p)2379 _edje_calc_params_need_type_common(Edje_Calc_Params *p)
2380 {
2381    if (p->type.common) return;
2382    p->type.common = calloc(1, sizeof(Edje_Calc_Params_Type_Common));
2383 }
2384 
2385 static inline void
_edje_calc_params_need_type_text(Edje_Calc_Params * p)2386 _edje_calc_params_need_type_text(Edje_Calc_Params *p)
2387 {
2388    if (p->type.text) return;
2389    p->type.text = calloc(1, sizeof(Edje_Calc_Params_Type_Text));
2390 }
2391 
2392 static inline void
_edje_calc_params_need_ext(Edje_Calc_Params * p)2393 _edje_calc_params_need_ext(Edje_Calc_Params *p)
2394 {
2395    if (p->ext) return;
2396    p->ext = calloc(1, sizeof(Edje_Calc_Params_Ext));
2397    if (!p->ext) return;
2398 #ifdef EDJE_CALC_CACHE
2399    p->ext->map = eina_cow_alloc(_edje_calc_params_map_cow);
2400 # ifdef HAVE_EPHYSICS
2401    p->ext->physics = eina_cow_alloc(_edje_calc_params_physics_cow);
2402 # endif
2403 #endif
2404 }
2405 
2406 void _edje_calc_params_clear(Edje_Calc_Params *p);
2407 void  _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4);
2408 
2409 /** Find the description of the part by state name and state value.
2410  * The param 'approximate' on the approximate calculation of the state value,
2411  * it used for amination calculate, when used transition from 0.0 to 1.0.
2412  * If need exact matching state name and value set EINA_FALSE to 'approximate'.
2413  */
2414 Edje_Part_Description_Common *_edje_part_description_find(Edje *ed,
2415                                                           Edje_Real_Part *rp,
2416                                                           const char *state_name, double val,
2417                                                           Eina_Bool approximate);
2418 void  _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char  *d1, double v1, const char *d2, double v2);
2419 void  _edje_recalc(Edje *ed);
2420 void  _edje_recalc_do(Edje *ed);
2421 int   _edje_part_dragable_calc(Edje *ed, Edje_Real_Part *ep, FLOAT_T *x, FLOAT_T *y);
2422 void  _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y);
2423 
2424 void _edje_timer_cb(void *data, const Efl_Event *event);
2425 Eina_Bool _edje_pending_timer_cb(void *data);
2426 void  _edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
2427 void  _edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
2428 void  _edje_callbacks_del(Evas_Object *obj, Edje *ed);
2429 void  _edje_callbacks_focus_del(Evas_Object *obj, Edje *ed);
2430 
2431 const Edje_Signal_Callback_Group *_edje_signal_callback_alloc(void);
2432 void _edje_signal_callback_matches_unref(Edje_Signal_Callback_Matches *m, Edje_Signal_Callback_Flags *flags, void **custom_data);
2433 void _edje_signal_callback_free(const Edje_Signal_Callback_Group *cgp);
2434 Eina_Bool _edje_signal_callback_push(Edje_Signal_Callback_Group *cgp,
2435                                      const char *signal, const char *source,
2436                                      Edje_Signal_Cb func_legacy,
2437                                      Efl_Signal_Cb func_eo,
2438                                      Eina_Free_Cb func_free_cb,
2439                                      void *data,
2440                                      Eina_Bool propagate);
2441 Eina_Bool _edje_signal_callback_disable(Edje_Signal_Callback_Group *cgp,
2442                                         const char *signal, const char *source,
2443                                         Edje_Signal_Cb func_legacy,
2444                                         EflLayoutSignalCb func, Eina_Free_Cb func_free_cb, void *data);
2445 
2446 EAPI void _edje_edd_init(void);
2447 EAPI void _edje_edd_shutdown(void);
2448 
2449 Eina_Error _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested);
2450 
2451 void  _edje_file_callbacks_del(Edje *ed, Evas *e);
2452 void  _edje_file_del(Edje *ed);
2453 void  _edje_file_free(Edje_File *edf);
2454 void  _edje_file_cache_shutdown(void);
2455 void  _edje_collection_free(Edje_File *edf,
2456 			    Edje_Part_Collection *ec,
2457 			    Edje_Part_Collection_Directory_Entry *ce);
2458 void  _edje_collection_free_part_description_clean(int type,
2459 						   Edje_Part_Description_Common *desc,
2460 						   Eina_Bool free_strings);
2461 void _edje_collection_free_part_description_free(int type,
2462 						 Edje_Part_Description_Common *desc,
2463 						 Edje_Part_Collection_Directory_Entry *ce,
2464 						 Eina_Bool free_strings);
2465 
2466 void  _edje_del(Edje *ed);
2467 void  _edje_ref(Edje *ed);
2468 void  _edje_unref(Edje *ed);
2469 void  _edje_ref(Edje *ed);
2470 void  _edje_unref(Edje *ed);
2471 
2472 void _edje_program_run_cleanup(Edje *ed, Edje_Running_Program *runp);
2473 Eina_Bool _edje_program_run_iterate(Edje_Running_Program *runp, double tim);
2474 void  _edje_program_end(Edje *ed, Edje_Running_Program *runp);
2475 void  _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig, const char *ssrc, Edje_Message_Signal_Data *mdata);
2476 void _edje_programs_patterns_clean(Edje_Part_Collection *ed);
2477 void _edje_programs_patterns_init(Edje_Part_Collection *ed);
2478 void  _edje_emit(Edje *ed, const char *sig, const char *src);
2479 void _edje_seat_emit(Edje *ed, Efl_Input_Device *dev, const char *sig, const char *src);
2480 void _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*free_func)(void *));
2481 void _edje_emit_full_data(Edje *ed, const char *sig, const char *src, Edje_Message_Signal_Data *mdata);
2482 void _edje_emit_handle(Edje *ed, const char *sig, const char *src, Edje_Message_Signal_Data *data, Eina_Bool prop);
2483 void  _edje_signals_sources_patterns_clean(Edje_Signals_Sources_Patterns *ssp);
2484 const char * _edje_object_part_state_get(Edje *ed, const char *part, double *val_ret);
2485 
2486 void _edje_signal_data_free(Edje_Message_Signal_Data *mdata);
2487 void _edje_signal_data_ref(Edje_Message_Signal_Data *mdata);
2488 
2489 void _edje_focused_part_set(Edje *ed, const char *seat_name, Edje_Real_Part *rp);
2490 Edje_Real_Part *_edje_focused_part_get(Edje *ed, const char *seat_name);
2491 void _edje_part_focus_set(Edje *ed, const char *seat_name, Edje_Real_Part *rp);
2492 
2493 void _edje_devices_add(Edje *ed, Evas *tev);
2494 Eina_Stringshare *_edje_seat_name_get(Edje *ed, Efl_Input_Device *device);
2495 Efl_Input_Device *_edje_seat_get(Edje *ed, Eina_Stringshare *name);
2496 Eina_Bool _edje_part_allowed_seat_find(Edje_Real_Part *rp, const char *seat_name);
2497 
2498 const Edje_Signals_Sources_Patterns *_edje_signal_callback_patterns_ref(Edje_Signal_Callback_Group *gp);
2499 void _edje_signal_callback_patterns_unref(const Edje_Signals_Sources_Patterns *essp);
2500 void _edje_signal_callback_reset(Edje_Signal_Callback_Flags *flags, unsigned int length);
2501 
2502 void _edje_signal_callback_free(const Edje_Signal_Callback_Group *gp);
2503 
2504 const char *   _set_translated_string(Edje *ed, Edje_Real_Part *ep);
2505 void           _edje_text_init(void);
2506 void           _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep);
2507 void           _edje_text_part_on_del(Edje *ed, Edje_Part *ep);
2508 void           _edje_text_recalc_apply(Edje *ed,
2509                                        Edje_Real_Part *ep,
2510                                        Edje_Calc_Params *params,
2511                                        Edje_Part_Description_Text *chosen_desc,
2512                                        Eina_Bool calc_only);
2513 Evas_Font_Size _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc);
2514 const char *   _edje_text_class_font_get(Edje *ed,
2515                                          Edje_Part_Description_Text *chosen_desc,
2516                                          int *size, char **free_later);
2517 const char *   _edje_text_font_get(const char *base, const char *new,
2518                                    char **free_later);
2519 
2520 void
2521 _edje_part_recalc_single_textblock(FLOAT_T sc,
2522                                    Edje *ed,
2523                                    Edje_Real_Part *ep,
2524                                    Edje_Part_Description_Text *chosen_desc,
2525                                    Edje_Calc_Params *params,
2526                                    int *minw, int *minh,
2527                                    int *maxw, int *maxh);
2528 
2529 Edje_Real_Part   *_edje_real_part_get(const Edje *ed, const char *part);
2530 Edje_Real_Part   *_edje_real_part_recursive_get(Edje **ed, const char *part);
2531 Edje_Color_Class *_edje_color_class_find(const Edje *ed, const char *color_class);
2532 // The color_class has to be a pointer to an Eet owned string.
2533 Edje_Color_Class *_edje_color_class_recursive_find(const Edje *ed, const char *color_class);
2534 void              _edje_color_class_on_del(Edje *ed, Edje_Part *ep);
2535 void              _edje_color_class_hash_free(void);
2536 
2537 const char       * _edje_find_alias(Eina_Hash *aliased, char *src, int *length);
2538 Edje_Text_Class  *_edje_text_class_find(Edje *ed, const char *text_class);
2539 void              _edje_text_class_hash_free(void);
2540 Edje_Size_Class  *_edje_size_class_find(Edje *ed, const char *size_class);
2541 void              _edje_size_class_hash_free(void);
2542 Edje             *_edje_fetch(const Evas_Object *obj) EINA_PURE;
2543 int               _edje_util_freeze(Edje *ed);
2544 int               _edje_util_thaw(Edje *ed);
2545 int               _edje_block(Edje *ed);
2546 int               _edje_unblock(Edje *ed);
2547 int               _edje_block_break(Edje *ed);
2548 void              _edje_block_violate(Edje *ed);
2549 void              _edje_object_part_swallow_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
2550 void              _edje_object_part_swallow_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
2551 void              _edje_real_part_swallow(Edje *ed, Edje_Real_Part *rp, Evas_Object *obj_swallow, Eina_Bool hints_update);
2552 void              _edje_real_part_swallow_clear(Edje *ed, Edje_Real_Part *rp);
2553 void              _edje_box_init(void);
2554 void              _edje_box_shutdown(void);
2555 Eina_Bool         _edje_box_layout_find(const char *name, Evas_Object_Box_Layout *cb, void **data, void (**free_data)(void *data));
2556 void              _edje_box_recalc_apply(Edje *ed EINA_UNUSED, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Box *chosen_desc);
2557 Eina_Bool         _edje_box_layout_add_child(Edje_Real_Part *rp, Evas_Object *child_obj);
2558 void              _edje_box_layout_remove_child(Edje_Real_Part *rp, Evas_Object *child_obj);
2559 Edje_Part_Box_Animation * _edje_box_layout_anim_new(Evas_Object *box);
2560 void              _edje_box_layout_free_data(void *data);
2561 
2562 Edje_Part_Description_Text *_edje_real_part_text_source_description_get(Edje_Real_Part *ep, Edje_Real_Part **rp2);
2563 Edje_Part_Description_Text *_edje_real_part_text_text_source_description_get(Edje_Real_Part *ep, Edje_Real_Part **rp2);
2564 Eina_Bool         _edje_real_part_box_append(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj);
2565 Eina_Bool         _edje_real_part_box_prepend(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj);
2566 Eina_Bool         _edje_real_part_box_insert_before(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref);
2567 Eina_Bool         _edje_real_part_box_insert_after(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref);
2568 Eina_Bool         _edje_real_part_box_insert_at(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos);
2569 Evas_Object      *_edje_real_part_box_content_at(Edje *ed, Edje_Real_Part *rp, unsigned int pos);
2570 Evas_Object      *_edje_real_part_box_remove(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj);
2571 Evas_Object      *_edje_real_part_box_remove_at(Edje *ed, Edje_Real_Part *rp, unsigned int pos);
2572 Eina_Bool         _edje_real_part_box_remove_all(Edje *ed, Edje_Real_Part *rp, Eina_Bool clear);
2573 Eina_Bool         _edje_real_part_table_pack(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
2574 Eina_Bool         _edje_real_part_table_unpack(Edje *ed, Edje_Real_Part *rp, Evas_Object *child_obj);
2575 void              _edje_real_part_table_clear(Edje *ed, Edje_Real_Part *rp, Eina_Bool clear);
2576 Evas_Object      *_edje_children_get(Edje_Real_Part *rp, const char *partid);
2577 
2578 Eina_Bool         _edje_object_part_text_raw_set(Edje *ed, Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text);
2579 void _edje_user_define_string(Edje *ed, const char *part, const char *raw_text, Edje_Text_Type type);
2580 char             *_edje_text_escape(const char *text);
2581 char             *_edje_text_unescape(const char *text);
2582 
2583 void          _edje_embryo_script_init      (Edje_Part_Collection *edc);
2584 void          _edje_embryo_script_shutdown  (Edje_Part_Collection *edc);
2585 void          _edje_embryo_script_reset     (Edje *ed);
2586 void          _edje_embryo_test_run         (Edje *ed, Edje_Program *pr, const char *sig, const char *src);
2587 Edje_Var     *_edje_var_new                 (void);
2588 void          _edje_var_free                (Edje_Var *var);
2589 void          _edje_var_init                (Edje *ed);
2590 void          _edje_var_shutdown            (Edje *ed);
2591 int           _edje_var_string_id_get       (Edje *ed, const char *string);
2592 int           _edje_var_var_int_get         (Edje *ed, Edje_Var *var);
2593 void          _edje_var_var_int_set         (Edje *ed, Edje_Var *var, int v);
2594 double        _edje_var_var_float_get       (Edje *ed, Edje_Var *var);
2595 void          _edje_var_var_float_set       (Edje *ed, Edje_Var *var, double v);
2596 const char   *_edje_var_var_str_get         (Edje *ed, Edje_Var *var);
2597 void          _edje_var_var_str_set         (Edje *ed, Edje_Var *var, const char *str);
2598 int           _edje_var_int_get             (Edje *ed, int id);
2599 void          _edje_var_int_set             (Edje *ed, int id, int v);
2600 double        _edje_var_float_get           (Edje *ed, int id);
2601 void          _edje_var_float_set           (Edje *ed, int id, double v);
2602 const char   *_edje_var_str_get             (Edje *ed, int id);
2603 void          _edje_var_str_set             (Edje *ed, int id, const char *str);
2604 
2605 void          _edje_var_list_var_append(Edje *ed, int id, Edje_Var *var);
2606 void          _edje_var_list_var_prepend(Edje *ed, int id, Edje_Var *var);
2607 void          _edje_var_list_var_append_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
2608 void          _edje_var_list_var_prepend_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
2609 Edje_Var     *_edje_var_list_nth(Edje *ed, int id, int n);
2610 
2611 int           _edje_var_list_count_get(Edje *ed, int id);
2612 void          _edje_var_list_remove_nth(Edje *ed, int id, int n);
2613 
2614 int           _edje_var_list_nth_int_get(Edje *ed, int id, int n);
2615 void          _edje_var_list_nth_int_set(Edje *ed, int id, int n, int v);
2616 void          _edje_var_list_int_append(Edje *ed, int id, int v);
2617 void          _edje_var_list_int_prepend(Edje *ed, int id, int v);
2618 void          _edje_var_list_int_insert(Edje *ed, int id, int n, int v);
2619 
2620 double        _edje_var_list_nth_float_get(Edje *ed, int id, int n);
2621 void          _edje_var_list_nth_float_set(Edje *ed, int id, int n, double v);
2622 void          _edje_var_list_float_append(Edje *ed, int id, double v);
2623 void          _edje_var_list_float_prepend(Edje *ed, int id, double v);
2624 void          _edje_var_list_float_insert(Edje *ed, int id, int n, double v);
2625 
2626 const char   *_edje_var_list_nth_str_get(Edje *ed, int id, int n);
2627 void          _edje_var_list_nth_str_set(Edje *ed, int id, int n, const char *v);
2628 void          _edje_var_list_str_append(Edje *ed, int id, const char *v);
2629 void          _edje_var_list_str_prepend(Edje *ed, int id, const char *v);
2630 void          _edje_var_list_str_insert(Edje *ed, int id, int n, const char *v);
2631 
2632 int           _edje_var_timer_add           (Edje *ed, double in, const char *fname, int val);
2633 void          _edje_var_timer_del           (Edje *ed, int id);
2634 void          _edje_var_timer_reset         (Edje *ed, int id);
2635 
2636 int           _edje_var_anim_add            (Edje *ed, double len, const char *fname, int val);
2637 void          _edje_var_anim_del            (Edje *ed, int id);
2638 
2639 void          _edje_message_init            (void);
2640 void          _edje_message_shutdown        (void);
2641 void          _edje_message_cb_set          (Edje *ed, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data);
2642 Edje_Message *_edje_message_new             (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id);
2643 void          _edje_message_free            (Edje_Message *em);
2644 void          _edje_util_message_send       (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, void *emsg);
2645 void          _edje_message_parameters_push (Edje_Message *em);
2646 void          _edje_message_process         (Edje_Message *em);
2647 void          _edje_message_queue_process   (void);
2648 void          _edje_message_queue_clear     (void);
2649 void          _edje_message_del             (Edje *ed);
2650 
2651 // Edje object level textblock style api
2652 Evas_Textblock_Style * _edje_textblock_style_get(Edje *ed, const char *style);
2653 void _edje_textblock_styles_add(Edje *ed, Edje_Real_Part *ep);
2654 void _edje_textblock_styles_del(Edje *ed, Edje_Part *pt);
2655 void _edje_object_textblock_style_all_update_text_class(Edje *ed, const char *text_class);
2656 void _edje_object_textblock_styles_cache_cleanup(Edje *ed);
2657 
2658 // Edje File level textblock style api
2659 void _edje_file_textblock_style_all_update(Edje_File *ed);
2660 void _edje_file_textblock_styles_all_update_text_class(Edje *ed, const char *text_class);
2661 void _edje_file_textblock_style_parse_and_fix(Edje_File *edf);
2662 void _edje_file_textblock_style_cleanup(Edje_File *edf);
2663 
2664 Edje_File *_edje_cache_file_coll_open(const Eina_File *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed);
2665 Edje_File *_edje_file_cache_find(const Eina_File *file);
2666 void _edje_cache_coll_clean(Edje_File *edf);
2667 void _edje_cache_coll_flush(Edje_File *edf);
2668 void _edje_cache_coll_unref(Edje_File *edf, Edje_Part_Collection *edc);
2669 EAPI void edje_cache_emp_alloc(Edje_Part_Collection_Directory_Entry *ce);
2670 EAPI void edje_cache_emp_free(Edje_Part_Collection_Directory_Entry *ce);
2671 EAPI void _edje_cache_file_unref(Edje_File *edf);
2672 
2673 void _edje_embryo_globals_init(Edje *ed);
2674 
2675 #define CHKPARAM(n) if (params[0] != (sizeof(Embryo_Cell) * (n))) return -1;
2676 #define HASNPARAMS(n) (params[0] == (sizeof(Embryo_Cell) * (n)))
2677 #define GETSTR(str, par) { \
2678    Embryo_Cell *___cptr; \
2679    int ___l; \
2680    str = NULL; \
2681    if ((___cptr = embryo_data_address_get(ep, (par)))) { \
2682       ___l = embryo_data_string_length_get(ep, ___cptr); \
2683       if (((str) = alloca(___l + 1))) \
2684 	embryo_data_string_get(ep, ___cptr, (str)); } }
2685 #define GETSTREVAS(str, par) { \
2686    if ((str)) { \
2687       if ((par) && (!strcmp((par), (str)))) return 0; \
2688       if ((par)) eina_stringshare_del((par)); \
2689       (par) = (char *)eina_stringshare_add((str)); } \
2690    else (par) = NULL; }
2691 #define GETFLOAT(val, par) { \
2692    float *___cptr; \
2693    if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
2694       val = *___cptr; } }
2695 
2696 #define GETFLOAT_T(val, par)						\
2697   {									\
2698      float *___cptr;							\
2699      if ((___cptr = (float *)embryo_data_address_get(ep, (par))))	\
2700        {								\
2701 	  val = FROM_DOUBLE(*___cptr);					\
2702        }								\
2703   }
2704 
2705 #define GETINT(val, par) {			\
2706    int *___cptr; \
2707    if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
2708       val = *___cptr; } }
2709 #define SETSTR(str, par) { \
2710    Embryo_Cell *___cptr; \
2711    if ((___cptr = embryo_data_address_get(ep, (par)))) { \
2712       embryo_data_string_set(ep, str, ___cptr); } }
2713 #define SETSTRALLOCATE(s)			\
2714   {						\
2715      if (s) {					\
2716 	if ((int) strlen((s)) < params[4]) {	\
2717 	   SETSTR((s), params[3]); }		\
2718 	else {					\
2719 	   char *ss;				\
2720 	   ss = alloca(strlen((s)) + 1);	\
2721 	   strcpy(ss, (s));			\
2722 	   ss[params[4] - 2] = 0;		\
2723 	   SETSTR(ss, params[3]); } }		\
2724      else					\
2725        SETSTR("", params[3]);			\
2726   }
2727 #define SETFLOAT(val, par) { \
2728    float *___cptr; \
2729    if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
2730       *___cptr = (float)val; } }
2731 #define SETFLOAT_T(val, par)						\
2732   {									\
2733      float *___cptr;							\
2734      if ((___cptr = (float *)embryo_data_address_get(ep, (par))))	\
2735        {								\
2736 	  *___cptr = (float) TO_DOUBLE(val);				\
2737        }								\
2738   }
2739 #define SETINT(val, par) { \
2740    int *___cptr; \
2741    if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
2742       *___cptr = (int)val; } }
2743 
2744 extern jmp_buf _edje_lua_panic_jmp;
2745 #define _edje_lua_panic_here() setjmp(_edje_lua_panic_jmp)
2746 
2747 lua_State *_edje_lua_state_get(void);
2748 lua_State *_edje_lua_new_thread(Edje *ed, lua_State *L);
2749 void _edje_lua_free_thread(Edje *ed, lua_State *L);
2750 void _edje_lua_new_reg(lua_State *L, int index, void *ptr);
2751 void _edje_lua_get_reg(lua_State *L, void *ptr);
2752 void _edje_lua_free_reg(lua_State *L, void *ptr);
2753 void _edje_lua_script_fn_new(Edje *ed);
2754 void _edje_lua_group_fn_new(Edje *ed);
2755 void _edje_lua_init(void);
2756 void _edje_lua_shutdown(void);
2757 
2758 void __edje_lua_error(const char *file, const char *fnc, int line, lua_State *L, int err_code);
2759 #define _edje_lua_error(L, err_code)					\
2760   __edje_lua_error(__FILE__, __func__, __LINE__, L, err_code)
2761 
2762 Eina_Bool  _edje_lua_script_only(Edje *ed);
2763 void _edje_lua_script_only_init(Edje *ed);
2764 void _edje_lua_script_only_shutdown(Edje *ed);
2765 void _edje_lua_script_only_show(Edje *ed);
2766 void _edje_lua_script_only_hide(Edje *ed);
2767 void _edje_lua_script_only_move(Edje *ed);
2768 void _edje_lua_script_only_resize(Edje *ed);
2769 void _edje_lua_script_only_message(Edje *ed, Edje_Message *em);
2770 
2771 void _edje_entry_init(Edje *ed);
2772 void _edje_entry_shutdown(Edje *ed);
2773 int _edje_entry_real_part_cursor_objs_get(Edje_Real_Part *rp, Evas_Object  **objs);
2774 void _edje_entry_real_part_init(Edje *ed, Edje_Real_Part *rp);
2775 void _edje_entry_real_part_shutdown(Edje *ed, Edje_Real_Part *rp);
2776 void _edje_entry_real_part_configure(Edje *ed, Edje_Real_Part *rp);
2777 const char *_edje_entry_selection_get(Edje_Real_Part *rp);
2778 const char *_edje_entry_text_get(Edje_Real_Part *rp);
2779 void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text);
2780 void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text);
2781 void _edje_entry_text_markup_append(Edje_Real_Part *rp, const char *text);
2782 void _edje_entry_set_cursor_start(Edje_Real_Part *rp);
2783 void _edje_entry_set_cursor_end(Edje_Real_Part *rp);
2784 void _edje_entry_cursor_copy(Edje_Real_Part *rp, Edje_Cursor cur, Edje_Cursor dst);
2785 void _edje_entry_select_none(Edje_Real_Part *rp);
2786 void _edje_entry_select_all(Edje_Real_Part *rp);
2787 void _edje_entry_select_begin(Edje_Real_Part *rp);
2788 void _edje_entry_select_extend(Edje_Real_Part *rp);
2789 const Eina_List *_edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char *anchor);
2790 const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
2791 Eina_Bool _edje_entry_item_geometry_get(Edje_Real_Part *rp, const char *item, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
2792 const Eina_List *_edje_entry_items_list(Edje_Real_Part *rp);
2793 void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *cdir);
2794 void _edje_entry_user_insert(Edje_Real_Part *rp, const char *text);
2795 void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow);
2796 Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp);
2797 void _edje_entry_select_abort(Edje_Real_Part *rp);
2798 void *_edje_entry_imf_context_get(Edje_Real_Part *rp);
2799 Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur);
2800 Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur);
2801 Eina_Bool _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur);
2802 Eina_Bool _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur);
2803 void _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur);
2804 void _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur);
2805 void _edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur);
2806 void _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur);
2807 Eina_Bool _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur, int x, int y);
2808 Eina_Bool _edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
2809 Eina_Bool _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
2810 char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur);
2811 void _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos);
2812 int _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur);
2813 void _edje_entry_imf_context_reset(Edje_Real_Part *rp);
2814 void _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout layout);
2815 Edje_Input_Panel_Layout _edje_entry_input_panel_layout_get(Edje_Real_Part *rp);
2816 void _edje_entry_input_panel_layout_variation_set(Edje_Real_Part *rp, int variation);
2817 int _edje_entry_input_panel_layout_variation_get(Edje_Real_Part *rp);
2818 void _edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type autocapital_type);
2819 Edje_Text_Autocapital_Type _edje_entry_autocapital_type_get(Edje_Real_Part *rp);
2820 void _edje_entry_prediction_allow_set(Edje_Real_Part *rp, Eina_Bool prediction);
2821 Eina_Bool _edje_entry_prediction_allow_get(Edje_Real_Part *rp);
2822 void _edje_entry_input_hint_set(Edje_Real_Part *rp, Edje_Input_Hints input_hints);
2823 Edje_Input_Hints _edje_entry_input_hint_get(const Edje_Real_Part *rp);
2824 void _edje_entry_input_panel_enabled_set(Edje_Real_Part *rp, Eina_Bool enabled);
2825 Eina_Bool _edje_entry_input_panel_enabled_get(Edje_Real_Part *rp);
2826 void _edje_entry_input_panel_show(Edje_Real_Part *rp);
2827 void _edje_entry_input_panel_hide(Edje_Real_Part *rp);
2828 void _edje_entry_input_panel_language_set(Edje_Real_Part *rp, Edje_Input_Panel_Lang lang);
2829 Edje_Input_Panel_Lang _edje_entry_input_panel_language_get(Edje_Real_Part *rp);
2830 void _edje_entry_input_panel_imdata_set(Edje_Real_Part *rp, const void *data, int len);
2831 void _edje_entry_input_panel_imdata_get(Edje_Real_Part *rp, void *data, int *len);
2832 void _edje_entry_input_panel_return_key_type_set(Edje_Real_Part *rp, Edje_Input_Panel_Return_Key_Type return_key_type);
2833 Edje_Input_Panel_Return_Key_Type _edje_entry_input_panel_return_key_type_get(Edje_Real_Part *rp);
2834 void _edje_entry_input_panel_return_key_disabled_set(Edje_Real_Part *rp, Eina_Bool disabled);
2835 Eina_Bool _edje_entry_input_panel_return_key_disabled_get(Edje_Real_Part *rp);
2836 void _edje_entry_input_panel_show_on_demand_set(Edje_Real_Part *rp, Eina_Bool ondemand);
2837 Eina_Bool _edje_entry_input_panel_show_on_demand_get(Edje_Real_Part *rp);
2838 void _edje_entry_prediction_hint_set(Edje_Real_Part *rp, const char *prediction_hint);
2839 Eina_Bool _edje_entry_prediction_hint_hash_set(Edje_Real_Part *rp, const char *key, const char *value);
2840 Eina_Bool _edje_entry_prediction_hint_hash_del(Edje_Real_Part *rp, const char *key);
2841 Eina_Bool _edje_entry_hide_visible_password(Edje *edje, Edje_Real_Part *rp);
2842 
2843 void _edje_external_init(void);
2844 void _edje_external_shutdown(void);
2845 Evas_Object *_edje_external_type_add(const char *type_name, Evas *evas, Evas_Object *parent, const Eina_List *params, const char *part_name);
2846 void _edje_external_signal_emit(Evas_Object *obj, const char *emission, const char *source);
2847 Eina_Bool _edje_external_param_set(Evas_Object *obj, Edje_Real_Part *rp, const Edje_External_Param *param) EINA_ARG_NONNULL(2);
2848 Eina_Bool _edje_external_param_get(const Evas_Object *obj, Edje_Real_Part *rp, Edje_External_Param *param) EINA_ARG_NONNULL(2);
2849 Evas_Object *_edje_external_content_get(const Evas_Object *obj, const char *content) EINA_ARG_NONNULL(1, 2);
2850 void _edje_external_params_free(Eina_List *params, Eina_Bool free_strings);
2851 void _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep,
2852 				 Edje_Calc_Params *params,
2853 				 Edje_Part_Description_Common *chosen_desc);
2854 void *_edje_external_params_parse(Evas_Object *obj, const Eina_List *params);
2855 void _edje_external_parsed_params_free(Evas_Object *obj, void *params);
2856 
2857 Eina_Module *_edje_module_handle_load(const char *module);
2858 void _edje_module_init(void);
2859 void _edje_module_shutdown(void);
2860 
2861 void _edje_need_imf(void);
2862 
2863 static inline Eina_Bool
edje_program_is_strncmp(const char * str)2864 edje_program_is_strncmp(const char *str)
2865 {
2866    size_t length;
2867 
2868    length = strlen(str);
2869 
2870    if (strpbrk(str, "*?[\\") != str + length)
2871      return EINA_FALSE;
2872    if (str[length] == '['
2873        || str[length] == '\\')
2874      return EINA_FALSE;
2875    return EINA_TRUE;
2876 }
2877 
2878 static inline Eina_Bool
edje_program_is_strrncmp(const char * str)2879 edje_program_is_strrncmp(const char *str)
2880 {
2881    if (*str != '*' && *str != '?')
2882      return EINA_FALSE;
2883    if (strpbrk(str + 1, "*?[\\"))
2884      return EINA_FALSE;
2885    return EINA_TRUE;
2886 }
2887 void edje_object_propagate_callback_add(Evas_Object *obj, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
2888 
2889 
2890 /* used by edje_cc - private still */
2891 EAPI void _edje_program_insert(Edje_Part_Collection *ed, Edje_Program *p);
2892 EAPI void _edje_program_remove(Edje_Part_Collection *ed, Edje_Program *p);
2893 
2894 void _edje_lua2_error_full(const char *file, const char *fnc, int line, lua_State *L, int err_code);
2895 #define _edje_lua2_error(L, err_code) _edje_lua2_error_full(__FILE__, __func__, __LINE__, L, err_code)
2896 void _edje_lua2_script_init(Edje *ed);
2897 void _edje_lua2_script_shutdown(Edje *ed);
2898 void _edje_lua2_script_load(Edje_Part_Collection *edc, void *data, int size);
2899 void _edje_lua2_script_unload(Edje_Part_Collection *edc);
2900 
2901 void _edje_lua2_script_func_shutdown(Edje *ed);
2902 void _edje_lua2_script_func_show(Edje *ed);
2903 void _edje_lua2_script_func_hide(Edje *ed);
2904 void _edje_lua2_script_func_move(Edje *ed);
2905 void _edje_lua2_script_func_resize(Edje *ed);
2906 void _edje_lua2_script_func_message(Edje *ed, Edje_Message *em);
2907 void _edje_lua2_script_func_signal(Edje *ed, const char *sig, const char *src);
2908 
2909 const char *edje_string_get(const Edje_String *es);
2910 const char *edje_string_id_get(const Edje_String *es);
2911 
2912 void _edje_object_orientation_inform(Evas_Object *obj);
2913 
2914 void _edje_lib_ref(void);
2915 void _edje_lib_unref(void);
2916 
2917 void _edje_language_signal_emit(Edje *ed, Evas_Object *obj, char *signal);
2918 
2919 void _edje_subobj_register(Edje *ed, Evas_Object *ob);
2920 void _edje_subobj_unregister(Edje *ed, Evas_Object *ob);
2921 
2922 void _edje_multisense_init(void);
2923 void _edje_multisense_shutdown(void);
2924 Eina_Bool _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, const double speed, int channel);
2925 Eina_Bool _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const double duration, int channel);
2926 Eina_Bool _edje_multisense_internal_vibration_sample_play(Edje *ed, const char *sample_name, int repeat);
2927 
2928 void _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *state);
2929 
2930 Edje_User_Defined * _edje_user_text_style_definition_fetch(Edje *ed, const char *part);
2931 Edje_User_Defined * _edje_user_text_expand_definition_fetch(Edje *ed, const char *part);
2932 void _edje_user_definition_remove(Edje_User_Defined *eud, Evas_Object *child);
2933 void _edje_user_definition_free(Edje_User_Defined *eud);
2934 
2935 void _canvas_layout_user_text_apply(Edje_User_Defined *eud, Eo *obj, Edje_Part_Text_Prop *prop);
2936 void _canvas_layout_user_text_collect(Edje *ed, Edje_User_Defined *eud);
2937 
2938 extern Efl_Observable *_edje_color_class_member;
2939 extern Efl_Observable *_edje_text_class_member;
2940 extern Efl_Observable *_edje_size_class_member;
2941 
2942 void _edje_class_init(void);
2943 void _edje_class_shutdown(void);
2944 
2945 void _scale_set(Eo *obj, void *_pd, va_list *list);
2946 void _scale_get(Eo *obj, void *_pd, va_list *list);
2947 void _base_scale_get(Eo *obj, void *_pd, va_list *list);
2948 void _mirrored_get(Eo *obj, void *_pd, va_list *list);
2949 void _mirrored_set(Eo *obj, void *_pd, va_list *list);
2950 void _data_get(Eo *obj, void *_pd, va_list *list);
2951 void _freeze(Eo *obj, void *_pd, va_list *list);
2952 void _thaw(Eo *obj, void *_pd, va_list *list);
2953 void _color_class_set(Eo *obj, void *_pd, va_list *list);
2954 void _color_class_get(Eo *obj, void *_pd, va_list *list);
2955 void _text_class_set(Eo *obj, void *_pd, va_list *list);
2956 void _text_class_get(Eo *obj, void *_pd, va_list *list);
2957 void _part_exists(Eo *obj, void *_pd, va_list *list);
2958 void _part_object_get(Eo *obj, void *_pd, va_list *list);
2959 void _part_geometry_get(Eo *obj, void *_pd, va_list *list);
2960 void _item_provider_set(Eo *obj, void *_pd, va_list *list);
2961 void _text_change_cb_set(Eo *obj, void *_pd, va_list *list);
2962 void _part_text_style_user_push(Eo *obj, void *_pd, va_list *list);
2963 void _part_text_style_user_pop(Eo *obj, void *_pd, va_list *list);
2964 void _part_text_style_user_peek(Eo *obj, void *_pd, va_list *list);
2965 void _part_text_set(Eo *obj, void *_pd, va_list *list);
2966 void _part_text_get(Eo *obj, void *_pd, va_list *list);
2967 void _part_text_escaped_set(Eo *obj, void *_pd, va_list *list);
2968 void _part_text_unescaped_set(Eo *obj, void *_pd, va_list *list);
2969 void _part_text_unescaped_get(Eo *obj, void *_pd, va_list *list);
2970 void _part_text_selection_get(Eo *obj, void *_pd, va_list *list);
2971 void _part_text_select_none(Eo *obj, void *_pd, va_list *list);
2972 void _part_text_select_all(Eo *obj, void *_pd, va_list *list);
2973 void _part_text_insert(Eo *obj, void *_pd, va_list *list);
2974 void _part_text_append(Eo *obj, void *_pd, va_list *list);
2975 void _part_text_anchor_list_get(Eo *obj, void *_pd, va_list *list);
2976 void _part_text_anchor_geometry_get(Eo *obj, void *_pd, va_list *list);
2977 void _part_text_item_list_get(Eo *obj, void *_pd, va_list *list);
2978 void _part_text_item_geometry_get(Eo *obj, void *_pd, va_list *list);
2979 void _part_text_cursor_geometry_get(Eo *obj, void *_pd, va_list *list);
2980 void _part_text_user_insert(Eo *obj, void *_pd, va_list *list);
2981 void _part_text_select_allow_set(Eo *obj, void *_pd, va_list *list);
2982 void _part_text_select_abort(Eo *obj, void *_pd, va_list *list);
2983 void _part_text_select_begin(Eo *obj, void *_pd, va_list *list);
2984 void _part_text_select_extend(Eo *obj, void *_pd, va_list *list);
2985 void _part_text_imf_context_get(Eo *obj, void *_pd, va_list *list);
2986 void _part_text_cursor_next(Eo *obj, void *_pd, va_list *list);
2987 void _part_text_cursor_prev(Eo *obj, void *_pd, va_list *list);
2988 void _part_text_cursor_up(Eo *obj, void *_pd, va_list *list);
2989 void _part_text_cursor_down(Eo *obj, void *_pd, va_list *list);
2990 void _part_text_cursor_begin_set(Eo *obj, void *_pd, va_list *list);
2991 void _part_text_cursor_end_set(Eo *obj, void *_pd, va_list *list);
2992 void _part_text_cursor_copy(Eo *obj, void *_pd, va_list *list);
2993 void _part_text_cursor_line_begin_set(Eo *obj, void *_pd, va_list *list);
2994 void _part_text_cursor_line_end_set(Eo *obj, void *_pd, va_list *list);
2995 void _part_text_cursor_coord_set(Eo *obj, void *_pd, va_list *list);
2996 void _part_text_cursor_is_format_get(Eo *obj, void *_pd, va_list *list);
2997 void _part_text_cursor_is_visible_format_get(Eo *obj, void *_pd, va_list *list);
2998 void _part_text_cursor_content_get(Eo *obj, void *_pd, va_list *list);
2999 void _part_text_cursor_pos_set(Eo *obj, void *_pd, va_list *list);
3000 void _part_text_cursor_pos_get(Eo *obj, void *_pd, va_list *list);
3001 void _part_text_imf_context_reset(Eo *obj, void *_pd, va_list *list);
3002 void _part_text_input_panel_layout_set(Eo *obj, void *_pd, va_list *list);
3003 void _part_text_input_panel_layout_get(Eo *obj, void *_pd, va_list *list);
3004 void _part_text_input_panel_layout_variation_set(Eo *obj, void *_pd, va_list *list);
3005 void _part_text_input_panel_layout_variation_get(Eo *obj, void *_pd, va_list *list);
3006 void _part_text_autocapital_type_set(Eo *obj, void *_pd, va_list *list);
3007 void _part_text_autocapital_type_get(Eo *obj, void *_pd, va_list *list);
3008 void _part_text_prediction_allow_set(Eo *obj, void *_pd, va_list *list);
3009 void _part_text_prediction_allow_get(Eo *obj, void *_pd, va_list *list);
3010 void _part_text_input_panel_enabled_set(Eo *obj, void *_pd, va_list *list);
3011 void _part_text_input_panel_enabled_get(Eo *obj, void *_pd, va_list *list);
3012 void _part_text_input_panel_show(Eo *obj, void *_pd, va_list *list);
3013 void _part_text_input_panel_hide(Eo *obj, void *_pd, va_list *list);
3014 void _part_text_input_panel_language_set(Eo *obj, void *_pd, va_list *list);
3015 void _part_text_input_panel_language_get(Eo *obj, void *_pd, va_list *list);
3016 void _part_text_input_panel_imdata_set(Eo *obj, void *_pd, va_list *list);
3017 void _part_text_input_panel_imdata_get(Eo *obj, void *_pd, va_list *list);
3018 void _part_text_input_panel_return_key_type_set(Eo *obj, void *_pd, va_list *list);
3019 void _part_text_input_panel_return_key_type_get(Eo *obj, void *_pd, va_list *list);
3020 void _part_text_input_panel_return_key_disabled_set(Eo *obj, void *_pd, va_list *list);
3021 void _part_text_input_panel_return_key_disabled_get(Eo *obj, void *_pd, va_list *list);
3022 void _part_text_input_panel_show_on_demand_set(Eo *obj, void *_pd, va_list *list);
3023 void _part_text_input_panel_show_on_demand_get(Eo *obj, void *_pd, va_list *list);
3024 void _text_insert_filter_callback_add(Eo *obj, void *_pd, va_list *list);
3025 void _text_insert_filter_callback_del(Eo *obj, void *_pd, va_list *list);
3026 void _text_insert_filter_callback_del_full(Eo *obj, void *_pd, va_list *list);
3027 void _text_markup_filter_callback_add(Eo *obj, void *_pd, va_list *list);
3028 void _text_markup_filter_callback_del(Eo *obj, void *_pd, va_list *list);
3029 void _text_markup_filter_callback_del_full(Eo *obj, void *_pd, va_list *list);
3030 void _part_swallow(Eo *obj, void *_pd, va_list *list);
3031 void _part_unswallow(Eo *obj, void *_pd, va_list *list);
3032 void _part_swallow_get(Eo *obj, void *_pd, va_list *list);
3033 void _size_min_get(Eo *obj, void *_pd, va_list *list);
3034 void _size_max_get(Eo *obj, void *_pd, va_list *list);
3035 void _calc_force(Eo *obj, void *_pd, va_list *list);
3036 void _size_min_calc(Eo *obj, void *_pd, va_list *list);
3037 void _parts_extends_calc(Eo *obj, void *_pd, va_list *list);
3038 void _size_min_restricted_calc(Eo *obj, void *_pd, va_list *list);
3039 void _part_state_get(Eo *obj, void *_pd, va_list *list);
3040 void _part_drag_dir_get(Eo *obj, void *_pd, va_list *list);
3041 void _part_drag_value_set(Eo *obj, void *_pd, va_list *list);
3042 void _part_drag_value_get(Eo *obj, void *_pd, va_list *list);
3043 void _part_drag_size_set(Eo *obj, void *_pd, va_list *list);
3044 void _part_drag_size_get(Eo *obj, void *_pd, va_list *list);
3045 void _part_drag_step_set(Eo *obj, void *_pd, va_list *list);
3046 void _part_drag_step_get(Eo *obj, void *_pd, va_list *list);
3047 void _part_drag_page_set(Eo *obj, void *_pd, va_list *list);
3048 void _part_drag_page_get(Eo *obj, void *_pd, va_list *list);
3049 void _part_drag_step(Eo *obj, void *_pd, va_list *list);
3050 void _part_drag_page(Eo *obj, void *_pd, va_list *list);
3051 void _part_box_append(Eo *obj, void *_pd, va_list *list);
3052 void _part_box_prepend(Eo *obj, void *_pd, va_list *list);
3053 void _part_box_insert_before(Eo *obj, void *_pd, va_list *list);
3054 void _part_box_insert_at(Eo *obj, void *_pd, va_list *list);
3055 void _part_box_remove(Eo *obj, void *_pd, va_list *list);
3056 void _part_box_remove_at(Eo *obj, void *_pd, va_list *list);
3057 void _part_box_remove_all(Eo *obj, void *_pd, va_list *list);
3058 void _access_part_list_get(Eo *obj, void *_pd, va_list *list);
3059 void _part_table_child_get(Eo *obj, void *_pd, va_list *list);
3060 void _part_table_pack(Eo *obj, void *_pd, va_list *list);
3061 void _part_table_unpack(Eo *obj, void *_pd, va_list *list);
3062 void _part_table_col_row_size_get(Eo *obj, void *_pd, va_list *list);
3063 void _part_table_clear(Eo *obj, void *_pd, va_list *list);
3064 void _perspective_set(Eo *obj, void *_pd, va_list *list);
3065 void _perspective_get(Eo *obj, void *_pd, va_list *list);
3066 void _preload(Eo *obj, void *_pd, va_list *list);
3067 void _update_hints_set(Eo *obj, void *_pd, va_list *list);
3068 void _update_hints_get(Eo *obj, void *_pd, va_list *list);
3069 
3070 void _part_external_object_get(Eo *obj, void *_pd, va_list *list);
3071 void _part_external_param_set(Eo *obj, void *_pd, va_list *list);
3072 void _part_external_param_get(Eo *obj, void *_pd, va_list *list);
3073 void _part_external_content_get(Eo *obj, void *_pd, va_list *list);
3074 void _part_external_param_type_get(Eo *obj, void *_pd, va_list *list);
3075 
3076 void _file_get(Eo *obj, void *_pd, va_list *list);
3077 void _load_error_get(Eo *obj, void *_pd, va_list *list);
3078 
3079 void _message_send(Eo *obj, void *_pd, va_list *list);
3080 void _message_handler_set(Eo *obj, void *_pd, va_list *list);
3081 void _message_signal_process(Eo *obj, void *_pd, va_list *list);
3082 
3083 void _signal_callback_add(Eo *obj, void *_pd, va_list *list);
3084 void _signal_callback_del(Eo *obj, void *_pd, va_list *list);
3085 void _signal_callback_del_full(Eo *obj, void *_pd, va_list *list);
3086 void _signal_emit(Eo *obj, void *_pd, va_list *list);
3087 void _play_set(Eo *obj, void *_pd, va_list *list);
3088 void _play_get(Eo *obj, void *_pd, va_list *list);
3089 void _animation_set(Eo *obj, void *_pd, va_list *list);
3090 void _animation_get(Eo *obj, void *_pd, va_list *list);
3091 
3092 void edje_signal_init(void);
3093 void edje_signal_shutdown(void);
3094 
3095 Eina_Bool _edje_real_part_mouse_events_get(Edje *ed, Edje_Real_Part *rp);
3096 void _edje_real_part_mouse_events_set(Edje *ed, Edje_Real_Part *rp, Eina_Bool mouse_events);
3097 Eina_Bool _edje_real_part_repeat_events_get(Edje *ed, Edje_Real_Part *rp);
3098 void _edje_real_part_repeat_events_set(Edje *ed, Edje_Real_Part *rp, Eina_Bool repeat_events);
3099 void _edje_real_part_pointer_mode_set(Edje *ed, Edje_Real_Part *rp, Evas_Object_Pointer_Mode mode);
3100 Evas_Event_Flags _edje_real_part_ignore_flags_get(Edje *ed, Edje_Real_Part *rp);
3101 void _edje_real_part_ignore_flags_set(Edje *ed, Edje_Real_Part *rp, Evas_Event_Flags ignore_flags);
3102 Evas_Event_Flags _edje_real_part_mask_flags_get(Edje *ed, Edje_Real_Part *rp);
3103 void _edje_real_part_mask_flags_set(Edje *ed, Edje_Real_Part *rp, Evas_Event_Flags mask_flags);
3104 
3105 /* part drag apis */
3106 Edje_Drag_Dir _edje_object_part_drag_dir_get(Edje *ed, const char *part);
3107 Eina_Bool _edje_object_part_drag_value_set(Edje *ed, const char *part, double dx, double dy);
3108 Eina_Bool _edje_object_part_drag_value_get(Edje *ed, const char *part, double *dx, double *dy);
3109 Eina_Bool _edje_object_part_drag_size_set(Edje *ed, const char *part, double dw, double dh);
3110 Eina_Bool _edje_object_part_drag_size_get(Edje *ed, const char *part, double *dw, double *dh);
3111 Eina_Bool _edje_object_part_drag_step_set(Edje *ed, const char *part, double dx, double dy);
3112 Eina_Bool _edje_object_part_drag_step_get(Edje *ed, const char *part, double *dx, double *dy);
3113 Eina_Bool _edje_object_part_drag_page_set(Edje *ed, const char *part, double dx, double dy);
3114 Eina_Bool _edje_object_part_drag_page_get(Edje *ed, const char *part, double *dx, double *dy);
3115 Eina_Bool _edje_object_part_drag_step(Edje *ed, const char *part, double dx, double dy);
3116 Eina_Bool _edje_object_part_drag_page(Edje *ed, const char *part, double dx, double dy);
3117 
3118 /* part proxy */
3119 Eo *_edje_other_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3120 Eo *_edje_invalid_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3121 
3122 /* part containers: box */
3123 Eo *_edje_box_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3124 Eina_Bool _edje_part_box_append(Edje *ed, const char *part, Evas_Object *child);
3125 Eina_Bool _edje_part_box_prepend(Edje *ed, const char *part, Evas_Object *child);
3126 Eina_Bool _edje_part_box_insert_before(Edje *ed, const char *part, Evas_Object *child, const Evas_Object *reference);
3127 Eina_Bool _edje_part_box_insert_after(Edje *ed, const char *part, Evas_Object *child, const Evas_Object *reference);
3128 Eina_Bool _edje_part_box_insert_at(Edje *ed, const char *part, Evas_Object *child, unsigned int pos);
3129 Evas_Object *_edje_part_box_content_at(Edje *ed, const char *part, unsigned int pos);
3130 Evas_Object *_edje_part_box_remove(Edje *ed, const char *part, Evas_Object *child);
3131 Evas_Object *_edje_part_box_remove_at(Edje *ed, const char *part, unsigned int pos);
3132 Eina_Bool _edje_part_box_remove_all(Edje *ed, const char *part, Eina_Bool clear);
3133 
3134 /* part containers: table */
3135 Eo *_edje_table_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3136 Evas_Object *_edje_part_table_child_get(Edje *ed, const char *part, unsigned int col, unsigned int row);
3137 Eina_Bool _edje_part_table_pack(Edje *ed, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
3138 Eina_Bool _edje_part_table_unpack(Edje *ed, const char *part, Evas_Object *child_obj);
3139 Eina_Bool _edje_part_table_col_row_size_get(Edje *ed, const char *part, int *cols, int *rows);
3140 Eina_Bool _edje_part_table_clear(Edje *ed, const char *part, Eina_Bool clear);
3141 
3142 /* part containers: swallow */
3143 Eo *_edje_swallow_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3144 Efl_Gfx_Entity *_edje_efl_content_content_get(Edje *ed, const char *part);
3145 Eina_Bool _edje_efl_content_content_set(Edje *ed, const char *part, Efl_Gfx_Entity *obj_swallow);
3146 
3147 /* part containers: external */
3148 Eo *_edje_external_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3149 Eina_Bool _edje_object_part_external_param_set(Edje *ed, const char *part, const Edje_External_Param *param);
3150 Eina_Bool _edje_object_part_external_param_get(Edje *ed, const char *part, Edje_External_Param *param);
3151 Edje_External_Param_Type _edje_object_part_external_param_type_get(Edje *ed, const char *part, const char *param);
3152 Evas_Object *_edje_object_part_external_object_get(Edje *ed, const char *part);
3153 Evas_Object *_edje_object_part_external_content_get(Edje *ed, const char *part, const char *content);
3154 
3155 /* part text */
3156 Eo *_edje_text_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp, const char *part);
3157 Eina_Bool   _edje_efl_text_text_set(Eo *obj, Edje *ed, const char *part, const char *text, Eina_Bool legacy, Eina_Bool set_markup);
3158 const char *_edje_efl_text_text_get(const Eo *obj, Edje *ed, const char *part, Eina_Bool legacy, Eina_Bool get_markup);
3159 Eina_Bool   _edje_efl_text_markup_set(Eo *obj, Edje *ed, const char *part, const char *markup);
3160 const char *_edje_efl_text_markup_get(Eo *obj, Edje *ed, const char *part);
3161 Evas_Textblock_Cursor *_edje_text_cursor_get(Edje_Real_Part *rp, Edje_Cursor cur);
3162 void _edje_text_cursor_begin(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3163 void _edje_text_cursor_end(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3164 void _edje_text_cursor_pos_set(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur, int pos);
3165 int _edje_text_cursor_pos_get(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3166 Eina_Bool _edje_text_cursor_coord_set(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur, int x, int y);
3167 void _edje_text_cursor_line_begin(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3168 void _edje_text_cursor_line_end(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3169 Eina_Bool _edje_text_cursor_next(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3170 Eina_Bool _edje_text_cursor_prev(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3171 Eina_Bool _edje_text_cursor_up(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3172 Eina_Bool _edje_text_cursor_down(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3173 void _edje_text_cursor_copy(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *dst, Efl_Text_Cursor_Handle *cur);
3174 char * _edje_text_cursor_content_get(Edje_Real_Part *rp, Efl_Text_Cursor_Handle *cur);
3175 void _edje_object_part_text_insert(Edje *ed, Edje_Real_Part *rp, const char *text);
3176 
3177 void _edje_internal_proxy_shutdown(void);
3178 #ifdef BUILD_VG_LOADER_JSON
3179 void _edje_part_vector_anim_stop(Edje *ed, Edje_Real_Part *rp);
3180 void _edje_part_vector_anim_pause(Edje *ed, Edje_Real_Part *rp);
3181 void _edje_part_vector_anim_resume(Edje *ed, Edje_Real_Part *rp);
3182 void _edje_part_vector_anim_play(Edje *ed, Edje_Real_Part *rp, Eina_Bool backward, Eina_Bool loop);
3183 #endif
3184 
3185 #ifdef HAVE_EPHYSICS
3186 Eina_Bool _edje_ephysics_load(void);
3187 
3188 typedef struct _Edje_Ephysics Edje_Ephysics;
3189 
3190 struct _Edje_Ephysics
3191 {
3192    Eina_Module *mod;
3193 
3194    int (*ephysics_init) (void);
3195    int (*ephysics_shutdown) (void);
3196    EPhysics_World *(*ephysics_world_new) (void);
3197    void (*ephysics_world_del) (EPhysics_World *world);
3198    void (*ephysics_world_event_callback_add) (EPhysics_World *world, EPhysics_Callback_World_Type type, EPhysics_World_Event_Cb func, const void *data);
3199    void (*ephysics_world_rate_set) (EPhysics_World *world, double rate);
3200    void (*ephysics_world_gravity_set) (EPhysics_World *world, double gx, double gy, double gz);
3201    void (*ephysics_world_render_geometry_set) (EPhysics_World *world, Evas_Coord x, Evas_Coord y, Evas_Coord z, Evas_Coord w, Evas_Coord h, Evas_Coord d);
3202    void (*ephysics_world_render_geometry_get) (const EPhysics_World *world, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z, Evas_Coord *w, Evas_Coord *h, Evas_Coord *d);
3203    void (*ephysics_quaternion_set) (EPhysics_Quaternion *quat, double x, double y, double z, double w);
3204    void (*ephysics_quaternion_get) (const EPhysics_Quaternion *quat, double *x, double *y, double *z, double *w);
3205    void (*ephysics_quaternion_normalize) (EPhysics_Quaternion *quat);
3206    EPhysics_Body *(*ephysics_body_box_add) (EPhysics_World *world);
3207    EPhysics_Body *(*ephysics_body_sphere_add) (EPhysics_World *world);
3208    EPhysics_Body *(*ephysics_body_cylinder_add) (EPhysics_World *world);
3209    EPhysics_Body *(*ephysics_body_soft_box_add) (EPhysics_World *world);
3210    EPhysics_Body *(*ephysics_body_soft_sphere_add) (EPhysics_World *world, int granularity);
3211    EPhysics_Body *(*ephysics_body_soft_cylinder_add) (EPhysics_World *world);
3212    EPhysics_Body *(*ephysics_body_cloth_add) (EPhysics_World *world, unsigned short rows, unsigned short columns);
3213    EPhysics_Body *(*ephysics_body_top_boundary_add) (EPhysics_World *world);
3214    EPhysics_Body *(*ephysics_body_bottom_boundary_add) (EPhysics_World *world);
3215    EPhysics_Body *(*ephysics_body_right_boundary_add) (EPhysics_World *world);
3216    EPhysics_Body *(*ephysics_body_left_boundary_add) (EPhysics_World *world);
3217    EPhysics_Body *(*ephysics_body_front_boundary_add) (EPhysics_World *world);
3218    EPhysics_Body *(*ephysics_body_back_boundary_add) (EPhysics_World *world);
3219    void (*ephysics_body_central_impulse_apply) (EPhysics_Body *body, double x, double y, double z);
3220    void (*ephysics_body_torque_impulse_apply) (EPhysics_Body *body, double pitch, double yaw, double roll);
3221    void (*ephysics_body_central_force_apply) (EPhysics_Body *body, double x, double y, double z);
3222    void (*ephysics_body_torque_apply) (EPhysics_Body *body, double torque_x, double torque_y, double torque_z);
3223    void (*ephysics_body_forces_clear) (EPhysics_Body *body);
3224    void (*ephysics_body_linear_velocity_set) (EPhysics_Body *body, double x, double y, double z);
3225    void (*ephysics_body_angular_velocity_set) (EPhysics_Body *body, double x, double y, double z);
3226    void (*ephysics_body_stop) (EPhysics_Body *body);
3227    void (*ephysics_body_rotation_set) (EPhysics_Body *body, EPhysics_Quaternion *quat);
3228    void (*ephysics_body_forces_get) (const EPhysics_Body *body, double *x, double *y, double *z);
3229    void (*ephysics_body_torques_get) (const EPhysics_Body *body, double *x, double *y, double *z);
3230    void (*ephysics_body_linear_velocity_get) (const EPhysics_Body *body, double *x, double *y, double *z);
3231    void (*ephysics_body_angular_velocity_get) (const EPhysics_Body *body, double *x, double *y, double *z);
3232    void (*ephysics_body_linear_movement_enable_set) (EPhysics_Body *body, Eina_Bool enable_x, Eina_Bool enable_y, Eina_Bool enable_z);
3233    void (*ephysics_body_angular_movement_enable_set) (EPhysics_Body *body, Eina_Bool enable_x, Eina_Bool enable_y, Eina_Bool enable_z);
3234    void (*ephysics_body_move) (EPhysics_Body *body, Evas_Coord x, Evas_Coord y, Evas_Coord z);
3235    void (*ephysics_body_geometry_get) (const EPhysics_Body *body, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z, Evas_Coord *w, Evas_Coord *h, Evas_Coord *d);
3236    void (*ephysics_body_resize) (EPhysics_Body *body, Evas_Coord w, Evas_Coord h, Evas_Coord d);
3237    void (*ephysics_body_material_set) (EPhysics_Body *body, EPhysics_Body_Material material);
3238    void (*ephysics_body_density_set) (EPhysics_Body *body, double density);
3239    void (*ephysics_body_mass_set) (EPhysics_Body *body, double mass);
3240    void (*ephysics_body_soft_body_hardness_set) (EPhysics_Body *body, double hardness);
3241    void (*ephysics_body_restitution_set) (EPhysics_Body *body, double restitution);
3242    void (*ephysics_body_friction_set) (EPhysics_Body *body, double friction);
3243    void (*ephysics_body_damping_set) (EPhysics_Body *body, double linear_damping, double angular_damping);
3244    void (*ephysics_body_sleeping_threshold_set) (EPhysics_Body *body, double linear_threshold, double angular_threshold);
3245    void (*ephysics_body_light_set) (EPhysics_Body *body, Eina_Bool enable);
3246    void (*ephysics_body_back_face_culling_set) (EPhysics_Body *body, Eina_Bool enable);
3247    void (*ephysics_body_evas_object_update) (EPhysics_Body *body);
3248    void (*ephysics_body_face_evas_object_set) (EPhysics_Body *body, EPhysics_Body_Face face, Evas_Object *evas_obj, Eina_Bool use_obj_pos);
3249    void (*ephysics_body_evas_object_set) (EPhysics_Body *body, Evas_Object *evas_obj, Eina_Bool use_obj_pos);
3250    void (*ephysics_body_event_callback_add) (EPhysics_Body *body, EPhysics_Callback_Body_Type type, EPhysics_Body_Event_Cb func, const void *data);
3251    void (*ephysics_body_data_set) (EPhysics_Body *body, void *data);
3252    void *(*ephysics_body_data_get) (const EPhysics_Body *body);
3253    EPhysics_Quaternion *(*ephysics_body_rotation_get) (const EPhysics_Body *body, EPhysics_Quaternion *rotation);
3254 };
3255 
3256 extern Edje_Ephysics *_edje_ephysics;
3257 #define EPH_LOAD() _edje_ephysics_load()
3258 #define EPH_CALL(x) _edje_ephysics->x
3259 
3260 #endif
3261 
3262 #ifdef HAVE_LIBREMIX
3263 #include <remix/remix.h>
3264 #endif
3265 
3266 typedef struct _Edje_Multisense_Env  Edje_Multisense_Env;
3267 
3268 struct _Edje_Multisense_Env
3269 {
3270 #ifdef HAVE_LIBREMIX
3271    RemixEnv *remixenv;
3272 #endif
3273 };
3274 
3275 typedef Eina_Bool (*MULTISENSE_FACTORY_INIT_FUNC) (Edje_Multisense_Env *);
3276 #ifdef HAVE_LIBREMIX
3277 typedef RemixBase* (*MULTISENSE_SOUND_PLAYER_GET_FUNC) (Edje_Multisense_Env *);
3278 #endif
3279 
3280 #include "efl_canvas_layout_part_invalid.eo.h"
3281 
3282 #undef EAPI
3283 #define EAPI
3284 
3285 #endif
3286