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_Text Edje_Part_Description_Text;
281 typedef struct _Edje_Part_Description_Box Edje_Part_Description_Box;
282 typedef struct _Edje_Part_Description_Table Edje_Part_Description_Table;
283 typedef struct _Edje_Part_Description_External Edje_Part_Description_External;
284 typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common;
285 typedef struct _Edje_Part_Description_Spec_Fill Edje_Part_Description_Spec_Fill;
286 typedef struct _Edje_Part_Description_Spec_Border Edje_Part_Description_Spec_Border;
287 typedef struct _Edje_Part_Description_Spec_Image Edje_Part_Description_Spec_Image;
288 typedef struct _Edje_Part_Description_Spec_Text Edje_Part_Description_Spec_Text;
289 typedef struct _Edje_Part_Description_Spec_Box Edje_Part_Description_Spec_Box;
290 typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_Table;
291 typedef struct _Edje_Patterns Edje_Patterns;
292 typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation;
294 typedef struct _Edje Edje;
295 typedef struct _Edje_Real_Part_State Edje_Real_Part_State;
296 typedef struct _Edje_Real_Part_Drag Edje_Real_Part_Drag;
297 typedef struct _Edje_Real_Part_Set Edje_Real_Part_Set;
298 typedef struct _Edje_Real_Part Edje_Real_Part;
299 typedef struct _Edje_Running_Program Edje_Running_Program;
300 typedef struct _Edje_Signal_Callback Edje_Signal_Callback;
301 typedef struct _Edje_Calc_Params Edje_Calc_Params;
302 typedef struct _Edje_Pending_Program Edje_Pending_Program;
303 typedef struct _Edje_Text_Style Edje_Text_Style;
304 typedef struct _Edje_Color_Class Edje_Color_Class;
305 typedef struct _Edje_Text_Class Edje_Text_Class;
306 typedef struct _Edje_Var Edje_Var;
307 typedef struct _Edje_Var_Int Edje_Var_Int;
308 typedef struct _Edje_Var_Float Edje_Var_Float;
309 typedef struct _Edje_Var_String Edje_Var_String;
310 typedef struct _Edje_Var_List Edje_Var_List;
311 typedef struct _Edje_Var_Hash Edje_Var_Hash;
312 typedef struct _Edje_Var_Animator Edje_Var_Animator;
313 typedef struct _Edje_Var_Timer Edje_Var_Timer;
314 typedef struct _Edje_Var_Pool Edje_Var_Pool;
315 typedef struct _Edje_Signal_Source_Char Edje_Signal_Source_Char;
316 typedef struct _Edje_Text_Insert_Filter_Callback Edje_Text_Insert_Filter_Callback;
318 #define EDJE_INF_MAX_W 100000
319 #define EDJE_INF_MAX_H 100000
321 #define EDJE_IMAGE_SOURCE_TYPE_NONE 0
322 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT 1
323 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY 2
324 #define EDJE_IMAGE_SOURCE_TYPE_EXTERNAL 3
325 #define EDJE_IMAGE_SOURCE_TYPE_LAST 4
327 #define EDJE_VAR_NONE 0
328 #define EDJE_VAR_INT 1
329 #define EDJE_VAR_FLOAT 2
330 #define EDJE_VAR_STRING 3
331 #define EDJE_VAR_LIST 4
332 #define EDJE_VAR_HASH 5
334 #define EDJE_VAR_MAGIC_BASE 0x12fe84ba
336 #define EDJE_STATE_PARAM_NONE 0
337 #define EDJE_STATE_PARAM_ALIGNMENT 1
338 #define EDJE_STATE_PARAM_MIN 2
339 #define EDJE_STATE_PARAM_MAX 3
340 #define EDJE_STATE_PARAM_STEP 4
341 #define EDJE_STATE_PARAM_ASPECT 5
342 #define EDJE_STATE_PARAM_ASPECT_PREF 6
343 #define EDJE_STATE_PARAM_COLOR 7
344 #define EDJE_STATE_PARAM_COLOR2 8
345 #define EDJE_STATE_PARAM_COLOR3 9
346 #define EDJE_STATE_PARAM_COLOR_CLASS 10
347 #define EDJE_STATE_PARAM_REL1 11
348 #define EDJE_STATE_PARAM_REL1_TO 12
349 #define EDJE_STATE_PARAM_REL1_OFFSET 13
350 #define EDJE_STATE_PARAM_REL2 14
351 #define EDJE_STATE_PARAM_REL2_TO 15
352 #define EDJE_STATE_PARAM_REL2_OFFSET 16
353 #define EDJE_STATE_PARAM_IMAGE 17
354 #define EDJE_STATE_PARAM_BORDER 18
355 #define EDJE_STATE_PARAM_FILL_SMOOTH 19
356 #define EDJE_STATE_PARAM_FILL_POS 20
357 #define EDJE_STATE_PARAM_FILL_SIZE 21
358 #define EDJE_STATE_PARAM_TEXT 22
359 #define EDJE_STATE_PARAM_TEXT_CLASS 23
360 #define EDJE_STATE_PARAM_TEXT_FONT 24
361 #define EDJE_STATE_PARAM_TEXT_STYLE 25
362 #define EDJE_STATE_PARAM_TEXT_SIZE 26
363 #define EDJE_STATE_PARAM_TEXT_FIT 27
364 #define EDJE_STATE_PARAM_TEXT_MIN 28
365 #define EDJE_STATE_PARAM_TEXT_MAX 29
366 #define EDJE_STATE_PARAM_TEXT_ALIGN 30
367 #define EDJE_STATE_PARAM_VISIBLE 31
368 #define EDJE_STATE_PARAM_MAP_OM 32
369 #define EDJE_STATE_PARAM_MAP_PERSP 33
370 #define EDJE_STATE_PARAM_MAP_LIGNT 34
371 #define EDJE_STATE_PARAM_MAP_ROT_CENTER 35
372 #define EDJE_STATE_PARAM_MAP_ROT_X 36
373 #define EDJE_STATE_PARAM_MAP_ROT_Y 37
374 #define EDJE_STATE_PARAM_MAP_ROT_Z 38
375 #define EDJE_STATE_PARAM_MAP_BACK_CULL 39
376 #define EDJE_STATE_PARAM_MAP_PERSP_ON 40
377 #define EDJE_STATE_PARAM_PERSP_ZPLANE 41
378 #define EDJE_STATE_PARAM_PERSP_FOCAL 42
379 #define EDJE_STATE_PARAM_LAST 43
381 #define EDJE_ENTRY_EDIT_MODE_NONE 0
382 #define EDJE_ENTRY_EDIT_MODE_SELECTABLE 1
383 #define EDJE_ENTRY_EDIT_MODE_EDITABLE 2
384 #define EDJE_ENTRY_EDIT_MODE_PASSWORD 3
386 #define EDJE_ENTRY_SELECTION_MODE_DEFAULT 0
387 #define EDJE_ENTRY_SELECTION_MODE_EXPLICIT 1
389 #define EDJE_ENTRY_CURSOR_MODE_UNDER 0
390 #define EDJE_ENTRY_CURSOR_MODE_BEFORE 1
392 #define EDJE_ORIENTATION_AUTO 0
393 #define EDJE_ORIENTATION_LTR 1
394 #define EDJE_ORIENTATION_RTL 2
396 #define EDJE_PART_PATH_SEPARATOR ':'
397 #define EDJE_PART_PATH_SEPARATOR_STRING ":"
398 #define EDJE_PART_PATH_SEPARATOR_INDEXL '['
399 #define EDJE_PART_PATH_SEPARATOR_INDEXR ']'
407 Edje_External_Directory *external_dir;
408 Edje_Image_Directory *image_dir;
410 Eina_List *color_classes;
413 const char *compiler;
421 Eina_Hash *collection;
422 Eina_List *collection_cache;
424 Edje_Patterns *collection_patterns;
428 unsigned char free_strings : 1;
429 unsigned char dangling : 1;
430 unsigned char warning : 1;
437 Evas_Textblock_Style *style;
440 struct _Edje_Style_Tag
446 const char *text_class;
452 struct _Edje_Font_Directory_Entry
454 const char *entry; /* the name of the font */
455 const char *file; /* the name of the file */
460 struct _Edje_External_Directory
462 Edje_External_Directory_Entry *entries; /* a list of Edje_External_Directory_Entry */
463 unsigned int entries_count;
466 struct _Edje_External_Directory_Entry
468 const char *entry; /* the name of the external */
478 struct _Edje_Image_Directory
480 Edje_Image_Directory_Entry *entries; /* an array of Edje_Image_Directory_Entry */
481 unsigned int entries_count;
483 Edje_Image_Directory_Set *sets;
484 unsigned int sets_count; /* an array of Edje_Image_Directory_Set */
487 struct _Edje_Image_Directory_Entry
489 const char *entry; /* the nominal name of the image - if any */
490 int source_type; /* alternate source mode. 0 = none */
491 int source_param; /* extra params on encoding */
492 int id; /* the id no. of the image */
495 struct _Edje_Image_Directory_Set
503 struct _Edje_Image_Directory_Set_Entry
518 struct _Edje_Program /* a conditional program to be run */
520 int id; /* id of program */
521 const char *name; /* name of the action */
523 const char *signal; /* if signal emission name matches the glob here... */
524 const char *source; /* if part that emitted this (name) matches this glob */
528 const char *state; /* if state is not set, we will try with source */
529 } filter; /* the part filter.part should be in state filter.state for signal to be accepted */
536 int action; /* type - set state, stop action, set drag pos etc. */
537 const char *state; /* what state of alternates to apply, NULL = default */
538 const char *state2; /* what other state to use - for signal emit action */
539 double value; /* value of state to apply (if multiple names match) */
540 double value2; /* other value for drag actions */
543 int mode; /* how to tween - linear, sinusoidal etc. */
544 FLOAT_T time; /* time to graduate between current and new state */
547 Eina_List *targets; /* list of target parts to apply the state to */
549 Eina_List *after; /* list of actions to run at the end of this, for looping */
553 const char *description;
556 /* used for PARAM_COPY (param names in state and state2 above!) */
558 int src; /* part where parameter is being retrieved */
559 int dst; /* part where parameter is being stored */
563 struct _Edje_Program_Target /* the target of an action */
565 int id; /* just the part id no, or action id no */
568 struct _Edje_Program_After /* the action to run after another action */
574 #define PART_TYPE_FIELDS(TYPE) \
585 struct _Edje_Part_Collection_Directory_Entry
587 const char *entry; /* the nominal name of the part collection */
588 int id; /* the id of this named part collection */
592 PART_TYPE_FIELDS(int)
598 PART_TYPE_FIELDS(Eina_Mempool *)
604 PART_TYPE_FIELDS(Eina_Mempool *)
605 } mp_rtl; /* For Right To Left interface */
607 Edje_Part_Collection *ref;
614 struct _Edje_Pack_Element
616 unsigned char type; /* only GROUP supported for now */
617 Edje_Real_Part *parent; /* pointer to the table/box that hold it, set at runtime */
618 const char *name; /* if != NULL, will be set with evas_object_name_set */
619 const char *source; /* group name to use as source for this element */
620 Edje_Size min, prefer, max;
624 Edje_Alignment align;
625 Edje_Alignment weight;
627 const char *options; /* extra options for custom objects */
628 /* table specific follows */
630 unsigned short colspan, rowspan;
635 struct _Edje_Part_Collection
637 struct { /* list of Edje_Program */
638 Edje_Program **fnmatch; /* complex match with "*?[\" */
639 unsigned int fnmatch_count;
641 Edje_Program **strcmp; /* No special caractere, plain strcmp does the work */
642 unsigned int strcmp_count;
644 Edje_Program **strncmp; /* Finish by * or ?, plain strncmp does the work */
645 unsigned int strncmp_count;
647 Edje_Program **strrncmp; /* Start with * or ?, reverse strncmp will do the job */
648 unsigned int strrncmp_count;
650 Edje_Program **nocmp; /* Empty signal/source that will never match */
651 unsigned int nocmp_count;
654 Edje_Part **parts; /* an array of Edje_Part */
655 unsigned int parts_count;
659 int id; /* the collection id */
661 Eina_Hash *alias; /* aliasing part */
662 Eina_Hash *aliased; /* invert match of alias */
666 unsigned char orientation;
671 #ifdef EDJE_PROGRAM_CACHE
673 Eina_Hash *no_matches;
678 Embryo_Program *script; /* all the embryo script code for this group */
681 unsigned char script_only;
683 unsigned char lua_script_only;
685 unsigned char checked : 1;
688 struct _Edje_Part_Dragable
690 int step_x; /* drag jumps n pixels (0 = no limit) */
691 int step_y; /* drag jumps n pixels (0 = no limit) */
693 int count_x; /* drag area divided by n (0 = no limit) */
694 int count_y; /* drag area divided by n (0 = no limit) */
696 int confine_id; /* dragging within this bit, -1 = no */
699 int event_id; /* If it is used as scrollbar */
701 signed char x; /* can u click & drag this bit in x dir */
702 signed char y; /* can u click & drag this bit in y dir */
705 struct _Edje_Part_Api
708 const char *description;
711 typedef struct _Edje_Part_Description_List Edje_Part_Description_List;
712 struct _Edje_Part_Description_List
714 Edje_Part_Description_Common **desc;
715 Edje_Part_Description_Common **desc_rtl; /* desc for Right To Left interface */
716 unsigned int desc_count;
721 const char *name; /* the name if any of the part */
722 Edje_Part_Description_Common *default_desc; /* the part descriptor for default */
723 Edje_Part_Description_Common *default_desc_rtl; /* default desc for Right To Left interface */
725 Edje_Part_Description_List other; /* other possible descriptors */
727 const char *source, *source2, *source3, *source4, *source5, *source6;
728 int id; /* its id number */
729 int clip_to_id; /* the part id to clip this one to */
730 Edje_Part_Dragable dragable;
731 Edje_Pack_Element **items; /* packed items for box and table */
732 unsigned int items_count;
733 unsigned char type; /* what type (image, rect, text) */
734 unsigned char effect; /* 0 = plain... */
735 unsigned char mouse_events; /* it will affect/respond to mouse events */
736 unsigned char repeat_events; /* it will repeat events to objects below */
737 Evas_Event_Flags ignore_flags;
738 unsigned char scale; /* should certain properties scale with edje scale factor? */
739 unsigned char precise_is_inside;
740 unsigned char use_alternate_font_metrics;
741 unsigned char pointer_mode;
742 unsigned char entry_mode;
743 unsigned char select_mode;
744 unsigned char cursor_mode;
745 unsigned char multiline;
749 struct _Edje_Part_Image_Id
755 struct _Edje_Part_Description_Common
758 double value; /* the value of the state (for ranges) */
759 const char *name; /* the named state if any */
762 Edje_Alignment align; /* 0 <-> 1.0 alignment within allocated space */
765 unsigned char w, h; /* width or height is fixed in side (cannot expand with Edje object size) */
769 Edje_Position step; /* size stepping by n pixels, 0 = none */
770 Edje_Aspect_Prefer aspect;
772 char *color_class; /* how to modify the color */
781 int id_x; /* -1 = whole part collection, or part ID */
782 int id_y; /* -1 = whole part collection, or part ID */
792 unsigned char backcull;
794 unsigned char persp_on;
795 unsigned char smooth;
804 unsigned char visible; /* is it shown */
807 struct _Edje_Part_Description_Spec_Fill
809 FLOAT_T pos_rel_x; /* fill offset x relative to area */
810 FLOAT_T rel_x; /* relative size compared to area */
811 FLOAT_T pos_rel_y; /* fill offset y relative to area */
812 FLOAT_T rel_y; /* relative size compared to area */
813 int pos_abs_x; /* fill offset x added to fill offset */
814 int abs_x; /* size of fill added to relative fill */
815 int pos_abs_y; /* fill offset y added to fill offset */
816 int abs_y; /* size of fill added to relative fill */
817 int angle; /* angle of fill -- currently only used by grads */
818 int spread; /* spread of fill -- currently only used by grads */
819 char smooth; /* fill with smooth scaling or not */
820 unsigned char type; /* fill coordinate from container (SCALE) or from source image (TILE) */
823 struct _Edje_Part_Description_Spec_Border
825 int l, r, t, b; /* border scaling on image fill */
826 unsigned char no_fill; /* do we fill the center of the image if bordered? 1 == NO!!!! */
827 unsigned char scale; /* scale image border by same as scale factor */
830 struct _Edje_Part_Description_Spec_Image
832 Edje_Part_Image_Id **tweens; /* list of Edje_Part_Image_Id */
833 unsigned int tweens_count; /* number of tweens */
835 int id; /* the image id to use */
836 int scale_hint; /* evas scale hint */
837 Eina_Bool set; /* if image condition it's content */
839 Edje_Part_Description_Spec_Border border;
840 Edje_Part_Description_Spec_Fill fill;
843 struct _Edje_Part_Description_Spec_Text
845 Edje_String text; /* if "" or NULL, then leave text unchanged */
846 char *text_class; /* how to apply/modify the font */
847 Edje_String style; /* the text style if a textblock */
848 Edje_String font; /* if a specific font is asked for */
849 Edje_String repch; /* replacement char for password mode entry */
851 Edje_Alignment align; /* text alignment within bounds */
854 double elipsis; /* 0.0 - 1.0 defining where the elipsis align */
855 int size; /* 0 = use user set size */
856 int id_source; /* -1 if none */
857 int id_text_source; /* -1 if none */
859 unsigned char fit_x; /* resize font size down to fit in x dir */
860 unsigned char fit_y; /* resize font size down to fit in y dir */
861 unsigned char min_x; /* if text size should be part min size */
862 unsigned char min_y; /* if text size should be part min size */
863 unsigned char max_x; /* if text size should be part max size */
864 unsigned char max_y; /* if text size should be part max size */
866 int size_range_max; /* -1 means, no bound. */
869 struct _Edje_Part_Description_Spec_Box
871 char *layout, *alt_layout;
872 Edje_Alignment align;
881 struct _Edje_Part_Description_Spec_Table
883 unsigned char homogeneous;
884 Edje_Alignment align;
890 struct _Edje_Part_Description_Image
892 Edje_Part_Description_Common common;
893 Edje_Part_Description_Spec_Image image;
896 struct _Edje_Part_Description_Text
898 Edje_Part_Description_Common common;
899 Edje_Part_Description_Spec_Text text;
902 struct _Edje_Part_Description_Box
904 Edje_Part_Description_Common common;
905 Edje_Part_Description_Spec_Box box;
908 struct _Edje_Part_Description_Table
910 Edje_Part_Description_Common common;
911 Edje_Part_Description_Spec_Table table;
914 struct _Edje_Part_Description_External
916 Edje_Part_Description_Common common;
917 Eina_List *external_params; /* parameters for external objects */
922 struct _Edje_Signal_Source_Char
932 struct _Edje_Signals_Sources_Patterns
935 Edje_Patterns *signals_patterns;
936 Edje_Patterns *sources_patterns;
938 Eina_Rbtree *exact_match;
942 Edje_Program **globing;
951 typedef struct _Edje_Signals_Sources_Patterns Edje_Signals_Sources_Patterns;
955 const Edje_Smart_Api *api;
960 Evas_Coord x, y, w, h;
963 Evas *evas; /* the Evas this Edje belongs to */
964 Evas_Object *obj; /* the smart object */
965 Evas_Object *clipper; /* a big rect to clip this Edje to */
966 Edje_File *file; /* the file the data comes form */
967 Edje_Part_Collection *collection; /* the description being used */
968 Eina_List *actions; /* currently running actions */
969 Eina_List *callbacks;
970 Eina_List *pending_actions;
971 Eina_List *color_classes;
972 Eina_List *text_classes;
973 /* variable pool for Edje Embryo scripts */
974 Edje_Var_Pool *var_pool;
975 /* for faster lookups to avoid nth list walks */
976 Edje_Real_Part **table_parts;
977 Edje_Program **table_programs;
978 Edje_Real_Part *focused_part;
980 Eina_List *text_insert_filter_callbacks;
981 void *script_only_data;
982 int table_programs_size;
983 unsigned int table_parts_size;
985 Edje_Perspective *persp;
988 Edje_Signals_Sources_Patterns callbacks;
989 Edje_Signals_Sources_Patterns programs;
997 Eina_Bool is_rtl : 1;
1000 Edje_Text_Change_Cb func;
1005 Edje_Message_Handler_Cb func;
1009 int processing_messages;
1015 unsigned int dirty : 1;
1016 unsigned int recalc : 1;
1017 unsigned int walking_callbacks : 1;
1018 unsigned int delete_callbacks : 1;
1019 unsigned int just_added_callbacks : 1;
1020 unsigned int have_objects : 1;
1021 unsigned int paused : 1;
1022 unsigned int no_anim : 1;
1023 unsigned int calc_only : 1;
1024 unsigned int walking_actions : 1;
1025 unsigned int block_break : 1;
1026 unsigned int delete_me : 1;
1027 unsigned int postponed : 1;
1028 unsigned int freeze_calc : 1;
1029 unsigned int has_entries : 1;
1030 unsigned int entries_inited : 1;
1031 #ifdef EDJE_CALC_CACHE
1032 unsigned int text_part_change : 1;
1033 unsigned int all_part_change : 1;
1035 unsigned int have_mapped_part : 1;
1038 Eina_Inlist *lua_objs;
1042 Edje_Item_Provider_Cb func;
1047 struct _Edje_Calc_Params
1049 int x, y, w, h; // 16
1050 Edje_Rectangle req; // 16
1051 Edje_Rectangle req_drag; // 16
1052 Edje_Color color; // 4
1056 int x, y, w, h; // 16
1063 int l, r, t, b; // 16
1068 Edje_Alignment align; /* text alignment within bounds */ // 16
1069 double elipsis; // 8
1071 Edje_Color color2, color3; // 8
1074 unsigned char visible : 1;
1075 unsigned char smooth : 1; // 1
1078 struct _Edje_Real_Part_Set
1080 Edje_Image_Directory_Set_Entry *entry; // 4
1081 Edje_Image_Directory_Set *set; // 4
1086 struct _Edje_Real_Part_State
1088 Edje_Part_Description_Common *description; // 4
1089 Edje_Part_Description_Common *description_rtl; // 4
1090 Edje_Real_Part *rel1_to_x; // 4
1091 Edje_Real_Part *rel1_to_y; // 4
1092 Edje_Real_Part *rel2_to_x; // 4
1093 Edje_Real_Part *rel2_to_y; // 4
1094 #ifdef EDJE_CALC_CACHE
1096 Edje_Calc_Params p; // 96
1098 void *external_params; // 4
1099 Edje_Real_Part_Set *set; // 4
1101 // WITH EDJE_CALC_CACHE 132
1103 struct _Edje_Real_Part_Drag
1106 Edje_Position_Scale val, size, step, page; // 64
1108 unsigned int count; // 4
1114 unsigned char need_reset : 1; // 4
1115 Edje_Real_Part *confine_to; // 4
1118 struct _Edje_Real_Part
1121 Edje_Part *part; // 4
1122 Evas_Object *object; // 4
1123 int x, y, w, h; // 16
1124 Edje_Rectangle req; // 16
1126 Eina_List *items; // 4 //FIXME: only if table/box
1127 Edje_Part_Box_Animation *anim; // 4 //FIXME: Used only if box
1128 void *entry_data; // 4 // FIXME: move to entry section
1130 Evas_Object *swallowed_object; // 4 // FIXME: move with swallow_params data
1132 Edje_Size min, max; // 16
1133 Edje_Aspect aspect; // 12
1134 } swallow_params; // 28 // FIXME: only if type SWALLOW
1136 Edje_Real_Part_Drag *drag; // 4
1137 Edje_Real_Part *events_to; // 4
1140 Edje_Real_Part *source; // 4
1141 Edje_Real_Part *text_source; // 4
1142 const char *text; // 4
1143 Edje_Position offset; // 8 text only
1144 const char *font; // 4 text only
1145 const char *style; // 4 text only
1146 int size; // 4 text only
1148 double in_w, in_h; // 16 text only
1149 int in_size; // 4 text only
1150 const char *in_str; // 4 text only
1151 const char *out_str; // 4 text only
1152 int out_size; // 4 text only
1153 FLOAT_T align_x, align_y; // 16 text only
1154 double elipsis; // 8 text only
1155 int fit_x, fit_y; // 8 text only
1157 } text; // 86 // FIXME make text a potiner to struct and alloc at end
1158 // if part type is TEXT move common members textblock +
1159 // text to front and have smaller struct for textblock
1161 FLOAT_T description_pos; // 8
1162 Edje_Part_Description_Common *chosen_description; // 4
1163 Edje_Real_Part_State param1; // 20
1164 // WITH EDJE_CALC_CACHE: 140
1165 Edje_Real_Part_State *param2, *custom; // 8
1167 #ifdef EDJE_CALC_CACHE
1171 Edje_Real_Part *clip_to; // 4
1173 Edje_Running_Program *program; // 4
1175 int clicked_button; // 4
1177 unsigned char calculated; // 1
1178 unsigned char calculating; // 1
1180 unsigned char still_in : 1; // 1
1181 #ifdef EDJE_CALC_CACHE
1182 unsigned char invalidate : 1; // 0
1185 // WITH EDJE_CALC_CACHE: 400
1187 struct _Edje_Running_Program
1190 Edje_Program *program;
1195 struct _Edje_Signal_Callback
1199 Edje_Signal_Cb func;
1201 unsigned char just_added : 1;
1202 unsigned char delete_me : 1;
1205 struct _Edje_Text_Insert_Filter_Callback
1208 Edje_Text_Filter_Cb func;
1212 struct _Edje_Pending_Program
1215 Edje_Program *program;
1219 struct _Edje_Text_Style
1225 unsigned char l, r, t, b;
1229 unsigned char color; /* 0 = color, 1, 2 = color2, color3 */
1230 signed char x, y; /* offset */
1231 unsigned char alpha;
1235 struct _Edje_Color_Class
1238 unsigned char r, g, b, a;
1239 unsigned char r2, g2, b2, a2;
1240 unsigned char r3, g3, b3, a3;
1243 struct _Edje_Text_Class
1247 Evas_Font_Size size;
1250 struct _Edje_Var_Int
1255 struct _Edje_Var_Float
1260 struct _Edje_Var_String
1265 struct _Edje_Var_List
1270 struct _Edje_Var_Hash
1275 struct _Edje_Var_Timer
1279 Embryo_Function func;
1284 struct _Edje_Var_Animator
1288 Embryo_Function func;
1294 struct _Edje_Var_Pool
1298 Eina_List *animators;
1316 typedef enum _Edje_Queue
1322 typedef struct _Edje_Message_Signal Edje_Message_Signal;
1323 typedef struct _Edje_Message Edje_Message;
1325 struct _Edje_Message_Signal
1331 struct _Edje_Message
1335 Edje_Message_Type type;
1340 typedef enum _Edje_Fill
1342 EDJE_FILL_TYPE_SCALE = 0,
1346 typedef enum _Edje_Match_Error
1349 EDJE_MATCH_ALLOC_ERROR,
1350 EDJE_MATCH_SYNTAX_ERROR
1354 typedef struct _Edje_States Edje_States;
1355 struct _Edje_Patterns
1357 const char **patterns;
1359 Edje_States *states;
1362 Eina_Bool delete_me : 1;
1364 size_t patterns_size;
1369 Edje_Patterns *edje_match_collection_dir_init(const Eina_List *lst);
1370 Edje_Patterns *edje_match_programs_signal_init(Edje_Program * const *array,
1371 unsigned int count);
1372 Edje_Patterns *edje_match_programs_source_init(Edje_Program * const *array,
1373 unsigned int count);
1374 Edje_Patterns *edje_match_callback_signal_init(const Eina_List *lst);
1375 Edje_Patterns *edje_match_callback_source_init(const Eina_List *lst);
1377 Eina_Bool edje_match_collection_dir_exec(const Edje_Patterns *ppat,
1378 const char *string);
1379 Eina_Bool edje_match_programs_exec(const Edje_Patterns *ppat_signal,
1380 const Edje_Patterns *ppat_source,
1383 Edje_Program **programs,
1384 Eina_Bool (*func)(Edje_Program *pr, void *data),
1386 int edje_match_callback_exec(Edje_Patterns *ppat_signal,
1387 Edje_Patterns *ppat_source,
1390 Eina_List *callbacks,
1393 void edje_match_patterns_free(Edje_Patterns *ppat);
1395 Eina_List *edje_match_program_hash_build(Edje_Program * const * programs,
1397 Eina_Rbtree **tree);
1398 Eina_List *edje_match_callback_hash_build(const Eina_List *callbacks,
1399 Eina_Rbtree **tree);
1400 const Eina_List *edje_match_signal_source_hash_get(const char *signal,
1402 const Eina_Rbtree *tree);
1403 void edje_match_signal_source_free(Edje_Signal_Source_Char *key, void *data);
1405 // FIXME remove below 2 eapi decls when edje_convert goes
1406 EAPI void _edje_edd_init(void);
1407 EAPI void _edje_edd_shutdown(void);
1409 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_file;
1410 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_part_collection;
1412 extern int _edje_anim_count;
1413 extern Ecore_Animator *_edje_timer;
1414 extern Eina_List *_edje_animators;
1415 extern Eina_List *_edje_edjes;
1417 extern char *_edje_fontset_append;
1418 extern FLOAT_T _edje_scale;
1419 extern int _edje_freeze_val;
1420 extern int _edje_freeze_calc_count;
1421 extern Eina_List *_edje_freeze_calc_list;
1423 extern Eina_Mempool *_edje_real_part_mp;
1424 extern Eina_Mempool *_edje_real_part_state_mp;
1426 extern Eina_Mempool *_emp_RECTANGLE;
1427 extern Eina_Mempool *_emp_TEXT;
1428 extern Eina_Mempool *_emp_IMAGE;
1429 extern Eina_Mempool *_emp_SWALLOW;
1430 extern Eina_Mempool *_emp_TEXTBLOCK;
1431 extern Eina_Mempool *_emp_GROUP;
1432 extern Eina_Mempool *_emp_BOX;
1433 extern Eina_Mempool *_emp_TABLE;
1434 extern Eina_Mempool *_emp_EXTERNAL;
1435 extern Eina_Mempool *_emp_part;
1437 void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos);
1438 Edje_Part_Description_Common *_edje_part_description_find(Edje *ed,
1440 const char *name, double val);
1441 void _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, double v1, const char *d2, double v2);
1442 void _edje_recalc(Edje *ed);
1443 void _edje_recalc_do(Edje *ed);
1444 void _edje_part_recalc_1(Edje *ed, Edje_Real_Part *ep);
1445 int _edje_part_dragable_calc(Edje *ed, Edje_Real_Part *ep, FLOAT_T *x, FLOAT_T *y);
1446 void _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y);
1448 Eina_Bool _edje_timer_cb(void *data);
1449 Eina_Bool _edje_pending_timer_cb(void *data);
1450 void _edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
1451 void _edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp);
1452 void _edje_callbacks_del(Evas_Object *obj, Edje *ed);
1453 void _edje_callbacks_focus_del(Evas_Object *obj, Edje *ed);
1455 void _edje_edd_init(void);
1456 void _edje_edd_shutdown(void);
1458 int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Eina_List *group_path);
1460 void _edje_file_add(Edje *ed);
1461 void _edje_file_del(Edje *ed);
1462 void _edje_file_free(Edje_File *edf);
1463 void _edje_file_cache_shutdown(void);
1464 void _edje_collection_free(Edje_File *edf,
1465 Edje_Part_Collection *ec,
1466 Edje_Part_Collection_Directory_Entry *ce);
1467 void _edje_collection_free_part_description_clean(int type,
1468 Edje_Part_Description_Common *desc,
1469 Eina_Bool free_strings);
1470 void _edje_collection_free_part_description_free(int type,
1471 Edje_Part_Description_Common *desc,
1472 Edje_Part_Collection_Directory_Entry *ce,
1473 Eina_Bool free_strings);
1475 void _edje_object_smart_set(Edje_Smart_Api *sc);
1476 const Edje_Smart_Api * _edje_object_smart_class_get(void);
1478 void _edje_del(Edje *ed);
1479 void _edje_ref(Edje *ed);
1480 void _edje_unref(Edje *ed);
1481 void _edje_clean_objects(Edje *ed);
1482 void _edje_ref(Edje *ed);
1483 void _edje_unref(Edje *ed);
1485 Eina_Bool _edje_program_run_iterate(Edje_Running_Program *runp, double tim);
1486 void _edje_program_end(Edje *ed, Edje_Running_Program *runp);
1487 void _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig, const char *ssrc);
1488 void _edje_programs_patterns_clean(Edje *ed);
1489 void _edje_programs_patterns_init(Edje *ed);
1490 void _edje_emit(Edje *ed, const char *sig, const char *src);
1491 void _edje_emit_handle(Edje *ed, const char *sig, const char *src);
1492 void _edje_signals_sources_patterns_clean(Edje_Signals_Sources_Patterns *ssp);
1493 void _edje_callbacks_patterns_clean(Edje *ed);
1495 void _edje_text_init(void);
1496 void _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep);
1497 void _edje_text_part_on_del(Edje *ed, Edje_Part *ep);
1498 void _edje_text_recalc_apply(Edje *ed,
1500 Edje_Calc_Params *params,
1501 Edje_Part_Description_Text *chosen_desc);
1502 Evas_Font_Size _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc);
1503 const char * _edje_text_class_font_get(Edje *ed,
1504 Edje_Part_Description_Text *chosen_desc,
1505 int *size, char **free_later);
1508 Edje_Real_Part *_edje_real_part_get(const Edje *ed, const char *part);
1509 Edje_Real_Part *_edje_real_part_recursive_get(const Edje *ed, const char *part);
1510 Edje *_edje_recursive_get(Edje *ed, const char *part, Edje_Real_Part **orp);
1511 Edje_Color_Class *_edje_color_class_find(Edje *ed, const char *color_class);
1512 void _edje_color_class_member_add(Edje *ed, const char *color_class);
1513 void _edje_color_class_member_del(Edje *ed, const char *color_class);
1514 void _edje_color_class_on_del(Edje *ed, Edje_Part *ep);
1515 void _edje_color_class_members_free(void);
1516 void _edje_color_class_hash_free(void);
1518 Edje_Text_Class *_edje_text_class_find(Edje *ed, const char *text_class);
1519 void _edje_text_class_member_add(Edje *ed, const char *text_class);
1520 void _edje_text_class_member_del(Edje *ed, const char *text_class);
1521 void _edje_text_class_members_free(void);
1522 void _edje_text_class_hash_free(void);
1524 Edje *_edje_fetch(const Evas_Object *obj);
1525 int _edje_freeze(Edje *ed);
1526 int _edje_thaw(Edje *ed);
1527 int _edje_block(Edje *ed);
1528 int _edje_unblock(Edje *ed);
1529 int _edje_block_break(Edje *ed);
1530 void _edje_block_violate(Edje *ed);
1531 void _edje_object_part_swallow_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
1532 void _edje_object_part_swallow_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
1533 void _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow);
1534 void _edje_real_part_swallow_clear(Edje_Real_Part *rp);
1535 void _edje_box_init(void);
1536 void _edje_box_shutdown(void);
1537 Eina_Bool _edje_box_layout_find(const char *name, Evas_Object_Box_Layout *cb, void **data, void (**free_data)(void *data));
1538 void _edje_box_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Box *chosen_desc);
1539 Eina_Bool _edje_box_layout_add_child(Edje_Real_Part *rp, Evas_Object *child_obj);
1540 void _edje_box_layout_remove_child(Edje_Real_Part *rp, Evas_Object *child_obj);
1541 Edje_Part_Box_Animation * _edje_box_layout_anim_new(Evas_Object *box);
1542 void _edje_box_layout_free_data(void *data);
1544 Eina_Bool _edje_real_part_box_append(Edje_Real_Part *rp, Evas_Object *child_obj);
1545 Eina_Bool _edje_real_part_box_prepend(Edje_Real_Part *rp, Evas_Object *child_obj);
1546 Eina_Bool _edje_real_part_box_insert_before(Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref);
1547 Eina_Bool _edje_real_part_box_insert_at(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos);
1548 Evas_Object *_edje_real_part_box_remove(Edje_Real_Part *rp, Evas_Object *child_obj);
1549 Evas_Object *_edje_real_part_box_remove_at(Edje_Real_Part *rp, unsigned int pos);
1550 Eina_Bool _edje_real_part_box_remove_all(Edje_Real_Part *rp, Eina_Bool clear);
1551 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);
1552 Eina_Bool _edje_real_part_table_unpack(Edje_Real_Part *rp, Evas_Object *child_obj);
1553 void _edje_real_part_table_clear(Edje_Real_Part *rp, Eina_Bool clear);
1554 Evas_Object *_edje_children_get(Edje_Real_Part *rp, const char *partid);
1556 Eina_Bool _edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text);
1557 char *_edje_text_escape(const char *text);
1558 char *_edje_text_unescape(const char *text);
1560 void _edje_embryo_script_init (Edje_Part_Collection *edc);
1561 void _edje_embryo_script_shutdown (Edje_Part_Collection *edc);
1562 void _edje_embryo_script_reset (Edje *ed);
1563 void _edje_embryo_test_run (Edje *ed, const char *fname, const char *sig, const char *src);
1564 Edje_Var *_edje_var_new (void);
1565 void _edje_var_free (Edje_Var *var);
1566 void _edje_var_init (Edje *ed);
1567 void _edje_var_shutdown (Edje *ed);
1568 int _edje_var_string_id_get (Edje *ed, const char *string);
1569 int _edje_var_var_int_get (Edje *ed, Edje_Var *var);
1570 void _edje_var_var_int_set (Edje *ed, Edje_Var *var, int v);
1571 double _edje_var_var_float_get (Edje *ed, Edje_Var *var);
1572 void _edje_var_var_float_set (Edje *ed, Edje_Var *var, double v);
1573 const char *_edje_var_var_str_get (Edje *ed, Edje_Var *var);
1574 void _edje_var_var_str_set (Edje *ed, Edje_Var *var, const char *str);
1575 int _edje_var_int_get (Edje *ed, int id);
1576 void _edje_var_int_set (Edje *ed, int id, int v);
1577 double _edje_var_float_get (Edje *ed, int id);
1578 void _edje_var_float_set (Edje *ed, int id, double v);
1579 const char *_edje_var_str_get (Edje *ed, int id);
1580 void _edje_var_str_set (Edje *ed, int id, const char *str);
1582 void _edje_var_list_var_append(Edje *ed, int id, Edje_Var *var);
1583 void _edje_var_list_var_prepend(Edje *ed, int id, Edje_Var *var);
1584 void _edje_var_list_var_append_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
1585 void _edje_var_list_var_prepend_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative);
1586 Edje_Var *_edje_var_list_nth(Edje *ed, int id, int n);
1588 int _edje_var_list_count_get(Edje *ed, int id);
1589 void _edje_var_list_remove_nth(Edje *ed, int id, int n);
1591 int _edje_var_list_nth_int_get(Edje *ed, int id, int n);
1592 void _edje_var_list_nth_int_set(Edje *ed, int id, int n, int v);
1593 void _edje_var_list_int_append(Edje *ed, int id, int v);
1594 void _edje_var_list_int_prepend(Edje *ed, int id, int v);
1595 void _edje_var_list_int_insert(Edje *ed, int id, int n, int v);
1597 double _edje_var_list_nth_float_get(Edje *ed, int id, int n);
1598 void _edje_var_list_nth_float_set(Edje *ed, int id, int n, double v);
1599 void _edje_var_list_float_append(Edje *ed, int id, double v);
1600 void _edje_var_list_float_prepend(Edje *ed, int id, double v);
1601 void _edje_var_list_float_insert(Edje *ed, int id, int n, double v);
1603 const char *_edje_var_list_nth_str_get(Edje *ed, int id, int n);
1604 void _edje_var_list_nth_str_set(Edje *ed, int id, int n, const char *v);
1605 void _edje_var_list_str_append(Edje *ed, int id, const char *v);
1606 void _edje_var_list_str_prepend(Edje *ed, int id, const char *v);
1607 void _edje_var_list_str_insert(Edje *ed, int id, int n, const char *v);
1609 int _edje_var_timer_add (Edje *ed, double in, const char *fname, int val);
1610 void _edje_var_timer_del (Edje *ed, int id);
1612 int _edje_var_anim_add (Edje *ed, double len, const char *fname, int val);
1613 void _edje_var_anim_del (Edje *ed, int id);
1615 void _edje_message_init (void);
1616 void _edje_message_shutdown (void);
1617 void _edje_message_cb_set (Edje *ed, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data);
1618 Edje_Message *_edje_message_new (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id);
1619 void _edje_message_free (Edje_Message *em);
1620 void _edje_message_send (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, void *emsg);
1621 void _edje_message_parameters_push (Edje_Message *em);
1622 void _edje_message_process (Edje_Message *em);
1623 void _edje_message_queue_process (void);
1624 void _edje_message_queue_clear (void);
1625 void _edje_message_del (Edje *ed);
1627 void _edje_textblock_styles_add(Edje *ed);
1628 void _edje_textblock_styles_del(Edje *ed);
1629 void _edje_textblock_style_all_update(Edje *ed);
1630 void _edje_textblock_style_parse_and_fix(Edje_File *edf);
1631 void _edje_textblock_style_cleanup(Edje_File *edf);
1632 Edje_File *_edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret);
1633 void _edje_cache_coll_clean(Edje_File *edf);
1634 void _edje_cache_coll_flush(Edje_File *edf);
1635 void _edje_cache_coll_unref(Edje_File *edf, Edje_Part_Collection *edc);
1636 void _edje_cache_file_unref(Edje_File *edf);
1638 void _edje_embryo_globals_init(Edje *ed);
1640 #define CHKPARAM(n) if (params[0] != (sizeof(Embryo_Cell) * (n))) return -1;
1641 #define GETSTR(str, par) { \
1642 Embryo_Cell *___cptr; \
1645 if ((___cptr = embryo_data_address_get(ep, (par)))) { \
1646 ___l = embryo_data_string_length_get(ep, ___cptr); \
1647 if (((str) = alloca(___l + 1))) \
1648 embryo_data_string_get(ep, ___cptr, (str)); } }
1649 #define GETSTREVAS(str, par) { \
1651 if ((par) && (!strcmp((par), (str)))) return 0; \
1652 if ((par)) eina_stringshare_del((par)); \
1653 (par) = (char *)eina_stringshare_add((str)); } \
1654 else (par) = NULL; }
1655 #define GETFLOAT(val, par) { \
1657 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
1660 #define GETFLOAT_T(val, par) \
1663 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \
1665 val = FROM_DOUBLE(*___cptr); \
1669 #define GETINT(val, par) { \
1671 if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
1673 #define SETSTR(str, par) { \
1674 Embryo_Cell *___cptr; \
1675 if ((___cptr = embryo_data_address_get(ep, (par)))) { \
1676 embryo_data_string_set(ep, str, ___cptr); } }
1677 #define SETSTRALLOCATE(s) \
1680 if ((int) strlen((s)) < params[4]) { \
1681 SETSTR((s), params[3]); } \
1684 ss = alloca(strlen((s)) + 1); \
1686 ss[params[4] - 2] = 0; \
1687 SETSTR(ss, params[3]); } } \
1689 SETSTR("", params[3]); \
1691 #define SETFLOAT(val, par) { \
1693 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \
1694 *___cptr = (float)val; } }
1695 #define SETFLOAT_T(val, par) \
1698 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \
1700 *___cptr = (float) TO_DOUBLE(val); \
1703 #define SETINT(val, par) { \
1705 if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \
1706 *___cptr = (int)val; } }
1708 Eina_Bool _edje_script_only(Edje *ed);
1709 void _edje_script_only_init(Edje *ed);
1710 void _edje_script_only_shutdown(Edje *ed);
1711 void _edje_script_only_show(Edje *ed);
1712 void _edje_script_only_hide(Edje *ed);
1713 void _edje_script_only_move(Edje *ed);
1714 void _edje_script_only_resize(Edje *ed);
1715 void _edje_script_only_message(Edje *ed, Edje_Message *em);
1717 extern jmp_buf _edje_lua_panic_jmp;
1718 #define _edje_lua_panic_here() setjmp(_edje_lua_panic_jmp)
1720 lua_State *_edje_lua_state_get();
1721 lua_State *_edje_lua_new_thread(Edje *ed, lua_State *L);
1722 void _edje_lua_free_thread(Edje *ed, lua_State *L);
1723 void _edje_lua_new_reg(lua_State *L, int index, void *ptr);
1724 void _edje_lua_get_reg(lua_State *L, void *ptr);
1725 void _edje_lua_free_reg(lua_State *L, void *ptr);
1726 void _edje_lua_script_fn_new(Edje *ed);
1727 void _edje_lua_group_fn_new(Edje *ed);
1728 void _edje_lua_init();
1729 void _edje_lua_shutdown();
1731 void __edje_lua_error(const char *file, const char *fnc, int line, lua_State *L, int err_code);
1732 #define _edje_lua_error(L, err_code) \
1733 __edje_lua_error(__FILE__, __FUNCTION__, __LINE__, L, err_code)
1735 Eina_Bool _edje_lua_script_only(Edje *ed);
1736 void _edje_lua_script_only_init(Edje *ed);
1737 void _edje_lua_script_only_shutdown(Edje *ed);
1738 void _edje_lua_script_only_show(Edje *ed);
1739 void _edje_lua_script_only_hide(Edje *ed);
1740 void _edje_lua_script_only_move(Edje *ed);
1741 void _edje_lua_script_only_resize(Edje *ed);
1742 void _edje_lua_script_only_message(Edje *ed, Edje_Message *em);
1744 void _edje_entry_init(Edje *ed);
1745 void _edje_entry_shutdown(Edje *ed);
1746 void _edje_entry_real_part_init(Edje_Real_Part *rp);
1747 void _edje_entry_real_part_shutdown(Edje_Real_Part *rp);
1748 void _edje_entry_real_part_configure(Edje_Real_Part *rp);
1749 const char *_edje_entry_selection_get(Edje_Real_Part *rp);
1750 const char *_edje_entry_text_get(Edje_Real_Part *rp);
1751 void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text);
1752 void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text);
1753 void _edje_entry_set_cursor_start(Edje_Real_Part *rp);
1754 void _edje_entry_set_cursor_end(Edje_Real_Part *rp);
1755 void _edje_entry_cursor_copy(Edje_Real_Part *rp, Edje_Cursor cur, Edje_Cursor dst);
1756 void _edje_entry_select_none(Edje_Real_Part *rp);
1757 void _edje_entry_select_all(Edje_Real_Part *rp);
1758 void _edje_entry_select_begin(Edje_Real_Part *rp);
1759 void _edje_entry_select_extend(Edje_Real_Part *rp);
1760 const Eina_List *_edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char *anchor);
1761 const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
1762 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);
1763 const Eina_List *_edje_entry_items_list(Edje_Real_Part *rp);
1764 void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
1765 void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow);
1766 Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp);
1767 void _edje_entry_select_abort(Edje_Real_Part *rp);
1769 Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur);
1770 Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur);
1771 Eina_Bool _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur);
1772 Eina_Bool _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur);
1773 void _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur);
1774 void _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur);
1775 void _edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur);
1776 void _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur);
1777 Eina_Bool _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur, int x, int y);
1778 Eina_Bool _edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
1779 Eina_Bool _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur);
1780 const char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur);
1781 void _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos);
1782 int _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur);
1784 void _edje_external_init();
1785 void _edje_external_shutdown();
1786 Evas_Object *_edje_external_type_add(const char *type_name, Evas *evas, Evas_Object *parent, const Eina_List *params, const char *part_name);
1787 void _edje_external_signal_emit(Evas_Object *obj, const char *emission, const char *source);
1788 Eina_Bool _edje_external_param_set(Evas_Object *obj, Edje_Real_Part *rp, const Edje_External_Param *param) EINA_ARG_NONNULL(1, 2);
1789 Eina_Bool _edje_external_param_get(const Evas_Object *obj, Edje_Real_Part *rp, Edje_External_Param *param) EINA_ARG_NONNULL(1, 2);
1790 Evas_Object *_edje_external_content_get(const Evas_Object *obj, const char *content) EINA_ARG_NONNULL(1, 2);
1791 void _edje_external_params_free(Eina_List *params, Eina_Bool free_strings);
1792 void _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep,
1793 Edje_Calc_Params *params,
1794 Edje_Part_Description_Common *chosen_desc);
1795 void *_edje_external_params_parse(Evas_Object *obj, const Eina_List *params);
1796 void _edje_external_parsed_params_free(Evas_Object *obj, void *params);
1798 EAPI void _edje_module_init();
1799 EAPI void _edje_module_shutdown();
1801 static inline Eina_Bool
1802 edje_program_is_strncmp(const char *str)
1806 length = strlen(str);
1808 if (strpbrk(str, "*?[\\") != str + length)
1810 if (str[length] == '['
1811 || str[length] == '\\')
1816 static inline Eina_Bool
1817 edje_program_is_strrncmp(const char *str)
1819 if (*str != '*' && *str != '?')
1821 if (strpbrk(str + 1, "*?[\\"))
1826 EAPI void _edje_program_insert(Edje_Part_Collection *ed, Edje_Program *p);
1827 EAPI void _edje_program_remove(Edje_Part_Collection *ed, Edje_Program *p);
1829 void _edje_lua2_error_full(const char *file, const char *fnc, int line, lua_State *L, int err_code);
1830 #define _edje_lua2_error(L, err_code) _edje_lua2_error_full(__FILE__, __FUNCTION__, __LINE__, L, err_code)
1831 void _edje_lua2_script_init(Edje *ed);
1832 void _edje_lua2_script_shutdown(Edje *ed);
1833 void _edje_lua2_script_load(Edje_Part_Collection *edc, void *data, int size);
1834 void _edje_lua2_script_unload(Edje_Part_Collection *edc);
1836 void _edje_lua2_script_func_shutdown(Edje *ed);
1837 void _edje_lua2_script_func_show(Edje *ed);
1838 void _edje_lua2_script_func_hide(Edje *ed);
1839 void _edje_lua2_script_func_move(Edje *ed);
1840 void _edje_lua2_script_func_resize(Edje *ed);
1841 void _edje_lua2_script_func_message(Edje *ed, Edje_Message *em);
1842 void _edje_lua2_script_func_signal(Edje *ed, const char *sig, const char *src);
1844 const char *edje_string_get(const Edje_String *es);
1845 const char *edje_string_id_get(const Edje_String *es);
1847 void _edje_object_orientation_inform(Evas_Object *obj);