aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/edje/src/lib/edje_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/edje/src/lib/edje_private.h')
-rw-r--r--libraries/edje/src/lib/edje_private.h2028
1 files changed, 2028 insertions, 0 deletions
diff --git a/libraries/edje/src/lib/edje_private.h b/libraries/edje/src/lib/edje_private.h
new file mode 100644
index 0000000..cbb3e03
--- /dev/null
+++ b/libraries/edje/src/lib/edje_private.h
@@ -0,0 +1,2028 @@
1#ifndef _EDJE_PRIVATE_H
2#define _EDJE_PRIVATE_H
3
4#ifdef HAVE_CONFIG_H
5# include <config.h>
6#endif
7
8#ifndef _WIN32
9# define _GNU_SOURCE
10#endif
11
12#ifdef HAVE_ALLOCA_H
13# include <alloca.h>
14#elif defined __GNUC__
15# define alloca __builtin_alloca
16#elif defined _AIX
17# define alloca __alloca
18#elif defined _MSC_VER
19# include <malloc.h>
20# define alloca _alloca
21#else
22# include <stddef.h>
23void *alloca (size_t);
24#endif
25
26#include <string.h>
27#include <limits.h>
28#include <sys/stat.h>
29#include <time.h>
30#include <sys/time.h>
31#include <errno.h>
32
33#ifndef _MSC_VER
34# include <libgen.h>
35# include <unistd.h>
36#endif
37
38#include <lua.h>
39#include <lualib.h>
40#include <lauxlib.h>
41#include <setjmp.h>
42
43#ifdef HAVE_LOCALE_H
44# include <locale.h>
45#endif
46
47#ifdef HAVE_EVIL
48# include <Evil.h>
49#endif
50
51#include <Eina.h>
52#include <Eet.h>
53#include <Evas.h>
54#include <Ecore.h>
55#include <Ecore_Evas.h>
56#include <Ecore_File.h>
57#ifdef HAVE_ECORE_IMF
58# include <Ecore_IMF.h>
59# include <Ecore_IMF_Evas.h>
60#endif
61#include <Embryo.h>
62
63#include "Edje.h"
64
65EAPI extern int _edje_default_log_dom ;
66
67#ifdef EDJE_DEFAULT_LOG_COLOR
68# undef EDJE_DEFAULT_LOG_COLOR
69#endif
70#define EDJE_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
71#ifdef ERR
72# undef ERR
73#endif
74#define ERR(...) EINA_LOG_DOM_ERR(_edje_default_log_dom, __VA_ARGS__)
75#ifdef INF
76# undef INF
77#endif
78#define INF(...) EINA_LOG_DOM_INFO(_edje_default_log_dom, __VA_ARGS__)
79#ifdef WRN
80# undef WRN
81#endif
82#define WRN(...) EINA_LOG_DOM_WARN(_edje_default_log_dom, __VA_ARGS__)
83#ifdef CRIT
84# undef CRIT
85#endif
86#define CRIT(...) EINA_LOG_DOM_CRIT(_edje_default_log_dom, __VA_ARGS__)
87#ifdef __GNUC__
88# if __GNUC__ >= 4
89// BROKEN in gcc 4 on amd64
90//# pragma GCC visibility push(hidden)
91# endif
92#endif
93
94#ifndef ABS
95#define ABS(x) ((x) < 0 ? -(x) : (x))
96#endif
97
98#ifndef CLAMP
99#define CLAMP(x, min, max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x)))
100#endif
101
102#ifndef MIN
103#define MIN(a, b) (((a) < (b)) ? (a) : (b))
104#endif
105
106
107#ifdef BUILD_EDJE_FP
108
109#define FLOAT_T Eina_F32p32
110#define EDJE_T_FLOAT EET_T_F32P32
111#define MUL(a, b) eina_f32p32_mul(a, b)
112#define SCALE(a, b) eina_f32p32_scale(a, b)
113#define DIV(a, b) eina_f32p32_div(a, b)
114#define DIV2(a) ((a) >> 1)
115#define ADD(a, b) eina_f32p32_add(a, b)
116#define SUB(a, b) eina_f32p32_sub(a, b)
117#define SQRT(a) eina_f32p32_sqrt(a)
118#define TO_DOUBLE(a) eina_f32p32_double_to(a)
119#define FROM_DOUBLE(a) eina_f32p32_double_from(a)
120#define FROM_INT(a) eina_f32p32_int_from(a)
121#define TO_INT(a) eina_f32p32_int_to(a)
122#define ZERO 0
123#define COS(a) eina_f32p32_cos(a)
124#define SIN(a) eina_f32p32_sin(a)
125#define PI EINA_F32P32_PI
126
127#else
128
129#define FLOAT_T double
130#define EDJE_T_FLOAT EET_T_DOUBLE
131#define MUL(a, b) ((a) * (b))
132#define SCALE(a, b) ((a) * (double)(b))
133#define DIV(a, b) ((a) / (b))
134#define DIV2(a) ((a) / 2.0)
135#define ADD(a, b) ((a) + (b))
136#define SUB(a, b) ((a) - (b))
137#define SQRT(a) sqrt(a)
138#define TO_DOUBLE(a) (double)(a)
139#define FROM_DOUBLE(a) (a)
140#define FROM_INT(a) (double)(a)
141#define TO_INT(a) (int)(a)
142#define ZERO 0.0
143#define COS(a) cos(a)
144#define SIN(a) sin(a)
145#define PI 3.14159265358979323846
146
147#endif
148
149/* Inheritable Edje Smart API. For now private so only Edje Edit makes
150 * use of this, but who knows what will be possible in the future */
151#define EDJE_SMART_API_VERSION 1
152
153typedef struct _Edje_Smart_Api Edje_Smart_Api;
154
155struct _Edje_Smart_Api
156{
157 Evas_Smart_Class base;
158 int version;
159 Eina_Bool (*file_set)(Evas_Object *obj, const char *file, const char *group);
160};
161
162/* Basic macro to init the Edje Smart API */
163#define EDJE_SMART_API_INIT(smart_class_init) {smart_class_init, EDJE_SMART_API_VERSION, NULL}
164
165#define EDJE_SMART_API_INIT_NULL EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
166#define EDJE_SMART_API_INIT_VERSION EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
167#define EDJE_SMART_API_INIT_NAME_VERSION(name) EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
168
169/* increment this when the EET data descriptors have changed and old
170 * EETs cannot be loaded/used correctly anymore.
171 */
172#define EDJE_FILE_VERSION 3
173/* increment this when you add new feature to edje file format without
174 * breaking backward compatibility.
175 */
176#define EDJE_FILE_MINOR 2
177
178/* FIXME:
179 *
180 * More example Edje files
181 *
182 * ? programs can do multiple actions from one signal
183 * ? add containering (hbox, vbox, table, wrapping multi-line hbox & vbox)
184 * ? text entry widget (single line only)
185 *
186 * ? recursions, unsafe callbacks outside Edje etc. with freeze, ref/unref and block/unblock and break_programs needs to be redesigned & fixed
187 * ? all unsafe calls that may result in callbacks must be marked and dealt with
188 */
189
190typedef enum
191{
192 EDJE_ASPECT_PREFER_NONE,
193 EDJE_ASPECT_PREFER_VERTICAL,
194 EDJE_ASPECT_PREFER_HORIZONTAL,
195 EDJE_ASPECT_PREFER_BOTH
196} Edje_Internal_Aspect;
197
198struct _Edje_Perspective
199{
200 Evas_Object *obj;
201 Evas *e;
202 Evas_Coord px, py, z0, foc;
203 Eina_List *users;
204 Eina_Bool global : 1;
205};
206
207struct _Edje_Position_Scale
208{
209 FLOAT_T x, y;
210};
211
212struct _Edje_Position
213{
214 int x, y;
215};
216
217struct _Edje_Size
218{
219 int w, h;
220};
221
222struct _Edje_Rectangle
223{
224 int x, y, w, h;
225};
226
227struct _Edje_Color
228{
229 unsigned char r, g, b, a;
230};
231
232struct _Edje_Aspect_Prefer
233{
234 FLOAT_T min, max;
235 Edje_Internal_Aspect prefer;
236};
237
238struct _Edje_Aspect
239{
240 int w, h;
241 Edje_Aspect_Control mode;
242};
243
244struct _Edje_String
245{
246 const char *str;
247 unsigned int id;
248};
249
250typedef struct _Edje_Position_Scale Edje_Alignment;
251typedef struct _Edje_Position_Scale Edje_Position_Scale;
252typedef struct _Edje_Position Edje_Position;
253typedef struct _Edje_Size Edje_Size;
254typedef struct _Edje_Rectangle Edje_Rectangle;
255typedef struct _Edje_Color Edje_Color;
256typedef struct _Edje_Aspect_Prefer Edje_Aspect_Prefer;
257typedef struct _Edje_Aspect Edje_Aspect;
258typedef struct _Edje_String Edje_String;
259
260typedef struct _Edje_File Edje_File;
261typedef struct _Edje_Style Edje_Style;
262typedef struct _Edje_Style_Tag Edje_Style_Tag;
263typedef struct _Edje_External_Directory Edje_External_Directory;
264typedef struct _Edje_External_Directory_Entry Edje_External_Directory_Entry;
265typedef struct _Edje_Font_Directory_Entry Edje_Font_Directory_Entry;
266typedef struct _Edje_Image_Directory Edje_Image_Directory;
267typedef struct _Edje_Image_Directory_Entry Edje_Image_Directory_Entry;
268typedef struct _Edje_Image_Directory_Set Edje_Image_Directory_Set;
269typedef struct _Edje_Image_Directory_Set_Entry Edje_Image_Directory_Set_Entry;
270typedef struct _Edje_Limit Edje_Limit;
271typedef struct _Edje_Sound_Sample Edje_Sound_Sample;
272typedef struct _Edje_Sound_Tone Edje_Sound_Tone;
273typedef struct _Edje_Sound_Directory Edje_Sound_Directory;
274typedef struct _Edje_Program Edje_Program;
275typedef struct _Edje_Program_Target Edje_Program_Target;
276typedef struct _Edje_Program_After Edje_Program_After;
277typedef struct _Edje_Part_Collection_Directory_Entry Edje_Part_Collection_Directory_Entry;
278typedef struct _Edje_Pack_Element Edje_Pack_Element;
279typedef struct _Edje_Part_Collection Edje_Part_Collection;
280typedef struct _Edje_Part Edje_Part;
281typedef struct _Edje_Part_Api Edje_Part_Api;
282typedef struct _Edje_Part_Dragable Edje_Part_Dragable;
283typedef struct _Edje_Part_Image_Id Edje_Part_Image_Id;
284typedef struct _Edje_Part_Description_Image Edje_Part_Description_Image;
285typedef struct _Edje_Part_Description_Proxy Edje_Part_Description_Proxy;
286typedef struct _Edje_Part_Description_Text Edje_Part_Description_Text;
287typedef struct _Edje_Part_Description_Box Edje_Part_Description_Box;
288typedef struct _Edje_Part_Description_Table Edje_Part_Description_Table;
289typedef struct _Edje_Part_Description_External Edje_Part_Description_External;
290typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common;
291typedef struct _Edje_Part_Description_Spec_Fill Edje_Part_Description_Spec_Fill;
292typedef struct _Edje_Part_Description_Spec_Border Edje_Part_Description_Spec_Border;
293typedef struct _Edje_Part_Description_Spec_Image Edje_Part_Description_Spec_Image;
294typedef struct _Edje_Part_Description_Spec_Proxy Edje_Part_Description_Spec_Proxy;
295typedef struct _Edje_Part_Description_Spec_Text Edje_Part_Description_Spec_Text;
296typedef struct _Edje_Part_Description_Spec_Box Edje_Part_Description_Spec_Box;
297typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_Table;
298typedef struct _Edje_Patterns Edje_Patterns;
299typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation;
300
301typedef struct _Edje Edje;
302typedef struct _Edje_Real_Part_State Edje_Real_Part_State;
303typedef struct _Edje_Real_Part_Drag Edje_Real_Part_Drag;
304typedef struct _Edje_Real_Part_Set Edje_Real_Part_Set;
305typedef struct _Edje_Real_Part Edje_Real_Part;
306typedef struct _Edje_Running_Program Edje_Running_Program;
307typedef struct _Edje_Signal_Callback Edje_Signal_Callback;
308typedef struct _Edje_Calc_Params Edje_Calc_Params;
309typedef struct _Edje_Pending_Program Edje_Pending_Program;
310typedef struct _Edje_Text_Style Edje_Text_Style;
311typedef struct _Edje_Color_Class Edje_Color_Class;
312typedef struct _Edje_Text_Class Edje_Text_Class;
313typedef struct _Edje_Var Edje_Var;
314typedef struct _Edje_Var_Int Edje_Var_Int;
315typedef struct _Edje_Var_Float Edje_Var_Float;
316typedef struct _Edje_Var_String Edje_Var_String;
317typedef struct _Edje_Var_List Edje_Var_List;
318typedef struct _Edje_Var_Hash Edje_Var_Hash;
319typedef struct _Edje_Var_Animator Edje_Var_Animator;
320typedef struct _Edje_Var_Timer Edje_Var_Timer;
321typedef struct _Edje_Var_Pool Edje_Var_Pool;
322typedef struct _Edje_Signal_Source_Char Edje_Signal_Source_Char;
323typedef struct _Edje_Text_Insert_Filter_Callback Edje_Text_Insert_Filter_Callback;
324
325#define EDJE_INF_MAX_W 100000
326#define EDJE_INF_MAX_H 100000
327
328#define EDJE_IMAGE_SOURCE_TYPE_NONE 0
329#define EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT 1
330#define EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY 2
331#define EDJE_IMAGE_SOURCE_TYPE_EXTERNAL 3
332#define EDJE_IMAGE_SOURCE_TYPE_LAST 4
333
334#define EDJE_SOUND_SOURCE_TYPE_NONE 0
335#define EDJE_SOUND_SOURCE_TYPE_INLINE_RAW 1
336#define EDJE_SOUND_SOURCE_TYPE_INLINE_COMP 2
337#define EDJE_SOUND_SOURCE_TYPE_INLINE_LOSSY 3
338#define EDJE_SOUND_SOURCE_TYPE_INLINE_AS_IS 4
339
340#define EDJE_VAR_NONE 0
341#define EDJE_VAR_INT 1
342#define EDJE_VAR_FLOAT 2
343#define EDJE_VAR_STRING 3
344#define EDJE_VAR_LIST 4
345#define EDJE_VAR_HASH 5
346
347#define EDJE_VAR_MAGIC_BASE 0x12fe84ba
348
349#define EDJE_STATE_PARAM_NONE 0
350#define EDJE_STATE_PARAM_ALIGNMENT 1
351#define EDJE_STATE_PARAM_MIN 2
352#define EDJE_STATE_PARAM_MAX 3
353#define EDJE_STATE_PARAM_STEP 4
354#define EDJE_STATE_PARAM_ASPECT 5
355#define EDJE_STATE_PARAM_ASPECT_PREF 6
356#define EDJE_STATE_PARAM_COLOR 7
357#define EDJE_STATE_PARAM_COLOR2 8
358#define EDJE_STATE_PARAM_COLOR3 9
359#define EDJE_STATE_PARAM_COLOR_CLASS 10
360#define EDJE_STATE_PARAM_REL1 11
361#define EDJE_STATE_PARAM_REL1_TO 12
362#define EDJE_STATE_PARAM_REL1_OFFSET 13
363#define EDJE_STATE_PARAM_REL2 14
364#define EDJE_STATE_PARAM_REL2_TO 15
365#define EDJE_STATE_PARAM_REL2_OFFSET 16
366#define EDJE_STATE_PARAM_IMAGE 17
367#define EDJE_STATE_PARAM_BORDER 18
368#define EDJE_STATE_PARAM_FILL_SMOOTH 19
369#define EDJE_STATE_PARAM_FILL_POS 20
370#define EDJE_STATE_PARAM_FILL_SIZE 21
371#define EDJE_STATE_PARAM_TEXT 22
372#define EDJE_STATE_PARAM_TEXT_CLASS 23
373#define EDJE_STATE_PARAM_TEXT_FONT 24
374#define EDJE_STATE_PARAM_TEXT_STYLE 25
375#define EDJE_STATE_PARAM_TEXT_SIZE 26
376#define EDJE_STATE_PARAM_TEXT_FIT 27
377#define EDJE_STATE_PARAM_TEXT_MIN 28
378#define EDJE_STATE_PARAM_TEXT_MAX 29
379#define EDJE_STATE_PARAM_TEXT_ALIGN 30
380#define EDJE_STATE_PARAM_VISIBLE 31
381#define EDJE_STATE_PARAM_MAP_OM 32
382#define EDJE_STATE_PARAM_MAP_PERSP 33
383#define EDJE_STATE_PARAM_MAP_LIGNT 34
384#define EDJE_STATE_PARAM_MAP_ROT_CENTER 35
385#define EDJE_STATE_PARAM_MAP_ROT_X 36
386#define EDJE_STATE_PARAM_MAP_ROT_Y 37
387#define EDJE_STATE_PARAM_MAP_ROT_Z 38
388#define EDJE_STATE_PARAM_MAP_BACK_CULL 39
389#define EDJE_STATE_PARAM_MAP_PERSP_ON 40
390#define EDJE_STATE_PARAM_PERSP_ZPLANE 41
391#define EDJE_STATE_PARAM_PERSP_FOCAL 42
392#define EDJE_STATE_PARAM_LAST 43
393
394#define EDJE_ENTRY_EDIT_MODE_NONE 0
395#define EDJE_ENTRY_EDIT_MODE_SELECTABLE 1
396#define EDJE_ENTRY_EDIT_MODE_EDITABLE 2
397#define EDJE_ENTRY_EDIT_MODE_PASSWORD 3
398
399#define EDJE_ENTRY_SELECTION_MODE_DEFAULT 0
400#define EDJE_ENTRY_SELECTION_MODE_EXPLICIT 1
401
402#define EDJE_ENTRY_CURSOR_MODE_UNDER 0
403#define EDJE_ENTRY_CURSOR_MODE_BEFORE 1
404
405#define EDJE_ORIENTATION_AUTO 0
406#define EDJE_ORIENTATION_LTR 1
407#define EDJE_ORIENTATION_RTL 2
408
409#define EDJE_PART_PATH_SEPARATOR ':'
410#define EDJE_PART_PATH_SEPARATOR_STRING ":"
411#define EDJE_PART_PATH_SEPARATOR_INDEXL '['
412#define EDJE_PART_PATH_SEPARATOR_INDEXR ']'
413
414#define FLAG_NONE 0
415#define FLAG_X 0x01
416#define FLAG_Y 0x02
417#define FLAG_XY (FLAG_X | FLAG_Y)
418
419/*----------*/
420
421struct _Edje_File
422{
423 const char *path;
424 time_t mtime;
425
426 Edje_External_Directory *external_dir;
427 Edje_Image_Directory *image_dir;
428 Edje_Sound_Directory *sound_dir;
429 Eina_List *styles;
430 Eina_List *color_classes;
431
432 int references;
433 const char *compiler;
434 int version;
435 int minor;
436 int feature_ver;
437
438 Eina_Hash *data;
439 Eina_Hash *fonts;
440
441 Eina_Hash *collection;
442 Eina_List *collection_cache;
443
444 Edje_Patterns *collection_patterns;
445
446 Eet_File *ef;
447
448 unsigned char free_strings : 1;
449 unsigned char dangling : 1;
450 unsigned char warning : 1;
451};
452
453struct _Edje_Style
454{
455 char *name;
456 Eina_List *tags;
457 Evas_Textblock_Style *style;
458};
459
460struct _Edje_Style_Tag
461{
462 const char *key;
463 const char *value;
464 const char *font;
465 double font_size;
466 const char *text_class;
467};
468
469/*----------*/
470
471
472struct _Edje_Font_Directory_Entry
473{
474 const char *entry; /* the name of the font */
475 const char *file; /* the name of the file */
476};
477
478/*----------*/
479
480struct _Edje_External_Directory
481{
482 Edje_External_Directory_Entry *entries; /* a list of Edje_External_Directory_Entry */
483 unsigned int entries_count;
484};
485
486struct _Edje_External_Directory_Entry
487{
488 const char *entry; /* the name of the external */
489};
490
491
492/*----------*/
493
494
495
496/*----------*/
497
498struct _Edje_Image_Directory
499{
500 Edje_Image_Directory_Entry *entries; /* an array of Edje_Image_Directory_Entry */
501 unsigned int entries_count;
502
503 Edje_Image_Directory_Set *sets;
504 unsigned int sets_count; /* an array of Edje_Image_Directory_Set */
505};
506
507struct _Edje_Image_Directory_Entry
508{
509 const char *entry; /* the nominal name of the image - if any */
510 int source_type; /* alternate source mode. 0 = none */
511 int source_param; /* extra params on encoding */
512 int id; /* the id no. of the image */
513};
514
515struct _Edje_Image_Directory_Set
516{
517 char *name;
518 Eina_List *entries;
519
520 int id;
521};
522
523struct _Edje_Image_Directory_Set_Entry
524{
525 const char *name;
526 int id;
527
528 struct {
529 struct {
530 int w;
531 int h;
532 } min, max;
533 } size;
534};
535
536struct _Edje_Sound_Sample /*Sound Sample*/
537{
538 const char *name; /* the nominal name of the sound */
539 const char *snd_src; /* Sound source Wav file */
540 int compression; /* Compression - RAW, LOSSLESS COMP , LOSSY ) */
541 int mode; /* alternate source mode. 0 = none */
542 double quality;
543 int id; /* the id no. of the sound */
544};
545
546struct _Edje_Sound_Tone /*Sound Sample*/
547{
548 const char *name; /* the nominal name of the sound - if any */
549 int value; /* alternate source mode. 0 = none */
550 int id; /* the id no. of the sound */
551};
552
553struct _Edje_Sound_Directory
554{
555
556 Edje_Sound_Sample *samples; /* an array of Edje_Sound_Sample entries */
557 unsigned int samples_count;
558
559 Edje_Sound_Tone *tones; /* an array of Edje_Sound_Tone entries */
560 unsigned int tones_count;
561};
562
563/*----------*/
564
565struct _Edje_Program /* a conditional program to be run */
566{
567 int id; /* id of program */
568 const char *name; /* name of the action */
569
570 const char *signal; /* if signal emission name matches the glob here... */
571 const char *source; /* if part that emitted this (name) matches this glob */
572 const char *sample_name;
573 const char *tone_name;
574 double duration;
575 double speed;
576
577 struct {
578 const char *part;
579 const char *state; /* if state is not set, we will try with source */
580 } filter; /* the part filter.part should be in state filter.state for signal to be accepted */
581
582 struct {
583 double from;
584 double range;
585 } in;
586
587 int action; /* type - set state, stop action, set drag pos etc. */
588 const char *state; /* what state of alternates to apply, NULL = default */
589 const char *state2; /* what other state to use - for signal emit action */
590 double value; /* value of state to apply (if multiple names match) */
591 double value2; /* other value for drag actions */
592
593 struct {
594 int mode; /* how to tween - linear, sinusoidal etc. */
595 FLOAT_T time; /* time to graduate between current and new state */
596 FLOAT_T v1; /* other value for drag actions */
597 FLOAT_T v2; /* other value for drag actions */
598 } tween;
599
600 Eina_List *targets; /* list of target parts to apply the state to */
601
602 Eina_List *after; /* list of actions to run at the end of this, for looping */
603
604 struct {
605 const char *name;
606 const char *description;
607 } api;
608
609 /* used for PARAM_COPY (param names in state and state2 above!) */
610 struct {
611 int src; /* part where parameter is being retrieved */
612 int dst; /* part where parameter is being stored */
613 } param;
614};
615
616struct _Edje_Program_Target /* the target of an action */
617{
618 int id; /* just the part id no, or action id no */
619};
620
621struct _Edje_Program_After /* the action to run after another action */
622{
623 int id;
624};
625
626/*----------*/
627struct _Edje_Limit
628{
629 const char *name;
630 int value;
631};
632
633/*----------*/
634#define PART_TYPE_FIELDS(TYPE) \
635 TYPE RECTANGLE; \
636 TYPE TEXT; \
637 TYPE IMAGE; \
638 TYPE PROXY; \
639 TYPE SWALLOW; \
640 TYPE TEXTBLOCK; \
641 TYPE GROUP; \
642 TYPE BOX; \
643 TYPE TABLE; \
644 TYPE EXTERNAL;
645
646struct _Edje_Part_Collection_Directory_Entry
647{
648 const char *entry; /* the nominal name of the part collection */
649 int id; /* the id of this named part collection */
650
651 struct
652 {
653 PART_TYPE_FIELDS(int)
654 int part;
655 } count;
656
657 struct
658 {
659 PART_TYPE_FIELDS(Eina_Mempool *)
660 Eina_Mempool *part;
661 } mp;
662
663 struct
664 {
665 PART_TYPE_FIELDS(Eina_Mempool *)
666 } mp_rtl; /* For Right To Left interface */
667
668 Edje_Part_Collection *ref;
669};
670
671/*----------*/
672
673/*----------*/
674
675struct _Edje_Pack_Element
676{
677 unsigned char type; /* only GROUP supported for now */
678 Edje_Real_Part *parent; /* pointer to the table/box that hold it, set at runtime */
679 const char *name; /* if != NULL, will be set with evas_object_name_set */
680 const char *source; /* group name to use as source for this element */
681 Edje_Size min, prefer, max;
682 struct {
683 int l, r, t, b;
684 } padding;
685 Edje_Alignment align;
686 Edje_Alignment weight;
687 Edje_Aspect aspect;
688 const char *options; /* extra options for custom objects */
689 /* table specific follows */
690 int col, row;
691 unsigned short colspan, rowspan;
692};
693
694/*----------*/
695
696struct _Edje_Part_Collection
697{
698 struct { /* list of Edje_Program */
699 Edje_Program **fnmatch; /* complex match with "*?[\" */
700 unsigned int fnmatch_count;
701
702 Edje_Program **strcmp; /* No special caractere, plain strcmp does the work */
703 unsigned int strcmp_count;
704
705 Edje_Program **strncmp; /* Finish by * or ?, plain strncmp does the work */
706 unsigned int strncmp_count;
707
708 Edje_Program **strrncmp; /* Start with * or ?, reverse strncmp will do the job */
709 unsigned int strrncmp_count;
710
711 Edje_Program **nocmp; /* Empty signal/source that will never match */
712 unsigned int nocmp_count;
713 } programs;
714
715 struct { /* list of limit that need to be monitored */
716 Edje_Limit **vertical;
717 unsigned int vertical_count;
718
719 Edje_Limit **horizontal;
720 unsigned int horizontal_count;
721 } limits;
722
723 Edje_Part **parts; /* an array of Edje_Part */
724 unsigned int parts_count;
725
726 Eina_Hash *data;
727
728 int id; /* the collection id */
729
730 Eina_Hash *alias; /* aliasing part */
731 Eina_Hash *aliased; /* invert match of alias */
732
733 struct {
734 Edje_Size min, max;
735 unsigned char orientation;
736 } prop;
737
738 int references;
739
740#ifdef EDJE_PROGRAM_CACHE
741 struct {
742 Eina_Hash *no_matches;
743 Eina_Hash *matches;
744 } prog_cache;
745#endif
746
747 Embryo_Program *script; /* all the embryo script code for this group */
748 const char *part;
749
750 unsigned char script_only;
751
752 unsigned char lua_script_only;
753
754 unsigned char checked : 1;
755};
756
757struct _Edje_Part_Dragable
758{
759 int step_x; /* drag jumps n pixels (0 = no limit) */
760 int step_y; /* drag jumps n pixels (0 = no limit) */
761
762 int count_x; /* drag area divided by n (0 = no limit) */
763 int count_y; /* drag area divided by n (0 = no limit) */
764
765 int confine_id; /* dragging within this bit, -1 = no */
766
767 /* davinchi */
768 int event_id; /* If it is used as scrollbar */
769
770 signed char x; /* can u click & drag this bit in x dir */
771 signed char y; /* can u click & drag this bit in y dir */
772};
773
774struct _Edje_Part_Api
775{
776 const char *name;
777 const char *description;
778};
779
780typedef struct _Edje_Part_Description_List Edje_Part_Description_List;
781struct _Edje_Part_Description_List
782{
783 Edje_Part_Description_Common **desc;
784 Edje_Part_Description_Common **desc_rtl; /* desc for Right To Left interface */
785 unsigned int desc_count;
786};
787
788struct _Edje_Part
789{
790 const char *name; /* the name if any of the part */
791 Edje_Part_Description_Common *default_desc; /* the part descriptor for default */
792 Edje_Part_Description_Common *default_desc_rtl; /* default desc for Right To Left interface */
793
794 Edje_Part_Description_List other; /* other possible descriptors */
795
796 const char *source, *source2, *source3, *source4, *source5, *source6;
797 int id; /* its id number */
798 int clip_to_id; /* the part id to clip this one to */
799 Edje_Part_Dragable dragable;
800 Edje_Pack_Element **items; /* packed items for box and table */
801 unsigned int items_count;
802 unsigned char type; /* what type (image, rect, text) */
803 unsigned char effect; /* 0 = plain... */
804 unsigned char mouse_events; /* it will affect/respond to mouse events */
805 unsigned char repeat_events; /* it will repeat events to objects below */
806 Evas_Event_Flags ignore_flags;
807 unsigned char scale; /* should certain properties scale with edje scale factor? */
808 unsigned char precise_is_inside;
809 unsigned char use_alternate_font_metrics;
810 unsigned char pointer_mode;
811 unsigned char entry_mode;
812 unsigned char select_mode;
813 unsigned char cursor_mode;
814 unsigned char multiline;
815 Edje_Part_Api api;
816};
817
818struct _Edje_Part_Image_Id
819{
820 int id;
821 Eina_Bool set;
822};
823
824struct _Edje_Part_Description_Common
825{
826 struct {
827 double value; /* the value of the state (for ranges) */
828 const char *name; /* the named state if any */
829 } state;
830
831 Edje_Alignment align; /* 0 <-> 1.0 alignment within allocated space */
832
833 struct {
834 unsigned char w, h; /* width or height is fixed in side (cannot expand with Edje object size) */
835 } fixed;
836
837 Edje_Size min, max;
838 Edje_Position step; /* size stepping by n pixels, 0 = none */
839 Edje_Aspect_Prefer aspect;
840
841 char *color_class; /* how to modify the color */
842 Edje_Color color;
843 Edje_Color color2;
844
845 struct {
846 FLOAT_T relative_x;
847 FLOAT_T relative_y;
848 int offset_x;
849 int offset_y;
850 int id_x; /* -1 = whole part collection, or part ID */
851 int id_y; /* -1 = whole part collection, or part ID */
852 } rel1, rel2;
853
854 struct {
855 int id_persp;
856 int id_light;
857 struct {
858 int id_center;
859 FLOAT_T x, y, z;
860 } rot;
861 unsigned char backcull;
862 unsigned char on;
863 unsigned char persp_on;
864 unsigned char smooth;
865 unsigned char alpha;
866 } map;
867
868 struct {
869 int zplane;
870 int focal;
871 } persp;
872
873 unsigned char visible; /* is it shown */
874};
875
876struct _Edje_Part_Description_Spec_Fill
877{
878 FLOAT_T pos_rel_x; /* fill offset x relative to area */
879 FLOAT_T rel_x; /* relative size compared to area */
880 FLOAT_T pos_rel_y; /* fill offset y relative to area */
881 FLOAT_T rel_y; /* relative size compared to area */
882 int pos_abs_x; /* fill offset x added to fill offset */
883 int abs_x; /* size of fill added to relative fill */
884 int pos_abs_y; /* fill offset y added to fill offset */
885 int abs_y; /* size of fill added to relative fill */
886 int angle; /* angle of fill -- currently only used by grads */
887 int spread; /* spread of fill -- currently only used by grads */
888 char smooth; /* fill with smooth scaling or not */
889 unsigned char type; /* fill coordinate from container (SCALE) or from source image (TILE) */
890};
891
892struct _Edje_Part_Description_Spec_Border
893{
894 int l, r, t, b; /* border scaling on image fill */
895 unsigned char no_fill; /* do we fill the center of the image if bordered? 1 == NO!!!! */
896 unsigned char scale; /* scale image border by same as scale factor */
897 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" */
898};
899
900struct _Edje_Part_Description_Spec_Image
901{
902 Edje_Part_Description_Spec_Fill fill;
903
904 Edje_Part_Image_Id **tweens; /* list of Edje_Part_Image_Id */
905 unsigned int tweens_count; /* number of tweens */
906
907 int id; /* the image id to use */
908 int scale_hint; /* evas scale hint */
909 Eina_Bool set; /* if image condition it's content */
910
911 Edje_Part_Description_Spec_Border border;
912};
913
914struct _Edje_Part_Description_Spec_Proxy
915{
916 Edje_Part_Description_Spec_Fill fill;
917
918 int id; /* the part id to use as a source for this state */
919};
920
921struct _Edje_Part_Description_Spec_Text
922{
923 Edje_String text; /* if "" or NULL, then leave text unchanged */
924 char *text_class; /* how to apply/modify the font */
925 Edje_String style; /* the text style if a textblock */
926 Edje_String font; /* if a specific font is asked for */
927 Edje_String repch; /* replacement char for password mode entry */
928
929 Edje_Alignment align; /* text alignment within bounds */
930 Edje_Color color3;
931
932 double elipsis; /* 0.0 - 1.0 defining where the elipsis align */
933 int size; /* 0 = use user set size */
934 int id_source; /* -1 if none */
935 int id_text_source; /* -1 if none */
936
937 unsigned char fit_x; /* resize font size down to fit in x dir */
938 unsigned char fit_y; /* resize font size down to fit in y dir */
939 unsigned char min_x; /* if text size should be part min size */
940 unsigned char min_y; /* if text size should be part min size */
941 unsigned char max_x; /* if text size should be part max size */
942 unsigned char max_y; /* if text size should be part max size */
943 int size_range_min;
944 int size_range_max; /* -1 means, no bound. */
945};
946
947struct _Edje_Part_Description_Spec_Box
948{
949 char *layout, *alt_layout;
950 Edje_Alignment align;
951 struct {
952 int x, y;
953 } padding;
954 struct {
955 unsigned char h, v;
956 } min;
957};
958
959struct _Edje_Part_Description_Spec_Table
960{
961 unsigned char homogeneous;
962 Edje_Alignment align;
963 struct {
964 int x, y;
965 } padding;
966 struct {
967 unsigned char h, v;
968 } min;
969};
970
971struct _Edje_Part_Description_Image
972{
973 Edje_Part_Description_Common common;
974 Edje_Part_Description_Spec_Image image;
975};
976
977struct _Edje_Part_Description_Proxy
978{
979 Edje_Part_Description_Common common;
980 Edje_Part_Description_Spec_Proxy proxy;
981};
982
983struct _Edje_Part_Description_Text
984{
985 Edje_Part_Description_Common common;
986 Edje_Part_Description_Spec_Text text;
987};
988
989struct _Edje_Part_Description_Box
990{
991 Edje_Part_Description_Common common;
992 Edje_Part_Description_Spec_Box box;
993};
994
995struct _Edje_Part_Description_Table
996{
997 Edje_Part_Description_Common common;
998 Edje_Part_Description_Spec_Table table;
999};
1000
1001struct _Edje_Part_Description_External
1002{
1003 Edje_Part_Description_Common common;
1004 Eina_List *external_params; /* parameters for external objects */
1005};
1006
1007/*----------*/
1008
1009struct _Edje_Signal_Source_Char
1010{
1011 EINA_RBTREE;
1012
1013 const char *signal;
1014 const char *source;
1015
1016 Eina_List *list;
1017};
1018
1019struct _Edje_Signals_Sources_Patterns
1020
1021{
1022 Edje_Patterns *signals_patterns;
1023 Edje_Patterns *sources_patterns;
1024
1025 Eina_Rbtree *exact_match;
1026
1027 union {
1028 struct {
1029 Edje_Program **globing;
1030 unsigned int count;
1031 } programs;
1032 struct {
1033 Eina_List *globing;
1034 } callbacks;
1035 } u;
1036};
1037
1038typedef struct _Edje_Signals_Sources_Patterns Edje_Signals_Sources_Patterns;
1039
1040struct _Edje
1041{
1042 Evas_Object_Smart_Clipped_Data base;
1043 /* This contains (or should):
1044 Evas_Object *clipper; // a big rect to clip this Edje to
1045 Evas *evas; // the Evas this Edje belongs to
1046 */
1047 const Edje_Smart_Api *api;
1048 const char *path;
1049 const char *group;
1050 const char *parent;
1051
1052 Evas_Coord x, y, w, h;
1053 Edje_Size min;
1054 double paused_at;
1055 Evas_Object *obj; /* the smart object */
1056 Edje_File *file; /* the file the data comes form */
1057 Edje_Part_Collection *collection; /* the description being used */
1058 Eina_List *actions; /* currently running actions */
1059 Eina_List *callbacks;
1060 Eina_List *pending_actions;
1061 Eina_List *color_classes;
1062 Eina_List *text_classes;
1063 /* variable pool for Edje Embryo scripts */
1064 Edje_Var_Pool *var_pool;
1065 /* for faster lookups to avoid nth list walks */
1066 Edje_Real_Part **table_parts;
1067 Edje_Program **table_programs;
1068 Edje_Real_Part *focused_part;
1069 Eina_List *subobjs;
1070 Eina_List *text_insert_filter_callbacks;
1071 void *script_only_data;
1072
1073 int table_programs_size;
1074 unsigned int table_parts_size;
1075
1076 struct {
1077 Eina_Hash *text_class;
1078 Eina_Hash *color_class;
1079 } members;
1080
1081 Edje_Perspective *persp;
1082
1083 struct {
1084 Edje_Signals_Sources_Patterns callbacks;
1085 Edje_Signals_Sources_Patterns programs;
1086 } patterns;
1087
1088 int references;
1089 int block;
1090 int load_error;
1091 int freeze;
1092 FLOAT_T scale;
1093 Eina_Bool is_rtl : 1;
1094
1095 struct {
1096 Edje_Text_Change_Cb func;
1097 void *data;
1098 } text_change;
1099
1100 struct {
1101 Edje_Message_Handler_Cb func;
1102 void *data;
1103 int num;
1104 } message;
1105 int processing_messages;
1106
1107 int state;
1108
1109 int preload_count;
1110
1111 lua_State *L;
1112 Eina_Inlist *lua_objs;
1113 int lua_ref;
1114
1115 struct {
1116 Edje_Item_Provider_Cb func;
1117 void *data;
1118 } item_provider;
1119
1120 unsigned int dirty : 1;
1121 unsigned int recalc : 1;
1122 unsigned int walking_callbacks : 1;
1123 unsigned int delete_callbacks : 1;
1124 unsigned int just_added_callbacks : 1;
1125 unsigned int have_objects : 1;
1126 unsigned int paused : 1;
1127 unsigned int no_anim : 1;
1128 unsigned int calc_only : 1;
1129 unsigned int walking_actions : 1;
1130 unsigned int block_break : 1;
1131 unsigned int delete_me : 1;
1132 unsigned int postponed : 1;
1133 unsigned int freeze_calc : 1;
1134 unsigned int has_entries : 1;
1135 unsigned int entries_inited : 1;
1136#ifdef EDJE_CALC_CACHE
1137 unsigned int text_part_change : 1;
1138 unsigned int all_part_change : 1;
1139#endif
1140 unsigned int have_mapped_part : 1;
1141};
1142
1143struct _Edje_Calc_Params
1144{
1145 int x, y, w, h; // 16
1146 Edje_Rectangle req; // 16
1147 Edje_Rectangle req_drag; // 16
1148 Edje_Color color; // 4
1149 union {
1150 struct {
1151 struct {
1152 int x, y, w, h; // 16
1153 int angle; // 4
1154 int spread; // 4
1155 } fill; // 24
1156
1157 union {
1158 struct {
1159 int l, r, t, b; // 16
1160 } image; // 16
1161 } spec; // 16
1162 } common; // 40
1163 struct {
1164 Edje_Alignment align; /* text alignment within bounds */ // 16
1165 double elipsis; // 8
1166 int size; // 4
1167 Edje_Color color2, color3; // 8
1168 } text; // 36
1169 } type; // 40
1170 struct {
1171 struct {
1172 int x, y, z;
1173 } center; // 12
1174 struct {
1175 double x, y, z;
1176 } rotation; // 24
1177 struct {
1178 int x, y, z;
1179 int r, g, b;
1180 int ar, ag, ab;
1181 } light; // 36
1182 struct {
1183 int x, y, z;
1184 int focal;
1185 } persp;
1186 } map;
1187 unsigned char persp_on : 1;
1188 unsigned char lighted : 1;
1189 unsigned char mapped : 1;
1190 unsigned char visible : 1;
1191 unsigned char smooth : 1; // 1
1192}; // 96
1193
1194struct _Edje_Real_Part_Set
1195{
1196 Edje_Image_Directory_Set_Entry *entry; // 4
1197 Edje_Image_Directory_Set *set; // 4
1198
1199 int id; // 4
1200};
1201
1202struct _Edje_Real_Part_State
1203{
1204 Edje_Part_Description_Common *description; // 4
1205 Edje_Part_Description_Common *description_rtl; // 4
1206 Edje_Real_Part *rel1_to_x; // 4
1207 Edje_Real_Part *rel1_to_y; // 4
1208 Edje_Real_Part *rel2_to_x; // 4
1209 Edje_Real_Part *rel2_to_y; // 4
1210#ifdef EDJE_CALC_CACHE
1211 int state; // 4
1212 Edje_Calc_Params p; // 96
1213#endif
1214 void *external_params; // 4
1215 Edje_Real_Part_Set *set; // 4
1216}; // 32
1217// WITH EDJE_CALC_CACHE 132
1218
1219struct _Edje_Real_Part_Drag
1220{
1221 FLOAT_T x, y; // 16
1222 Edje_Position_Scale val, size, step, page; // 64
1223 struct {
1224 unsigned int count; // 4
1225 int x, y; // 8
1226 } down;
1227 struct {
1228 int x, y; // 8
1229 } tmp;
1230 unsigned char need_reset : 1; // 4
1231 Edje_Real_Part *confine_to; // 4
1232}; // 104
1233
1234struct _Edje_Real_Part
1235{
1236 Edje *edje; // 4
1237 Edje_Part *part; // 4
1238 Evas_Object *object; // 4
1239 int x, y, w, h; // 16
1240 Edje_Rectangle req; // 16
1241
1242 Eina_List *items; // 4 //FIXME: only if table/box
1243 Edje_Part_Box_Animation *anim; // 4 //FIXME: Used only if box
1244 void *entry_data; // 4 // FIXME: move to entry section
1245
1246 Evas_Object *swallowed_object; // 4 // FIXME: move with swallow_params data
1247 struct {
1248 Edje_Size min, max; // 16
1249 Edje_Aspect aspect; // 12
1250 } swallow_params; // 28 // FIXME: only if type SWALLOW
1251
1252 Edje_Real_Part_Drag *drag; // 4
1253 Edje_Real_Part *events_to; // 4
1254
1255 struct {
1256 Edje_Real_Part *source; // 4
1257 Edje_Real_Part *text_source; // 4
1258 const char *text; // 4
1259 Edje_Position offset; // 8 text only
1260 const char *font; // 4 text only
1261 const char *style; // 4 text only
1262 int size; // 4 text only
1263 struct {
1264 double in_w, in_h; // 16 text only
1265 int in_size; // 4 text only
1266 const char *in_str; // 4 text only
1267 const char *out_str; // 4 text only
1268 int out_size; // 4 text only
1269 FLOAT_T align_x, align_y; // 16 text only
1270 double elipsis; // 8 text only
1271 int fit_x, fit_y; // 8 text only
1272 } cache; // 64
1273 } text; // 86 // FIXME make text a potiner to struct and alloc at end
1274 // if part type is TEXT move common members textblock +
1275 // text to front and have smaller struct for textblock
1276
1277 FLOAT_T description_pos; // 8
1278 Edje_Part_Description_Common *chosen_description; // 4
1279 Edje_Real_Part_State param1; // 20
1280 // WITH EDJE_CALC_CACHE: 140
1281 Edje_Real_Part_State *param2, *custom; // 8
1282 Edje_Calc_Params *current; // 4
1283
1284#ifdef EDJE_CALC_CACHE
1285 int state; // 4
1286#endif
1287
1288 Edje_Real_Part *clip_to; // 4
1289
1290 Edje_Running_Program *program; // 4
1291
1292 int clicked_button; // 4
1293
1294 unsigned char calculated; // 1
1295 unsigned char calculating; // 1
1296
1297 unsigned char still_in : 1; // 1
1298#ifdef EDJE_CALC_CACHE
1299 unsigned char invalidate : 1; // 0
1300#endif
1301}; // 264
1302// WITH EDJE_CALC_CACHE: 404
1303
1304struct _Edje_Running_Program
1305{
1306 Edje *edje;
1307 Edje_Program *program;
1308 double start_time;
1309 char delete_me : 1;
1310};
1311
1312struct _Edje_Signal_Callback
1313{
1314 const char *signal;
1315 const char *source;
1316 Edje_Signal_Cb func;
1317 void *data;
1318 unsigned char just_added : 1;
1319 unsigned char delete_me : 1;
1320 unsigned char propagate : 1;
1321};
1322
1323struct _Edje_Text_Insert_Filter_Callback
1324{
1325 const char *part;
1326 Edje_Text_Filter_Cb func;
1327 void *data;
1328};
1329
1330struct _Edje_Pending_Program
1331{
1332 Edje *edje;
1333 Edje_Program *program;
1334 Ecore_Timer *timer;
1335};
1336
1337struct _Edje_Text_Style
1338{
1339 struct {
1340 unsigned char x, y;
1341 } offset;
1342 struct {
1343 unsigned char l, r, t, b;
1344 } pad;
1345 int num;
1346 struct {
1347 unsigned char color; /* 0 = color, 1, 2 = color2, color3 */
1348 signed char x, y; /* offset */
1349 unsigned char alpha;
1350 } members[32];
1351};
1352
1353struct _Edje_Color_Class
1354{
1355 const char *name;
1356 unsigned char r, g, b, a;
1357 unsigned char r2, g2, b2, a2;
1358 unsigned char r3, g3, b3, a3;
1359};
1360
1361struct _Edje_Text_Class
1362{
1363 const char *name;
1364 const char *font;
1365 Evas_Font_Size size;
1366};
1367
1368struct _Edje_Var_Int
1369{
1370 int v;
1371};
1372
1373struct _Edje_Var_Float
1374{
1375 double v;
1376};
1377
1378struct _Edje_Var_String
1379{
1380 char *v;
1381};
1382
1383struct _Edje_Var_List
1384{
1385 Eina_List *v;
1386};
1387
1388struct _Edje_Var_Hash
1389{
1390 Eina_Hash *v;
1391};
1392
1393struct _Edje_Var_Timer
1394{
1395 Edje *edje;
1396 int id;
1397 Embryo_Function func;
1398 int val;
1399 Ecore_Timer *timer;
1400};
1401
1402struct _Edje_Var_Animator
1403{
1404 Edje *edje;
1405 int id;
1406 Embryo_Function func;
1407 int val;
1408 double start, len;
1409 char delete_me;
1410};
1411
1412struct _Edje_Var_Pool
1413{
1414 int id_count;
1415 Eina_List *timers;
1416 Eina_List *animators;
1417 int size;
1418 Edje_Var *vars;
1419 int walking_list;
1420};
1421
1422struct _Edje_Var
1423{
1424 union {
1425 Edje_Var_Int i;
1426 Edje_Var_Float f;
1427 Edje_Var_String s;
1428 Edje_Var_List l;
1429 Edje_Var_Hash h;
1430 } data;
1431 unsigned char type;
1432};
1433
1434typedef enum _Edje_Queue
1435{
1436 EDJE_QUEUE_APP,
1437 EDJE_QUEUE_SCRIPT
1438} Edje_Queue;
1439
1440typedef struct _Edje_Message_Signal Edje_Message_Signal;
1441typedef struct _Edje_Message Edje_Message;
1442
1443typedef struct _Edje_Message_Signal_Data Edje_Message_Signal_Data;
1444struct _Edje_Message_Signal_Data
1445{
1446 int ref;
1447 void *data;
1448 void (*free_func)(void *);
1449};
1450
1451struct _Edje_Message_Signal
1452{
1453 const char *sig;
1454 const char *src;
1455 Edje_Message_Signal_Data *data;
1456};
1457
1458struct _Edje_Message
1459{
1460 Edje *edje;
1461 Edje_Queue queue;
1462 Edje_Message_Type type;
1463 int id;
1464 unsigned char *msg;
1465 Eina_Bool propagated : 1;
1466};
1467
1468typedef enum _Edje_Fill
1469{
1470 EDJE_FILL_TYPE_SCALE = 0,
1471 EDJE_FILL_TYPE_TILE
1472} Edje_Fill;
1473
1474typedef enum _Edje_Match_Error
1475{
1476 EDJE_MATCH_OK,
1477 EDJE_MATCH_ALLOC_ERROR,
1478 EDJE_MATCH_SYNTAX_ERROR
1479
1480} Edje_Match_Error;
1481
1482typedef struct _Edje_States Edje_States;
1483struct _Edje_Patterns
1484{
1485 const char **patterns;
1486
1487 Edje_States *states;
1488
1489 int ref;
1490 Eina_Bool delete_me : 1;
1491
1492 size_t patterns_size;
1493 size_t max_length;
1494 size_t finals[];
1495};
1496
1497Edje_Patterns *edje_match_collection_dir_init(const Eina_List *lst);
1498Edje_Patterns *edje_match_programs_signal_init(Edje_Program * const *array,
1499 unsigned int count);
1500Edje_Patterns *edje_match_programs_source_init(Edje_Program * const *array,
1501 unsigned int count);
1502Edje_Patterns *edje_match_callback_signal_init(const Eina_List *lst);
1503Edje_Patterns *edje_match_callback_source_init(const Eina_List *lst);
1504
1505Eina_Bool edje_match_collection_dir_exec(const Edje_Patterns *ppat,
1506 const char *string);
1507Eina_Bool edje_match_programs_exec(const Edje_Patterns *ppat_signal,
1508 const Edje_Patterns *ppat_source,
1509 const char *signal,
1510 const char *source,
1511 Edje_Program **programs,
1512 Eina_Bool (*func)(Edje_Program *pr, void *data),
1513 void *data,
1514 Eina_Bool prop);
1515int edje_match_callback_exec(Edje_Patterns *ppat_signal,
1516 Edje_Patterns *ppat_source,
1517 const char *signal,
1518 const char *source,
1519 Eina_List *callbacks,
1520 Edje *ed,
1521 Eina_Bool prop);
1522
1523void edje_match_patterns_free(Edje_Patterns *ppat);
1524
1525Eina_List *edje_match_program_hash_build(Edje_Program * const * programs,
1526 unsigned int count,
1527 Eina_Rbtree **tree);
1528Eina_List *edje_match_callback_hash_build(const Eina_List *callbacks,
1529 Eina_Rbtree **tree);
1530const Eina_List *edje_match_signal_source_hash_get(const char *signal,
1531 const char *source,
1532 const Eina_Rbtree *tree);
1533void edje_match_signal_source_free(Edje_Signal_Source_Char *key, void *data);
1534
1535// FIXME remove below 2 eapi decls when edje_convert goes
1536EAPI void _edje_edd_init(void);
1537EAPI void _edje_edd_shutdown(void);
1538
1539EAPI extern Eet_Data_Descriptor *_edje_edd_edje_file;
1540EAPI extern Eet_Data_Descriptor *_edje_edd_edje_part_collection;
1541
1542extern int _edje_anim_count;
1543extern Ecore_Animator *_edje_timer;
1544extern Eina_List *_edje_animators;
1545extern Eina_List *_edje_edjes;
1546
1547extern char *_edje_fontset_append;
1548extern FLOAT_T _edje_scale;
1549extern int _edje_freeze_val;
1550extern int _edje_freeze_calc_count;
1551extern Eina_List *_edje_freeze_calc_list;
1552
1553extern Eina_Bool _edje_password_show_last;
1554extern FLOAT_T _edje_password_show_last_timeout;
1555
1556extern Eina_Mempool *_edje_real_part_mp;
1557extern Eina_Mempool *_edje_real_part_state_mp;
1558
1559extern Eina_Mempool *_emp_RECTANGLE;
1560extern Eina_Mempool *_emp_TEXT;
1561extern Eina_Mempool *_emp_IMAGE;
1562extern Eina_Mempool *_emp_PROXY;
1563extern Eina_Mempool *_emp_SWALLOW;
1564extern Eina_Mempool *_emp_TEXTBLOCK;
1565extern Eina_Mempool *_emp_GROUP;
1566extern Eina_Mempool *_emp_BOX;
1567extern Eina_Mempool *_emp_TABLE;
1568extern Eina_Mempool *_emp_EXTERNAL;
1569extern Eina_Mempool *_emp_part;
1570
1571void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2);
1572Edje_Part_Description_Common *_edje_part_description_find(Edje *ed,
1573 Edje_Real_Part *rp,
1574 const char *name, double val);
1575void _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, double v1, const char *d2, double v2);
1576void _edje_recalc(Edje *ed);
1577void _edje_recalc_do(Edje *ed);
1578void _edje_part_recalc_1(Edje *ed, Edje_Real_Part *ep);
1579int _edje_part_dragable_calc(Edje *ed, Edje_Real_Part *ep, FLOAT_T *x, FLOAT_T *y);
1580void _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y);
1581
1582Eina_Bool _edje_timer_cb(void *data);
1583Eina_Bool _edje_pending_timer_cb(void *data);
1584void _edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
1585void _edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
1586void _edje_callbacks_del(Evas_Object *obj, Edje *ed);
1587void _edje_callbacks_focus_del(Evas_Object *obj, Edje *ed);
1588
1589void _edje_edd_init(void);
1590void _edje_edd_shutdown(void);
1591
1592int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, const char *parent, Eina_List *group_path);
1593
1594void _edje_file_add(Edje *ed);
1595void _edje_file_del(Edje *ed);
1596void _edje_file_free(Edje_File *edf);
1597void _edje_file_cache_shutdown(void);
1598void _edje_collection_free(Edje_File *edf,
1599 Edje_Part_Collection *ec,
1600 Edje_Part_Collection_Directory_Entry *ce);
1601void _edje_collection_free_part_description_clean(int type,
1602 Edje_Part_Description_Common *desc,
1603 Eina_Bool free_strings);
1604void _edje_collection_free_part_description_free(int type,
1605 Edje_Part_Description_Common *desc,
1606 Edje_Part_Collection_Directory_Entry *ce,
1607 Eina_Bool free_strings);
1608
1609void _edje_object_smart_set(Edje_Smart_Api *sc);
1610const Edje_Smart_Api * _edje_object_smart_class_get(void);
1611
1612void _edje_del(Edje *ed);
1613void _edje_ref(Edje *ed);
1614void _edje_unref(Edje *ed);
1615void _edje_clean_objects(Edje *ed);
1616void _edje_ref(Edje *ed);
1617void _edje_unref(Edje *ed);
1618
1619Eina_Bool _edje_program_run_iterate(Edje_Running_Program *runp, double tim);
1620void _edje_program_end(Edje *ed, Edje_Running_Program *runp);
1621void _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig, const char *ssrc);
1622void _edje_programs_patterns_clean(Edje *ed);
1623void _edje_programs_patterns_init(Edje *ed);
1624void _edje_emit(Edje *ed, const char *sig, const char *src);
1625void _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*free_func)(void *));
1626void _edje_emit_handle(Edje *ed, const char *sig, const char *src, Edje_Message_Signal_Data *data, Eina_Bool prop);
1627void _edje_signals_sources_patterns_clean(Edje_Signals_Sources_Patterns *ssp);
1628void _edje_callbacks_patterns_clean(Edje *ed);
1629
1630void _edje_text_init(void);
1631void _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep);
1632void _edje_text_part_on_del(Edje *ed, Edje_Part *ep);
1633void _edje_text_recalc_apply(Edje *ed,
1634 Edje_Real_Part *ep,
1635 Edje_Calc_Params *params,
1636 Edje_Part_Description_Text *chosen_desc);
1637Evas_Font_Size _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc);
1638const char * _edje_text_class_font_get(Edje *ed,
1639 Edje_Part_Description_Text *chosen_desc,
1640 int *size, char **free_later);
1641
1642
1643Edje_Real_Part *_edje_real_part_get(const Edje *ed, const char *part);
1644Edje_Real_Part *_edje_real_part_recursive_get(const Edje *ed, const char *part);
1645Edje_Color_Class *_edje_color_class_find(Edje *ed, const char *color_class);
1646void _edje_color_class_member_direct_del(const char *color_class, void *lookup);
1647void _edje_color_class_member_add(Edje *ed, const char *color_class);
1648void _edje_color_class_member_del(Edje *ed, const char *color_class);
1649void _edje_color_class_on_del(Edje *ed, Edje_Part *ep);
1650void _edje_color_class_members_free(void);
1651void _edje_color_class_hash_free(void);
1652
1653Edje_Text_Class *_edje_text_class_find(Edje *ed, const char *text_class);
1654void _edje_text_class_member_add(Edje *ed, const char *text_class);
1655void _edje_text_class_member_del(Edje *ed, const char *text_class);
1656void _edje_text_class_member_direct_del(const char *text_class, void *lookup);
1657void _edje_text_class_members_free(void);
1658void _edje_text_class_hash_free(void);
1659
1660Edje *_edje_fetch(const Evas_Object *obj) EINA_PURE;
1661int _edje_freeze(Edje *ed);
1662int _edje_thaw(Edje *ed);
1663int _edje_block(Edje *ed);
1664int _edje_unblock(Edje *ed);
1665int _edje_block_break(Edje *ed);
1666void _edje_block_violate(Edje *ed);
1667void _edje_object_part_swallow_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
1668void _edje_object_part_swallow_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
1669void _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow, Eina_Bool hints_update);
1670void _edje_real_part_swallow_clear(Edje_Real_Part *rp);
1671void _edje_box_init(void);
1672void _edje_box_shutdown(void);
1673Eina_Bool _edje_box_layout_find(const char *name, Evas_Object_Box_Layout *cb, void **data, void (**free_data)(void *data));
1674void _edje_box_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Box *chosen_desc);
1675Eina_Bool _edje_box_layout_add_child(Edje_Real_Part *rp, Evas_Object *child_obj);
1676void _edje_box_layout_remove_child(Edje_Real_Part *rp, Evas_Object *child_obj);
1677Edje_Part_Box_Animation * _edje_box_layout_anim_new(Evas_Object *box);
1678void _edje_box_layout_free_data(void *data);
1679
1680Eina_Bool _edje_real_part_box_append(Edje_Real_Part *rp, Evas_Object *child_obj);
1681Eina_Bool _edje_real_part_box_prepend(Edje_Real_Part *rp, Evas_Object *child_obj);
1682Eina_Bool _edje_real_part_box_insert_before(Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref);
1683Eina_Bool _edje_real_part_box_insert_at(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos);
1684Evas_Object *_edje_real_part_box_remove(Edje_Real_Part *rp, Evas_Object *child_obj);
1685Evas_Object *_edje_real_part_box_remove_at(Edje_Real_Part *rp, unsigned int pos);
1686Eina_Bool _edje_real_part_box_remove_all(Edje_Real_Part *rp, Eina_Bool clear);
1687Eina_Bool _edje_real_part_table_pack(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
1688Eina_Bool _edje_real_part_table_unpack(Edje_Real_Part *rp, Evas_Object *child_obj);
1689void _edje_real_part_table_clear(Edje_Real_Part *rp, Eina_Bool clear);
1690Evas_Object *_edje_children_get(Edje_Real_Part *rp, const char *partid);
1691
1692Eina_Bool _edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text);
1693char *_edje_text_escape(const char *text);
1694char *_edje_text_unescape(const char *text);
1695
1696void _edje_embryo_script_init (Edje_Part_Collection *edc);
1697void _edje_embryo_script_shutdown (Edje_Part_Collection *edc);
1698void _edje_embryo_script_reset (Edje *ed);
1699void _edje_embryo_test_run (Edje *ed, const char *fname, const char *sig, const char *src);
1700Edje_Var *_edje_var_new (void);
1701void _edje_var_free (Edje_Var *var);
1702void _edje_var_init (Edje *ed);
1703void _edje_var_shutdown (Edje *ed);
1704int _edje_var_string_id_get (Edje *ed, const char *string);
1705int _edje_var_var_int_get (Edje *ed, Edje_Var *var);
1706void _edje_var_var_int_set (Edje *ed, Edje_Var *var, int v);
1707double _edje_var_var_float_get (Edje *ed, Edje_Var *var);
1708void _edje_var_var_float_set (Edje *ed, Edje_Var *var, double v);
1709const char *_edje_var_var_str_get (Edje *ed, Edje_Var *var);
1710void _edje_var_var_str_set (Edje *ed, Edje_Var *var, const char *str);
1711int _edje_var_int_get (Edje *ed, int id);
1712void _edje_var_int_set (Edje *ed, int id, int v);
1713double _edje_var_float_get (Edje *ed, int id);
1714void _edje_var_float_set (Edje *ed, int id, double v);
1715const char *_edje_var_str_get (Edje *ed, int id);
1716void _edje_var_str_set (Edje *ed, int id, const char *str);
1717
1718void _edje_var_list_var_append(Edje *ed, int id, Edje_Var *var);
1719void _edje_var_list_var_prepend(Edje *ed, int id, Edje_Var *var);
1720void _edje_var_list_var_append_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
1721void _edje_var_list_var_prepend_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
1722Edje_Var *_edje_var_list_nth(Edje *ed, int id, int n);
1723
1724int _edje_var_list_count_get(Edje *ed, int id);
1725void _edje_var_list_remove_nth(Edje *ed, int id, int n);
1726
1727int _edje_var_list_nth_int_get(Edje *ed, int id, int n);
1728void _edje_var_list_nth_int_set(Edje *ed, int id, int n, int v);
1729void _edje_var_list_int_append(Edje *ed, int id, int v);
1730void _edje_var_list_int_prepend(Edje *ed, int id, int v);
1731void _edje_var_list_int_insert(Edje *ed, int id, int n, int v);
1732
1733double _edje_var_list_nth_float_get(Edje *ed, int id, int n);
1734void _edje_var_list_nth_float_set(Edje *ed, int id, int n, double v);
1735void _edje_var_list_float_append(Edje *ed, int id, double v);
1736void _edje_var_list_float_prepend(Edje *ed, int id, double v);
1737void _edje_var_list_float_insert(Edje *ed, int id, int n, double v);
1738
1739const char *_edje_var_list_nth_str_get(Edje *ed, int id, int n);
1740void _edje_var_list_nth_str_set(Edje *ed, int id, int n, const char *v);
1741void _edje_var_list_str_append(Edje *ed, int id, const char *v);
1742void _edje_var_list_str_prepend(Edje *ed, int id, const char *v);
1743void _edje_var_list_str_insert(Edje *ed, int id, int n, const char *v);
1744
1745int _edje_var_timer_add (Edje *ed, double in, const char *fname, int val);
1746void _edje_var_timer_del (Edje *ed, int id);
1747
1748int _edje_var_anim_add (Edje *ed, double len, const char *fname, int val);
1749void _edje_var_anim_del (Edje *ed, int id);
1750
1751void _edje_message_init (void);
1752void _edje_message_shutdown (void);
1753void _edje_message_cb_set (Edje *ed, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data);
1754Edje_Message *_edje_message_new (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id);
1755void _edje_message_free (Edje_Message *em);
1756void _edje_message_propornot_send (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, void *emsg, Eina_Bool prop);
1757void _edje_message_send (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, void *emsg);
1758void _edje_message_parameters_push (Edje_Message *em);
1759void _edje_message_process (Edje_Message *em);
1760void _edje_message_queue_process (void);
1761void _edje_message_queue_clear (void);
1762void _edje_message_del (Edje *ed);
1763
1764void _edje_textblock_styles_add(Edje *ed);
1765void _edje_textblock_styles_del(Edje *ed);
1766void _edje_textblock_style_all_update(Edje *ed);
1767void _edje_textblock_style_parse_and_fix(Edje_File *edf);
1768void _edje_textblock_style_cleanup(Edje_File *edf);
1769Edje_File *_edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret);
1770void _edje_cache_coll_clean(Edje_File *edf);
1771void _edje_cache_coll_flush(Edje_File *edf);
1772void _edje_cache_coll_unref(Edje_File *edf, Edje_Part_Collection *edc);
1773void _edje_cache_file_unref(Edje_File *edf);
1774
1775void _edje_embryo_globals_init(Edje *ed);
1776
1777#define CHKPARAM(n) if (params[0] != (sizeof(Embryo_Cell) * (n))) return -1;
1778#define GETSTR(str, par) { \
1779 Embryo_Cell *___cptr; \
1780 int ___l; \
1781 str = NULL; \
1782 if ((___cptr = embryo_data_address_get(ep, (par)))) { \
1783 ___l = embryo_data_string_length_get(ep, ___cptr); \
1784 if (((str) = alloca(___l + 1))) \
1785 embryo_data_string_get(ep, ___cptr, (str)); } }
1786#define GETSTREVAS(str, par) { \
1787 if ((str)) { \
1788 if ((par) && (!strcmp((par), (str)))) return 0; \
1789 if ((par)) eina_stringshare_del((par)); \
1790 (par) = (char *)eina_stringshare_add((str)); } \
1791 else (par) = NULL; }
1792#define GETFLOAT(val, par) { \
1793 float *___cptr; \
1794 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
1795 val = *___cptr; } }
1796
1797#define GETFLOAT_T(val, par) \
1798 { \
1799 float *___cptr; \
1800 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \
1801 { \
1802 val = FROM_DOUBLE(*___cptr); \
1803 } \
1804 }
1805
1806#define GETINT(val, par) { \
1807 int *___cptr; \
1808 if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
1809 val = *___cptr; } }
1810#define SETSTR(str, par) { \
1811 Embryo_Cell *___cptr; \
1812 if ((___cptr = embryo_data_address_get(ep, (par)))) { \
1813 embryo_data_string_set(ep, str, ___cptr); } }
1814#define SETSTRALLOCATE(s) \
1815 { \
1816 if (s) { \
1817 if ((int) strlen((s)) < params[4]) { \
1818 SETSTR((s), params[3]); } \
1819 else { \
1820 char *ss; \
1821 ss = alloca(strlen((s)) + 1); \
1822 strcpy(ss, (s)); \
1823 ss[params[4] - 2] = 0; \
1824 SETSTR(ss, params[3]); } } \
1825 else \
1826 SETSTR("", params[3]); \
1827 }
1828#define SETFLOAT(val, par) { \
1829 float *___cptr; \
1830 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
1831 *___cptr = (float)val; } }
1832#define SETFLOAT_T(val, par) \
1833 { \
1834 float *___cptr; \
1835 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \
1836 { \
1837 *___cptr = (float) TO_DOUBLE(val); \
1838 } \
1839 }
1840#define SETINT(val, par) { \
1841 int *___cptr; \
1842 if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
1843 *___cptr = (int)val; } }
1844
1845Eina_Bool _edje_script_only(Edje *ed);
1846void _edje_script_only_init(Edje *ed);
1847void _edje_script_only_shutdown(Edje *ed);
1848void _edje_script_only_show(Edje *ed);
1849void _edje_script_only_hide(Edje *ed);
1850void _edje_script_only_move(Edje *ed);
1851void _edje_script_only_resize(Edje *ed);
1852void _edje_script_only_message(Edje *ed, Edje_Message *em);
1853
1854extern jmp_buf _edje_lua_panic_jmp;
1855#define _edje_lua_panic_here() setjmp(_edje_lua_panic_jmp)
1856
1857lua_State *_edje_lua_state_get();
1858lua_State *_edje_lua_new_thread(Edje *ed, lua_State *L);
1859void _edje_lua_free_thread(Edje *ed, lua_State *L);
1860void _edje_lua_new_reg(lua_State *L, int index, void *ptr);
1861void _edje_lua_get_reg(lua_State *L, void *ptr);
1862void _edje_lua_free_reg(lua_State *L, void *ptr);
1863void _edje_lua_script_fn_new(Edje *ed);
1864void _edje_lua_group_fn_new(Edje *ed);
1865void _edje_lua_init();
1866void _edje_lua_shutdown();
1867
1868void __edje_lua_error(const char *file, const char *fnc, int line, lua_State *L, int err_code);
1869#define _edje_lua_error(L, err_code) \
1870 __edje_lua_error(__FILE__, __FUNCTION__, __LINE__, L, err_code)
1871
1872Eina_Bool _edje_lua_script_only(Edje *ed);
1873void _edje_lua_script_only_init(Edje *ed);
1874void _edje_lua_script_only_shutdown(Edje *ed);
1875void _edje_lua_script_only_show(Edje *ed);
1876void _edje_lua_script_only_hide(Edje *ed);
1877void _edje_lua_script_only_move(Edje *ed);
1878void _edje_lua_script_only_resize(Edje *ed);
1879void _edje_lua_script_only_message(Edje *ed, Edje_Message *em);
1880
1881void _edje_entry_init(Edje *ed);
1882void _edje_entry_shutdown(Edje *ed);
1883void _edje_entry_real_part_init(Edje_Real_Part *rp);
1884void _edje_entry_real_part_shutdown(Edje_Real_Part *rp);
1885void _edje_entry_real_part_configure(Edje_Real_Part *rp);
1886const char *_edje_entry_selection_get(Edje_Real_Part *rp);
1887const char *_edje_entry_text_get(Edje_Real_Part *rp);
1888void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text);
1889void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text);
1890void _edje_entry_text_markup_append(Edje_Real_Part *rp, const char *text);
1891void _edje_entry_set_cursor_start(Edje_Real_Part *rp);
1892void _edje_entry_set_cursor_end(Edje_Real_Part *rp);
1893void _edje_entry_cursor_copy(Edje_Real_Part *rp, Edje_Cursor cur, Edje_Cursor dst);
1894void _edje_entry_select_none(Edje_Real_Part *rp);
1895void _edje_entry_select_all(Edje_Real_Part *rp);
1896void _edje_entry_select_begin(Edje_Real_Part *rp);
1897void _edje_entry_select_extend(Edje_Real_Part *rp);
1898const Eina_List *_edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char *anchor);
1899const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
1900Eina_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);
1901const Eina_List *_edje_entry_items_list(Edje_Real_Part *rp);
1902void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
1903void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow);
1904Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp);
1905void _edje_entry_select_abort(Edje_Real_Part *rp);
1906
1907Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur);
1908Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur);
1909Eina_Bool _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur);
1910Eina_Bool _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur);
1911void _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur);
1912void _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur);
1913void _edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur);
1914void _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur);
1915Eina_Bool _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur, int x, int y);
1916Eina_Bool _edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
1917Eina_Bool _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
1918const char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur);
1919void _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos);
1920int _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur);
1921void _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout layout);
1922Edje_Input_Panel_Layout _edje_entry_input_panel_layout_get(Edje_Real_Part *rp);
1923void _edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type autocapital_type);
1924Edje_Text_Autocapital_Type _edje_entry_autocapital_type_get(Edje_Real_Part *rp);
1925void _edje_entry_input_panel_enabled_set(Edje_Real_Part *rp, Eina_Bool enabled);
1926Eina_Bool _edje_entry_input_panel_enabled_get(Edje_Real_Part *rp);
1927
1928void _edje_external_init();
1929void _edje_external_shutdown();
1930Evas_Object *_edje_external_type_add(const char *type_name, Evas *evas, Evas_Object *parent, const Eina_List *params, const char *part_name);
1931void _edje_external_signal_emit(Evas_Object *obj, const char *emission, const char *source);
1932Eina_Bool _edje_external_param_set(Evas_Object *obj, Edje_Real_Part *rp, const Edje_External_Param *param) EINA_ARG_NONNULL(2);
1933Eina_Bool _edje_external_param_get(const Evas_Object *obj, Edje_Real_Part *rp, Edje_External_Param *param) EINA_ARG_NONNULL(2);
1934Evas_Object *_edje_external_content_get(const Evas_Object *obj, const char *content) EINA_ARG_NONNULL(1, 2);
1935void _edje_external_params_free(Eina_List *params, Eina_Bool free_strings);
1936void _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep,
1937 Edje_Calc_Params *params,
1938 Edje_Part_Description_Common *chosen_desc);
1939void *_edje_external_params_parse(Evas_Object *obj, const Eina_List *params);
1940void _edje_external_parsed_params_free(Evas_Object *obj, void *params);
1941
1942Eina_Module *_edje_module_handle_load(const char *module);
1943void _edje_module_init();
1944void _edje_module_shutdown();
1945
1946static inline Eina_Bool
1947edje_program_is_strncmp(const char *str)
1948{
1949 size_t length;
1950
1951 length = strlen(str);
1952
1953 if (strpbrk(str, "*?[\\") != str + length)
1954 return EINA_FALSE;
1955 if (str[length] == '['
1956 || str[length] == '\\')
1957 return EINA_FALSE;
1958 return EINA_TRUE;
1959}
1960
1961static inline Eina_Bool
1962edje_program_is_strrncmp(const char *str)
1963{
1964 if (*str != '*' && *str != '?')
1965 return EINA_FALSE;
1966 if (strpbrk(str + 1, "*?[\\"))
1967 return EINA_FALSE;
1968 return EINA_TRUE;
1969}
1970void edje_object_propagate_callback_add(Evas_Object *obj, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
1971
1972
1973/* used by edje_cc - private still */
1974EAPI void _edje_program_insert(Edje_Part_Collection *ed, Edje_Program *p);
1975EAPI void _edje_program_remove(Edje_Part_Collection *ed, Edje_Program *p);
1976
1977void _edje_lua2_error_full(const char *file, const char *fnc, int line, lua_State *L, int err_code);
1978#define _edje_lua2_error(L, err_code) _edje_lua2_error_full(__FILE__, __FUNCTION__, __LINE__, L, err_code)
1979void _edje_lua2_script_init(Edje *ed);
1980void _edje_lua2_script_shutdown(Edje *ed);
1981void _edje_lua2_script_load(Edje_Part_Collection *edc, void *data, int size);
1982void _edje_lua2_script_unload(Edje_Part_Collection *edc);
1983
1984void _edje_lua2_script_func_shutdown(Edje *ed);
1985void _edje_lua2_script_func_show(Edje *ed);
1986void _edje_lua2_script_func_hide(Edje *ed);
1987void _edje_lua2_script_func_move(Edje *ed);
1988void _edje_lua2_script_func_resize(Edje *ed);
1989void _edje_lua2_script_func_message(Edje *ed, Edje_Message *em);
1990void _edje_lua2_script_func_signal(Edje *ed, const char *sig, const char *src);
1991
1992const char *edje_string_get(const Edje_String *es);
1993const char *edje_string_id_get(const Edje_String *es);
1994
1995void _edje_object_orientation_inform(Evas_Object *obj);
1996
1997void _edje_lib_ref(void);
1998void _edje_lib_unref(void);
1999
2000void _edje_subobj_register(Edje *ed, Evas_Object *ob);
2001
2002void _edje_multisense_init(void);
2003void _edje_multisense_shutdown(void);
2004Eina_Bool _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, const double speed);
2005Eina_Bool _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const double duration);
2006
2007void _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *state);
2008
2009#ifdef HAVE_LIBREMIX
2010#include <remix/remix.h>
2011#endif
2012#include <Eina.h>
2013
2014typedef struct _Edje_Multisense_Env Edje_Multisense_Env;
2015
2016struct _Edje_Multisense_Env
2017{
2018#ifdef HAVE_LIBREMIX
2019 RemixEnv *remixenv;
2020#endif
2021};
2022
2023typedef Eina_Bool (*MULTISENSE_FACTORY_INIT_FUNC) (Edje_Multisense_Env *);
2024#ifdef HAVE_LIBREMIX
2025typedef RemixBase* (*MULTISENSE_SOUND_PLAYER_GET_FUNC) (Edje_Multisense_Env *);
2026#endif
2027
2028#endif