edje_private.h
Go to the documentation of this file.
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 STDC_HEADERS
13 # include <stdlib.h>
14 # include <stddef.h>
15 #else
16 # ifdef HAVE_STDLIB_H
17 # include <stdlib.h>
18 # endif
19 #endif
20 #ifdef HAVE_ALLOCA_H
21 # include <alloca.h>
22 #elif !defined alloca
23 # ifdef __GNUC__
24 # define alloca __builtin_alloca
25 # elif defined _AIX
26 # define alloca __alloca
27 # elif defined _MSC_VER
28 # include <malloc.h>
29 # define alloca _alloca
30 # elif !defined HAVE_ALLOCA
31 # ifdef __cplusplus
32 extern "C"
33 # endif
34 void *alloca (size_t);
35 # endif
36 #endif
37 
38 #include <string.h>
39 #include <limits.h>
40 #include <sys/stat.h>
41 #include <time.h>
42 #include <sys/time.h>
43 #include <errno.h>
44 
45 #ifndef _MSC_VER
46 # include <libgen.h>
47 # include <unistd.h>
48 #endif
49 
50 #include <fcntl.h>
51 
52 #include <lua.h>
53 #include <lualib.h>
54 #include <lauxlib.h>
55 #include <setjmp.h>
56 
57 #ifdef HAVE_LOCALE_H
58 # include <locale.h>
59 #endif
60 
61 #ifdef HAVE_EVIL
62 # include <Evil.h>
63 #endif
64 
65 #include <Eina.h>
66 #include <Eet.h>
67 #include <Evas.h>
68 #include <Ecore.h>
69 #include <Ecore_Evas.h>
70 #include <Ecore_File.h>
71 #include <Ecore_Input.h>
72 #ifdef HAVE_ECORE_IMF
73 # include <Ecore_IMF.h>
74 # include <Ecore_IMF_Evas.h>
75 #endif
76 #include <Embryo.h>
77 
78 #ifdef HAVE_EIO
79 # include <Eio.h>
80 #endif
81 
82 #include "Edje.h"
83 
84 EAPI extern int _edje_default_log_dom ;
85 
86 #ifdef EDJE_DEFAULT_LOG_COLOR
87 # undef EDJE_DEFAULT_LOG_COLOR
88 #endif
89 #define EDJE_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
90 #ifdef ERR
91 # undef ERR
92 #endif
93 #define ERR(...) EINA_LOG_DOM_ERR(_edje_default_log_dom, __VA_ARGS__)
94 #ifdef INF
95 # undef INF
96 #endif
97 #define INF(...) EINA_LOG_DOM_INFO(_edje_default_log_dom, __VA_ARGS__)
98 #ifdef WRN
99 # undef WRN
100 #endif
101 #define WRN(...) EINA_LOG_DOM_WARN(_edje_default_log_dom, __VA_ARGS__)
102 #ifdef CRIT
103 # undef CRIT
104 #endif
105 #define CRIT(...) EINA_LOG_DOM_CRIT(_edje_default_log_dom, __VA_ARGS__)
106 #ifdef DBG
107 # undef DBG
108 #endif
109 #define DBG(...) EINA_LOG_DOM_DBG(_edje_default_log_dom, __VA_ARGS__)
110 #ifdef __GNUC__
111 # if __GNUC__ >= 4
112 // BROKEN in gcc 4 on amd64
113 //# pragma GCC visibility push(hidden)
114 # endif
115 #endif
116 
117 #ifndef ABS
118 #define ABS(x) ((x) < 0 ? -(x) : (x))
119 #endif
120 
121 #ifndef CLAMP
122 #define CLAMP(x, min, max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x)))
123 #endif
124 
125 #ifndef MIN
126 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
127 #endif
128 
129 
130 #ifdef BUILD_EDJE_FP
131 
132 #define FLOAT_T Eina_F32p32
133 #define EDJE_T_FLOAT EET_T_F32P32
134 #define MUL(a, b) eina_f32p32_mul(a, b)
135 #define SCALE(a, b) eina_f32p32_scale(a, b)
136 #define DIV(a, b) eina_f32p32_div(a, b)
137 #define DIV2(a) ((a) >> 1)
138 #define ADD(a, b) eina_f32p32_add(a, b)
139 #define SUB(a, b) eina_f32p32_sub(a, b)
140 #define SQRT(a) eina_f32p32_sqrt(a)
141 #define TO_DOUBLE(a) eina_f32p32_double_to(a)
142 #define FROM_DOUBLE(a) eina_f32p32_double_from(a)
143 #define FROM_INT(a) eina_f32p32_int_from(a)
144 #define TO_INT(a) eina_f32p32_int_to(a)
145 #define ZERO 0
146 #define COS(a) eina_f32p32_cos(a)
147 #define SIN(a) eina_f32p32_sin(a)
148 #define PI EINA_F32P32_PI
149 
150 #else
151 
152 #define FLOAT_T double
153 #define EDJE_T_FLOAT EET_T_DOUBLE
154 #define MUL(a, b) ((a) * (b))
155 #define SCALE(a, b) ((a) * (double)(b))
156 #define DIV(a, b) ((a) / (b))
157 #define DIV2(a) ((a) / 2.0)
158 #define ADD(a, b) ((a) + (b))
159 #define SUB(a, b) ((a) - (b))
160 #define SQRT(a) sqrt(a)
161 #define TO_DOUBLE(a) (double)(a)
162 #define FROM_DOUBLE(a) (a)
163 #define FROM_INT(a) (double)(a)
164 #define TO_INT(a) (int)(a)
165 #define ZERO 0.0
166 #define COS(a) cos(a)
167 #define SIN(a) sin(a)
168 #define PI 3.14159265358979323846
169 
170 #endif
171 
172 /* Inheritable Edje Smart API. For now private so only Edje Edit makes
173  * use of this, but who knows what will be possible in the future */
174 #define EDJE_SMART_API_VERSION 1
175 
177 
179 {
180  Evas_Smart_Class base;
181  int version;
182  Eina_Bool (*file_set)(Evas_Object *obj, const char *file, const char *group);
183 };
184 
185 /* Basic macro to init the Edje Smart API */
186 #define EDJE_SMART_API_INIT(smart_class_init) {smart_class_init, EDJE_SMART_API_VERSION, NULL}
187 
188 #define EDJE_SMART_API_INIT_NULL EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
189 #define EDJE_SMART_API_INIT_VERSION EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
190 #define EDJE_SMART_API_INIT_NAME_VERSION(name) EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
191 
192 /* increment this when the EET data descriptors have changed and old
193  * EETs cannot be loaded/used correctly anymore.
194  */
195 #define EDJE_FILE_VERSION 3
196 /* increment this when you add new feature to edje file format without
197  * breaking backward compatibility.
198  */
199 #define EDJE_FILE_MINOR 4
200 
201 /* FIXME:
202  *
203  * More example Edje files
204  *
205  * ? programs can do multiple actions from one signal
206  * ? add containering (hbox, vbox, table, wrapping multi-line hbox & vbox)
207  * ? text entry widget (single line only)
208  *
209  * ? recursions, unsafe callbacks outside Edje etc. with freeze, ref/unref and block/unblock and break_programs needs to be redesigned & fixed
210  * ? all unsafe calls that may result in callbacks must be marked and dealt with
211  */
212 
213 typedef enum
214 {
221 
223 {
224  Evas_Object *obj;
225  Evas *e;
226  Evas_Coord px, py, z0, foc;
227  Eina_List *users;
228  Eina_Bool global : 1;
229 };
230 
232 {
234 };
235 
237 {
238  int x, y;
239 };
240 
242 {
243  int w, h;
244  Eina_Bool limit; /* should we limit ourself to the size of the source */
245 };
246 
248 {
249  int x, y, w, h;
250 };
251 
253 {
254  unsigned char r, g, b, a;
255 };
256 
258 {
260  char prefer;
261 };
262 
264 {
265  int w, h;
267 };
268 
270 {
271  const char *str;
272  unsigned int id;
273 };
274 
278 typedef struct _Edje_Size Edje_Size;
280 typedef struct _Edje_Color Edje_Color;
282 typedef struct _Edje_Aspect Edje_Aspect;
283 typedef struct _Edje_String Edje_String;
284 
285 typedef struct _Edje_File Edje_File;
286 typedef struct _Edje_Style Edje_Style;
295 typedef struct _Edje_Limit Edje_Limit;
305 typedef struct _Edje_Part Edje_Part;
326 
327 typedef struct _Edje Edje;
339 typedef struct _Edje_Var Edje_Var;
351 
352 #define EDJE_INF_MAX_W 100000
353 #define EDJE_INF_MAX_H 100000
354 
355 #define EDJE_IMAGE_SOURCE_TYPE_NONE 0
356 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT 1
357 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY 2
358 #define EDJE_IMAGE_SOURCE_TYPE_EXTERNAL 3
359 #define EDJE_IMAGE_SOURCE_TYPE_LAST 4
360 
361 #define EDJE_SOUND_SOURCE_TYPE_NONE 0
362 #define EDJE_SOUND_SOURCE_TYPE_INLINE_RAW 1
363 #define EDJE_SOUND_SOURCE_TYPE_INLINE_COMP 2
364 #define EDJE_SOUND_SOURCE_TYPE_INLINE_LOSSY 3
365 #define EDJE_SOUND_SOURCE_TYPE_INLINE_AS_IS 4
366 
367 #define EDJE_VAR_NONE 0
368 #define EDJE_VAR_INT 1
369 #define EDJE_VAR_FLOAT 2
370 #define EDJE_VAR_STRING 3
371 #define EDJE_VAR_LIST 4
372 #define EDJE_VAR_HASH 5
373 
374 #define EDJE_VAR_MAGIC_BASE 0x12fe84ba
375 
376 #define EDJE_STATE_PARAM_NONE 0
377 #define EDJE_STATE_PARAM_ALIGNMENT 1
378 #define EDJE_STATE_PARAM_MIN 2
379 #define EDJE_STATE_PARAM_MAX 3
380 #define EDJE_STATE_PARAM_STEP 4
381 #define EDJE_STATE_PARAM_ASPECT 5
382 #define EDJE_STATE_PARAM_ASPECT_PREF 6
383 #define EDJE_STATE_PARAM_COLOR 7
384 #define EDJE_STATE_PARAM_COLOR2 8
385 #define EDJE_STATE_PARAM_COLOR3 9
386 #define EDJE_STATE_PARAM_COLOR_CLASS 10
387 #define EDJE_STATE_PARAM_REL1 11
388 #define EDJE_STATE_PARAM_REL1_TO 12
389 #define EDJE_STATE_PARAM_REL1_OFFSET 13
390 #define EDJE_STATE_PARAM_REL2 14
391 #define EDJE_STATE_PARAM_REL2_TO 15
392 #define EDJE_STATE_PARAM_REL2_OFFSET 16
393 #define EDJE_STATE_PARAM_IMAGE 17
394 #define EDJE_STATE_PARAM_BORDER 18
395 #define EDJE_STATE_PARAM_FILL_SMOOTH 19
396 #define EDJE_STATE_PARAM_FILL_POS 20
397 #define EDJE_STATE_PARAM_FILL_SIZE 21
398 #define EDJE_STATE_PARAM_TEXT 22
399 #define EDJE_STATE_PARAM_TEXT_CLASS 23
400 #define EDJE_STATE_PARAM_TEXT_FONT 24
401 #define EDJE_STATE_PARAM_TEXT_STYLE 25
402 #define EDJE_STATE_PARAM_TEXT_SIZE 26
403 #define EDJE_STATE_PARAM_TEXT_FIT 27
404 #define EDJE_STATE_PARAM_TEXT_MIN 28
405 #define EDJE_STATE_PARAM_TEXT_MAX 29
406 #define EDJE_STATE_PARAM_TEXT_ALIGN 30
407 #define EDJE_STATE_PARAM_VISIBLE 31
408 #define EDJE_STATE_PARAM_MAP_OM 32
409 #define EDJE_STATE_PARAM_MAP_PERSP 33
410 #define EDJE_STATE_PARAM_MAP_LIGNT 34
411 #define EDJE_STATE_PARAM_MAP_ROT_CENTER 35
412 #define EDJE_STATE_PARAM_MAP_ROT_X 36
413 #define EDJE_STATE_PARAM_MAP_ROT_Y 37
414 #define EDJE_STATE_PARAM_MAP_ROT_Z 38
415 #define EDJE_STATE_PARAM_MAP_BACK_CULL 39
416 #define EDJE_STATE_PARAM_MAP_PERSP_ON 40
417 #define EDJE_STATE_PARAM_PERSP_ZPLANE 41
418 #define EDJE_STATE_PARAM_PERSP_FOCAL 42
419 #define EDJE_STATE_PARAM_LAST 43
420 
421 #define EDJE_ENTRY_EDIT_MODE_NONE 0
422 #define EDJE_ENTRY_EDIT_MODE_SELECTABLE 1
423 #define EDJE_ENTRY_EDIT_MODE_EDITABLE 2
424 #define EDJE_ENTRY_EDIT_MODE_PASSWORD 3
425 
426 #define EDJE_ENTRY_SELECTION_MODE_DEFAULT 0
427 #define EDJE_ENTRY_SELECTION_MODE_EXPLICIT 1
428 
429 #define EDJE_ENTRY_CURSOR_MODE_UNDER 0
430 #define EDJE_ENTRY_CURSOR_MODE_BEFORE 1
431 
432 #define EDJE_ORIENTATION_AUTO 0
433 #define EDJE_ORIENTATION_LTR 1
434 #define EDJE_ORIENTATION_RTL 2
435 
436 #define EDJE_PART_PATH_SEPARATOR ':'
437 #define EDJE_PART_PATH_SEPARATOR_STRING ":"
438 #define EDJE_PART_PATH_SEPARATOR_INDEXL '['
439 #define EDJE_PART_PATH_SEPARATOR_INDEXR ']'
440 
441 #define FLAG_NONE 0
442 #define FLAG_X 0x01
443 #define FLAG_Y 0x02
444 #define FLAG_XY (FLAG_X | FLAG_Y)
445 
446 /*----------*/
447 
449 {
450  const char *path;
451  time_t mtime;
452 
456  Eina_List *styles;
457 
458  Eina_List *color_classes;
459  Eina_Hash *color_hash;
460 
462  const char *compiler;
463  int version;
464  int minor;
466 
467  Eina_Hash *data;
468  Eina_Hash *fonts;
469 
470  Eina_Hash *collection;
471  Eina_List *collection_cache;
472 
474 
475  Eet_File *ef;
476 
477 #ifdef HAVE_EIO
478  Eio_Monitor *monitor;
479  Eina_List *edjes;
480  Eina_List *handlers;
481  Ecore_Timer *timeout;
482 #endif
483 
484  unsigned char free_strings : 1;
485  unsigned char dangling : 1;
486  unsigned char warning : 1;
487 };
488 
490 {
491  char *name;
492  Eina_List *tags;
493  Evas_Textblock_Style *style;
494 };
495 
497 {
498  const char *key;
499  const char *value;
500  const char *font;
501  double font_size;
502  const char *text_class;
503 };
504 
505 /*----------*/
506 
507 
509 {
510  const char *entry; /* the name of the font */
511  const char *file; /* the name of the file */
512 };
513 
514 /*----------*/
515 
517 {
518  Edje_External_Directory_Entry *entries; /* a list of Edje_External_Directory_Entry */
519  unsigned int entries_count;
520 };
521 
523 {
524  const char *entry; /* the name of the external */
525 };
526 
527 
528 /*----------*/
529 
530 
531 
532 /*----------*/
533 
535 {
536  Edje_Image_Directory_Entry *entries; /* an array of Edje_Image_Directory_Entry */
537  unsigned int entries_count;
538 
540  unsigned int sets_count; /* an array of Edje_Image_Directory_Set */
541 };
542 
544 {
545  const char *entry; /* the nominal name of the image - if any */
546  int source_type; /* alternate source mode. 0 = none */
547  int source_param; /* extra params on encoding */
548  int id; /* the id no. of the image */
549 };
550 
552 {
553  char *name;
554  Eina_List *entries;
555 
556  int id;
557 };
558 
560 {
561  const char *name;
562  int id;
563 
564  struct {
565  struct {
566  int w;
567  int h;
568  } min, max;
569  } size;
570 };
571 
572 struct _Edje_Sound_Sample /*Sound Sample*/
573 {
574  const char *name; /* the nominal name of the sound */
575  const char *snd_src; /* Sound source Wav file */
576  int compression; /* Compression - RAW, LOSSLESS COMP , LOSSY ) */
577  int mode; /* alternate source mode. 0 = none */
578  double quality;
579  int id; /* the id no. of the sound */
580 };
581 
582 struct _Edje_Sound_Tone /*Sound Sample*/
583 {
584  const char *name; /* the nominal name of the sound - if any */
585  int value; /* alternate source mode. 0 = none */
586  int id; /* the id no. of the sound */
587 };
588 
590 {
591 
592  Edje_Sound_Sample *samples; /* an array of Edje_Sound_Sample entries */
593  unsigned int samples_count;
594 
595  Edje_Sound_Tone *tones; /* an array of Edje_Sound_Tone entries */
596  unsigned int tones_count;
597 };
598 
599 /*----------*/
600 
601 struct _Edje_Program /* a conditional program to be run */
602 {
603  int id; /* id of program */
604  const char *name; /* name of the action */
605 
606  const char *signal; /* if signal emission name matches the glob here... */
607  const char *source; /* if part that emitted this (name) matches this glob */
608  const char *sample_name;
609  const char *tone_name;
610  double duration;
611  double speed;
612 
613  struct {
614  const char *part;
615  const char *state; /* if state is not set, we will try with source */
616  } filter; /* the part filter.part should be in state filter.state for signal to be accepted */
617 
618  struct {
619  double from;
620  double range;
621  } in;
622 
623  int action; /* type - set state, stop action, set drag pos etc. */
624  const char *state; /* what state of alternates to apply, NULL = default */
625  const char *state2; /* what other state to use - for signal emit action */
626  double value; /* value of state to apply (if multiple names match) */
627  double value2; /* other value for drag actions */
628 
629  struct {
630  int mode; /* how to tween - linear, sinusoidal etc. */
631  FLOAT_T time; /* time to graduate between current and new state */
632  FLOAT_T v1; /* other value for drag actions */
633  FLOAT_T v2; /* other value for drag actions */
634  } tween;
635 
636  Eina_List *targets; /* list of target parts to apply the state to */
637 
638  Eina_List *after; /* list of actions to run at the end of this, for looping */
639 
640  struct {
641  const char *name;
642  const char *description;
643  } api;
644 
645  /* used for PARAM_COPY (param names in state and state2 above!) */
646  struct {
647  int src; /* part where parameter is being retrieved */
648  int dst; /* part where parameter is being stored */
649  } param;
650 
651  Eina_Bool exec : 1;
652 };
653 
654 struct _Edje_Program_Target /* the target of an action */
655 {
656  int id; /* just the part id no, or action id no */
657 };
658 
659 struct _Edje_Program_After /* the action to run after another action */
660 {
661  int id;
662 };
663 
664 /*----------*/
666 {
667  const char *name;
668  int value;
669 };
670 
671 /*----------*/
672 #define PART_TYPE_FIELDS(TYPE) \
673  TYPE RECTANGLE; \
674  TYPE TEXT; \
675  TYPE IMAGE; \
676  TYPE PROXY; \
677  TYPE SWALLOW; \
678  TYPE TEXTBLOCK; \
679  TYPE GROUP; \
680  TYPE BOX; \
681  TYPE TABLE; \
682  TYPE SPACER; \
683  TYPE EXTERNAL;
684 
686 {
687  const char *entry; /* the nominal name of the part collection */
688  int id; /* the id of this named part collection */
689 
690  struct
691  {
692  PART_TYPE_FIELDS(int)
693  int part;
694  } count;
695 
696  struct
697  {
698  PART_TYPE_FIELDS(Eina_Mempool *)
699  Eina_Mempool *part;
700  } mp;
701 
702  struct
703  {
704  PART_TYPE_FIELDS(Eina_Mempool *)
705  } mp_rtl; /* For Right To Left interface */
706 
708 };
709 
710 /*----------*/
711 
712 /*----------*/
713 
715 {
716  unsigned char type; /* only GROUP supported for now */
717  Edje_Real_Part *parent; /* pointer to the table/box that hold it, set at runtime */
718  const char *name; /* if != NULL, will be set with evas_object_name_set */
719  const char *source; /* group name to use as source for this element */
720  Edje_Size min, prefer, max;
721  struct {
722  int l, r, t, b;
723  } padding;
727  const char *options; /* extra options for custom objects */
728  /* table specific follows */
729  int col, row;
730  unsigned short colspan, rowspan;
731 };
732 
733 typedef enum {
739 
741 {
742  int part;
743 
744  Edje_Part_Limit_State width; /* -1, 0 or 1 */
745  Edje_Part_Limit_State height; /* -1, 0, or 1 */
746 };
747 
748 /*----------*/
749 
751 {
752  struct { /* list of Edje_Program */
753  Edje_Program **fnmatch; /* complex match with "*?[\" */
754  unsigned int fnmatch_count;
755 
756  Edje_Program **strcmp; /* No special caractere, plain strcmp does the work */
757  unsigned int strcmp_count;
758 
759  Edje_Program **strncmp; /* Finish by * or ?, plain strncmp does the work */
760  unsigned int strncmp_count;
761 
762  Edje_Program **strrncmp; /* Start with * or ?, reverse strncmp will do the job */
763  unsigned int strrncmp_count;
764 
765  Edje_Program **nocmp; /* Empty signal/source that will never match */
766  unsigned int nocmp_count;
767  } programs;
768 
769  struct { /* list of limit that need to be monitored */
771  unsigned int vertical_count;
772 
774  unsigned int horizontal_count;
775 
777  unsigned int parts_count;
778  } limits;
779 
780  Edje_Part **parts; /* an array of Edje_Part */
781  unsigned int parts_count;
782 
783  Eina_Hash *data;
784 
785  int id; /* the collection id */
786 
787  Eina_Hash *alias; /* aliasing part */
788  Eina_Hash *aliased; /* invert match of alias */
789 
790  struct {
792  unsigned char orientation;
793  } prop;
794 
796 
797 #ifdef EDJE_PROGRAM_CACHE
798  struct {
799  Eina_Hash *no_matches;
800  Eina_Hash *matches;
801  } prog_cache;
802 #endif
803 
804  Embryo_Program *script; /* all the embryo script code for this group */
805  const char *part;
806 
807  unsigned char script_only;
808 
809  unsigned char lua_script_only;
810 
811  unsigned char broadcast_signal;
812 
813  unsigned char checked : 1;
814 };
815 
817 {
818  int step_x; /* drag jumps n pixels (0 = no limit) */
819  int step_y; /* drag jumps n pixels (0 = no limit) */
820 
821  int count_x; /* drag area divided by n (0 = no limit) */
822  int count_y; /* drag area divided by n (0 = no limit) */
823 
824  int confine_id; /* dragging within this bit, -1 = no */
825 
826  /* davinchi */
827  int event_id; /* If it is used as scrollbar */
828 
829  signed char x; /* can u click & drag this bit in x dir */
830  signed char y; /* can u click & drag this bit in y dir */
831 };
832 
834 {
835  const char *name;
836  const char *description;
837 };
838 
841 {
843  Edje_Part_Description_Common **desc_rtl; /* desc for Right To Left interface */
844  unsigned int desc_count;
845 };
846 
848 {
849  const char *name; /* the name if any of the part */
850  Edje_Part_Description_Common *default_desc; /* the part descriptor for default */
851  Edje_Part_Description_Common *default_desc_rtl; /* default desc for Right To Left interface */
852 
853  Edje_Part_Description_List other; /* other possible descriptors */
854 
855  const char *source, *source2, *source3, *source4, *source5, *source6;
856  int id; /* its id number */
857  int clip_to_id; /* the part id to clip this one to */
859  Edje_Pack_Element **items; /* packed items for box and table */
860  unsigned int items_count;
861  unsigned char type; /* what type (image, rect, text) */
862  unsigned char effect; /* 0 = plain... */
863  unsigned char mouse_events; /* it will affect/respond to mouse events */
864  unsigned char repeat_events; /* it will repeat events to objects below */
865  Evas_Event_Flags ignore_flags;
866  unsigned char scale; /* should certain properties scale with edje scale factor? */
867  unsigned char precise_is_inside;
869  unsigned char pointer_mode;
870  unsigned char entry_mode;
871  unsigned char select_mode;
872  unsigned char cursor_mode;
873  unsigned char multiline;
874  unsigned char access; /* it will be used accessibility feature */
876 };
877 
879 {
880  int id;
881  Eina_Bool set;
882 };
883 
885 {
886  struct {
887  double value; /* the value of the state (for ranges) */
888  const char *name; /* the named state if any */
889  } state;
890 
891  Edje_Alignment align; /* 0 <-> 1.0 alignment within allocated space */
892 
893  struct {
894  unsigned char w, h; /* width or height is fixed in side (cannot expand with Edje object size) */
895  } fixed;
896 
897  struct { // only during recalc
898  unsigned char have;
899  FLOAT_T w, h;
900  } minmul;
901 
903  Edje_Position step; /* size stepping by n pixels, 0 = none */
905 
906  char *color_class; /* how to modify the color */
909 
910  struct {
913  int offset_x;
914  int offset_y;
915  int id_x; /* -1 = whole part collection, or part ID */
916  int id_y; /* -1 = whole part collection, or part ID */
917  } rel1, rel2;
918 
919  struct {
920  int id_persp;
921  int id_light;
922  struct {
924  FLOAT_T x, y, z;
925  } rot;
926  unsigned char backcull;
927  unsigned char on;
928  unsigned char persp_on;
929  unsigned char smooth;
930  unsigned char alpha;
931  } map;
932 
933  struct {
934  int zplane;
935  int focal;
936  } persp;
937 
938  unsigned char visible; /* is it shown */
939  unsigned char limit; /* 0 == no, 1 = width, 2 = height, 3 = both */
940 };
941 
943 {
944  FLOAT_T pos_rel_x; /* fill offset x relative to area */
945  FLOAT_T rel_x; /* relative size compared to area */
946  FLOAT_T pos_rel_y; /* fill offset y relative to area */
947  FLOAT_T rel_y; /* relative size compared to area */
948  int pos_abs_x; /* fill offset x added to fill offset */
949  int abs_x; /* size of fill added to relative fill */
950  int pos_abs_y; /* fill offset y added to fill offset */
951  int abs_y; /* size of fill added to relative fill */
952  int angle; /* angle of fill -- currently only used by grads */
953  int spread; /* spread of fill -- currently only used by grads */
954  char smooth; /* fill with smooth scaling or not */
955  unsigned char type; /* fill coordinate from container (SCALE) or from source image (TILE) */
956 };
957 
959 {
960  int l, r, t, b; /* border scaling on image fill */
961  unsigned char no_fill; /* do we fill the center of the image if bordered? 1 == NO!!!! */
962  unsigned char scale; /* scale image border by same as scale factor */
963  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" */
964 };
965 
967 {
969 
970  Edje_Part_Image_Id **tweens; /* list of Edje_Part_Image_Id */
971  unsigned int tweens_count; /* number of tweens */
972 
973  int id; /* the image id to use */
974  int scale_hint; /* evas scale hint */
975  Eina_Bool set; /* if image condition it's content */
976 
978 };
979 
981 {
983 
984  int id; /* the part id to use as a source for this state */
985 };
986 
988 {
989  Edje_String text; /* if "" or NULL, then leave text unchanged */
990  char *text_class; /* how to apply/modify the font */
991  Edje_String style; /* the text style if a textblock */
992  Edje_String font; /* if a specific font is asked for */
993  Edje_String repch; /* replacement char for password mode entry */
994 
995  Edje_Alignment align; /* text alignment within bounds */
997 
998  double elipsis; /* 0.0 - 1.0 defining where the elipsis align */
999  int size; /* 0 = use user set size */
1000  int id_source; /* -1 if none */
1001  int id_text_source; /* -1 if none */
1002 
1003  unsigned char fit_x; /* resize font size down to fit in x dir */
1004  unsigned char fit_y; /* resize font size down to fit in y dir */
1005  unsigned char min_x; /* if text size should be part min size */
1006  unsigned char min_y; /* if text size should be part min size */
1007  unsigned char max_x; /* if text size should be part max size */
1008  unsigned char max_y; /* if text size should be part max size */
1010  int size_range_max; /* -1 means, no bound. */
1011 };
1012 
1014 {
1015  char *layout, *alt_layout;
1017  struct {
1018  int x, y;
1019  } padding;
1020  struct {
1021  unsigned char h, v;
1022  } min;
1023 };
1024 
1026 {
1027  unsigned char homogeneous;
1029  struct {
1030  int x, y;
1031  } padding;
1032  struct {
1033  unsigned char h, v;
1034  } min;
1035 };
1036 
1038 {
1041 };
1042 
1044 {
1047 };
1048 
1050 {
1053 };
1054 
1056 {
1059 };
1060 
1062 {
1065 };
1066 
1068 {
1070  Eina_List *external_params; /* parameters for external objects */
1071 };
1072 
1073 /*----------*/
1074 
1076 {
1078 
1079  const char *signal;
1080  const char *source;
1081 
1082  Eina_List *list;
1083 };
1084 
1086 
1087 {
1090 
1091  Eina_Rbtree *exact_match;
1092 
1093  union {
1094  struct {
1096  unsigned int count;
1097  } programs;
1098  struct {
1099  Eina_List *globing;
1100  } callbacks;
1101  } u;
1102 };
1103 
1105 
1106 struct _Edje
1107 {
1108  Evas_Object_Smart_Clipped_Data base;
1109  /* This contains (or should):
1110  Evas_Object *clipper; // a big rect to clip this Edje to
1111  Evas *evas; // the Evas this Edje belongs to
1112  */
1114  const char *path;
1115  const char *group;
1116  const char *parent;
1117 
1118  Evas_Coord x, y, w, h;
1120  double paused_at;
1121  Evas_Object *obj; /* the smart object */
1122  Edje_File *file; /* the file the data comes form */
1123  Edje_Part_Collection *collection; /* the description being used */
1124  Eina_List *actions; /* currently running actions */
1125  Eina_List *callbacks;
1126  Eina_List *pending_actions;
1127  Eina_Hash *color_classes;
1128  Eina_List *text_classes;
1129  /* variable pool for Edje Embryo scripts */
1131  /* for faster lookups to avoid nth list walks */
1135  Eina_List *subobjs;
1139 
1141  unsigned int table_parts_size;
1142 
1143  Eina_List *groups;
1144 
1145  struct {
1146  Eina_Hash *text_class;
1147  Eina_Hash *color_class;
1148  } members;
1149 
1151 
1152  struct {
1155  } patterns;
1156 
1158  int block;
1160  int freeze;
1162  Eina_Bool is_rtl : 1;
1163 
1164  struct {
1166  void *data;
1167  } text_change;
1168 
1169  struct {
1171  void *data;
1172  int num;
1173  } message;
1175 
1176  int state;
1177 
1179 
1180  lua_State *L;
1181  Eina_Inlist *lua_objs;
1182  int lua_ref;
1183 
1184  struct {
1186  void *data;
1187  } item_provider;
1188 
1189  Eina_List *user_defined;
1190 
1192 
1193  unsigned int dirty : 1;
1194  unsigned int recalc : 1;
1195  unsigned int delete_callbacks : 1;
1196  unsigned int just_added_callbacks : 1;
1197  unsigned int have_objects : 1;
1198  unsigned int paused : 1;
1199  unsigned int no_anim : 1;
1200  unsigned int calc_only : 1;
1201  unsigned int walking_actions : 1;
1202  unsigned int block_break : 1;
1203  unsigned int delete_me : 1;
1204  unsigned int postponed : 1;
1205  unsigned int freeze_calc : 1;
1206  unsigned int has_entries : 1;
1207  unsigned int entries_inited : 1;
1208 #ifdef EDJE_CALC_CACHE
1209  unsigned int text_part_change : 1;
1210  unsigned int all_part_change : 1;
1211 #endif
1212  unsigned int have_mapped_part : 1;
1213  unsigned int recalc_call : 1;
1214  unsigned int update_hints : 1;
1215  unsigned int recalc_hints : 1;
1216 };
1217 
1219 {
1220  int x, y, w, h; // 16
1224  union {
1225  struct {
1226  struct {
1227  int x, y, w, h; // 16
1228  int angle; // 4
1229  int spread; // 4
1230  } fill; // 24
1231 
1232  union {
1233  struct {
1234  int l, r, t, b; // 16
1236  } image; // 16
1237  } spec; // 16
1238  } common; // 40
1239  struct {
1240  Edje_Alignment align; /* text alignment within bounds */ // 16
1241  double elipsis; // 8
1242  int size; // 4
1243  Edje_Color color2, color3; // 8
1244  } text; // 36
1245  } type; // 40
1246  struct {
1247  struct {
1248  int x, y, z;
1249  } center; // 12
1250  struct {
1251  FLOAT_T x, y, z;
1252  } rotation; // 24
1253  struct {
1254  int x, y, z;
1255  int r, g, b;
1256  int ar, ag, ab;
1257  } light; // 36
1258  struct {
1259  int x, y, z;
1260  int focal;
1261  } persp;
1262  } map;
1263  unsigned char persp_on : 1;
1264  unsigned char lighted : 1;
1265  unsigned char mapped : 1;
1266  unsigned char visible : 1;
1267  unsigned char smooth : 1; // 1
1268 }; // 96
1269 
1271 {
1274 
1275  int id; // 4
1276 };
1277 
1279 {
1286 #ifdef EDJE_CALC_CACHE
1287  int state; // 4
1288  Edje_Calc_Params p; // 96
1289 #endif
1290  void *external_params; // 4
1292 }; // 32
1293 // WITH EDJE_CALC_CACHE 132
1294 
1296 {
1297  FLOAT_T x, y; // 16
1298  Edje_Position_Scale val, size, step, page; // 64
1299  struct {
1300  unsigned int count; // 4
1301  int x, y; // 8
1302  } down;
1303  struct {
1304  int x, y; // 8
1305  } tmp;
1306  unsigned char need_reset : 1; // 4
1308 }; // 104
1309 
1311 {
1312  Edje *edje; // 4
1314  Evas_Object *object; // 4
1315  int x, y, w, h; // 16
1317 
1318  Eina_List *items; // 4 //FIXME: only if table/box
1319  Edje_Part_Box_Animation *anim; // 4 //FIXME: Used only if box
1320  void *entry_data; // 4 // FIXME: move to entry section
1321 
1322  Evas_Object *swallowed_object; // 4 // FIXME: move with swallow_params data
1323  struct {
1324  Edje_Size min, max; // 16
1326  } swallow_params; // 28 // FIXME: only if type SWALLOW
1327 
1330 
1331  struct {
1334  const char *text; // 4
1335  Edje_Position offset; // 8 text only
1336  const char *font; // 4 text only
1337  const char *style; // 4 text only
1338  int size; // 4 text only
1339  struct {
1340  double in_w, in_h; // 16 text only
1341  int in_size; // 4 text only
1342  const char *in_str; // 4 text only
1343  const char *out_str; // 4 text only
1344  int out_size; // 4 text only
1345  FLOAT_T align_x, align_y; // 16 text only
1346  double elipsis; // 8 text only
1347  int fit_x, fit_y; // 8 text only
1348  } cache; // 64
1349  } text; // 86 // FIXME make text a potiner to struct and alloc at end
1350  // if part type is TEXT move common members textblock +
1351  // text to front and have smaller struct for textblock
1352 
1356  // WITH EDJE_CALC_CACHE: 140
1359 
1360 #ifdef EDJE_CALC_CACHE
1361  int state; // 4
1362 #endif
1363 
1365 
1367 
1368  int clicked_button; // 4
1369 
1370  unsigned char calculated; // 1
1371  unsigned char calculating; // 1
1372 
1373  unsigned char still_in : 1; // 1
1374 #ifdef EDJE_CALC_CACHE
1375  unsigned char invalidate : 1; // 0
1376 #endif
1377 }; // 264
1378 // WITH EDJE_CALC_CACHE: 404
1379 
1381 {
1384  double start_time;
1385  char delete_me : 1;
1386 };
1387 
1389 {
1390  const char *signal;
1391  const char *source;
1393  void *data;
1394  unsigned char just_added : 1;
1395  unsigned char delete_me : 1;
1396  unsigned char propagate : 1;
1397 };
1398 
1400 {
1401  const char *part;
1403  void *data;
1404 };
1405 
1407 {
1408  const char *part;
1410  void *data;
1411 };
1412 
1414 {
1417  Ecore_Timer *timer;
1418 };
1419 
1421 {
1422  struct {
1423  unsigned char x, y;
1424  } offset;
1425  struct {
1426  unsigned char l, r, t, b;
1427  } pad;
1428  int num;
1429  struct {
1430  unsigned char color; /* 0 = color, 1, 2 = color2, color3 */
1431  signed char x, y; /* offset */
1432  unsigned char alpha;
1433  } members[32];
1434 };
1435 
1437 {
1438  const char *name;
1439  unsigned char r, g, b, a;
1440  unsigned char r2, g2, b2, a2;
1441  unsigned char r3, g3, b3, a3;
1442 };
1443 
1445 {
1446  const char *name;
1447  const char *font;
1448  Evas_Font_Size size;
1449 };
1450 
1452 {
1453  int v;
1454 };
1455 
1457 {
1458  double v;
1459 };
1460 
1462 {
1463  char *v;
1464 };
1465 
1467 {
1468  Eina_List *v;
1469 };
1470 
1472 {
1473  Eina_Hash *v;
1474 };
1475 
1477 {
1479  int id;
1480  Embryo_Function func;
1481  int val;
1482  Ecore_Timer *timer;
1483 };
1484 
1486 {
1488  int id;
1489  Embryo_Function func;
1490  int val;
1491  double start, len;
1493 };
1494 
1496 {
1498  Eina_List *timers;
1499  Eina_List *animators;
1500  int size;
1503 };
1504 
1506 {
1507  union {
1513  } data;
1514  unsigned char type;
1515 };
1516 
1517 typedef enum _Edje_Queue
1518 {
1521 } Edje_Queue;
1522 
1525 
1528 {
1529  int ref;
1530  void *data;
1531  void (*free_func)(void *);
1532 };
1533 
1535 {
1536  const char *sig;
1537  const char *src;
1539 };
1540 
1542 {
1546  int id;
1547  unsigned char *msg;
1548  Eina_Bool propagated : 1;
1549 };
1550 
1551 typedef enum _Edje_Fill
1552 {
1555 } Edje_Fill;
1556 
1557 typedef enum _Edje_Match_Error
1558 {
1562 
1564 
1565 typedef struct _Edje_States Edje_States;
1567 {
1568  const char **patterns;
1569 
1571 
1572  int ref;
1573  Eina_Bool delete_me : 1;
1574 
1576  size_t max_length;
1577  size_t finals[];
1578 };
1579 
1581 {
1591 
1594 {
1596  const char *part;
1598 
1599  union {
1600  struct {
1601  const char *text;
1602  } string;
1603  struct {
1604  Evas_Object *child;
1605  } swallow;
1606  struct {
1607  Evas_Object *child;
1608  int index;
1609  } box;
1610  struct {
1611  Evas_Object *child;
1612  unsigned short col;
1613  unsigned short row;
1614  unsigned short colspan;
1615  unsigned short rowspan;
1616  } table;
1617  struct {
1618  double x, y;
1619  } drag_position;
1620  struct {
1621  double w, h;
1622  } drag_size;
1623  } u;
1624 };
1625 
1626 Edje_Patterns *edje_match_collection_dir_init(const Eina_List *lst);
1628  unsigned int count);
1630  unsigned int count);
1631 Edje_Patterns *edje_match_callback_signal_init(const Eina_List *lst);
1632 Edje_Patterns *edje_match_callback_source_init(const Eina_List *lst);
1633 
1634 Eina_Bool edje_match_collection_dir_exec(const Edje_Patterns *ppat,
1635  const char *string);
1636 Eina_Bool edje_match_programs_exec(const Edje_Patterns *ppat_signal,
1637  const Edje_Patterns *ppat_source,
1638  const char *signal,
1639  const char *source,
1640  Edje_Program **programs,
1641  Eina_Bool (*func)(Edje_Program *pr, void *data),
1642  void *data,
1643  Eina_Bool prop);
1644 int edje_match_callback_exec(Edje_Patterns *ppat_signal,
1645  Edje_Patterns *ppat_source,
1646  const char *signal,
1647  const char *source,
1648  Eina_List *callbacks,
1649  Edje *ed,
1650  Eina_Bool prop);
1651 
1653 
1654 Eina_List *edje_match_program_hash_build(Edje_Program * const * programs,
1655  unsigned int count,
1656  Eina_Rbtree **tree);
1657 Eina_List *edje_match_callback_hash_build(const Eina_List *callbacks,
1658  Eina_Rbtree **tree);
1659 const Eina_List *edje_match_signal_source_hash_get(const char *signal,
1660  const char *source,
1661  const Eina_Rbtree *tree);
1663 
1664 // FIXME remove below 2 eapi decls when edje_convert goes
1665 EAPI void _edje_edd_init(void);
1666 EAPI void _edje_edd_shutdown(void);
1667 
1668 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_file;
1669 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_part_collection;
1670 
1671 extern int _edje_anim_count;
1672 extern Ecore_Animator *_edje_timer;
1673 extern Eina_List *_edje_animators;
1674 extern Eina_List *_edje_edjes;
1675 
1676 extern char *_edje_fontset_append;
1677 extern FLOAT_T _edje_scale;
1678 extern int _edje_freeze_val;
1679 extern int _edje_freeze_calc_count;
1680 extern Eina_List *_edje_freeze_calc_list;
1681 
1682 extern Eina_Bool _edje_password_show_last;
1684 
1685 extern Eina_Mempool *_edje_real_part_mp;
1686 extern Eina_Mempool *_edje_real_part_state_mp;
1687 
1688 extern Eina_Mempool *_emp_RECTANGLE;
1689 extern Eina_Mempool *_emp_TEXT;
1690 extern Eina_Mempool *_emp_IMAGE;
1691 extern Eina_Mempool *_emp_PROXY;
1692 extern Eina_Mempool *_emp_SWALLOW;
1693 extern Eina_Mempool *_emp_TEXTBLOCK;
1694 extern Eina_Mempool *_emp_GROUP;
1695 extern Eina_Mempool *_emp_BOX;
1696 extern Eina_Mempool *_emp_TABLE;
1697 extern Eina_Mempool *_emp_EXTERNAL;
1698 extern Eina_Mempool *_emp_SPACER;
1699 extern Eina_Mempool *_emp_part;
1700 
1701 void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2);
1703  Edje_Real_Part *rp,
1704  const char *name, double val);
1705 void _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, double v1, const char *d2, double v2);
1706 void _edje_recalc(Edje *ed);
1707 void _edje_recalc_do(Edje *ed);
1708 void _edje_part_recalc_1(Edje *ed, Edje_Real_Part *ep);
1711 
1712 Eina_Bool _edje_timer_cb(void *data);
1713 Eina_Bool _edje_pending_timer_cb(void *data);
1714 void _edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
1715 void _edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
1716 void _edje_callbacks_del(Evas_Object *obj, Edje *ed);
1717 void _edje_callbacks_focus_del(Evas_Object *obj, Edje *ed);
1718 
1719 void _edje_edd_init(void);
1720 void _edje_edd_shutdown(void);
1721 
1722 int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, const char *parent, Eina_List *group_path);
1723 
1724 void _edje_file_add(Edje *ed);
1725 void _edje_file_del(Edje *ed);
1726 void _edje_file_free(Edje_File *edf);
1727 void _edje_file_cache_shutdown(void);
1733  Eina_Bool free_strings);
1737  Eina_Bool free_strings);
1738 
1741 
1742 void _edje_del(Edje *ed);
1743 void _edje_ref(Edje *ed);
1744 void _edje_unref(Edje *ed);
1745 void _edje_clean_objects(Edje *ed);
1746 void _edje_ref(Edje *ed);
1747 void _edje_unref(Edje *ed);
1748 
1749 Eina_Bool _edje_program_run_iterate(Edje_Running_Program *runp, double tim);
1751 void _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig, const char *ssrc);
1754 void _edje_emit(Edje *ed, const char *sig, const char *src);
1755 void _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*free_func)(void *));
1756 void _edje_emit_handle(Edje *ed, const char *sig, const char *src, Edje_Message_Signal_Data *data, Eina_Bool prop);
1759 
1760 void _edje_text_init(void);
1762 void _edje_text_part_on_del(Edje *ed, Edje_Part *ep);
1763 void _edje_text_recalc_apply(Edje *ed,
1764  Edje_Real_Part *ep,
1765  Edje_Calc_Params *params,
1766  Edje_Part_Description_Text *chosen_desc);
1767 Evas_Font_Size _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc);
1768 const char * _edje_text_class_font_get(Edje *ed,
1769  Edje_Part_Description_Text *chosen_desc,
1770  int *size, char **free_later);
1771 
1772 
1773 Edje_Real_Part *_edje_real_part_get(const Edje *ed, const char *part);
1774 Edje_Real_Part *_edje_real_part_recursive_get(const Edje *ed, const char *part);
1775 Edje_Color_Class *_edje_color_class_find(Edje *ed, const char *color_class);
1776 void _edje_color_class_member_direct_del(const char *color_class, void *lookup);
1777 void _edje_color_class_member_add(Edje *ed, const char *color_class);
1778 void _edje_color_class_member_del(Edje *ed, const char *color_class);
1779 void _edje_color_class_on_del(Edje *ed, Edje_Part *ep);
1781 void _edje_color_class_hash_free(void);
1782 
1783 Edje_Text_Class *_edje_text_class_find(Edje *ed, const char *text_class);
1784 void _edje_text_class_member_add(Edje *ed, const char *text_class);
1785 void _edje_text_class_member_del(Edje *ed, const char *text_class);
1786 void _edje_text_class_member_direct_del(const char *text_class, void *lookup);
1788 void _edje_text_class_hash_free(void);
1789 
1790 Edje *_edje_fetch(const Evas_Object *obj) EINA_PURE;
1791 int _edje_freeze(Edje *ed);
1792 int _edje_thaw(Edje *ed);
1793 int _edje_block(Edje *ed);
1794 int _edje_unblock(Edje *ed);
1795 int _edje_block_break(Edje *ed);
1796 void _edje_block_violate(Edje *ed);
1797 void _edje_object_part_swallow_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
1798 void _edje_object_part_swallow_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
1799 void _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow, Eina_Bool hints_update);
1801 void _edje_box_init(void);
1802 void _edje_box_shutdown(void);
1803 Eina_Bool _edje_box_layout_find(const char *name, Evas_Object_Box_Layout *cb, void **data, void (**free_data)(void *data));
1804 void _edje_box_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Box *chosen_desc);
1805 Eina_Bool _edje_box_layout_add_child(Edje_Real_Part *rp, Evas_Object *child_obj);
1806 void _edje_box_layout_remove_child(Edje_Real_Part *rp, Evas_Object *child_obj);
1808 void _edje_box_layout_free_data(void *data);
1809 
1810 Eina_Bool _edje_real_part_box_append(Edje_Real_Part *rp, Evas_Object *child_obj);
1811 Eina_Bool _edje_real_part_box_prepend(Edje_Real_Part *rp, Evas_Object *child_obj);
1812 Eina_Bool _edje_real_part_box_insert_before(Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref);
1813 Eina_Bool _edje_real_part_box_insert_at(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos);
1814 Evas_Object *_edje_real_part_box_remove(Edje_Real_Part *rp, Evas_Object *child_obj);
1815 Evas_Object *_edje_real_part_box_remove_at(Edje_Real_Part *rp, unsigned int pos);
1816 Eina_Bool _edje_real_part_box_remove_all(Edje_Real_Part *rp, Eina_Bool clear);
1817 Eina_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);
1818 Eina_Bool _edje_real_part_table_unpack(Edje_Real_Part *rp, Evas_Object *child_obj);
1819 void _edje_real_part_table_clear(Edje_Real_Part *rp, Eina_Bool clear);
1820 Evas_Object *_edje_children_get(Edje_Real_Part *rp, const char *partid);
1821 
1822 Eina_Bool _edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text);
1823 char *_edje_text_escape(const char *text);
1824 char *_edje_text_unescape(const char *text);
1825 
1828 void _edje_embryo_script_reset (Edje *ed);
1829 void _edje_embryo_test_run (Edje *ed, const char *fname, const char *sig, const char *src);
1830 Edje_Var *_edje_var_new (void);
1831 void _edje_var_free (Edje_Var *var);
1832 void _edje_var_init (Edje *ed);
1833 void _edje_var_shutdown (Edje *ed);
1834 int _edje_var_string_id_get (Edje *ed, const char *string);
1835 int _edje_var_var_int_get (Edje *ed, Edje_Var *var);
1836 void _edje_var_var_int_set (Edje *ed, Edje_Var *var, int v);
1837 double _edje_var_var_float_get (Edje *ed, Edje_Var *var);
1838 void _edje_var_var_float_set (Edje *ed, Edje_Var *var, double v);
1839 const char *_edje_var_var_str_get (Edje *ed, Edje_Var *var);
1840 void _edje_var_var_str_set (Edje *ed, Edje_Var *var, const char *str);
1841 int _edje_var_int_get (Edje *ed, int id);
1842 void _edje_var_int_set (Edje *ed, int id, int v);
1843 double _edje_var_float_get (Edje *ed, int id);
1844 void _edje_var_float_set (Edje *ed, int id, double v);
1845 const char *_edje_var_str_get (Edje *ed, int id);
1846 void _edje_var_str_set (Edje *ed, int id, const char *str);
1847 
1848 void _edje_var_list_var_append(Edje *ed, int id, Edje_Var *var);
1849 void _edje_var_list_var_prepend(Edje *ed, int id, Edje_Var *var);
1850 void _edje_var_list_var_append_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
1851 void _edje_var_list_var_prepend_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
1852 Edje_Var *_edje_var_list_nth(Edje *ed, int id, int n);
1853 
1854 int _edje_var_list_count_get(Edje *ed, int id);
1855 void _edje_var_list_remove_nth(Edje *ed, int id, int n);
1856 
1857 int _edje_var_list_nth_int_get(Edje *ed, int id, int n);
1858 void _edje_var_list_nth_int_set(Edje *ed, int id, int n, int v);
1859 void _edje_var_list_int_append(Edje *ed, int id, int v);
1860 void _edje_var_list_int_prepend(Edje *ed, int id, int v);
1861 void _edje_var_list_int_insert(Edje *ed, int id, int n, int v);
1862 
1863 double _edje_var_list_nth_float_get(Edje *ed, int id, int n);
1864 void _edje_var_list_nth_float_set(Edje *ed, int id, int n, double v);
1865 void _edje_var_list_float_append(Edje *ed, int id, double v);
1866 void _edje_var_list_float_prepend(Edje *ed, int id, double v);
1867 void _edje_var_list_float_insert(Edje *ed, int id, int n, double v);
1868 
1869 const char *_edje_var_list_nth_str_get(Edje *ed, int id, int n);
1870 void _edje_var_list_nth_str_set(Edje *ed, int id, int n, const char *v);
1871 void _edje_var_list_str_append(Edje *ed, int id, const char *v);
1872 void _edje_var_list_str_prepend(Edje *ed, int id, const char *v);
1873 void _edje_var_list_str_insert(Edje *ed, int id, int n, const char *v);
1874 
1875 int _edje_var_timer_add (Edje *ed, double in, const char *fname, int val);
1876 void _edje_var_timer_del (Edje *ed, int id);
1877 
1878 int _edje_var_anim_add (Edje *ed, double len, const char *fname, int val);
1879 void _edje_var_anim_del (Edje *ed, int id);
1880 
1881 void _edje_message_init (void);
1882 void _edje_message_shutdown (void);
1883 void _edje_message_cb_set (Edje *ed, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data);
1885 void _edje_message_free (Edje_Message *em);
1886 void _edje_message_propornot_send (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, void *emsg, Eina_Bool prop);
1887 void _edje_message_send (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, void *emsg);
1890 void _edje_message_queue_process (void);
1891 void _edje_message_queue_clear (void);
1892 void _edje_message_del (Edje *ed);
1893 
1899 Edje_File *_edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed);
1904 
1906 
1907 #define CHKPARAM(n) if (params[0] != (sizeof(Embryo_Cell) * (n))) return -1;
1908 #define HASNPARAMS(n) (params[0] == (sizeof(Embryo_Cell) * (n)))
1909 #define GETSTR(str, par) { \
1910  Embryo_Cell *___cptr; \
1911  int ___l; \
1912  str = NULL; \
1913  if ((___cptr = embryo_data_address_get(ep, (par)))) { \
1914  ___l = embryo_data_string_length_get(ep, ___cptr); \
1915  if (((str) = alloca(___l + 1))) \
1916  embryo_data_string_get(ep, ___cptr, (str)); } }
1917 #define GETSTREVAS(str, par) { \
1918  if ((str)) { \
1919  if ((par) && (!strcmp((par), (str)))) return 0; \
1920  if ((par)) eina_stringshare_del((par)); \
1921  (par) = (char *)eina_stringshare_add((str)); } \
1922  else (par) = NULL; }
1923 #define GETFLOAT(val, par) { \
1924  float *___cptr; \
1925  if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
1926  val = *___cptr; } }
1927 
1928 #define GETFLOAT_T(val, par) \
1929  { \
1930  float *___cptr; \
1931  if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \
1932  { \
1933  val = FROM_DOUBLE(*___cptr); \
1934  } \
1935  }
1936 
1937 #define GETINT(val, par) { \
1938  int *___cptr; \
1939  if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
1940  val = *___cptr; } }
1941 #define SETSTR(str, par) { \
1942  Embryo_Cell *___cptr; \
1943  if ((___cptr = embryo_data_address_get(ep, (par)))) { \
1944  embryo_data_string_set(ep, str, ___cptr); } }
1945 #define SETSTRALLOCATE(s) \
1946  { \
1947  if (s) { \
1948  if ((int) strlen((s)) < params[4]) { \
1949  SETSTR((s), params[3]); } \
1950  else { \
1951  char *ss; \
1952  ss = alloca(strlen((s)) + 1); \
1953  strcpy(ss, (s)); \
1954  ss[params[4] - 2] = 0; \
1955  SETSTR(ss, params[3]); } } \
1956  else \
1957  SETSTR("", params[3]); \
1958  }
1959 #define SETFLOAT(val, par) { \
1960  float *___cptr; \
1961  if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
1962  *___cptr = (float)val; } }
1963 #define SETFLOAT_T(val, par) \
1964  { \
1965  float *___cptr; \
1966  if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \
1967  { \
1968  *___cptr = (float) TO_DOUBLE(val); \
1969  } \
1970  }
1971 #define SETINT(val, par) { \
1972  int *___cptr; \
1973  if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
1974  *___cptr = (int)val; } }
1975 
1976 Eina_Bool _edje_script_only(Edje *ed);
1977 void _edje_script_only_init(Edje *ed);
1979 void _edje_script_only_show(Edje *ed);
1980 void _edje_script_only_hide(Edje *ed);
1981 void _edje_script_only_move(Edje *ed);
1982 void _edje_script_only_resize(Edje *ed);
1984 
1985 extern jmp_buf _edje_lua_panic_jmp;
1986 #define _edje_lua_panic_here() setjmp(_edje_lua_panic_jmp)
1987 
1988 lua_State *_edje_lua_state_get();
1989 lua_State *_edje_lua_new_thread(Edje *ed, lua_State *L);
1990 void _edje_lua_free_thread(Edje *ed, lua_State *L);
1991 void _edje_lua_new_reg(lua_State *L, int index, void *ptr);
1992 void _edje_lua_get_reg(lua_State *L, void *ptr);
1993 void _edje_lua_free_reg(lua_State *L, void *ptr);
1994 void _edje_lua_script_fn_new(Edje *ed);
1995 void _edje_lua_group_fn_new(Edje *ed);
1996 void _edje_lua_init();
1997 void _edje_lua_shutdown();
1998 
1999 void __edje_lua_error(const char *file, const char *fnc, int line, lua_State *L, int err_code);
2000 #define _edje_lua_error(L, err_code) \
2001  __edje_lua_error(__FILE__, __FUNCTION__, __LINE__, L, err_code)
2002 
2003 Eina_Bool _edje_lua_script_only(Edje *ed);
2011 
2012 void _edje_entry_init(Edje *ed);
2013 void _edje_entry_shutdown(Edje *ed);
2017 const char *_edje_entry_selection_get(Edje_Real_Part *rp);
2018 const char *_edje_entry_text_get(Edje_Real_Part *rp);
2019 void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text);
2020 void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text);
2021 void _edje_entry_text_markup_append(Edje_Real_Part *rp, const char *text);
2029 const Eina_List *_edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char *anchor);
2030 const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
2031 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);
2032 const Eina_List *_edje_entry_items_list(Edje_Real_Part *rp);
2033 void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
2034 void _edje_entry_user_insert(Edje_Real_Part *rp, const char *text);
2035 void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow);
2036 Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp);
2047 Eina_Bool _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur, int x, int y);
2051 void _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos);
2058 void _edje_entry_prediction_allow_set(Edje_Real_Part *rp, Eina_Bool prediction);
2060 void _edje_entry_input_panel_enabled_set(Edje_Real_Part *rp, Eina_Bool enabled);
2066 void _edje_entry_input_panel_imdata_set(Edje_Real_Part *rp, const void *data, int len);
2067 void _edje_entry_input_panel_imdata_get(Edje_Real_Part *rp, void *data, int *len);
2072 
2073 void _edje_external_init();
2075 Evas_Object *_edje_external_type_add(const char *type_name, Evas *evas, Evas_Object *parent, const Eina_List *params, const char *part_name);
2076 void _edje_external_signal_emit(Evas_Object *obj, const char *emission, const char *source);
2077 Eina_Bool _edje_external_param_set(Evas_Object *obj, Edje_Real_Part *rp, const Edje_External_Param *param) EINA_ARG_NONNULL(2);
2078 Eina_Bool _edje_external_param_get(const Evas_Object *obj, Edje_Real_Part *rp, Edje_External_Param *param) EINA_ARG_NONNULL(2);
2079 Evas_Object *_edje_external_content_get(const Evas_Object *obj, const char *content) EINA_ARG_NONNULL(1, 2);
2080 void _edje_external_params_free(Eina_List *params, Eina_Bool free_strings);
2082  Edje_Calc_Params *params,
2083  Edje_Part_Description_Common *chosen_desc);
2084 void *_edje_external_params_parse(Evas_Object *obj, const Eina_List *params);
2085 void _edje_external_parsed_params_free(Evas_Object *obj, void *params);
2086 
2087 Eina_Module *_edje_module_handle_load(const char *module);
2088 void _edje_module_init();
2089 void _edje_module_shutdown();
2090 
2091 static inline Eina_Bool
2092 edje_program_is_strncmp(const char *str)
2093 {
2094  size_t length;
2095 
2096  length = strlen(str);
2097 
2098  if (strpbrk(str, "*?[\\") != str + length)
2099  return EINA_FALSE;
2100  if (str[length] == '['
2101  || str[length] == '\\')
2102  return EINA_FALSE;
2103  return EINA_TRUE;
2104 }
2105 
2106 static inline Eina_Bool
2107 edje_program_is_strrncmp(const char *str)
2108 {
2109  if (*str != '*' && *str != '?')
2110  return EINA_FALSE;
2111  if (strpbrk(str + 1, "*?[\\"))
2112  return EINA_FALSE;
2113  return EINA_TRUE;
2114 }
2115 void edje_object_propagate_callback_add(Evas_Object *obj, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
2116 
2117 
2118 /* used by edje_cc - private still */
2121 
2122 void _edje_lua2_error_full(const char *file, const char *fnc, int line, lua_State *L, int err_code);
2123 #define _edje_lua2_error(L, err_code) _edje_lua2_error_full(__FILE__, __FUNCTION__, __LINE__, L, err_code)
2124 void _edje_lua2_script_init(Edje *ed);
2126 void _edje_lua2_script_load(Edje_Part_Collection *edc, void *data, int size);
2128 
2135 void _edje_lua2_script_func_signal(Edje *ed, const char *sig, const char *src);
2136 
2137 const char *edje_string_get(const Edje_String *es);
2138 const char *edje_string_id_get(const Edje_String *es);
2139 
2140 void _edje_object_orientation_inform(Evas_Object *obj);
2141 
2142 void _edje_lib_ref(void);
2143 void _edje_lib_unref(void);
2144 
2145 void _edje_subobj_register(Edje *ed, Evas_Object *ob);
2146 void _edje_subobj_unregister(Edje *ed, Evas_Object *ob);
2147 
2148 void _edje_multisense_init(void);
2149 void _edje_multisense_shutdown(void);
2150 Eina_Bool _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, const double speed);
2151 Eina_Bool _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const double duration);
2152 
2153 void _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *state);
2154 
2155 void _edje_user_definition_remove(Edje_User_Defined *eud, Evas_Object *child);
2157 
2158 #ifdef HAVE_LIBREMIX
2159 #include <remix/remix.h>
2160 #endif
2161 #include <Eina.h>
2162 
2164 
2166 {
2167 #ifdef HAVE_LIBREMIX
2168  RemixEnv *remixenv;
2169 #endif
2170 };
2171 
2173 #ifdef HAVE_LIBREMIX
2174 typedef RemixBase* (*MULTISENSE_SOUND_PLAYER_GET_FUNC) (Edje_Multisense_Env *);
2175 #endif
2176 
2177 #endif