1 #ifndef _EDJE_PRIVATE_H
2 #define _EDJE_PRIVATE_H
14 #elif defined __GNUC__
15 # define alloca __builtin_alloca
17 # define alloca __alloca
18 #elif defined _MSC_VER
20 # define alloca _alloca
23 void *alloca (size_t);
55 #include <Ecore_File.h>
57 # include <Ecore_IMF.h>
58 # include <Ecore_IMF_Evas.h>
64 EAPI extern int _edje_default_log_dom ;
66 #ifdef EDJE_DEFAULT_LOG_COLOR
67 # undef EDJE_DEFAULT_LOG_COLOR
69 #define EDJE_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
73 #define ERR(...) EINA_LOG_DOM_ERR(_edje_default_log_dom, __VA_ARGS__)
77 #define INF(...) EINA_LOG_DOM_INFO(_edje_default_log_dom, __VA_ARGS__)
81 #define WRN(...) EINA_LOG_DOM_WARN(_edje_default_log_dom, __VA_ARGS__)
85 #define CRIT(...) EINA_LOG_DOM_CRIT(_edje_default_log_dom, __VA_ARGS__)
88 // BROKEN in gcc 4 on amd64
89 //# pragma GCC visibility push(hidden)
94 #define ABS(x) ((x) < 0 ? -(x) : (x))
98 #define CLAMP(x, min, max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x)))
102 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
108 #define FLOAT_T Eina_F32p32
109 #define EDJE_T_FLOAT EET_T_F32P32
110 #define MUL(a, b) eina_f32p32_mul(a, b)
111 #define SCALE(a, b) eina_f32p32_scale(a, b)
112 #define DIV(a, b) eina_f32p32_div(a, b)
113 #define DIV2(a) ((a) >> 1)
114 #define ADD(a, b) eina_f32p32_add(a, b)
115 #define SUB(a, b) eina_f32p32_sub(a, b)
116 #define SQRT(a) eina_f32p32_sqrt(a)
117 #define TO_DOUBLE(a) eina_f32p32_double_to(a)
118 #define FROM_DOUBLE(a) eina_f32p32_double_from(a)
119 #define FROM_INT(a) eina_f32p32_int_from(a)
120 #define TO_INT(a) eina_f32p32_int_to(a)
122 #define COS(a) eina_f32p32_cos(a)
123 #define SIN(a) eina_f32p32_sin(a)
124 #define PI EINA_F32P32_PI
128 #define FLOAT_T double
129 #define EDJE_T_FLOAT EET_T_DOUBLE
130 #define MUL(a, b) ((a) * (b))
131 #define SCALE(a, b) ((a) * (double)(b))
132 #define DIV(a, b) ((a) / (b))
133 #define DIV2(a) ((a) / 2.0)
134 #define ADD(a, b) ((a) + (b))
135 #define SUB(a, b) ((a) - (b))
136 #define SQRT(a) sqrt(a)
137 #define TO_DOUBLE(a) (double)(a)
138 #define FROM_DOUBLE(a) (a)
139 #define FROM_INT(a) (double)(a)
140 #define TO_INT(a) (int)(a)
142 #define COS(a) cos(a)
143 #define SIN(a) sin(a)
144 #define PI 3.14159265358979323846
148 /* Inheritable Edje Smart API. For now private so only Edje Edit makes
149 * use of this, but who knows what will be possible in the future */
150 #define EDJE_SMART_API_VERSION 1
152 typedef struct _Edje_Smart_Api Edje_Smart_Api;
154 struct _Edje_Smart_Api
156 Evas_Smart_Class base;
158 Eina_Bool (*file_set)(Evas_Object *obj, const char *file, const char *group);
161 /* Basic macro to init the Edje Smart API */
162 #define EDJE_SMART_API_INIT(smart_class_init) {smart_class_init, EDJE_SMART_API_VERSION, NULL}
164 #define EDJE_SMART_API_INIT_NULL EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
165 #define EDJE_SMART_API_INIT_VERSION EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
166 #define EDJE_SMART_API_INIT_NAME_VERSION(name) EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
168 /* increment this when the EET data descriptors have changed and old
169 * EETs cannot be loaded/used correctly anymore.
171 #define EDJE_FILE_VERSION 3
172 /* increment this when you add new feature to edje file format without
173 * breaking backward compatibility.
175 #define EDJE_FILE_MINOR 2
179 * More example Edje files
181 * ? programs can do multiple actions from one signal
182 * ? add containering (hbox, vbox, table, wrapping multi-line hbox & vbox)
183 * ? text entry widget (single line only)
185 * ? recursions, unsafe callbacks outside Edje etc. with freeze, ref/unref and block/unblock and break_programs needs to be redesigned & fixed
186 * ? all unsafe calls that may result in callbacks must be marked and dealt with
191 EDJE_ASPECT_PREFER_NONE,
192 EDJE_ASPECT_PREFER_VERTICAL,
193 EDJE_ASPECT_PREFER_HORIZONTAL,
194 EDJE_ASPECT_PREFER_BOTH
195 } Edje_Internal_Aspect;
197 struct _Edje_Perspective
201 Evas_Coord px, py, z0, foc;
203 Eina_Bool global : 1;
206 struct _Edje_Position_Scale
211 struct _Edje_Position
221 struct _Edje_Rectangle
228 unsigned char r, g, b, a;
231 struct _Edje_Aspect_Prefer
234 Edje_Internal_Aspect prefer;
240 Edje_Aspect_Control mode;
249 typedef struct _Edje_Position_Scale Edje_Alignment;
250 typedef struct _Edje_Position_Scale Edje_Position_Scale;
251 typedef struct _Edje_Position Edje_Position;
252 typedef struct _Edje_Size Edje_Size;
253 typedef struct _Edje_Rectangle Edje_Rectangle;
254 typedef struct _Edje_Color Edje_Color;
255 typedef struct _Edje_Aspect_Prefer Edje_Aspect_Prefer;
256 typedef struct _Edje_Aspect Edje_Aspect;
257 typedef struct _Edje_String Edje_String;
259 typedef struct _Edje_File Edje_File;
260 typedef struct _Edje_Style Edje_Style;
261 typedef struct _Edje_Style_Tag Edje_Style_Tag;
262 typedef struct _Edje_External_Directory Edje_External_Directory;
263 typedef struct _Edje_External_Directory_Entry Edje_External_Directory_Entry;
264 typedef struct _Edje_Font_Directory_Entry Edje_Font_Directory_Entry;
265 typedef struct _Edje_Image_Directory Edje_Image_Directory;
266 typedef struct _Edje_Image_Directory_Entry Edje_Image_Directory_Entry;
267 typedef struct _Edje_Image_Directory_Set Edje_Image_Directory_Set;
268 typedef struct _Edje_Image_Directory_Set_Entry Edje_Image_Directory_Set_Entry;
269 typedef struct _Edje_Program Edje_Program;
270 typedef struct _Edje_Program_Target Edje_Program_Target;
271 typedef struct _Edje_Program_After Edje_Program_After;
272 typedef struct _Edje_Part_Collection_Directory_Entry Edje_Part_Collection_Directory_Entry;
273 typedef struct _Edje_Pack_Element Edje_Pack_Element;
274 typedef struct _Edje_Part_Collection Edje_Part_Collection;
275 typedef struct _Edje_Part Edje_Part;
276 typedef struct _Edje_Part_Api Edje_Part_Api;
277 typedef struct _Edje_Part_Dragable Edje_Part_Dragable;
278 typedef struct _Edje_Part_Image_Id Edje_Part_Image_Id;
279 typedef struct _Edje_Part_Description_Image Edje_Part_Description_Image;
280 typedef struct _Edje_Part_Description_Proxy Edje_Part_Description_Proxy;
281 typedef struct _Edje_Part_Description_Text Edje_Part_Description_Text;
282 typedef struct _Edje_Part_Description_Box Edje_Part_Description_Box;
283 typedef struct _Edje_Part_Description_Table Edje_Part_Description_Table;
284 typedef struct _Edje_Part_Description_External Edje_Part_Description_External;
285 typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common;
286 typedef struct _Edje_Part_Description_Spec_Fill Edje_Part_Description_Spec_Fill;
287 typedef struct _Edje_Part_Description_Spec_Border Edje_Part_Description_Spec_Border;
288 typedef struct _Edje_Part_Description_Spec_Image Edje_Part_Description_Spec_Image;
289 typedef struct _Edje_Part_Description_Spec_Proxy Edje_Part_Description_Spec_Proxy;
290 typedef struct _Edje_Part_Description_Spec_Text Edje_Part_Description_Spec_Text;
291 typedef struct _Edje_Part_Description_Spec_Box Edje_Part_Description_Spec_Box;
292 typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_Table;
293 typedef struct _Edje_Patterns Edje_Patterns;
294 typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation;
296 typedef struct _Edje Edje;
297 typedef struct _Edje_Real_Part_State Edje_Real_Part_State;
298 typedef struct _Edje_Real_Part_Drag Edje_Real_Part_Drag;
299 typedef struct _Edje_Real_Part_Set Edje_Real_Part_Set;
300 typedef struct _Edje_Real_Part Edje_Real_Part;
301 typedef struct _Edje_Running_Program Edje_Running_Program;
302 typedef struct _Edje_Signal_Callback Edje_Signal_Callback;
303 typedef struct _Edje_Calc_Params Edje_Calc_Params;
304 typedef struct _Edje_Pending_Program Edje_Pending_Program;
305 typedef struct _Edje_Text_Style Edje_Text_Style;
306 typedef struct _Edje_Color_Class Edje_Color_Class;
307 typedef struct _Edje_Text_Class Edje_Text_Class;
308 typedef struct _Edje_Var Edje_Var;
309 typedef struct _Edje_Var_Int Edje_Var_Int;
310 typedef struct _Edje_Var_Float Edje_Var_Float;
311 typedef struct _Edje_Var_String Edje_Var_String;
312 typedef struct _Edje_Var_List Edje_Var_List;
313 typedef struct _Edje_Var_Hash Edje_Var_Hash;
314 typedef struct _Edje_Var_Animator Edje_Var_Animator;
315 typedef struct _Edje_Var_Timer Edje_Var_Timer;
316 typedef struct _Edje_Var_Pool Edje_Var_Pool;
317 typedef struct _Edje_Signal_Source_Char Edje_Signal_Source_Char;
318 typedef struct _Edje_Text_Insert_Filter_Callback Edje_Text_Insert_Filter_Callback;
320 #define EDJE_INF_MAX_W 100000
321 #define EDJE_INF_MAX_H 100000
323 #define EDJE_IMAGE_SOURCE_TYPE_NONE 0
324 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT 1
325 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY 2
326 #define EDJE_IMAGE_SOURCE_TYPE_EXTERNAL 3
327 #define EDJE_IMAGE_SOURCE_TYPE_LAST 4
329 #define EDJE_VAR_NONE 0
330 #define EDJE_VAR_INT 1
331 #define EDJE_VAR_FLOAT 2
332 #define EDJE_VAR_STRING 3
333 #define EDJE_VAR_LIST 4
334 #define EDJE_VAR_HASH 5
336 #define EDJE_VAR_MAGIC_BASE 0x12fe84ba
338 #define EDJE_STATE_PARAM_NONE 0
339 #define EDJE_STATE_PARAM_ALIGNMENT 1
340 #define EDJE_STATE_PARAM_MIN 2
341 #define EDJE_STATE_PARAM_MAX 3
342 #define EDJE_STATE_PARAM_STEP 4
343 #define EDJE_STATE_PARAM_ASPECT 5
344 #define EDJE_STATE_PARAM_ASPECT_PREF 6
345 #define EDJE_STATE_PARAM_COLOR 7
346 #define EDJE_STATE_PARAM_COLOR2 8
347 #define EDJE_STATE_PARAM_COLOR3 9
348 #define EDJE_STATE_PARAM_COLOR_CLASS 10
349 #define EDJE_STATE_PARAM_REL1 11
350 #define EDJE_STATE_PARAM_REL1_TO 12
351 #define EDJE_STATE_PARAM_REL1_OFFSET 13
352 #define EDJE_STATE_PARAM_REL2 14
353 #define EDJE_STATE_PARAM_REL2_TO 15
354 #define EDJE_STATE_PARAM_REL2_OFFSET 16
355 #define EDJE_STATE_PARAM_IMAGE 17
356 #define EDJE_STATE_PARAM_BORDER 18
357 #define EDJE_STATE_PARAM_FILL_SMOOTH 19
358 #define EDJE_STATE_PARAM_FILL_POS 20
359 #define EDJE_STATE_PARAM_FILL_SIZE 21
360 #define EDJE_STATE_PARAM_TEXT 22
361 #define EDJE_STATE_PARAM_TEXT_CLASS 23
362 #define EDJE_STATE_PARAM_TEXT_FONT 24
363 #define EDJE_STATE_PARAM_TEXT_STYLE 25
364 #define EDJE_STATE_PARAM_TEXT_SIZE 26
365 #define EDJE_STATE_PARAM_TEXT_FIT 27
366 #define EDJE_STATE_PARAM_TEXT_MIN 28
367 #define EDJE_STATE_PARAM_TEXT_MAX 29
368 #define EDJE_STATE_PARAM_TEXT_ALIGN 30
369 #define EDJE_STATE_PARAM_VISIBLE 31
370 #define EDJE_STATE_PARAM_MAP_OM 32
371 #define EDJE_STATE_PARAM_MAP_PERSP 33
372 #define EDJE_STATE_PARAM_MAP_LIGNT 34
373 #define EDJE_STATE_PARAM_MAP_ROT_CENTER 35
374 #define EDJE_STATE_PARAM_MAP_ROT_X 36
375 #define EDJE_STATE_PARAM_MAP_ROT_Y 37
376 #define EDJE_STATE_PARAM_MAP_ROT_Z 38
377 #define EDJE_STATE_PARAM_MAP_BACK_CULL 39
378 #define EDJE_STATE_PARAM_MAP_PERSP_ON 40
379 #define EDJE_STATE_PARAM_PERSP_ZPLANE 41
380 #define EDJE_STATE_PARAM_PERSP_FOCAL 42
381 #define EDJE_STATE_PARAM_LAST 43
383 #define EDJE_ENTRY_EDIT_MODE_NONE 0
384 #define EDJE_ENTRY_EDIT_MODE_SELECTABLE 1
385 #define EDJE_ENTRY_EDIT_MODE_EDITABLE 2
386 #define EDJE_ENTRY_EDIT_MODE_PASSWORD 3
388 #define EDJE_ENTRY_SELECTION_MODE_DEFAULT 0
389 #define EDJE_ENTRY_SELECTION_MODE_EXPLICIT 1
391 #define EDJE_ENTRY_CURSOR_MODE_UNDER 0
392 #define EDJE_ENTRY_CURSOR_MODE_BEFORE 1
394 #define EDJE_ORIENTATION_AUTO 0
395 #define EDJE_ORIENTATION_LTR 1
396 #define EDJE_ORIENTATION_RTL 2
398 #define EDJE_PART_PATH_SEPARATOR ':'
399 #define EDJE_PART_PATH_SEPARATOR_STRING ":"
400 #define EDJE_PART_PATH_SEPARATOR_INDEXL '['
401 #define EDJE_PART_PATH_SEPARATOR_INDEXR ']'
409 Edje_External_Directory *external_dir;
410 Edje_Image_Directory *image_dir;
412 Eina_List *color_classes;
415 const char *compiler;
423 Eina_Hash *collection;
424 Eina_List *collection_cache;
426 Edje_Patterns *collection_patterns;
430 unsigned char free_strings : 1;
431 unsigned char dangling : 1;
432 unsigned char warning : 1;
439 Evas_Textblock_Style *style;
442 struct _Edje_Style_Tag
448 const char *text_class;
454 struct _Edje_Font_Directory_Entry
456 const char *entry; /* the name of the font */
457 const char *file; /* the name of the file */
462 struct _Edje_External_Directory
464 Edje_External_Directory_Entry *entries; /* a list of Edje_External_Directory_Entry */
465 unsigned int entries_count;
468 struct _Edje_External_Directory_Entry
470 const char *entry; /* the name of the external */
480 struct _Edje_Image_Directory
482 Edje_Image_Directory_Entry *entries; /* an array of Edje_Image_Directory_Entry */
483 unsigned int entries_count;
485 Edje_Image_Directory_Set *sets;
486 unsigned int sets_count; /* an array of Edje_Image_Directory_Set */
489 struct _Edje_Image_Directory_Entry
491 const char *entry; /* the nominal name of the image - if any */
492 int source_type; /* alternate source mode. 0 = none */
493 int source_param; /* extra params on encoding */
494 int id; /* the id no. of the image */
497 struct _Edje_Image_Directory_Set
505 struct _Edje_Image_Directory_Set_Entry
520 struct _Edje_Program /* a conditional program to be run */
522 int id; /* id of program */
523 const char *name; /* name of the action */
525 const char *signal; /* if signal emission name matches the glob here... */
526 const char *source; /* if part that emitted this (name) matches this glob */
530 const char *state; /* if state is not set, we will try with source */
531 } filter; /* the part filter.part should be in state filter.state for signal to be accepted */
538 int action; /* type - set state, stop action, set drag pos etc. */
539 const char *state; /* what state of alternates to apply, NULL = default */
540 const char *state2; /* what other state to use - for signal emit action */
541 double value; /* value of state to apply (if multiple names match) */
542 double value2; /* other value for drag actions */
545 int mode; /* how to tween - linear, sinusoidal etc. */
546 FLOAT_T time; /* time to graduate between current and new state */
549 Eina_List *targets; /* list of target parts to apply the state to */
551 Eina_List *after; /* list of actions to run at the end of this, for looping */
555 const char *description;
558 /* used for PARAM_COPY (param names in state and state2 above!) */
560 int src; /* part where parameter is being retrieved */
561 int dst; /* part where parameter is being stored */
565 struct _Edje_Program_Target /* the target of an action */
567 int id; /* just the part id no, or action id no */
570 struct _Edje_Program_After /* the action to run after another action */
576 #define PART_TYPE_FIELDS(TYPE) \
588 struct _Edje_Part_Collection_Directory_Entry
590 const char *entry; /* the nominal name of the part collection */
591 int id; /* the id of this named part collection */
595 PART_TYPE_FIELDS(int)
601 PART_TYPE_FIELDS(Eina_Mempool *)
607 PART_TYPE_FIELDS(Eina_Mempool *)
608 } mp_rtl; /* For Right To Left interface */
610 Edje_Part_Collection *ref;
617 struct _Edje_Pack_Element
619 unsigned char type; /* only GROUP supported for now */
620 Edje_Real_Part *parent; /* pointer to the table/box that hold it, set at runtime */
621 const char *name; /* if != NULL, will be set with evas_object_name_set */
622 const char *source; /* group name to use as source for this element */
623 Edje_Size min, prefer, max;
627 Edje_Alignment align;
628 Edje_Alignment weight;
630 const char *options; /* extra options for custom objects */
631 /* table specific follows */
633 unsigned short colspan, rowspan;
638 struct _Edje_Part_Collection
640 struct { /* list of Edje_Program */
641 Edje_Program **fnmatch; /* complex match with "*?[\" */
642 unsigned int fnmatch_count;
644 Edje_Program **strcmp; /* No special caractere, plain strcmp does the work */
645 unsigned int strcmp_count;
647 Edje_Program **strncmp; /* Finish by * or ?, plain strncmp does the work */
648 unsigned int strncmp_count;
650 Edje_Program **strrncmp; /* Start with * or ?, reverse strncmp will do the job */
651 unsigned int strrncmp_count;
653 Edje_Program **nocmp; /* Empty signal/source that will never match */
654 unsigned int nocmp_count;
657 Edje_Part **parts; /* an array of Edje_Part */
658 unsigned int parts_count;
662 int id; /* the collection id */
664 Eina_Hash *alias; /* aliasing part */
665 Eina_Hash *aliased; /* invert match of alias */
669 unsigned char orientation;
674 #ifdef EDJE_PROGRAM_CACHE
676 Eina_Hash *no_matches;
681 Embryo_Program *script; /* all the embryo script code for this group */
684 unsigned char script_only;
686 unsigned char lua_script_only;
688 unsigned char checked : 1;
691 struct _Edje_Part_Dragable
693 int step_x; /* drag jumps n pixels (0 = no limit) */
694 int step_y; /* drag jumps n pixels (0 = no limit) */
696 int count_x; /* drag area divided by n (0 = no limit) */
697 int count_y; /* drag area divided by n (0 = no limit) */
699 int confine_id; /* dragging within this bit, -1 = no */
702 int event_id; /* If it is used as scrollbar */
704 signed char x; /* can u click & drag this bit in x dir */
705 signed char y; /* can u click & drag this bit in y dir */
708 struct _Edje_Part_Api
711 const char *description;
714 typedef struct _Edje_Part_Description_List Edje_Part_Description_List;
715 struct _Edje_Part_Description_List
717 Edje_Part_Description_Common **desc;
718 Edje_Part_Description_Common **desc_rtl; /* desc for Right To Left interface */
719 unsigned int desc_count;
724 const char *name; /* the name if any of the part */
725 Edje_Part_Description_Common *default_desc; /* the part descriptor for default */
726 Edje_Part_Description_Common *default_desc_rtl; /* default desc for Right To Left interface */
728 Edje_Part_Description_List other; /* other possible descriptors */
730 const char *source, *source2, *source3, *source4, *source5, *source6;
731 int id; /* its id number */
732 int clip_to_id; /* the part id to clip this one to */
733 Edje_Part_Dragable dragable;
734 Edje_Pack_Element **items; /* packed items for box and table */
735 unsigned int items_count;
736 unsigned char type; /* what type (image, rect, text) */
737 unsigned char effect; /* 0 = plain... */
738 unsigned char mouse_events; /* it will affect/respond to mouse events */
739 unsigned char repeat_events; /* it will repeat events to objects below */
740 Evas_Event_Flags ignore_flags;
741 unsigned char scale; /* should certain properties scale with edje scale factor? */
742 unsigned char precise_is_inside;
743 unsigned char use_alternate_font_metrics;
744 unsigned char pointer_mode;
745 unsigned char entry_mode;
746 unsigned char select_mode;
747 unsigned char cursor_mode;
748 unsigned char multiline;
752 struct _Edje_Part_Image_Id
758 struct _Edje_Part_Description_Common
761 double value; /* the value of the state (for ranges) */
762 const char *name; /* the named state if any */
765 Edje_Alignment align; /* 0 <-> 1.0 alignment within allocated space */
768 unsigned char w, h; /* width or height is fixed in side (cannot expand with Edje object size) */
772 Edje_Position step; /* size stepping by n pixels, 0 = none */
773 Edje_Aspect_Prefer aspect;
775 char *color_class; /* how to modify the color */
784 int id_x; /* -1 = whole part collection, or part ID */
785 int id_y; /* -1 = whole part collection, or part ID */
795 unsigned char backcull;
797 unsigned char persp_on;
798 unsigned char smooth;
807 unsigned char visible; /* is it shown */
810 struct _Edje_Part_Description_Spec_Fill
812 FLOAT_T pos_rel_x; /* fill offset x relative to area */
813 FLOAT_T rel_x; /* relative size compared to area */
814 FLOAT_T pos_rel_y; /* fill offset y relative to area */
815 FLOAT_T rel_y; /* relative size compared to area */
816 int pos_abs_x; /* fill offset x added to fill offset */
817 int abs_x; /* size of fill added to relative fill */
818 int pos_abs_y; /* fill offset y added to fill offset */
819 int abs_y; /* size of fill added to relative fill */
820 int angle; /* angle of fill -- currently only used by grads */
821 int spread; /* spread of fill -- currently only used by grads */
822 char smooth; /* fill with smooth scaling or not */
823 unsigned char type; /* fill coordinate from container (SCALE) or from source image (TILE) */
826 struct _Edje_Part_Description_Spec_Border
828 int l, r, t, b; /* border scaling on image fill */
829 unsigned char no_fill; /* do we fill the center of the image if bordered? 1 == NO!!!! */
830 unsigned char scale; /* scale image border by same as scale factor */
833 struct _Edje_Part_Description_Spec_Image
835 Edje_Part_Description_Spec_Fill fill;
837 Edje_Part_Image_Id **tweens; /* list of Edje_Part_Image_Id */
838 unsigned int tweens_count; /* number of tweens */
840 int id; /* the image id to use */
841 int scale_hint; /* evas scale hint */
842 Eina_Bool set; /* if image condition it's content */
844 Edje_Part_Description_Spec_Border border;
847 struct _Edje_Part_Description_Spec_Proxy
849 Edje_Part_Description_Spec_Fill fill;
851 int id; /* the part id to use as a source for this state */
854 struct _Edje_Part_Description_Spec_Text
856 Edje_String text; /* if "" or NULL, then leave text unchanged */
857 char *text_class; /* how to apply/modify the font */
858 Edje_String style; /* the text style if a textblock */
859 Edje_String font; /* if a specific font is asked for */
860 Edje_String repch; /* replacement char for password mode entry */
862 Edje_Alignment align; /* text alignment within bounds */
865 double elipsis; /* 0.0 - 1.0 defining where the elipsis align */
866 int size; /* 0 = use user set size */
867 int id_source; /* -1 if none */
868 int id_text_source; /* -1 if none */
870 unsigned char fit_x; /* resize font size down to fit in x dir */
871 unsigned char fit_y; /* resize font size down to fit in y dir */
872 unsigned char min_x; /* if text size should be part min size */
873 unsigned char min_y; /* if text size should be part min size */
874 unsigned char max_x; /* if text size should be part max size */
875 unsigned char max_y; /* if text size should be part max size */
877 int size_range_max; /* -1 means, no bound. */
880 struct _Edje_Part_Description_Spec_Box
882 char *layout, *alt_layout;
883 Edje_Alignment align;
892 struct _Edje_Part_Description_Spec_Table
894 unsigned char homogeneous;
895 Edje_Alignment align;
901 struct _Edje_Part_Description_Image
903 Edje_Part_Description_Common common;
904 Edje_Part_Description_Spec_Image image;
907 struct _Edje_Part_Description_Proxy
909 Edje_Part_Description_Common common;
910 Edje_Part_Description_Spec_Proxy proxy;
913 struct _Edje_Part_Description_Text
915 Edje_Part_Description_Common common;
916 Edje_Part_Description_Spec_Text text;
919 struct _Edje_Part_Description_Box
921 Edje_Part_Description_Common common;
922 Edje_Part_Description_Spec_Box box;
925 struct _Edje_Part_Description_Table
927 Edje_Part_Description_Common common;
928 Edje_Part_Description_Spec_Table table;
931 struct _Edje_Part_Description_External
933 Edje_Part_Description_Common common;
934 Eina_List *external_params; /* parameters for external objects */
939 struct _Edje_Signal_Source_Char
949 struct _Edje_Signals_Sources_Patterns
952 Edje_Patterns *signals_patterns;
953 Edje_Patterns *sources_patterns;
955 Eina_Rbtree *exact_match;
959 Edje_Program **globing;
968 typedef struct _Edje_Signals_Sources_Patterns Edje_Signals_Sources_Patterns;
972 Evas_Object_Smart_Clipped_Data base;
973 /* This contains (or should):
974 Evas_Object *clipper; // a big rect to clip this Edje to
975 Evas *evas; // the Evas this Edje belongs to
977 const Edje_Smart_Api *api;
982 Evas_Coord x, y, w, h;
985 Evas_Object *obj; /* the smart object */
986 Edje_File *file; /* the file the data comes form */
987 Edje_Part_Collection *collection; /* the description being used */
988 Eina_List *actions; /* currently running actions */
989 Eina_List *callbacks;
990 Eina_List *pending_actions;
991 Eina_List *color_classes;
992 Eina_List *text_classes;
993 /* variable pool for Edje Embryo scripts */
994 Edje_Var_Pool *var_pool;
995 /* for faster lookups to avoid nth list walks */
996 Edje_Real_Part **table_parts;
997 Edje_Program **table_programs;
998 Edje_Real_Part *focused_part;
1000 Eina_List *text_insert_filter_callbacks;
1001 void *script_only_data;
1002 int table_programs_size;
1003 unsigned int table_parts_size;
1005 Edje_Perspective *persp;
1008 Edje_Signals_Sources_Patterns callbacks;
1009 Edje_Signals_Sources_Patterns programs;
1017 Eina_Bool is_rtl : 1;
1020 Edje_Text_Change_Cb func;
1025 Edje_Message_Handler_Cb func;
1029 int processing_messages;
1035 unsigned int dirty : 1;
1036 unsigned int recalc : 1;
1037 unsigned int walking_callbacks : 1;
1038 unsigned int delete_callbacks : 1;
1039 unsigned int just_added_callbacks : 1;
1040 unsigned int have_objects : 1;
1041 unsigned int paused : 1;
1042 unsigned int no_anim : 1;
1043 unsigned int calc_only : 1;
1044 unsigned int walking_actions : 1;
1045 unsigned int block_break : 1;
1046 unsigned int delete_me : 1;
1047 unsigned int postponed : 1;
1048 unsigned int freeze_calc : 1;
1049 unsigned int has_entries : 1;
1050 unsigned int entries_inited : 1;
1051 #ifdef EDJE_CALC_CACHE
1052 unsigned int text_part_change : 1;
1053 unsigned int all_part_change : 1;
1055 unsigned int have_mapped_part : 1;
1058 Eina_Inlist *lua_objs;
1062 Edje_Item_Provider_Cb func;
1067 struct _Edje_Calc_Params
1069 int x, y, w, h; // 16
1070 Edje_Rectangle req; // 16
1071 Edje_Rectangle req_drag; // 16
1072 Edje_Color color; // 4
1076 int x, y, w, h; // 16
1083 int l, r, t, b; // 16
1088 Edje_Alignment align; /* text alignment within bounds */ // 16
1089 double elipsis; // 8
1091 Edje_Color color2, color3; // 8
1094 unsigned char visible : 1;
1095 unsigned char smooth : 1; // 1
1098 struct _Edje_Real_Part_Set
1100 Edje_Image_Directory_Set_Entry *entry; // 4
1101 Edje_Image_Directory_Set *set; // 4
1106 struct _Edje_Real_Part_State
1108 Edje_Part_Description_Common *description; // 4
1109 Edje_Part_Description_Common *description_rtl; // 4
1110 Edje_Real_Part *rel1_to_x; // 4
1111 Edje_Real_Part *rel1_to_y; // 4
1112 Edje_Real_Part *rel2_to_x; // 4
1113 Edje_Real_Part *rel2_to_y; // 4
1114 #ifdef EDJE_CALC_CACHE
1116 Edje_Calc_Params p; // 96
1118 void *external_params; // 4
1119 Edje_Real_Part_Set *set; // 4
1121 // WITH EDJE_CALC_CACHE 132
1123 struct _Edje_Real_Part_Drag
1126 Edje_Position_Scale val, size, step, page; // 64
1128 unsigned int count; // 4
1134 unsigned char need_reset : 1; // 4
1135 Edje_Real_Part *confine_to; // 4
1138 struct _Edje_Real_Part
1141 Edje_Part *part; // 4
1142 Evas_Object *object; // 4
1143 int x, y, w, h; // 16
1144 Edje_Rectangle req; // 16
1146 Eina_List *items; // 4 //FIXME: only if table/box
1147 Edje_Part_Box_Animation *anim; // 4 //FIXME: Used only if box
1148 void *entry_data; // 4 // FIXME: move to entry section
1150 Evas_Object *swallowed_object; // 4 // FIXME: move with swallow_params data
1152 Edje_Size min, max; // 16
1153 Edje_Aspect aspect; // 12
1154 } swallow_params; // 28 // FIXME: only if type SWALLOW
1156 Edje_Real_Part_Drag *drag; // 4
1157 Edje_Real_Part *events_to; // 4
1160 Edje_Real_Part *source; // 4
1161 Edje_Real_Part *text_source; // 4
1162 const char *text; // 4
1163 Edje_Position offset; // 8 text only
1164 const char *font; // 4 text only
1165 const char *style; // 4 text only
1166 int size; // 4 text only
1168 double in_w, in_h; // 16 text only
1169 int in_size; // 4 text only
1170 const char *in_str; // 4 text only
1171 const char *out_str; // 4 text only
1172 int out_size; // 4 text only
1173 FLOAT_T align_x, align_y; // 16 text only
1174 double elipsis; // 8 text only
1175 int fit_x, fit_y; // 8 text only
1177 } text; // 86 // FIXME make text a potiner to struct and alloc at end
1178 // if part type is TEXT move common members textblock +
1179 // text to front and have smaller struct for textblock
1181 FLOAT_T description_pos; // 8
1182 Edje_Part_Description_Common *chosen_description; // 4
1183 Edje_Real_Part_State param1; // 20
1184 // WITH EDJE_CALC_CACHE: 140
1185 Edje_Real_Part_State *param2, *custom; // 8
1187 #ifdef EDJE_CALC_CACHE
1191 Edje_Real_Part *clip_to; // 4
1193 Edje_Running_Program *program; // 4
1195 int clicked_button; // 4
1197 unsigned char calculated; // 1
1198 unsigned char calculating; // 1
1200 unsigned char still_in : 1; // 1
1201 #ifdef EDJE_CALC_CACHE
1202 unsigned char invalidate : 1; // 0
1205 // WITH EDJE_CALC_CACHE: 400
1207 struct _Edje_Running_Program
1210 Edje_Program *program;
1215 struct _Edje_Signal_Callback
1219 Edje_Signal_Cb func;
1221 unsigned char just_added : 1;
1222 unsigned char delete_me : 1;
1225 struct _Edje_Text_Insert_Filter_Callback
1228 Edje_Text_Filter_Cb func;
1232 struct _Edje_Pending_Program
1235 Edje_Program *program;
1239 struct _Edje_Text_Style
1245 unsigned char l, r, t, b;
1249 unsigned char color; /* 0 = color, 1, 2 = color2, color3 */
1250 signed char x, y; /* offset */
1251 unsigned char alpha;
1255 struct _Edje_Color_Class
1258 unsigned char r, g, b, a;
1259 unsigned char r2, g2, b2, a2;
1260 unsigned char r3, g3, b3, a3;
1263 struct _Edje_Text_Class
1267 Evas_Font_Size size;
1270 struct _Edje_Var_Int
1275 struct _Edje_Var_Float
1280 struct _Edje_Var_String
1285 struct _Edje_Var_List
1290 struct _Edje_Var_Hash
1295 struct _Edje_Var_Timer
1299 Embryo_Function func;
1304 struct _Edje_Var_Animator
1308 Embryo_Function func;
1314 struct _Edje_Var_Pool
1318 Eina_List *animators;
1336 typedef enum _Edje_Queue
1342 typedef struct _Edje_Message_Signal Edje_Message_Signal;
1343 typedef struct _Edje_Message Edje_Message;
1345 struct _Edje_Message_Signal
1351 struct _Edje_Message
1355 Edje_Message_Type type;
1360 typedef enum _Edje_Fill
1362 EDJE_FILL_TYPE_SCALE = 0,
1366 typedef enum _Edje_Match_Error
1369 EDJE_MATCH_ALLOC_ERROR,
1370 EDJE_MATCH_SYNTAX_ERROR
1374 typedef struct _Edje_States Edje_States;
1375 struct _Edje_Patterns
1377 const char **patterns;
1379 Edje_States *states;
1382 Eina_Bool delete_me : 1;
1384 size_t patterns_size;
1389 Edje_Patterns *edje_match_collection_dir_init(const Eina_List *lst);
1390 Edje_Patterns *edje_match_programs_signal_init(Edje_Program * const *array,
1391 unsigned int count);
1392 Edje_Patterns *edje_match_programs_source_init(Edje_Program * const *array,
1393 unsigned int count);
1394 Edje_Patterns *edje_match_callback_signal_init(const Eina_List *lst);
1395 Edje_Patterns *edje_match_callback_source_init(const Eina_List *lst);
1397 Eina_Bool edje_match_collection_dir_exec(const Edje_Patterns *ppat,
1398 const char *string);
1399 Eina_Bool edje_match_programs_exec(const Edje_Patterns *ppat_signal,
1400 const Edje_Patterns *ppat_source,
1403 Edje_Program **programs,
1404 Eina_Bool (*func)(Edje_Program *pr, void *data),
1406 int edje_match_callback_exec(Edje_Patterns *ppat_signal,
1407 Edje_Patterns *ppat_source,
1410 Eina_List *callbacks,
1413 void edje_match_patterns_free(Edje_Patterns *ppat);
1415 Eina_List *edje_match_program_hash_build(Edje_Program * const * programs,
1417 Eina_Rbtree **tree);
1418 Eina_List *edje_match_callback_hash_build(const Eina_List *callbacks,
1419 Eina_Rbtree **tree);
1420 const Eina_List *edje_match_signal_source_hash_get(const char *signal,
1422 const Eina_Rbtree *tree);
1423 void edje_match_signal_source_free(Edje_Signal_Source_Char *key, void *data);
1425 // FIXME remove below 2 eapi decls when edje_convert goes
1426 EAPI void _edje_edd_init(void);
1427 EAPI void _edje_edd_shutdown(void);
1429 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_file;
1430 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_part_collection;
1432 extern int _edje_anim_count;
1433 extern Ecore_Animator *_edje_timer;
1434 extern Eina_List *_edje_animators;
1435 extern Eina_List *_edje_edjes;
1437 extern char *_edje_fontset_append;
1438 extern FLOAT_T _edje_scale;
1439 extern int _edje_freeze_val;
1440 extern int _edje_freeze_calc_count;
1441 extern Eina_List *_edje_freeze_calc_list;
1443 extern Eina_Mempool *_edje_real_part_mp;
1444 extern Eina_Mempool *_edje_real_part_state_mp;
1446 extern Eina_Mempool *_emp_RECTANGLE;
1447 extern Eina_Mempool *_emp_TEXT;
1448 extern Eina_Mempool *_emp_IMAGE;
1449 extern Eina_Mempool *_emp_PROXY;
1450 extern Eina_Mempool *_emp_SWALLOW;
1451 extern Eina_Mempool *_emp_TEXTBLOCK;
1452 extern Eina_Mempool *_emp_GROUP;
1453 extern Eina_Mempool *_emp_BOX;
1454 extern Eina_Mempool *_emp_TABLE;
1455 extern Eina_Mempool *_emp_EXTERNAL;
1456 extern Eina_Mempool *_emp_part;
1458 void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos);
1459 Edje_Part_Description_Common *_edje_part_description_find(Edje *ed,
1461 const char *name, double val);
1462 void _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, double v1, const char *d2, double v2);
1463 void _edje_recalc(Edje *ed);
1464 void _edje_recalc_do(Edje *ed);
1465 void _edje_part_recalc_1(Edje *ed, Edje_Real_Part *ep);
1466 int _edje_part_dragable_calc(Edje *ed, Edje_Real_Part *ep, FLOAT_T *x, FLOAT_T *y);
1467 void _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y);
1469 Eina_Bool _edje_timer_cb(void *data);
1470 Eina_Bool _edje_pending_timer_cb(void *data);
1471 void _edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
1472 void _edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
1473 void _edje_callbacks_del(Evas_Object *obj, Edje *ed);
1474 void _edje_callbacks_focus_del(Evas_Object *obj, Edje *ed);
1476 void _edje_edd_init(void);
1477 void _edje_edd_shutdown(void);
1479 int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Eina_List *group_path);
1481 void _edje_file_add(Edje *ed);
1482 void _edje_file_del(Edje *ed);
1483 void _edje_file_free(Edje_File *edf);
1484 void _edje_file_cache_shutdown(void);
1485 void _edje_collection_free(Edje_File *edf,
1486 Edje_Part_Collection *ec,
1487 Edje_Part_Collection_Directory_Entry *ce);
1488 void _edje_collection_free_part_description_clean(int type,
1489 Edje_Part_Description_Common *desc,
1490 Eina_Bool free_strings);
1491 void _edje_collection_free_part_description_free(int type,
1492 Edje_Part_Description_Common *desc,
1493 Edje_Part_Collection_Directory_Entry *ce,
1494 Eina_Bool free_strings);
1496 void _edje_object_smart_set(Edje_Smart_Api *sc);
1497 const Edje_Smart_Api * _edje_object_smart_class_get(void);
1499 void _edje_del(Edje *ed);
1500 void _edje_ref(Edje *ed);
1501 void _edje_unref(Edje *ed);
1502 void _edje_clean_objects(Edje *ed);
1503 void _edje_ref(Edje *ed);
1504 void _edje_unref(Edje *ed);
1506 Eina_Bool _edje_program_run_iterate(Edje_Running_Program *runp, double tim);
1507 void _edje_program_end(Edje *ed, Edje_Running_Program *runp);
1508 void _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig, const char *ssrc);
1509 void _edje_programs_patterns_clean(Edje *ed);
1510 void _edje_programs_patterns_init(Edje *ed);
1511 void _edje_emit(Edje *ed, const char *sig, const char *src);
1512 void _edje_emit_handle(Edje *ed, const char *sig, const char *src);
1513 void _edje_signals_sources_patterns_clean(Edje_Signals_Sources_Patterns *ssp);
1514 void _edje_callbacks_patterns_clean(Edje *ed);
1516 void _edje_text_init(void);
1517 void _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep);
1518 void _edje_text_part_on_del(Edje *ed, Edje_Part *ep);
1519 void _edje_text_recalc_apply(Edje *ed,
1521 Edje_Calc_Params *params,
1522 Edje_Part_Description_Text *chosen_desc);
1523 Evas_Font_Size _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc);
1524 const char * _edje_text_class_font_get(Edje *ed,
1525 Edje_Part_Description_Text *chosen_desc,
1526 int *size, char **free_later);
1529 Edje_Real_Part *_edje_real_part_get(const Edje *ed, const char *part);
1530 Edje_Real_Part *_edje_real_part_recursive_get(const Edje *ed, const char *part);
1531 Edje_Color_Class *_edje_color_class_find(Edje *ed, const char *color_class);
1532 void _edje_color_class_member_add(Edje *ed, const char *color_class);
1533 void _edje_color_class_member_del(Edje *ed, const char *color_class);
1534 void _edje_color_class_on_del(Edje *ed, Edje_Part *ep);
1535 void _edje_color_class_members_free(void);
1536 void _edje_color_class_hash_free(void);
1538 Edje_Text_Class *_edje_text_class_find(Edje *ed, const char *text_class);
1539 void _edje_text_class_member_add(Edje *ed, const char *text_class);
1540 void _edje_text_class_member_del(Edje *ed, const char *text_class);
1541 void _edje_text_class_members_free(void);
1542 void _edje_text_class_hash_free(void);
1544 Edje *_edje_fetch(const Evas_Object *obj) EINA_PURE;
1545 int _edje_freeze(Edje *ed);
1546 int _edje_thaw(Edje *ed);
1547 int _edje_block(Edje *ed);
1548 int _edje_unblock(Edje *ed);
1549 int _edje_block_break(Edje *ed);
1550 void _edje_block_violate(Edje *ed);
1551 void _edje_object_part_swallow_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
1552 void _edje_object_part_swallow_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
1553 void _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow);
1554 void _edje_real_part_swallow_clear(Edje_Real_Part *rp);
1555 void _edje_box_init(void);
1556 void _edje_box_shutdown(void);
1557 Eina_Bool _edje_box_layout_find(const char *name, Evas_Object_Box_Layout *cb, void **data, void (**free_data)(void *data));
1558 void _edje_box_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Box *chosen_desc);
1559 Eina_Bool _edje_box_layout_add_child(Edje_Real_Part *rp, Evas_Object *child_obj);
1560 void _edje_box_layout_remove_child(Edje_Real_Part *rp, Evas_Object *child_obj);
1561 Edje_Part_Box_Animation * _edje_box_layout_anim_new(Evas_Object *box);
1562 void _edje_box_layout_free_data(void *data);
1564 Eina_Bool _edje_real_part_box_append(Edje_Real_Part *rp, Evas_Object *child_obj);
1565 Eina_Bool _edje_real_part_box_prepend(Edje_Real_Part *rp, Evas_Object *child_obj);
1566 Eina_Bool _edje_real_part_box_insert_before(Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref);
1567 Eina_Bool _edje_real_part_box_insert_at(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos);
1568 Evas_Object *_edje_real_part_box_remove(Edje_Real_Part *rp, Evas_Object *child_obj);
1569 Evas_Object *_edje_real_part_box_remove_at(Edje_Real_Part *rp, unsigned int pos);
1570 Eina_Bool _edje_real_part_box_remove_all(Edje_Real_Part *rp, Eina_Bool clear);
1571 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);
1572 Eina_Bool _edje_real_part_table_unpack(Edje_Real_Part *rp, Evas_Object *child_obj);
1573 void _edje_real_part_table_clear(Edje_Real_Part *rp, Eina_Bool clear);
1574 Evas_Object *_edje_children_get(Edje_Real_Part *rp, const char *partid);
1576 Eina_Bool _edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text);
1577 char *_edje_text_escape(const char *text);
1578 char *_edje_text_unescape(const char *text);
1580 void _edje_embryo_script_init (Edje_Part_Collection *edc);
1581 void _edje_embryo_script_shutdown (Edje_Part_Collection *edc);
1582 void _edje_embryo_script_reset (Edje *ed);
1583 void _edje_embryo_test_run (Edje *ed, const char *fname, const char *sig, const char *src);
1584 Edje_Var *_edje_var_new (void);
1585 void _edje_var_free (Edje_Var *var);
1586 void _edje_var_init (Edje *ed);
1587 void _edje_var_shutdown (Edje *ed);
1588 int _edje_var_string_id_get (Edje *ed, const char *string);
1589 int _edje_var_var_int_get (Edje *ed, Edje_Var *var);
1590 void _edje_var_var_int_set (Edje *ed, Edje_Var *var, int v);
1591 double _edje_var_var_float_get (Edje *ed, Edje_Var *var);
1592 void _edje_var_var_float_set (Edje *ed, Edje_Var *var, double v);
1593 const char *_edje_var_var_str_get (Edje *ed, Edje_Var *var);
1594 void _edje_var_var_str_set (Edje *ed, Edje_Var *var, const char *str);
1595 int _edje_var_int_get (Edje *ed, int id);
1596 void _edje_var_int_set (Edje *ed, int id, int v);
1597 double _edje_var_float_get (Edje *ed, int id);
1598 void _edje_var_float_set (Edje *ed, int id, double v);
1599 const char *_edje_var_str_get (Edje *ed, int id);
1600 void _edje_var_str_set (Edje *ed, int id, const char *str);
1602 void _edje_var_list_var_append(Edje *ed, int id, Edje_Var *var);
1603 void _edje_var_list_var_prepend(Edje *ed, int id, Edje_Var *var);
1604 void _edje_var_list_var_append_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
1605 void _edje_var_list_var_prepend_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
1606 Edje_Var *_edje_var_list_nth(Edje *ed, int id, int n);
1608 int _edje_var_list_count_get(Edje *ed, int id);
1609 void _edje_var_list_remove_nth(Edje *ed, int id, int n);
1611 int _edje_var_list_nth_int_get(Edje *ed, int id, int n);
1612 void _edje_var_list_nth_int_set(Edje *ed, int id, int n, int v);
1613 void _edje_var_list_int_append(Edje *ed, int id, int v);
1614 void _edje_var_list_int_prepend(Edje *ed, int id, int v);
1615 void _edje_var_list_int_insert(Edje *ed, int id, int n, int v);
1617 double _edje_var_list_nth_float_get(Edje *ed, int id, int n);
1618 void _edje_var_list_nth_float_set(Edje *ed, int id, int n, double v);
1619 void _edje_var_list_float_append(Edje *ed, int id, double v);
1620 void _edje_var_list_float_prepend(Edje *ed, int id, double v);
1621 void _edje_var_list_float_insert(Edje *ed, int id, int n, double v);
1623 const char *_edje_var_list_nth_str_get(Edje *ed, int id, int n);
1624 void _edje_var_list_nth_str_set(Edje *ed, int id, int n, const char *v);
1625 void _edje_var_list_str_append(Edje *ed, int id, const char *v);
1626 void _edje_var_list_str_prepend(Edje *ed, int id, const char *v);
1627 void _edje_var_list_str_insert(Edje *ed, int id, int n, const char *v);
1629 int _edje_var_timer_add (Edje *ed, double in, const char *fname, int val);
1630 void _edje_var_timer_del (Edje *ed, int id);
1632 int _edje_var_anim_add (Edje *ed, double len, const char *fname, int val);
1633 void _edje_var_anim_del (Edje *ed, int id);
1635 void _edje_message_init (void);
1636 void _edje_message_shutdown (void);
1637 void _edje_message_cb_set (Edje *ed, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data);
1638 Edje_Message *_edje_message_new (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id);
1639 void _edje_message_free (Edje_Message *em);
1640 void _edje_message_send (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, void *emsg);
1641 void _edje_message_parameters_push (Edje_Message *em);
1642 void _edje_message_process (Edje_Message *em);
1643 void _edje_message_queue_process (void);
1644 void _edje_message_queue_clear (void);
1645 void _edje_message_del (Edje *ed);
1647 void _edje_textblock_styles_add(Edje *ed);
1648 void _edje_textblock_styles_del(Edje *ed);
1649 void _edje_textblock_style_all_update(Edje *ed);
1650 void _edje_textblock_style_parse_and_fix(Edje_File *edf);
1651 void _edje_textblock_style_cleanup(Edje_File *edf);
1652 Edje_File *_edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret);
1653 void _edje_cache_coll_clean(Edje_File *edf);
1654 void _edje_cache_coll_flush(Edje_File *edf);
1655 void _edje_cache_coll_unref(Edje_File *edf, Edje_Part_Collection *edc);
1656 void _edje_cache_file_unref(Edje_File *edf);
1658 void _edje_embryo_globals_init(Edje *ed);
1660 #define CHKPARAM(n) if (params[0] != (sizeof(Embryo_Cell) * (n))) return -1;
1661 #define GETSTR(str, par) { \
1662 Embryo_Cell *___cptr; \
1665 if ((___cptr = embryo_data_address_get(ep, (par)))) { \
1666 ___l = embryo_data_string_length_get(ep, ___cptr); \
1667 if (((str) = alloca(___l + 1))) \
1668 embryo_data_string_get(ep, ___cptr, (str)); } }
1669 #define GETSTREVAS(str, par) { \
1671 if ((par) && (!strcmp((par), (str)))) return 0; \
1672 if ((par)) eina_stringshare_del((par)); \
1673 (par) = (char *)eina_stringshare_add((str)); } \
1674 else (par) = NULL; }
1675 #define GETFLOAT(val, par) { \
1677 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
1680 #define GETFLOAT_T(val, par) \
1683 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \
1685 val = FROM_DOUBLE(*___cptr); \
1689 #define GETINT(val, par) { \
1691 if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
1693 #define SETSTR(str, par) { \
1694 Embryo_Cell *___cptr; \
1695 if ((___cptr = embryo_data_address_get(ep, (par)))) { \
1696 embryo_data_string_set(ep, str, ___cptr); } }
1697 #define SETSTRALLOCATE(s) \
1700 if ((int) strlen((s)) < params[4]) { \
1701 SETSTR((s), params[3]); } \
1704 ss = alloca(strlen((s)) + 1); \
1706 ss[params[4] - 2] = 0; \
1707 SETSTR(ss, params[3]); } } \
1709 SETSTR("", params[3]); \
1711 #define SETFLOAT(val, par) { \
1713 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
1714 *___cptr = (float)val; } }
1715 #define SETFLOAT_T(val, par) \
1718 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \
1720 *___cptr = (float) TO_DOUBLE(val); \
1723 #define SETINT(val, par) { \
1725 if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
1726 *___cptr = (int)val; } }
1728 Eina_Bool _edje_script_only(Edje *ed);
1729 void _edje_script_only_init(Edje *ed);
1730 void _edje_script_only_shutdown(Edje *ed);
1731 void _edje_script_only_show(Edje *ed);
1732 void _edje_script_only_hide(Edje *ed);
1733 void _edje_script_only_move(Edje *ed);
1734 void _edje_script_only_resize(Edje *ed);
1735 void _edje_script_only_message(Edje *ed, Edje_Message *em);
1737 extern jmp_buf _edje_lua_panic_jmp;
1738 #define _edje_lua_panic_here() setjmp(_edje_lua_panic_jmp)
1740 lua_State *_edje_lua_state_get();
1741 lua_State *_edje_lua_new_thread(Edje *ed, lua_State *L);
1742 void _edje_lua_free_thread(Edje *ed, lua_State *L);
1743 void _edje_lua_new_reg(lua_State *L, int index, void *ptr);
1744 void _edje_lua_get_reg(lua_State *L, void *ptr);
1745 void _edje_lua_free_reg(lua_State *L, void *ptr);
1746 void _edje_lua_script_fn_new(Edje *ed);
1747 void _edje_lua_group_fn_new(Edje *ed);
1748 void _edje_lua_init();
1749 void _edje_lua_shutdown();
1751 void __edje_lua_error(const char *file, const char *fnc, int line, lua_State *L, int err_code);
1752 #define _edje_lua_error(L, err_code) \
1753 __edje_lua_error(__FILE__, __FUNCTION__, __LINE__, L, err_code)
1755 Eina_Bool _edje_lua_script_only(Edje *ed);
1756 void _edje_lua_script_only_init(Edje *ed);
1757 void _edje_lua_script_only_shutdown(Edje *ed);
1758 void _edje_lua_script_only_show(Edje *ed);
1759 void _edje_lua_script_only_hide(Edje *ed);
1760 void _edje_lua_script_only_move(Edje *ed);
1761 void _edje_lua_script_only_resize(Edje *ed);
1762 void _edje_lua_script_only_message(Edje *ed, Edje_Message *em);
1764 void _edje_entry_init(Edje *ed);
1765 void _edje_entry_shutdown(Edje *ed);
1766 void _edje_entry_real_part_init(Edje_Real_Part *rp);
1767 void _edje_entry_real_part_shutdown(Edje_Real_Part *rp);
1768 void _edje_entry_real_part_configure(Edje_Real_Part *rp);
1769 const char *_edje_entry_selection_get(Edje_Real_Part *rp);
1770 const char *_edje_entry_text_get(Edje_Real_Part *rp);
1771 void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text);
1772 void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text);
1773 void _edje_entry_text_markup_append(Edje_Real_Part *rp, const char *text);
1774 void _edje_entry_set_cursor_start(Edje_Real_Part *rp);
1775 void _edje_entry_set_cursor_end(Edje_Real_Part *rp);
1776 void _edje_entry_cursor_copy(Edje_Real_Part *rp, Edje_Cursor cur, Edje_Cursor dst);
1777 void _edje_entry_select_none(Edje_Real_Part *rp);
1778 void _edje_entry_select_all(Edje_Real_Part *rp);
1779 void _edje_entry_select_begin(Edje_Real_Part *rp);
1780 void _edje_entry_select_extend(Edje_Real_Part *rp);
1781 const Eina_List *_edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char *anchor);
1782 const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
1783 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);
1784 const Eina_List *_edje_entry_items_list(Edje_Real_Part *rp);
1785 void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
1786 void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow);
1787 Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp);
1788 void _edje_entry_select_abort(Edje_Real_Part *rp);
1790 Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur);
1791 Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur);
1792 Eina_Bool _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur);
1793 Eina_Bool _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur);
1794 void _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur);
1795 void _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur);
1796 void _edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur);
1797 void _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur);
1798 Eina_Bool _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur, int x, int y);
1799 Eina_Bool _edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
1800 Eina_Bool _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
1801 const char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur);
1802 void _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos);
1803 int _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur);
1805 void _edje_external_init();
1806 void _edje_external_shutdown();
1807 Evas_Object *_edje_external_type_add(const char *type_name, Evas *evas, Evas_Object *parent, const Eina_List *params, const char *part_name);
1808 void _edje_external_signal_emit(Evas_Object *obj, const char *emission, const char *source);
1809 Eina_Bool _edje_external_param_set(Evas_Object *obj, Edje_Real_Part *rp, const Edje_External_Param *param) EINA_ARG_NONNULL(1, 2);
1810 Eina_Bool _edje_external_param_get(const Evas_Object *obj, Edje_Real_Part *rp, Edje_External_Param *param) EINA_ARG_NONNULL(1, 2);
1811 Evas_Object *_edje_external_content_get(const Evas_Object *obj, const char *content) EINA_ARG_NONNULL(1, 2);
1812 void _edje_external_params_free(Eina_List *params, Eina_Bool free_strings);
1813 void _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep,
1814 Edje_Calc_Params *params,
1815 Edje_Part_Description_Common *chosen_desc);
1816 void *_edje_external_params_parse(Evas_Object *obj, const Eina_List *params);
1817 void _edje_external_parsed_params_free(Evas_Object *obj, void *params);
1819 EAPI void _edje_module_init();
1820 EAPI void _edje_module_shutdown();
1822 static inline Eina_Bool
1823 edje_program_is_strncmp(const char *str)
1827 length = strlen(str);
1829 if (strpbrk(str, "*?[\\") != str + length)
1831 if (str[length] == '['
1832 || str[length] == '\\')
1837 static inline Eina_Bool
1838 edje_program_is_strrncmp(const char *str)
1840 if (*str != '*' && *str != '?')
1842 if (strpbrk(str + 1, "*?[\\"))
1847 EAPI void _edje_program_insert(Edje_Part_Collection *ed, Edje_Program *p);
1848 EAPI void _edje_program_remove(Edje_Part_Collection *ed, Edje_Program *p);
1850 void _edje_lua2_error_full(const char *file, const char *fnc, int line, lua_State *L, int err_code);
1851 #define _edje_lua2_error(L, err_code) _edje_lua2_error_full(__FILE__, __FUNCTION__, __LINE__, L, err_code)
1852 void _edje_lua2_script_init(Edje *ed);
1853 void _edje_lua2_script_shutdown(Edje *ed);
1854 void _edje_lua2_script_load(Edje_Part_Collection *edc, void *data, int size);
1855 void _edje_lua2_script_unload(Edje_Part_Collection *edc);
1857 void _edje_lua2_script_func_shutdown(Edje *ed);
1858 void _edje_lua2_script_func_show(Edje *ed);
1859 void _edje_lua2_script_func_hide(Edje *ed);
1860 void _edje_lua2_script_func_move(Edje *ed);
1861 void _edje_lua2_script_func_resize(Edje *ed);
1862 void _edje_lua2_script_func_message(Edje *ed, Edje_Message *em);
1863 void _edje_lua2_script_func_signal(Edje *ed, const char *sig, const char *src);
1865 const char *edje_string_get(const Edje_String *es);
1866 const char *edje_string_id_get(const Edje_String *es);
1868 void _edje_object_orientation_inform(Evas_Object *obj);