src/lib/edje_private.h
Go to the documentation of this file.
00001 #ifndef _EDJE_PRIVATE_H 00002 #define _EDJE_PRIVATE_H 00003 00004 #ifdef HAVE_CONFIG_H 00005 # include <config.h> 00006 #endif 00007 00008 #ifndef _WIN32 00009 # define _GNU_SOURCE 00010 #endif 00011 00012 #ifdef STDC_HEADERS 00013 # include <stdlib.h> 00014 # include <stddef.h> 00015 #else 00016 # ifdef HAVE_STDLIB_H 00017 # include <stdlib.h> 00018 # endif 00019 #endif 00020 #ifdef HAVE_ALLOCA_H 00021 # include <alloca.h> 00022 #elif !defined alloca 00023 # ifdef __GNUC__ 00024 # define alloca __builtin_alloca 00025 # elif defined _AIX 00026 # define alloca __alloca 00027 # elif defined _MSC_VER 00028 # include <malloc.h> 00029 # define alloca _alloca 00030 # elif !defined HAVE_ALLOCA 00031 # ifdef __cplusplus 00032 extern "C" 00033 # endif 00034 void *alloca (size_t); 00035 # endif 00036 #endif 00037 00038 #include <string.h> 00039 #include <limits.h> 00040 #include <sys/stat.h> 00041 #include <time.h> 00042 #include <sys/time.h> 00043 #include <errno.h> 00044 00045 #ifndef _MSC_VER 00046 # include <libgen.h> 00047 # include <unistd.h> 00048 #endif 00049 00050 #include <fcntl.h> 00051 00052 #include <lua.h> 00053 #include <lualib.h> 00054 #include <lauxlib.h> 00055 #include <setjmp.h> 00056 00057 #ifdef HAVE_LOCALE_H 00058 # include <locale.h> 00059 #endif 00060 00061 #ifdef HAVE_EVIL 00062 # include <Evil.h> 00063 #endif 00064 00065 #include <Eina.h> 00066 #include <Eet.h> 00067 #include <Evas.h> 00068 #include <Ecore.h> 00069 #include <Ecore_Evas.h> 00070 #include <Ecore_File.h> 00071 #include <Ecore_Input.h> 00072 #ifdef HAVE_ECORE_IMF 00073 # include <Ecore_IMF.h> 00074 # include <Ecore_IMF_Evas.h> 00075 #endif 00076 #include <Embryo.h> 00077 00078 #ifdef HAVE_EIO 00079 # include <Eio.h> 00080 #endif 00081 00082 #include "Edje.h" 00083 00084 EAPI extern int _edje_default_log_dom ; 00085 00086 #ifdef EDJE_DEFAULT_LOG_COLOR 00087 # undef EDJE_DEFAULT_LOG_COLOR 00088 #endif 00089 #define EDJE_DEFAULT_LOG_COLOR EINA_COLOR_CYAN 00090 #ifdef ERR 00091 # undef ERR 00092 #endif 00093 #define ERR(...) EINA_LOG_DOM_ERR(_edje_default_log_dom, __VA_ARGS__) 00094 #ifdef INF 00095 # undef INF 00096 #endif 00097 #define INF(...) EINA_LOG_DOM_INFO(_edje_default_log_dom, __VA_ARGS__) 00098 #ifdef WRN 00099 # undef WRN 00100 #endif 00101 #define WRN(...) EINA_LOG_DOM_WARN(_edje_default_log_dom, __VA_ARGS__) 00102 #ifdef CRIT 00103 # undef CRIT 00104 #endif 00105 #define CRIT(...) EINA_LOG_DOM_CRIT(_edje_default_log_dom, __VA_ARGS__) 00106 #ifdef DBG 00107 # undef DBG 00108 #endif 00109 #define DBG(...) EINA_LOG_DOM_DBG(_edje_default_log_dom, __VA_ARGS__) 00110 #ifdef __GNUC__ 00111 # if __GNUC__ >= 4 00112 // BROKEN in gcc 4 on amd64 00113 //# pragma GCC visibility push(hidden) 00114 # endif 00115 #endif 00116 00117 #ifndef ABS 00118 #define ABS(x) ((x) < 0 ? -(x) : (x)) 00119 #endif 00120 00121 #ifndef CLAMP 00122 #define CLAMP(x, min, max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x))) 00123 #endif 00124 00125 #ifndef MIN 00126 #define MIN(a, b) (((a) < (b)) ? (a) : (b)) 00127 #endif 00128 00129 00130 #ifdef BUILD_EDJE_FP 00131 00132 #define FLOAT_T Eina_F32p32 00133 #define EDJE_T_FLOAT EET_T_F32P32 00134 #define MUL(a, b) eina_f32p32_mul(a, b) 00135 #define SCALE(a, b) eina_f32p32_scale(a, b) 00136 #define DIV(a, b) eina_f32p32_div(a, b) 00137 #define DIV2(a) ((a) >> 1) 00138 #define ADD(a, b) eina_f32p32_add(a, b) 00139 #define SUB(a, b) eina_f32p32_sub(a, b) 00140 #define SQRT(a) eina_f32p32_sqrt(a) 00141 #define TO_DOUBLE(a) eina_f32p32_double_to(a) 00142 #define FROM_DOUBLE(a) eina_f32p32_double_from(a) 00143 #define FROM_INT(a) eina_f32p32_int_from(a) 00144 #define TO_INT(a) eina_f32p32_int_to(a) 00145 #define ZERO 0 00146 #define COS(a) eina_f32p32_cos(a) 00147 #define SIN(a) eina_f32p32_sin(a) 00148 #define PI EINA_F32P32_PI 00149 00150 #else 00151 00152 #define FLOAT_T double 00153 #define EDJE_T_FLOAT EET_T_DOUBLE 00154 #define MUL(a, b) ((a) * (b)) 00155 #define SCALE(a, b) ((a) * (double)(b)) 00156 #define DIV(a, b) ((a) / (b)) 00157 #define DIV2(a) ((a) / 2.0) 00158 #define ADD(a, b) ((a) + (b)) 00159 #define SUB(a, b) ((a) - (b)) 00160 #define SQRT(a) sqrt(a) 00161 #define TO_DOUBLE(a) (double)(a) 00162 #define FROM_DOUBLE(a) (a) 00163 #define FROM_INT(a) (double)(a) 00164 #define TO_INT(a) (int)(a) 00165 #define ZERO 0.0 00166 #define COS(a) cos(a) 00167 #define SIN(a) sin(a) 00168 #define PI 3.14159265358979323846 00169 00170 #endif 00171 00172 /* Inheritable Edje Smart API. For now private so only Edje Edit makes 00173 * use of this, but who knows what will be possible in the future */ 00174 #define EDJE_SMART_API_VERSION 1 00175 00176 typedef struct _Edje_Smart_Api Edje_Smart_Api; 00177 00178 struct _Edje_Smart_Api 00179 { 00180 Evas_Smart_Class base; 00181 int version; 00182 Eina_Bool (*file_set)(Evas_Object *obj, const char *file, const char *group); 00183 }; 00184 00185 /* Basic macro to init the Edje Smart API */ 00186 #define EDJE_SMART_API_INIT(smart_class_init) {smart_class_init, EDJE_SMART_API_VERSION, NULL} 00187 00188 #define EDJE_SMART_API_INIT_NULL EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NULL) 00189 #define EDJE_SMART_API_INIT_VERSION EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_VERSION) 00190 #define EDJE_SMART_API_INIT_NAME_VERSION(name) EDJE_SMART_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name)) 00191 00192 /* increment this when the EET data descriptors have changed and old 00193 * EETs cannot be loaded/used correctly anymore. 00194 */ 00195 #define EDJE_FILE_VERSION 3 00196 /* increment this when you add new feature to edje file format without 00197 * breaking backward compatibility. 00198 */ 00199 #define EDJE_FILE_MINOR 4 00200 00201 /* FIXME: 00202 * 00203 * More example Edje files 00204 * 00205 * ? programs can do multiple actions from one signal 00206 * ? add containering (hbox, vbox, table, wrapping multi-line hbox & vbox) 00207 * ? text entry widget (single line only) 00208 * 00209 * ? recursions, unsafe callbacks outside Edje etc. with freeze, ref/unref and block/unblock and break_programs needs to be redesigned & fixed 00210 * ? all unsafe calls that may result in callbacks must be marked and dealt with 00211 */ 00212 00213 typedef enum 00214 { 00215 EDJE_ASPECT_PREFER_NONE, 00216 EDJE_ASPECT_PREFER_VERTICAL, 00217 EDJE_ASPECT_PREFER_HORIZONTAL, 00218 EDJE_ASPECT_PREFER_BOTH, 00219 EDJE_ASPECT_PREFER_SOURCE 00220 } Edje_Internal_Aspect; 00221 00222 struct _Edje_Perspective 00223 { 00224 Evas_Object *obj; 00225 Evas *e; 00226 Evas_Coord px, py, z0, foc; 00227 Eina_List *users; 00228 Eina_Bool global : 1; 00229 }; 00230 00231 struct _Edje_Position_Scale 00232 { 00233 FLOAT_T x, y; 00234 }; 00235 00236 struct _Edje_Position 00237 { 00238 int x, y; 00239 }; 00240 00241 struct _Edje_Size 00242 { 00243 int w, h; 00244 Eina_Bool limit; /* should we limit ourself to the size of the source */ 00245 }; 00246 00247 struct _Edje_Rectangle 00248 { 00249 int x, y, w, h; 00250 }; 00251 00252 struct _Edje_Color 00253 { 00254 unsigned char r, g, b, a; 00255 }; 00256 00257 struct _Edje_Aspect_Prefer 00258 { 00259 FLOAT_T min, max; 00260 char prefer; 00261 }; 00262 00263 struct _Edje_Aspect 00264 { 00265 int w, h; 00266 Edje_Aspect_Control mode; 00267 }; 00268 00269 struct _Edje_String 00270 { 00271 const char *str; 00272 unsigned int id; 00273 }; 00274 00275 typedef struct _Edje_Position_Scale Edje_Alignment; 00276 typedef struct _Edje_Position_Scale Edje_Position_Scale; 00277 typedef struct _Edje_Position Edje_Position; 00278 typedef struct _Edje_Size Edje_Size; 00279 typedef struct _Edje_Rectangle Edje_Rectangle; 00280 typedef struct _Edje_Color Edje_Color; 00281 typedef struct _Edje_Aspect_Prefer Edje_Aspect_Prefer; 00282 typedef struct _Edje_Aspect Edje_Aspect; 00283 typedef struct _Edje_String Edje_String; 00284 00285 typedef struct _Edje_File Edje_File; 00286 typedef struct _Edje_Style Edje_Style; 00287 typedef struct _Edje_Style_Tag Edje_Style_Tag; 00288 typedef struct _Edje_External_Directory Edje_External_Directory; 00289 typedef struct _Edje_External_Directory_Entry Edje_External_Directory_Entry; 00290 typedef struct _Edje_Font_Directory_Entry Edje_Font_Directory_Entry; 00291 typedef struct _Edje_Image_Directory Edje_Image_Directory; 00292 typedef struct _Edje_Image_Directory_Entry Edje_Image_Directory_Entry; 00293 typedef struct _Edje_Image_Directory_Set Edje_Image_Directory_Set; 00294 typedef struct _Edje_Image_Directory_Set_Entry Edje_Image_Directory_Set_Entry; 00295 typedef struct _Edje_Limit Edje_Limit; 00296 typedef struct _Edje_Sound_Sample Edje_Sound_Sample; 00297 typedef struct _Edje_Sound_Tone Edje_Sound_Tone; 00298 typedef struct _Edje_Sound_Directory Edje_Sound_Directory; 00299 typedef struct _Edje_Program Edje_Program; 00300 typedef struct _Edje_Program_Target Edje_Program_Target; 00301 typedef struct _Edje_Program_After Edje_Program_After; 00302 typedef struct _Edje_Part_Collection_Directory_Entry Edje_Part_Collection_Directory_Entry; 00303 typedef struct _Edje_Pack_Element Edje_Pack_Element; 00304 typedef struct _Edje_Part_Collection Edje_Part_Collection; 00305 typedef struct _Edje_Part Edje_Part; 00306 typedef struct _Edje_Part_Api Edje_Part_Api; 00307 typedef struct _Edje_Part_Dragable Edje_Part_Dragable; 00308 typedef struct _Edje_Part_Image_Id Edje_Part_Image_Id; 00309 typedef struct _Edje_Part_Description_Image Edje_Part_Description_Image; 00310 typedef struct _Edje_Part_Description_Proxy Edje_Part_Description_Proxy; 00311 typedef struct _Edje_Part_Description_Text Edje_Part_Description_Text; 00312 typedef struct _Edje_Part_Description_Box Edje_Part_Description_Box; 00313 typedef struct _Edje_Part_Description_Table Edje_Part_Description_Table; 00314 typedef struct _Edje_Part_Description_External Edje_Part_Description_External; 00315 typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common; 00316 typedef struct _Edje_Part_Description_Spec_Fill Edje_Part_Description_Spec_Fill; 00317 typedef struct _Edje_Part_Description_Spec_Border Edje_Part_Description_Spec_Border; 00318 typedef struct _Edje_Part_Description_Spec_Image Edje_Part_Description_Spec_Image; 00319 typedef struct _Edje_Part_Description_Spec_Proxy Edje_Part_Description_Spec_Proxy; 00320 typedef struct _Edje_Part_Description_Spec_Text Edje_Part_Description_Spec_Text; 00321 typedef struct _Edje_Part_Description_Spec_Box Edje_Part_Description_Spec_Box; 00322 typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_Table; 00323 typedef struct _Edje_Patterns Edje_Patterns; 00324 typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation; 00325 typedef struct _Edje_Part_Limit Edje_Part_Limit; 00326 00327 typedef struct _Edje Edje; 00328 typedef struct _Edje_Real_Part_State Edje_Real_Part_State; 00329 typedef struct _Edje_Real_Part_Drag Edje_Real_Part_Drag; 00330 typedef struct _Edje_Real_Part_Set Edje_Real_Part_Set; 00331 typedef struct _Edje_Real_Part Edje_Real_Part; 00332 typedef struct _Edje_Running_Program Edje_Running_Program; 00333 typedef struct _Edje_Signal_Callback Edje_Signal_Callback; 00334 typedef struct _Edje_Calc_Params Edje_Calc_Params; 00335 typedef struct _Edje_Pending_Program Edje_Pending_Program; 00336 typedef struct _Edje_Text_Style Edje_Text_Style; 00337 typedef struct _Edje_Color_Class Edje_Color_Class; 00338 typedef struct _Edje_Text_Class Edje_Text_Class; 00339 typedef struct _Edje_Var Edje_Var; 00340 typedef struct _Edje_Var_Int Edje_Var_Int; 00341 typedef struct _Edje_Var_Float Edje_Var_Float; 00342 typedef struct _Edje_Var_String Edje_Var_String; 00343 typedef struct _Edje_Var_List Edje_Var_List; 00344 typedef struct _Edje_Var_Hash Edje_Var_Hash; 00345 typedef struct _Edje_Var_Animator Edje_Var_Animator; 00346 typedef struct _Edje_Var_Timer Edje_Var_Timer; 00347 typedef struct _Edje_Var_Pool Edje_Var_Pool; 00348 typedef struct _Edje_Signal_Source_Char Edje_Signal_Source_Char; 00349 typedef struct _Edje_Text_Insert_Filter_Callback Edje_Text_Insert_Filter_Callback; 00350 typedef struct _Edje_Markup_Filter_Callback Edje_Markup_Filter_Callback; 00351 00352 #define EDJE_INF_MAX_W 100000 00353 #define EDJE_INF_MAX_H 100000 00354 00355 #define EDJE_IMAGE_SOURCE_TYPE_NONE 0 00356 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_PERFECT 1 00357 #define EDJE_IMAGE_SOURCE_TYPE_INLINE_LOSSY 2 00358 #define EDJE_IMAGE_SOURCE_TYPE_EXTERNAL 3 00359 #define EDJE_IMAGE_SOURCE_TYPE_LAST 4 00360 00361 #define EDJE_SOUND_SOURCE_TYPE_NONE 0 00362 #define EDJE_SOUND_SOURCE_TYPE_INLINE_RAW 1 00363 #define EDJE_SOUND_SOURCE_TYPE_INLINE_COMP 2 00364 #define EDJE_SOUND_SOURCE_TYPE_INLINE_LOSSY 3 00365 #define EDJE_SOUND_SOURCE_TYPE_INLINE_AS_IS 4 00366 00367 #define EDJE_VAR_NONE 0 00368 #define EDJE_VAR_INT 1 00369 #define EDJE_VAR_FLOAT 2 00370 #define EDJE_VAR_STRING 3 00371 #define EDJE_VAR_LIST 4 00372 #define EDJE_VAR_HASH 5 00373 00374 #define EDJE_VAR_MAGIC_BASE 0x12fe84ba 00375 00376 #define EDJE_STATE_PARAM_NONE 0 00377 #define EDJE_STATE_PARAM_ALIGNMENT 1 00378 #define EDJE_STATE_PARAM_MIN 2 00379 #define EDJE_STATE_PARAM_MAX 3 00380 #define EDJE_STATE_PARAM_STEP 4 00381 #define EDJE_STATE_PARAM_ASPECT 5 00382 #define EDJE_STATE_PARAM_ASPECT_PREF 6 00383 #define EDJE_STATE_PARAM_COLOR 7 00384 #define EDJE_STATE_PARAM_COLOR2 8 00385 #define EDJE_STATE_PARAM_COLOR3 9 00386 #define EDJE_STATE_PARAM_COLOR_CLASS 10 00387 #define EDJE_STATE_PARAM_REL1 11 00388 #define EDJE_STATE_PARAM_REL1_TO 12 00389 #define EDJE_STATE_PARAM_REL1_OFFSET 13 00390 #define EDJE_STATE_PARAM_REL2 14 00391 #define EDJE_STATE_PARAM_REL2_TO 15 00392 #define EDJE_STATE_PARAM_REL2_OFFSET 16 00393 #define EDJE_STATE_PARAM_IMAGE 17 00394 #define EDJE_STATE_PARAM_BORDER 18 00395 #define EDJE_STATE_PARAM_FILL_SMOOTH 19 00396 #define EDJE_STATE_PARAM_FILL_POS 20 00397 #define EDJE_STATE_PARAM_FILL_SIZE 21 00398 #define EDJE_STATE_PARAM_TEXT 22 00399 #define EDJE_STATE_PARAM_TEXT_CLASS 23 00400 #define EDJE_STATE_PARAM_TEXT_FONT 24 00401 #define EDJE_STATE_PARAM_TEXT_STYLE 25 00402 #define EDJE_STATE_PARAM_TEXT_SIZE 26 00403 #define EDJE_STATE_PARAM_TEXT_FIT 27 00404 #define EDJE_STATE_PARAM_TEXT_MIN 28 00405 #define EDJE_STATE_PARAM_TEXT_MAX 29 00406 #define EDJE_STATE_PARAM_TEXT_ALIGN 30 00407 #define EDJE_STATE_PARAM_VISIBLE 31 00408 #define EDJE_STATE_PARAM_MAP_OM 32 00409 #define EDJE_STATE_PARAM_MAP_PERSP 33 00410 #define EDJE_STATE_PARAM_MAP_LIGNT 34 00411 #define EDJE_STATE_PARAM_MAP_ROT_CENTER 35 00412 #define EDJE_STATE_PARAM_MAP_ROT_X 36 00413 #define EDJE_STATE_PARAM_MAP_ROT_Y 37 00414 #define EDJE_STATE_PARAM_MAP_ROT_Z 38 00415 #define EDJE_STATE_PARAM_MAP_BACK_CULL 39 00416 #define EDJE_STATE_PARAM_MAP_PERSP_ON 40 00417 #define EDJE_STATE_PARAM_PERSP_ZPLANE 41 00418 #define EDJE_STATE_PARAM_PERSP_FOCAL 42 00419 #define EDJE_STATE_PARAM_LAST 43 00420 00421 #define EDJE_ENTRY_EDIT_MODE_NONE 0 00422 #define EDJE_ENTRY_EDIT_MODE_SELECTABLE 1 00423 #define EDJE_ENTRY_EDIT_MODE_EDITABLE 2 00424 #define EDJE_ENTRY_EDIT_MODE_PASSWORD 3 00425 00426 #define EDJE_ENTRY_SELECTION_MODE_DEFAULT 0 00427 #define EDJE_ENTRY_SELECTION_MODE_EXPLICIT 1 00428 00429 #define EDJE_ENTRY_CURSOR_MODE_UNDER 0 00430 #define EDJE_ENTRY_CURSOR_MODE_BEFORE 1 00431 00432 #define EDJE_ORIENTATION_AUTO 0 00433 #define EDJE_ORIENTATION_LTR 1 00434 #define EDJE_ORIENTATION_RTL 2 00435 00436 #define EDJE_PART_PATH_SEPARATOR ':' 00437 #define EDJE_PART_PATH_SEPARATOR_STRING ":" 00438 #define EDJE_PART_PATH_SEPARATOR_INDEXL '[' 00439 #define EDJE_PART_PATH_SEPARATOR_INDEXR ']' 00440 00441 #define FLAG_NONE 0 00442 #define FLAG_X 0x01 00443 #define FLAG_Y 0x02 00444 #define FLAG_XY (FLAG_X | FLAG_Y) 00445 00446 /*----------*/ 00447 00448 struct _Edje_File 00449 { 00450 const char *path; 00451 time_t mtime; 00452 00453 Edje_External_Directory *external_dir; 00454 Edje_Image_Directory *image_dir; 00455 Edje_Sound_Directory *sound_dir; 00456 Eina_List *styles; 00457 00458 Eina_List *color_classes; 00459 Eina_Hash *color_hash; 00460 00461 int references; 00462 const char *compiler; 00463 int version; 00464 int minor; 00465 int feature_ver; 00466 00467 Eina_Hash *data; 00468 Eina_Hash *fonts; 00469 00470 Eina_Hash *collection; 00471 Eina_List *collection_cache; 00472 00473 Edje_Patterns *collection_patterns; 00474 00475 Eet_File *ef; 00476 00477 #ifdef HAVE_EIO 00478 Eio_Monitor *monitor; 00479 Eina_List *edjes; 00480 Eina_List *handlers; 00481 Ecore_Timer *timeout; 00482 #endif 00483 00484 unsigned char free_strings : 1; 00485 unsigned char dangling : 1; 00486 unsigned char warning : 1; 00487 }; 00488 00489 struct _Edje_Style 00490 { 00491 char *name; 00492 Eina_List *tags; 00493 Evas_Textblock_Style *style; 00494 }; 00495 00496 struct _Edje_Style_Tag 00497 { 00498 const char *key; 00499 const char *value; 00500 const char *font; 00501 double font_size; 00502 const char *text_class; 00503 }; 00504 00505 /*----------*/ 00506 00507 00508 struct _Edje_Font_Directory_Entry 00509 { 00510 const char *entry; /* the name of the font */ 00511 const char *file; /* the name of the file */ 00512 }; 00513 00514 /*----------*/ 00515 00516 struct _Edje_External_Directory 00517 { 00518 Edje_External_Directory_Entry *entries; /* a list of Edje_External_Directory_Entry */ 00519 unsigned int entries_count; 00520 }; 00521 00522 struct _Edje_External_Directory_Entry 00523 { 00524 const char *entry; /* the name of the external */ 00525 }; 00526 00527 00528 /*----------*/ 00529 00530 00531 00532 /*----------*/ 00533 00534 struct _Edje_Image_Directory 00535 { 00536 Edje_Image_Directory_Entry *entries; /* an array of Edje_Image_Directory_Entry */ 00537 unsigned int entries_count; 00538 00539 Edje_Image_Directory_Set *sets; 00540 unsigned int sets_count; /* an array of Edje_Image_Directory_Set */ 00541 }; 00542 00543 struct _Edje_Image_Directory_Entry 00544 { 00545 const char *entry; /* the nominal name of the image - if any */ 00546 int source_type; /* alternate source mode. 0 = none */ 00547 int source_param; /* extra params on encoding */ 00548 int id; /* the id no. of the image */ 00549 }; 00550 00551 struct _Edje_Image_Directory_Set 00552 { 00553 char *name; 00554 Eina_List *entries; 00555 00556 int id; 00557 }; 00558 00559 struct _Edje_Image_Directory_Set_Entry 00560 { 00561 const char *name; 00562 int id; 00563 00564 struct { 00565 struct { 00566 int w; 00567 int h; 00568 } min, max; 00569 } size; 00570 }; 00571 00572 struct _Edje_Sound_Sample /*Sound Sample*/ 00573 { 00574 const char *name; /* the nominal name of the sound */ 00575 const char *snd_src; /* Sound source Wav file */ 00576 int compression; /* Compression - RAW, LOSSLESS COMP , LOSSY ) */ 00577 int mode; /* alternate source mode. 0 = none */ 00578 double quality; 00579 int id; /* the id no. of the sound */ 00580 }; 00581 00582 struct _Edje_Sound_Tone /*Sound Sample*/ 00583 { 00584 const char *name; /* the nominal name of the sound - if any */ 00585 int value; /* alternate source mode. 0 = none */ 00586 int id; /* the id no. of the sound */ 00587 }; 00588 00589 struct _Edje_Sound_Directory 00590 { 00591 00592 Edje_Sound_Sample *samples; /* an array of Edje_Sound_Sample entries */ 00593 unsigned int samples_count; 00594 00595 Edje_Sound_Tone *tones; /* an array of Edje_Sound_Tone entries */ 00596 unsigned int tones_count; 00597 }; 00598 00599 /*----------*/ 00600 00601 struct _Edje_Program /* a conditional program to be run */ 00602 { 00603 int id; /* id of program */ 00604 const char *name; /* name of the action */ 00605 00606 const char *signal; /* if signal emission name matches the glob here... */ 00607 const char *source; /* if part that emitted this (name) matches this glob */ 00608 const char *sample_name; 00609 const char *tone_name; 00610 double duration; 00611 double speed; 00612 00613 struct { 00614 const char *part; 00615 const char *state; /* if state is not set, we will try with source */ 00616 } filter; /* the part filter.part should be in state filter.state for signal to be accepted */ 00617 00618 struct { 00619 double from; 00620 double range; 00621 } in; 00622 00623 int action; /* type - set state, stop action, set drag pos etc. */ 00624 const char *state; /* what state of alternates to apply, NULL = default */ 00625 const char *state2; /* what other state to use - for signal emit action */ 00626 double value; /* value of state to apply (if multiple names match) */ 00627 double value2; /* other value for drag actions */ 00628 00629 struct { 00630 int mode; /* how to tween - linear, sinusoidal etc. */ 00631 FLOAT_T time; /* time to graduate between current and new state */ 00632 FLOAT_T v1; /* other value for drag actions */ 00633 FLOAT_T v2; /* other value for drag actions */ 00634 } tween; 00635 00636 Eina_List *targets; /* list of target parts to apply the state to */ 00637 00638 Eina_List *after; /* list of actions to run at the end of this, for looping */ 00639 00640 struct { 00641 const char *name; 00642 const char *description; 00643 } api; 00644 00645 /* used for PARAM_COPY (param names in state and state2 above!) */ 00646 struct { 00647 int src; /* part where parameter is being retrieved */ 00648 int dst; /* part where parameter is being stored */ 00649 } param; 00650 00651 Eina_Bool exec : 1; 00652 }; 00653 00654 struct _Edje_Program_Target /* the target of an action */ 00655 { 00656 int id; /* just the part id no, or action id no */ 00657 }; 00658 00659 struct _Edje_Program_After /* the action to run after another action */ 00660 { 00661 int id; 00662 }; 00663 00664 /*----------*/ 00665 struct _Edje_Limit 00666 { 00667 const char *name; 00668 int value; 00669 }; 00670 00671 /*----------*/ 00672 #define PART_TYPE_FIELDS(TYPE) \ 00673 TYPE RECTANGLE; \ 00674 TYPE TEXT; \ 00675 TYPE IMAGE; \ 00676 TYPE PROXY; \ 00677 TYPE SWALLOW; \ 00678 TYPE TEXTBLOCK; \ 00679 TYPE GROUP; \ 00680 TYPE BOX; \ 00681 TYPE TABLE; \ 00682 TYPE SPACER; \ 00683 TYPE EXTERNAL; 00684 00685 struct _Edje_Part_Collection_Directory_Entry 00686 { 00687 const char *entry; /* the nominal name of the part collection */ 00688 int id; /* the id of this named part collection */ 00689 00690 struct 00691 { 00692 PART_TYPE_FIELDS(int) 00693 int part; 00694 } count; 00695 00696 struct 00697 { 00698 PART_TYPE_FIELDS(Eina_Mempool *) 00699 Eina_Mempool *part; 00700 } mp; 00701 00702 struct 00703 { 00704 PART_TYPE_FIELDS(Eina_Mempool *) 00705 } mp_rtl; /* For Right To Left interface */ 00706 00707 Edje_Part_Collection *ref; 00708 }; 00709 00710 /*----------*/ 00711 00712 /*----------*/ 00713 00714 struct _Edje_Pack_Element 00715 { 00716 unsigned char type; /* only GROUP supported for now */ 00717 Edje_Real_Part *parent; /* pointer to the table/box that hold it, set at runtime */ 00718 const char *name; /* if != NULL, will be set with evas_object_name_set */ 00719 const char *source; /* group name to use as source for this element */ 00720 Edje_Size min, prefer, max; 00721 struct { 00722 int l, r, t, b; 00723 } padding; 00724 Edje_Alignment align; 00725 Edje_Alignment weight; 00726 Edje_Aspect aspect; 00727 const char *options; /* extra options for custom objects */ 00728 /* table specific follows */ 00729 int col, row; 00730 unsigned short colspan, rowspan; 00731 }; 00732 00733 typedef enum { 00734 EDJE_PART_LIMIT_UNKNOWN = 0, 00735 EDJE_PART_LIMIT_BELOW, 00736 EDJE_PART_LIMIT_ZERO, 00737 EDJE_PART_LIMIT_OVER 00738 } Edje_Part_Limit_State; 00739 00740 struct _Edje_Part_Limit 00741 { 00742 int part; 00743 00744 Edje_Part_Limit_State width; /* -1, 0 or 1 */ 00745 Edje_Part_Limit_State height; /* -1, 0, or 1 */ 00746 }; 00747 00748 /*----------*/ 00749 00750 struct _Edje_Part_Collection 00751 { 00752 struct { /* list of Edje_Program */ 00753 Edje_Program **fnmatch; /* complex match with "*?[\" */ 00754 unsigned int fnmatch_count; 00755 00756 Edje_Program **strcmp; /* No special caractere, plain strcmp does the work */ 00757 unsigned int strcmp_count; 00758 00759 Edje_Program **strncmp; /* Finish by * or ?, plain strncmp does the work */ 00760 unsigned int strncmp_count; 00761 00762 Edje_Program **strrncmp; /* Start with * or ?, reverse strncmp will do the job */ 00763 unsigned int strrncmp_count; 00764 00765 Edje_Program **nocmp; /* Empty signal/source that will never match */ 00766 unsigned int nocmp_count; 00767 } programs; 00768 00769 struct { /* list of limit that need to be monitored */ 00770 Edje_Limit **vertical; 00771 unsigned int vertical_count; 00772 00773 Edje_Limit **horizontal; 00774 unsigned int horizontal_count; 00775 00776 Edje_Part_Limit *parts; 00777 unsigned int parts_count; 00778 } limits; 00779 00780 Edje_Part **parts; /* an array of Edje_Part */ 00781 unsigned int parts_count; 00782 00783 Eina_Hash *data; 00784 00785 int id; /* the collection id */ 00786 00787 Eina_Hash *alias; /* aliasing part */ 00788 Eina_Hash *aliased; /* invert match of alias */ 00789 00790 struct { 00791 Edje_Size min, max; 00792 unsigned char orientation; 00793 } prop; 00794 00795 int references; 00796 00797 #ifdef EDJE_PROGRAM_CACHE 00798 struct { 00799 Eina_Hash *no_matches; 00800 Eina_Hash *matches; 00801 } prog_cache; 00802 #endif 00803 00804 Embryo_Program *script; /* all the embryo script code for this group */ 00805 const char *part; 00806 00807 unsigned char script_only; 00808 00809 unsigned char lua_script_only; 00810 00811 unsigned char broadcast_signal; 00812 00813 unsigned char checked : 1; 00814 }; 00815 00816 struct _Edje_Part_Dragable 00817 { 00818 int step_x; /* drag jumps n pixels (0 = no limit) */ 00819 int step_y; /* drag jumps n pixels (0 = no limit) */ 00820 00821 int count_x; /* drag area divided by n (0 = no limit) */ 00822 int count_y; /* drag area divided by n (0 = no limit) */ 00823 00824 int confine_id; /* dragging within this bit, -1 = no */ 00825 00826 /* davinchi */ 00827 int event_id; /* If it is used as scrollbar */ 00828 00829 signed char x; /* can u click & drag this bit in x dir */ 00830 signed char y; /* can u click & drag this bit in y dir */ 00831 }; 00832 00833 struct _Edje_Part_Api 00834 { 00835 const char *name; 00836 const char *description; 00837 }; 00838 00839 typedef struct _Edje_Part_Description_List Edje_Part_Description_List; 00840 struct _Edje_Part_Description_List 00841 { 00842 Edje_Part_Description_Common **desc; 00843 Edje_Part_Description_Common **desc_rtl; /* desc for Right To Left interface */ 00844 unsigned int desc_count; 00845 }; 00846 00847 struct _Edje_Part 00848 { 00849 const char *name; /* the name if any of the part */ 00850 Edje_Part_Description_Common *default_desc; /* the part descriptor for default */ 00851 Edje_Part_Description_Common *default_desc_rtl; /* default desc for Right To Left interface */ 00852 00853 Edje_Part_Description_List other; /* other possible descriptors */ 00854 00855 const char *source, *source2, *source3, *source4, *source5, *source6; 00856 int id; /* its id number */ 00857 int clip_to_id; /* the part id to clip this one to */ 00858 Edje_Part_Dragable dragable; 00859 Edje_Pack_Element **items; /* packed items for box and table */ 00860 unsigned int items_count; 00861 unsigned char type; /* what type (image, rect, text) */ 00862 unsigned char effect; /* 0 = plain... */ 00863 unsigned char mouse_events; /* it will affect/respond to mouse events */ 00864 unsigned char repeat_events; /* it will repeat events to objects below */ 00865 Evas_Event_Flags ignore_flags; 00866 unsigned char scale; /* should certain properties scale with edje scale factor? */ 00867 unsigned char precise_is_inside; 00868 unsigned char use_alternate_font_metrics; 00869 unsigned char pointer_mode; 00870 unsigned char entry_mode; 00871 unsigned char select_mode; 00872 unsigned char cursor_mode; 00873 unsigned char multiline; 00874 unsigned char access; /* it will be used accessibility feature */ 00875 Edje_Part_Api api; 00876 }; 00877 00878 struct _Edje_Part_Image_Id 00879 { 00880 int id; 00881 Eina_Bool set; 00882 }; 00883 00884 struct _Edje_Part_Description_Common 00885 { 00886 struct { 00887 double value; /* the value of the state (for ranges) */ 00888 const char *name; /* the named state if any */ 00889 } state; 00890 00891 Edje_Alignment align; /* 0 <-> 1.0 alignment within allocated space */ 00892 00893 struct { 00894 unsigned char w, h; /* width or height is fixed in side (cannot expand with Edje object size) */ 00895 } fixed; 00896 00897 struct { // only during recalc 00898 unsigned char have; 00899 FLOAT_T w, h; 00900 } minmul; 00901 00902 Edje_Size min, max; 00903 Edje_Position step; /* size stepping by n pixels, 0 = none */ 00904 Edje_Aspect_Prefer aspect; 00905 00906 char *color_class; /* how to modify the color */ 00907 Edje_Color color; 00908 Edje_Color color2; 00909 00910 struct { 00911 FLOAT_T relative_x; 00912 FLOAT_T relative_y; 00913 int offset_x; 00914 int offset_y; 00915 int id_x; /* -1 = whole part collection, or part ID */ 00916 int id_y; /* -1 = whole part collection, or part ID */ 00917 } rel1, rel2; 00918 00919 struct { 00920 int id_persp; 00921 int id_light; 00922 struct { 00923 int id_center; 00924 FLOAT_T x, y, z; 00925 } rot; 00926 unsigned char backcull; 00927 unsigned char on; 00928 unsigned char persp_on; 00929 unsigned char smooth; 00930 unsigned char alpha; 00931 } map; 00932 00933 struct { 00934 int zplane; 00935 int focal; 00936 } persp; 00937 00938 unsigned char visible; /* is it shown */ 00939 unsigned char limit; /* 0 == no, 1 = width, 2 = height, 3 = both */ 00940 }; 00941 00942 struct _Edje_Part_Description_Spec_Fill 00943 { 00944 FLOAT_T pos_rel_x; /* fill offset x relative to area */ 00945 FLOAT_T rel_x; /* relative size compared to area */ 00946 FLOAT_T pos_rel_y; /* fill offset y relative to area */ 00947 FLOAT_T rel_y; /* relative size compared to area */ 00948 int pos_abs_x; /* fill offset x added to fill offset */ 00949 int abs_x; /* size of fill added to relative fill */ 00950 int pos_abs_y; /* fill offset y added to fill offset */ 00951 int abs_y; /* size of fill added to relative fill */ 00952 int angle; /* angle of fill -- currently only used by grads */ 00953 int spread; /* spread of fill -- currently only used by grads */ 00954 char smooth; /* fill with smooth scaling or not */ 00955 unsigned char type; /* fill coordinate from container (SCALE) or from source image (TILE) */ 00956 }; 00957 00958 struct _Edje_Part_Description_Spec_Border 00959 { 00960 int l, r, t, b; /* border scaling on image fill */ 00961 unsigned char no_fill; /* do we fill the center of the image if bordered? 1 == NO!!!! */ 00962 unsigned char scale; /* scale image border by same as scale factor */ 00963 FLOAT_T scale_by; /* when border scale above is enabled, border width OUTPUT is scaled by the object or global scale factor. this value adds another multiplier that the global scale is multiplued by first. if <= 0.0 it is not used, and if 1.0 it i s "ineffective" */ 00964 }; 00965 00966 struct _Edje_Part_Description_Spec_Image 00967 { 00968 Edje_Part_Description_Spec_Fill fill; 00969 00970 Edje_Part_Image_Id **tweens; /* list of Edje_Part_Image_Id */ 00971 unsigned int tweens_count; /* number of tweens */ 00972 00973 int id; /* the image id to use */ 00974 int scale_hint; /* evas scale hint */ 00975 Eina_Bool set; /* if image condition it's content */ 00976 00977 Edje_Part_Description_Spec_Border border; 00978 }; 00979 00980 struct _Edje_Part_Description_Spec_Proxy 00981 { 00982 Edje_Part_Description_Spec_Fill fill; 00983 00984 int id; /* the part id to use as a source for this state */ 00985 }; 00986 00987 struct _Edje_Part_Description_Spec_Text 00988 { 00989 Edje_String text; /* if "" or NULL, then leave text unchanged */ 00990 char *text_class; /* how to apply/modify the font */ 00991 Edje_String style; /* the text style if a textblock */ 00992 Edje_String font; /* if a specific font is asked for */ 00993 Edje_String repch; /* replacement char for password mode entry */ 00994 00995 Edje_Alignment align; /* text alignment within bounds */ 00996 Edje_Color color3; 00997 00998 double elipsis; /* 0.0 - 1.0 defining where the elipsis align */ 00999 int size; /* 0 = use user set size */ 01000 int id_source; /* -1 if none */ 01001 int id_text_source; /* -1 if none */ 01002 01003 unsigned char fit_x; /* resize font size down to fit in x dir */ 01004 unsigned char fit_y; /* resize font size down to fit in y dir */ 01005 unsigned char min_x; /* if text size should be part min size */ 01006 unsigned char min_y; /* if text size should be part min size */ 01007 unsigned char max_x; /* if text size should be part max size */ 01008 unsigned char max_y; /* if text size should be part max size */ 01009 int size_range_min; 01010 int size_range_max; /* -1 means, no bound. */ 01011 }; 01012 01013 struct _Edje_Part_Description_Spec_Box 01014 { 01015 char *layout, *alt_layout; 01016 Edje_Alignment align; 01017 struct { 01018 int x, y; 01019 } padding; 01020 struct { 01021 unsigned char h, v; 01022 } min; 01023 }; 01024 01025 struct _Edje_Part_Description_Spec_Table 01026 { 01027 unsigned char homogeneous; 01028 Edje_Alignment align; 01029 struct { 01030 int x, y; 01031 } padding; 01032 struct { 01033 unsigned char h, v; 01034 } min; 01035 }; 01036 01037 struct _Edje_Part_Description_Image 01038 { 01039 Edje_Part_Description_Common common; 01040 Edje_Part_Description_Spec_Image image; 01041 }; 01042 01043 struct _Edje_Part_Description_Proxy 01044 { 01045 Edje_Part_Description_Common common; 01046 Edje_Part_Description_Spec_Proxy proxy; 01047 }; 01048 01049 struct _Edje_Part_Description_Text 01050 { 01051 Edje_Part_Description_Common common; 01052 Edje_Part_Description_Spec_Text text; 01053 }; 01054 01055 struct _Edje_Part_Description_Box 01056 { 01057 Edje_Part_Description_Common common; 01058 Edje_Part_Description_Spec_Box box; 01059 }; 01060 01061 struct _Edje_Part_Description_Table 01062 { 01063 Edje_Part_Description_Common common; 01064 Edje_Part_Description_Spec_Table table; 01065 }; 01066 01067 struct _Edje_Part_Description_External 01068 { 01069 Edje_Part_Description_Common common; 01070 Eina_List *external_params; /* parameters for external objects */ 01071 }; 01072 01073 /*----------*/ 01074 01075 struct _Edje_Signal_Source_Char 01076 { 01077 EINA_RBTREE; 01078 01079 const char *signal; 01080 const char *source; 01081 01082 Eina_List *list; 01083 }; 01084 01085 struct _Edje_Signals_Sources_Patterns 01086 01087 { 01088 Edje_Patterns *signals_patterns; 01089 Edje_Patterns *sources_patterns; 01090 01091 Eina_Rbtree *exact_match; 01092 01093 union { 01094 struct { 01095 Edje_Program **globing; 01096 unsigned int count; 01097 } programs; 01098 struct { 01099 Eina_List *globing; 01100 } callbacks; 01101 } u; 01102 }; 01103 01104 typedef struct _Edje_Signals_Sources_Patterns Edje_Signals_Sources_Patterns; 01105 01106 struct _Edje 01107 { 01108 Evas_Object_Smart_Clipped_Data base; 01109 /* This contains (or should): 01110 Evas_Object *clipper; // a big rect to clip this Edje to 01111 Evas *evas; // the Evas this Edje belongs to 01112 */ 01113 const Edje_Smart_Api *api; 01114 const char *path; 01115 const char *group; 01116 const char *parent; 01117 01118 Evas_Coord x, y, w, h; 01119 Edje_Size min; 01120 double paused_at; 01121 Evas_Object *obj; /* the smart object */ 01122 Edje_File *file; /* the file the data comes form */ 01123 Edje_Part_Collection *collection; /* the description being used */ 01124 Eina_List *actions; /* currently running actions */ 01125 Eina_List *callbacks; 01126 Eina_List *pending_actions; 01127 Eina_Hash *color_classes; 01128 Eina_List *text_classes; 01129 /* variable pool for Edje Embryo scripts */ 01130 Edje_Var_Pool *var_pool; 01131 /* for faster lookups to avoid nth list walks */ 01132 Edje_Real_Part **table_parts; 01133 Edje_Program **table_programs; 01134 Edje_Real_Part *focused_part; 01135 Eina_List *subobjs; 01136 Eina_List *text_insert_filter_callbacks; 01137 Eina_List *markup_filter_callbacks; 01138 void *script_only_data; 01139 01140 int table_programs_size; 01141 unsigned int table_parts_size; 01142 01143 Eina_List *groups; 01144 01145 struct { 01146 Eina_Hash *text_class; 01147 Eina_Hash *color_class; 01148 } members; 01149 01150 Edje_Perspective *persp; 01151 01152 struct { 01153 Edje_Signals_Sources_Patterns callbacks; 01154 Edje_Signals_Sources_Patterns programs; 01155 } patterns; 01156 01157 int references; 01158 int block; 01159 int load_error; 01160 int freeze; 01161 FLOAT_T scale; 01162 Eina_Bool is_rtl : 1; 01163 01164 struct { 01165 Edje_Text_Change_Cb func; 01166 void *data; 01167 } text_change; 01168 01169 struct { 01170 Edje_Message_Handler_Cb func; 01171 void *data; 01172 int num; 01173 } message; 01174 int processing_messages; 01175 01176 int state; 01177 01178 int preload_count; 01179 01180 lua_State *L; 01181 Eina_Inlist *lua_objs; 01182 int lua_ref; 01183 01184 struct { 01185 Edje_Item_Provider_Cb func; 01186 void *data; 01187 } item_provider; 01188 01189 Eina_List *user_defined; 01190 01191 int walking_callbacks; 01192 01193 unsigned int dirty : 1; 01194 unsigned int recalc : 1; 01195 unsigned int delete_callbacks : 1; 01196 unsigned int just_added_callbacks : 1; 01197 unsigned int have_objects : 1; 01198 unsigned int paused : 1; 01199 unsigned int no_anim : 1; 01200 unsigned int calc_only : 1; 01201 unsigned int walking_actions : 1; 01202 unsigned int block_break : 1; 01203 unsigned int delete_me : 1; 01204 unsigned int postponed : 1; 01205 unsigned int freeze_calc : 1; 01206 unsigned int has_entries : 1; 01207 unsigned int entries_inited : 1; 01208 #ifdef EDJE_CALC_CACHE 01209 unsigned int text_part_change : 1; 01210 unsigned int all_part_change : 1; 01211 #endif 01212 unsigned int have_mapped_part : 1; 01213 unsigned int recalc_call : 1; 01214 unsigned int update_hints : 1; 01215 unsigned int recalc_hints : 1; 01216 }; 01217 01218 struct _Edje_Calc_Params 01219 { 01220 int x, y, w, h; // 16 01221 Edje_Rectangle req; // 16 01222 Edje_Rectangle req_drag; // 16 01223 Edje_Color color; // 4 01224 union { 01225 struct { 01226 struct { 01227 int x, y, w, h; // 16 01228 int angle; // 4 01229 int spread; // 4 01230 } fill; // 24 01231 01232 union { 01233 struct { 01234 int l, r, t, b; // 16 01235 FLOAT_T border_scale_by; 01236 } image; // 16 01237 } spec; // 16 01238 } common; // 40 01239 struct { 01240 Edje_Alignment align; /* text alignment within bounds */ // 16 01241 double elipsis; // 8 01242 int size; // 4 01243 Edje_Color color2, color3; // 8 01244 } text; // 36 01245 } type; // 40 01246 struct { 01247 struct { 01248 int x, y, z; 01249 } center; // 12 01250 struct { 01251 FLOAT_T x, y, z; 01252 } rotation; // 24 01253 struct { 01254 int x, y, z; 01255 int r, g, b; 01256 int ar, ag, ab; 01257 } light; // 36 01258 struct { 01259 int x, y, z; 01260 int focal; 01261 } persp; 01262 } map; 01263 unsigned char persp_on : 1; 01264 unsigned char lighted : 1; 01265 unsigned char mapped : 1; 01266 unsigned char visible : 1; 01267 unsigned char smooth : 1; // 1 01268 }; // 96 01269 01270 struct _Edje_Real_Part_Set 01271 { 01272 Edje_Image_Directory_Set_Entry *entry; // 4 01273 Edje_Image_Directory_Set *set; // 4 01274 01275 int id; // 4 01276 }; 01277 01278 struct _Edje_Real_Part_State 01279 { 01280 Edje_Part_Description_Common *description; // 4 01281 Edje_Part_Description_Common *description_rtl; // 4 01282 Edje_Real_Part *rel1_to_x; // 4 01283 Edje_Real_Part *rel1_to_y; // 4 01284 Edje_Real_Part *rel2_to_x; // 4 01285 Edje_Real_Part *rel2_to_y; // 4 01286 #ifdef EDJE_CALC_CACHE 01287 int state; // 4 01288 Edje_Calc_Params p; // 96 01289 #endif 01290 void *external_params; // 4 01291 Edje_Real_Part_Set *set; // 4 01292 }; // 32 01293 // WITH EDJE_CALC_CACHE 132 01294 01295 struct _Edje_Real_Part_Drag 01296 { 01297 FLOAT_T x, y; // 16 01298 Edje_Position_Scale val, size, step, page; // 64 01299 struct { 01300 unsigned int count; // 4 01301 int x, y; // 8 01302 } down; 01303 struct { 01304 int x, y; // 8 01305 } tmp; 01306 unsigned char need_reset : 1; // 4 01307 Edje_Real_Part *confine_to; // 4 01308 }; // 104 01309 01310 struct _Edje_Real_Part 01311 { 01312 Edje *edje; // 4 01313 Edje_Part *part; // 4 01314 Evas_Object *object; // 4 01315 int x, y, w, h; // 16 01316 Edje_Rectangle req; // 16 01317 01318 Eina_List *items; // 4 //FIXME: only if table/box 01319 Edje_Part_Box_Animation *anim; // 4 //FIXME: Used only if box 01320 void *entry_data; // 4 // FIXME: move to entry section 01321 01322 Evas_Object *swallowed_object; // 4 // FIXME: move with swallow_params data 01323 struct { 01324 Edje_Size min, max; // 16 01325 Edje_Aspect aspect; // 12 01326 } swallow_params; // 28 // FIXME: only if type SWALLOW 01327 01328 Edje_Real_Part_Drag *drag; // 4 01329 Edje_Real_Part *events_to; // 4 01330 01331 struct { 01332 Edje_Real_Part *source; // 4 01333 Edje_Real_Part *text_source; // 4 01334 const char *text; // 4 01335 Edje_Position offset; // 8 text only 01336 const char *font; // 4 text only 01337 const char *style; // 4 text only 01338 int size; // 4 text only 01339 struct { 01340 double in_w, in_h; // 16 text only 01341 int in_size; // 4 text only 01342 const char *in_str; // 4 text only 01343 const char *out_str; // 4 text only 01344 int out_size; // 4 text only 01345 FLOAT_T align_x, align_y; // 16 text only 01346 double elipsis; // 8 text only 01347 int fit_x, fit_y; // 8 text only 01348 } cache; // 64 01349 } text; // 86 // FIXME make text a potiner to struct and alloc at end 01350 // if part type is TEXT move common members textblock + 01351 // text to front and have smaller struct for textblock 01352 01353 FLOAT_T description_pos; // 8 01354 Edje_Part_Description_Common *chosen_description; // 4 01355 Edje_Real_Part_State param1; // 20 01356 // WITH EDJE_CALC_CACHE: 140 01357 Edje_Real_Part_State *param2, *custom; // 8 01358 Edje_Calc_Params *current; // 4 01359 01360 #ifdef EDJE_CALC_CACHE 01361 int state; // 4 01362 #endif 01363 01364 Edje_Real_Part *clip_to; // 4 01365 01366 Edje_Running_Program *program; // 4 01367 01368 int clicked_button; // 4 01369 01370 unsigned char calculated; // 1 01371 unsigned char calculating; // 1 01372 01373 unsigned char still_in : 1; // 1 01374 #ifdef EDJE_CALC_CACHE 01375 unsigned char invalidate : 1; // 0 01376 #endif 01377 }; // 264 01378 // WITH EDJE_CALC_CACHE: 404 01379 01380 struct _Edje_Running_Program 01381 { 01382 Edje *edje; 01383 Edje_Program *program; 01384 double start_time; 01385 char delete_me : 1; 01386 }; 01387 01388 struct _Edje_Signal_Callback 01389 { 01390 const char *signal; 01391 const char *source; 01392 Edje_Signal_Cb func; 01393 void *data; 01394 unsigned char just_added : 1; 01395 unsigned char delete_me : 1; 01396 unsigned char propagate : 1; 01397 }; 01398 01399 struct _Edje_Text_Insert_Filter_Callback 01400 { 01401 const char *part; 01402 Edje_Text_Filter_Cb func; 01403 void *data; 01404 }; 01405 01406 struct _Edje_Markup_Filter_Callback 01407 { 01408 const char *part; 01409 Edje_Markup_Filter_Cb func; 01410 void *data; 01411 }; 01412 01413 struct _Edje_Pending_Program 01414 { 01415 Edje *edje; 01416 Edje_Program *program; 01417 Ecore_Timer *timer; 01418 }; 01419 01420 struct _Edje_Text_Style 01421 { 01422 struct { 01423 unsigned char x, y; 01424 } offset; 01425 struct { 01426 unsigned char l, r, t, b; 01427 } pad; 01428 int num; 01429 struct { 01430 unsigned char color; /* 0 = color, 1, 2 = color2, color3 */ 01431 signed char x, y; /* offset */ 01432 unsigned char alpha; 01433 } members[32]; 01434 }; 01435 01436 struct _Edje_Color_Class 01437 { 01438 const char *name; 01439 unsigned char r, g, b, a; 01440 unsigned char r2, g2, b2, a2; 01441 unsigned char r3, g3, b3, a3; 01442 }; 01443 01444 struct _Edje_Text_Class 01445 { 01446 const char *name; 01447 const char *font; 01448 Evas_Font_Size size; 01449 }; 01450 01451 struct _Edje_Var_Int 01452 { 01453 int v; 01454 }; 01455 01456 struct _Edje_Var_Float 01457 { 01458 double v; 01459 }; 01460 01461 struct _Edje_Var_String 01462 { 01463 char *v; 01464 }; 01465 01466 struct _Edje_Var_List 01467 { 01468 Eina_List *v; 01469 }; 01470 01471 struct _Edje_Var_Hash 01472 { 01473 Eina_Hash *v; 01474 }; 01475 01476 struct _Edje_Var_Timer 01477 { 01478 Edje *edje; 01479 int id; 01480 Embryo_Function func; 01481 int val; 01482 Ecore_Timer *timer; 01483 }; 01484 01485 struct _Edje_Var_Animator 01486 { 01487 Edje *edje; 01488 int id; 01489 Embryo_Function func; 01490 int val; 01491 double start, len; 01492 char delete_me; 01493 }; 01494 01495 struct _Edje_Var_Pool 01496 { 01497 int id_count; 01498 Eina_List *timers; 01499 Eina_List *animators; 01500 int size; 01501 Edje_Var *vars; 01502 int walking_list; 01503 }; 01504 01505 struct _Edje_Var 01506 { 01507 union { 01508 Edje_Var_Int i; 01509 Edje_Var_Float f; 01510 Edje_Var_String s; 01511 Edje_Var_List l; 01512 Edje_Var_Hash h; 01513 } data; 01514 unsigned char type; 01515 }; 01516 01517 typedef enum _Edje_Queue 01518 { 01519 EDJE_QUEUE_APP, 01520 EDJE_QUEUE_SCRIPT 01521 } Edje_Queue; 01522 01523 typedef struct _Edje_Message_Signal Edje_Message_Signal; 01524 typedef struct _Edje_Message Edje_Message; 01525 01526 typedef struct _Edje_Message_Signal_Data Edje_Message_Signal_Data; 01527 struct _Edje_Message_Signal_Data 01528 { 01529 int ref; 01530 void *data; 01531 void (*free_func)(void *); 01532 }; 01533 01534 struct _Edje_Message_Signal 01535 { 01536 const char *sig; 01537 const char *src; 01538 Edje_Message_Signal_Data *data; 01539 }; 01540 01541 struct _Edje_Message 01542 { 01543 Edje *edje; 01544 Edje_Queue queue; 01545 Edje_Message_Type type; 01546 int id; 01547 unsigned char *msg; 01548 Eina_Bool propagated : 1; 01549 }; 01550 01551 typedef enum _Edje_Fill 01552 { 01553 EDJE_FILL_TYPE_SCALE = 0, 01554 EDJE_FILL_TYPE_TILE 01555 } Edje_Fill; 01556 01557 typedef enum _Edje_Match_Error 01558 { 01559 EDJE_MATCH_OK, 01560 EDJE_MATCH_ALLOC_ERROR, 01561 EDJE_MATCH_SYNTAX_ERROR 01562 01563 } Edje_Match_Error; 01564 01565 typedef struct _Edje_States Edje_States; 01566 struct _Edje_Patterns 01567 { 01568 const char **patterns; 01569 01570 Edje_States *states; 01571 01572 int ref; 01573 Eina_Bool delete_me : 1; 01574 01575 size_t patterns_size; 01576 size_t max_length; 01577 size_t finals[]; 01578 }; 01579 01580 typedef enum _Edje_User_Defined_Type 01581 { 01582 EDJE_USER_SWALLOW, 01583 EDJE_USER_BOX_PACK, 01584 EDJE_USER_TABLE_PACK, 01585 EDJE_USER_STRING, 01586 EDJE_USER_DRAG_STEP, 01587 EDJE_USER_DRAG_PAGE, 01588 EDJE_USER_DRAG_VALUE, 01589 EDJE_USER_DRAG_SIZE 01590 } Edje_User_Defined_Type; 01591 01592 typedef struct _Edje_User_Defined Edje_User_Defined; 01593 struct _Edje_User_Defined 01594 { 01595 Edje_User_Defined_Type type; 01596 const char *part; 01597 Edje *ed; 01598 01599 union { 01600 struct { 01601 const char *text; 01602 } string; 01603 struct { 01604 Evas_Object *child; 01605 } swallow; 01606 struct { 01607 Evas_Object *child; 01608 int index; 01609 } box; 01610 struct { 01611 Evas_Object *child; 01612 unsigned short col; 01613 unsigned short row; 01614 unsigned short colspan; 01615 unsigned short rowspan; 01616 } table; 01617 struct { 01618 double x, y; 01619 } drag_position; 01620 struct { 01621 double w, h; 01622 } drag_size; 01623 } u; 01624 }; 01625 01626 Edje_Patterns *edje_match_collection_dir_init(const Eina_List *lst); 01627 Edje_Patterns *edje_match_programs_signal_init(Edje_Program * const *array, 01628 unsigned int count); 01629 Edje_Patterns *edje_match_programs_source_init(Edje_Program * const *array, 01630 unsigned int count); 01631 Edje_Patterns *edje_match_callback_signal_init(const Eina_List *lst); 01632 Edje_Patterns *edje_match_callback_source_init(const Eina_List *lst); 01633 01634 Eina_Bool edje_match_collection_dir_exec(const Edje_Patterns *ppat, 01635 const char *string); 01636 Eina_Bool edje_match_programs_exec(const Edje_Patterns *ppat_signal, 01637 const Edje_Patterns *ppat_source, 01638 const char *signal, 01639 const char *source, 01640 Edje_Program **programs, 01641 Eina_Bool (*func)(Edje_Program *pr, void *data), 01642 void *data, 01643 Eina_Bool prop); 01644 int edje_match_callback_exec(Edje_Patterns *ppat_signal, 01645 Edje_Patterns *ppat_source, 01646 const char *signal, 01647 const char *source, 01648 Eina_List *callbacks, 01649 Edje *ed, 01650 Eina_Bool prop); 01651 01652 void edje_match_patterns_free(Edje_Patterns *ppat); 01653 01654 Eina_List *edje_match_program_hash_build(Edje_Program * const * programs, 01655 unsigned int count, 01656 Eina_Rbtree **tree); 01657 Eina_List *edje_match_callback_hash_build(const Eina_List *callbacks, 01658 Eina_Rbtree **tree); 01659 const Eina_List *edje_match_signal_source_hash_get(const char *signal, 01660 const char *source, 01661 const Eina_Rbtree *tree); 01662 void edje_match_signal_source_free(Edje_Signal_Source_Char *key, void *data); 01663 01664 // FIXME remove below 2 eapi decls when edje_convert goes 01665 EAPI void _edje_edd_init(void); 01666 EAPI void _edje_edd_shutdown(void); 01667 01668 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_file; 01669 EAPI extern Eet_Data_Descriptor *_edje_edd_edje_part_collection; 01670 01671 extern int _edje_anim_count; 01672 extern Ecore_Animator *_edje_timer; 01673 extern Eina_List *_edje_animators; 01674 extern Eina_List *_edje_edjes; 01675 01676 extern char *_edje_fontset_append; 01677 extern FLOAT_T _edje_scale; 01678 extern int _edje_freeze_val; 01679 extern int _edje_freeze_calc_count; 01680 extern Eina_List *_edje_freeze_calc_list; 01681 01682 extern Eina_Bool _edje_password_show_last; 01683 extern FLOAT_T _edje_password_show_last_timeout; 01684 01685 extern Eina_Mempool *_edje_real_part_mp; 01686 extern Eina_Mempool *_edje_real_part_state_mp; 01687 01688 extern Eina_Mempool *_emp_RECTANGLE; 01689 extern Eina_Mempool *_emp_TEXT; 01690 extern Eina_Mempool *_emp_IMAGE; 01691 extern Eina_Mempool *_emp_PROXY; 01692 extern Eina_Mempool *_emp_SWALLOW; 01693 extern Eina_Mempool *_emp_TEXTBLOCK; 01694 extern Eina_Mempool *_emp_GROUP; 01695 extern Eina_Mempool *_emp_BOX; 01696 extern Eina_Mempool *_emp_TABLE; 01697 extern Eina_Mempool *_emp_EXTERNAL; 01698 extern Eina_Mempool *_emp_SPACER; 01699 extern Eina_Mempool *_emp_part; 01700 01701 void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2); 01702 Edje_Part_Description_Common *_edje_part_description_find(Edje *ed, 01703 Edje_Real_Part *rp, 01704 const char *name, double val); 01705 void _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, double v1, const char *d2, double v2); 01706 void _edje_recalc(Edje *ed); 01707 void _edje_recalc_do(Edje *ed); 01708 void _edje_part_recalc_1(Edje *ed, Edje_Real_Part *ep); 01709 int _edje_part_dragable_calc(Edje *ed, Edje_Real_Part *ep, FLOAT_T *x, FLOAT_T *y); 01710 void _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y); 01711 01712 Eina_Bool _edje_timer_cb(void *data); 01713 Eina_Bool _edje_pending_timer_cb(void *data); 01714 void _edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp); 01715 void _edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp); 01716 void _edje_callbacks_del(Evas_Object *obj, Edje *ed); 01717 void _edje_callbacks_focus_del(Evas_Object *obj, Edje *ed); 01718 01719 void _edje_edd_init(void); 01720 void _edje_edd_shutdown(void); 01721 01722 int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, const char *parent, Eina_List *group_path); 01723 01724 void _edje_file_add(Edje *ed); 01725 void _edje_file_del(Edje *ed); 01726 void _edje_file_free(Edje_File *edf); 01727 void _edje_file_cache_shutdown(void); 01728 void _edje_collection_free(Edje_File *edf, 01729 Edje_Part_Collection *ec, 01730 Edje_Part_Collection_Directory_Entry *ce); 01731 void _edje_collection_free_part_description_clean(int type, 01732 Edje_Part_Description_Common *desc, 01733 Eina_Bool free_strings); 01734 void _edje_collection_free_part_description_free(int type, 01735 Edje_Part_Description_Common *desc, 01736 Edje_Part_Collection_Directory_Entry *ce, 01737 Eina_Bool free_strings); 01738 01739 void _edje_object_smart_set(Edje_Smart_Api *sc); 01740 const Edje_Smart_Api * _edje_object_smart_class_get(void); 01741 01742 void _edje_del(Edje *ed); 01743 void _edje_ref(Edje *ed); 01744 void _edje_unref(Edje *ed); 01745 void _edje_clean_objects(Edje *ed); 01746 void _edje_ref(Edje *ed); 01747 void _edje_unref(Edje *ed); 01748 01749 Eina_Bool _edje_program_run_iterate(Edje_Running_Program *runp, double tim); 01750 void _edje_program_end(Edje *ed, Edje_Running_Program *runp); 01751 void _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig, const char *ssrc); 01752 void _edje_programs_patterns_clean(Edje *ed); 01753 void _edje_programs_patterns_init(Edje *ed); 01754 void _edje_emit(Edje *ed, const char *sig, const char *src); 01755 void _edje_emit_full(Edje *ed, const char *sig, const char *src, void *data, void (*free_func)(void *)); 01756 void _edje_emit_handle(Edje *ed, const char *sig, const char *src, Edje_Message_Signal_Data *data, Eina_Bool prop); 01757 void _edje_signals_sources_patterns_clean(Edje_Signals_Sources_Patterns *ssp); 01758 void _edje_callbacks_patterns_clean(Edje *ed); 01759 01760 void _edje_text_init(void); 01761 void _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep); 01762 void _edje_text_part_on_del(Edje *ed, Edje_Part *ep); 01763 void _edje_text_recalc_apply(Edje *ed, 01764 Edje_Real_Part *ep, 01765 Edje_Calc_Params *params, 01766 Edje_Part_Description_Text *chosen_desc); 01767 Evas_Font_Size _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc); 01768 const char * _edje_text_class_font_get(Edje *ed, 01769 Edje_Part_Description_Text *chosen_desc, 01770 int *size, char **free_later); 01771 01772 01773 Edje_Real_Part *_edje_real_part_get(const Edje *ed, const char *part); 01774 Edje_Real_Part *_edje_real_part_recursive_get(const Edje *ed, const char *part); 01775 Edje_Color_Class *_edje_color_class_find(Edje *ed, const char *color_class); 01776 void _edje_color_class_member_direct_del(const char *color_class, void *lookup); 01777 void _edje_color_class_member_add(Edje *ed, const char *color_class); 01778 void _edje_color_class_member_del(Edje *ed, const char *color_class); 01779 void _edje_color_class_on_del(Edje *ed, Edje_Part *ep); 01780 void _edje_color_class_members_free(void); 01781 void _edje_color_class_hash_free(void); 01782 01783 Edje_Text_Class *_edje_text_class_find(Edje *ed, const char *text_class); 01784 void _edje_text_class_member_add(Edje *ed, const char *text_class); 01785 void _edje_text_class_member_del(Edje *ed, const char *text_class); 01786 void _edje_text_class_member_direct_del(const char *text_class, void *lookup); 01787 void _edje_text_class_members_free(void); 01788 void _edje_text_class_hash_free(void); 01789 01790 Edje *_edje_fetch(const Evas_Object *obj) EINA_PURE; 01791 int _edje_freeze(Edje *ed); 01792 int _edje_thaw(Edje *ed); 01793 int _edje_block(Edje *ed); 01794 int _edje_unblock(Edje *ed); 01795 int _edje_block_break(Edje *ed); 01796 void _edje_block_violate(Edje *ed); 01797 void _edje_object_part_swallow_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info); 01798 void _edje_object_part_swallow_changed_hints_cb(void *data, Evas *e, Evas_Object *obj, void *event_info); 01799 void _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow, Eina_Bool hints_update); 01800 void _edje_real_part_swallow_clear(Edje_Real_Part *rp); 01801 void _edje_box_init(void); 01802 void _edje_box_shutdown(void); 01803 Eina_Bool _edje_box_layout_find(const char *name, Evas_Object_Box_Layout *cb, void **data, void (**free_data)(void *data)); 01804 void _edje_box_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Box *chosen_desc); 01805 Eina_Bool _edje_box_layout_add_child(Edje_Real_Part *rp, Evas_Object *child_obj); 01806 void _edje_box_layout_remove_child(Edje_Real_Part *rp, Evas_Object *child_obj); 01807 Edje_Part_Box_Animation * _edje_box_layout_anim_new(Evas_Object *box); 01808 void _edje_box_layout_free_data(void *data); 01809 01810 Eina_Bool _edje_real_part_box_append(Edje_Real_Part *rp, Evas_Object *child_obj); 01811 Eina_Bool _edje_real_part_box_prepend(Edje_Real_Part *rp, Evas_Object *child_obj); 01812 Eina_Bool _edje_real_part_box_insert_before(Edje_Real_Part *rp, Evas_Object *child_obj, const Evas_Object *ref); 01813 Eina_Bool _edje_real_part_box_insert_at(Edje_Real_Part *rp, Evas_Object *child_obj, unsigned int pos); 01814 Evas_Object *_edje_real_part_box_remove(Edje_Real_Part *rp, Evas_Object *child_obj); 01815 Evas_Object *_edje_real_part_box_remove_at(Edje_Real_Part *rp, unsigned int pos); 01816 Eina_Bool _edje_real_part_box_remove_all(Edje_Real_Part *rp, Eina_Bool clear); 01817 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); 01818 Eina_Bool _edje_real_part_table_unpack(Edje_Real_Part *rp, Evas_Object *child_obj); 01819 void _edje_real_part_table_clear(Edje_Real_Part *rp, Eina_Bool clear); 01820 Evas_Object *_edje_children_get(Edje_Real_Part *rp, const char *partid); 01821 01822 Eina_Bool _edje_object_part_text_raw_set(Evas_Object *obj, Edje_Real_Part *rp, const char *part, const char *text); 01823 char *_edje_text_escape(const char *text); 01824 char *_edje_text_unescape(const char *text); 01825 01826 void _edje_embryo_script_init (Edje_Part_Collection *edc); 01827 void _edje_embryo_script_shutdown (Edje_Part_Collection *edc); 01828 void _edje_embryo_script_reset (Edje *ed); 01829 void _edje_embryo_test_run (Edje *ed, const char *fname, const char *sig, const char *src); 01830 Edje_Var *_edje_var_new (void); 01831 void _edje_var_free (Edje_Var *var); 01832 void _edje_var_init (Edje *ed); 01833 void _edje_var_shutdown (Edje *ed); 01834 int _edje_var_string_id_get (Edje *ed, const char *string); 01835 int _edje_var_var_int_get (Edje *ed, Edje_Var *var); 01836 void _edje_var_var_int_set (Edje *ed, Edje_Var *var, int v); 01837 double _edje_var_var_float_get (Edje *ed, Edje_Var *var); 01838 void _edje_var_var_float_set (Edje *ed, Edje_Var *var, double v); 01839 const char *_edje_var_var_str_get (Edje *ed, Edje_Var *var); 01840 void _edje_var_var_str_set (Edje *ed, Edje_Var *var, const char *str); 01841 int _edje_var_int_get (Edje *ed, int id); 01842 void _edje_var_int_set (Edje *ed, int id, int v); 01843 double _edje_var_float_get (Edje *ed, int id); 01844 void _edje_var_float_set (Edje *ed, int id, double v); 01845 const char *_edje_var_str_get (Edje *ed, int id); 01846 void _edje_var_str_set (Edje *ed, int id, const char *str); 01847 01848 void _edje_var_list_var_append(Edje *ed, int id, Edje_Var *var); 01849 void _edje_var_list_var_prepend(Edje *ed, int id, Edje_Var *var); 01850 void _edje_var_list_var_append_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative); 01851 void _edje_var_list_var_prepend_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *relative); 01852 Edje_Var *_edje_var_list_nth(Edje *ed, int id, int n); 01853 01854 int _edje_var_list_count_get(Edje *ed, int id); 01855 void _edje_var_list_remove_nth(Edje *ed, int id, int n); 01856 01857 int _edje_var_list_nth_int_get(Edje *ed, int id, int n); 01858 void _edje_var_list_nth_int_set(Edje *ed, int id, int n, int v); 01859 void _edje_var_list_int_append(Edje *ed, int id, int v); 01860 void _edje_var_list_int_prepend(Edje *ed, int id, int v); 01861 void _edje_var_list_int_insert(Edje *ed, int id, int n, int v); 01862 01863 double _edje_var_list_nth_float_get(Edje *ed, int id, int n); 01864 void _edje_var_list_nth_float_set(Edje *ed, int id, int n, double v); 01865 void _edje_var_list_float_append(Edje *ed, int id, double v); 01866 void _edje_var_list_float_prepend(Edje *ed, int id, double v); 01867 void _edje_var_list_float_insert(Edje *ed, int id, int n, double v); 01868 01869 const char *_edje_var_list_nth_str_get(Edje *ed, int id, int n); 01870 void _edje_var_list_nth_str_set(Edje *ed, int id, int n, const char *v); 01871 void _edje_var_list_str_append(Edje *ed, int id, const char *v); 01872 void _edje_var_list_str_prepend(Edje *ed, int id, const char *v); 01873 void _edje_var_list_str_insert(Edje *ed, int id, int n, const char *v); 01874 01875 int _edje_var_timer_add (Edje *ed, double in, const char *fname, int val); 01876 void _edje_var_timer_del (Edje *ed, int id); 01877 01878 int _edje_var_anim_add (Edje *ed, double len, const char *fname, int val); 01879 void _edje_var_anim_del (Edje *ed, int id); 01880 01881 void _edje_message_init (void); 01882 void _edje_message_shutdown (void); 01883 void _edje_message_cb_set (Edje *ed, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data); 01884 Edje_Message *_edje_message_new (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id); 01885 void _edje_message_free (Edje_Message *em); 01886 void _edje_message_propornot_send (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, void *emsg, Eina_Bool prop); 01887 void _edje_message_send (Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, void *emsg); 01888 void _edje_message_parameters_push (Edje_Message *em); 01889 void _edje_message_process (Edje_Message *em); 01890 void _edje_message_queue_process (void); 01891 void _edje_message_queue_clear (void); 01892 void _edje_message_del (Edje *ed); 01893 01894 void _edje_textblock_styles_add(Edje *ed); 01895 void _edje_textblock_styles_del(Edje *ed); 01896 void _edje_textblock_style_all_update(Edje *ed); 01897 void _edje_textblock_style_parse_and_fix(Edje_File *edf); 01898 void _edje_textblock_style_cleanup(Edje_File *edf); 01899 Edje_File *_edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed); 01900 void _edje_cache_coll_clean(Edje_File *edf); 01901 void _edje_cache_coll_flush(Edje_File *edf); 01902 void _edje_cache_coll_unref(Edje_File *edf, Edje_Part_Collection *edc); 01903 void _edje_cache_file_unref(Edje_File *edf); 01904 01905 void _edje_embryo_globals_init(Edje *ed); 01906 01907 #define CHKPARAM(n) if (params[0] != (sizeof(Embryo_Cell) * (n))) return -1; 01908 #define HASNPARAMS(n) (params[0] == (sizeof(Embryo_Cell) * (n))) 01909 #define GETSTR(str, par) { \ 01910 Embryo_Cell *___cptr; \ 01911 int ___l; \ 01912 str = NULL; \ 01913 if ((___cptr = embryo_data_address_get(ep, (par)))) { \ 01914 ___l = embryo_data_string_length_get(ep, ___cptr); \ 01915 if (((str) = alloca(___l + 1))) \ 01916 embryo_data_string_get(ep, ___cptr, (str)); } } 01917 #define GETSTREVAS(str, par) { \ 01918 if ((str)) { \ 01919 if ((par) && (!strcmp((par), (str)))) return 0; \ 01920 if ((par)) eina_stringshare_del((par)); \ 01921 (par) = (char *)eina_stringshare_add((str)); } \ 01922 else (par) = NULL; } 01923 #define GETFLOAT(val, par) { \ 01924 float *___cptr; \ 01925 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \ 01926 val = *___cptr; } } 01927 01928 #define GETFLOAT_T(val, par) \ 01929 { \ 01930 float *___cptr; \ 01931 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \ 01932 { \ 01933 val = FROM_DOUBLE(*___cptr); \ 01934 } \ 01935 } 01936 01937 #define GETINT(val, par) { \ 01938 int *___cptr; \ 01939 if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \ 01940 val = *___cptr; } } 01941 #define SETSTR(str, par) { \ 01942 Embryo_Cell *___cptr; \ 01943 if ((___cptr = embryo_data_address_get(ep, (par)))) { \ 01944 embryo_data_string_set(ep, str, ___cptr); } } 01945 #define SETSTRALLOCATE(s) \ 01946 { \ 01947 if (s) { \ 01948 if ((int) strlen((s)) < params[4]) { \ 01949 SETSTR((s), params[3]); } \ 01950 else { \ 01951 char *ss; \ 01952 ss = alloca(strlen((s)) + 1); \ 01953 strcpy(ss, (s)); \ 01954 ss[params[4] - 2] = 0; \ 01955 SETSTR(ss, params[3]); } } \ 01956 else \ 01957 SETSTR("", params[3]); \ 01958 } 01959 #define SETFLOAT(val, par) { \ 01960 float *___cptr; \ 01961 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) { \ 01962 *___cptr = (float)val; } } 01963 #define SETFLOAT_T(val, par) \ 01964 { \ 01965 float *___cptr; \ 01966 if ((___cptr = (float *)embryo_data_address_get(ep, (par)))) \ 01967 { \ 01968 *___cptr = (float) TO_DOUBLE(val); \ 01969 } \ 01970 } 01971 #define SETINT(val, par) { \ 01972 int *___cptr; \ 01973 if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \ 01974 *___cptr = (int)val; } } 01975 01976 Eina_Bool _edje_script_only(Edje *ed); 01977 void _edje_script_only_init(Edje *ed); 01978 void _edje_script_only_shutdown(Edje *ed); 01979 void _edje_script_only_show(Edje *ed); 01980 void _edje_script_only_hide(Edje *ed); 01981 void _edje_script_only_move(Edje *ed); 01982 void _edje_script_only_resize(Edje *ed); 01983 void _edje_script_only_message(Edje *ed, Edje_Message *em); 01984 01985 extern jmp_buf _edje_lua_panic_jmp; 01986 #define _edje_lua_panic_here() setjmp(_edje_lua_panic_jmp) 01987 01988 lua_State *_edje_lua_state_get(); 01989 lua_State *_edje_lua_new_thread(Edje *ed, lua_State *L); 01990 void _edje_lua_free_thread(Edje *ed, lua_State *L); 01991 void _edje_lua_new_reg(lua_State *L, int index, void *ptr); 01992 void _edje_lua_get_reg(lua_State *L, void *ptr); 01993 void _edje_lua_free_reg(lua_State *L, void *ptr); 01994 void _edje_lua_script_fn_new(Edje *ed); 01995 void _edje_lua_group_fn_new(Edje *ed); 01996 void _edje_lua_init(); 01997 void _edje_lua_shutdown(); 01998 01999 void __edje_lua_error(const char *file, const char *fnc, int line, lua_State *L, int err_code); 02000 #define _edje_lua_error(L, err_code) \ 02001 __edje_lua_error(__FILE__, __FUNCTION__, __LINE__, L, err_code) 02002 02003 Eina_Bool _edje_lua_script_only(Edje *ed); 02004 void _edje_lua_script_only_init(Edje *ed); 02005 void _edje_lua_script_only_shutdown(Edje *ed); 02006 void _edje_lua_script_only_show(Edje *ed); 02007 void _edje_lua_script_only_hide(Edje *ed); 02008 void _edje_lua_script_only_move(Edje *ed); 02009 void _edje_lua_script_only_resize(Edje *ed); 02010 void _edje_lua_script_only_message(Edje *ed, Edje_Message *em); 02011 02012 void _edje_entry_init(Edje *ed); 02013 void _edje_entry_shutdown(Edje *ed); 02014 void _edje_entry_real_part_init(Edje_Real_Part *rp); 02015 void _edje_entry_real_part_shutdown(Edje_Real_Part *rp); 02016 void _edje_entry_real_part_configure(Edje_Real_Part *rp); 02017 const char *_edje_entry_selection_get(Edje_Real_Part *rp); 02018 const char *_edje_entry_text_get(Edje_Real_Part *rp); 02019 void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text); 02020 void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text); 02021 void _edje_entry_text_markup_append(Edje_Real_Part *rp, const char *text); 02022 void _edje_entry_set_cursor_start(Edje_Real_Part *rp); 02023 void _edje_entry_set_cursor_end(Edje_Real_Part *rp); 02024 void _edje_entry_cursor_copy(Edje_Real_Part *rp, Edje_Cursor cur, Edje_Cursor dst); 02025 void _edje_entry_select_none(Edje_Real_Part *rp); 02026 void _edje_entry_select_all(Edje_Real_Part *rp); 02027 void _edje_entry_select_begin(Edje_Real_Part *rp); 02028 void _edje_entry_select_extend(Edje_Real_Part *rp); 02029 const Eina_List *_edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char *anchor); 02030 const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp); 02031 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); 02032 const Eina_List *_edje_entry_items_list(Edje_Real_Part *rp); 02033 void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch); 02034 void _edje_entry_user_insert(Edje_Real_Part *rp, const char *text); 02035 void _edje_entry_select_allow_set(Edje_Real_Part *rp, Eina_Bool allow); 02036 Eina_Bool _edje_entry_select_allow_get(const Edje_Real_Part *rp); 02037 void _edje_entry_select_abort(Edje_Real_Part *rp); 02038 void *_edje_entry_imf_context_get(Edje_Real_Part *rp); 02039 Eina_Bool _edje_entry_cursor_next(Edje_Real_Part *rp, Edje_Cursor cur); 02040 Eina_Bool _edje_entry_cursor_prev(Edje_Real_Part *rp, Edje_Cursor cur); 02041 Eina_Bool _edje_entry_cursor_up(Edje_Real_Part *rp, Edje_Cursor cur); 02042 Eina_Bool _edje_entry_cursor_down(Edje_Real_Part *rp, Edje_Cursor cur); 02043 void _edje_entry_cursor_begin(Edje_Real_Part *rp, Edje_Cursor cur); 02044 void _edje_entry_cursor_end(Edje_Real_Part *rp, Edje_Cursor cur); 02045 void _edje_entry_cursor_line_begin(Edje_Real_Part *rp, Edje_Cursor cur); 02046 void _edje_entry_cursor_line_end(Edje_Real_Part *rp, Edje_Cursor cur); 02047 Eina_Bool _edje_entry_cursor_coord_set(Edje_Real_Part *rp, Edje_Cursor cur, int x, int y); 02048 Eina_Bool _edje_entry_cursor_is_format_get(Edje_Real_Part *rp, Edje_Cursor cur); 02049 Eina_Bool _edje_entry_cursor_is_visible_format_get(Edje_Real_Part *rp, Edje_Cursor cur); 02050 char *_edje_entry_cursor_content_get(Edje_Real_Part *rp, Edje_Cursor cur); 02051 void _edje_entry_cursor_pos_set(Edje_Real_Part *rp, Edje_Cursor cur, int pos); 02052 int _edje_entry_cursor_pos_get(Edje_Real_Part *rp, Edje_Cursor cur); 02053 void _edje_entry_imf_context_reset(Edje_Real_Part *rp); 02054 void _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout layout); 02055 Edje_Input_Panel_Layout _edje_entry_input_panel_layout_get(Edje_Real_Part *rp); 02056 void _edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_Type autocapital_type); 02057 Edje_Text_Autocapital_Type _edje_entry_autocapital_type_get(Edje_Real_Part *rp); 02058 void _edje_entry_prediction_allow_set(Edje_Real_Part *rp, Eina_Bool prediction); 02059 Eina_Bool _edje_entry_prediction_allow_get(Edje_Real_Part *rp); 02060 void _edje_entry_input_panel_enabled_set(Edje_Real_Part *rp, Eina_Bool enabled); 02061 Eina_Bool _edje_entry_input_panel_enabled_get(Edje_Real_Part *rp); 02062 void _edje_entry_input_panel_show(Edje_Real_Part *rp); 02063 void _edje_entry_input_panel_hide(Edje_Real_Part *rp); 02064 void _edje_entry_input_panel_language_set(Edje_Real_Part *rp, Edje_Input_Panel_Lang lang); 02065 Edje_Input_Panel_Lang _edje_entry_input_panel_language_get(Edje_Real_Part *rp); 02066 void _edje_entry_input_panel_imdata_set(Edje_Real_Part *rp, const void *data, int len); 02067 void _edje_entry_input_panel_imdata_get(Edje_Real_Part *rp, void *data, int *len); 02068 void _edje_entry_input_panel_return_key_type_set(Edje_Real_Part *rp, Edje_Input_Panel_Return_Key_Type return_key_type); 02069 Edje_Input_Panel_Return_Key_Type _edje_entry_input_panel_return_key_type_get(Edje_Real_Part *rp); 02070 void _edje_entry_input_panel_return_key_disabled_set(Edje_Real_Part *rp, Eina_Bool disabled); 02071 Eina_Bool _edje_entry_input_panel_return_key_disabled_get(Edje_Real_Part *rp); 02072 02073 void _edje_external_init(); 02074 void _edje_external_shutdown(); 02075 Evas_Object *_edje_external_type_add(const char *type_name, Evas *evas, Evas_Object *parent, const Eina_List *params, const char *part_name); 02076 void _edje_external_signal_emit(Evas_Object *obj, const char *emission, const char *source); 02077 Eina_Bool _edje_external_param_set(Evas_Object *obj, Edje_Real_Part *rp, const Edje_External_Param *param) EINA_ARG_NONNULL(2); 02078 Eina_Bool _edje_external_param_get(const Evas_Object *obj, Edje_Real_Part *rp, Edje_External_Param *param) EINA_ARG_NONNULL(2); 02079 Evas_Object *_edje_external_content_get(const Evas_Object *obj, const char *content) EINA_ARG_NONNULL(1, 2); 02080 void _edje_external_params_free(Eina_List *params, Eina_Bool free_strings); 02081 void _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep, 02082 Edje_Calc_Params *params, 02083 Edje_Part_Description_Common *chosen_desc); 02084 void *_edje_external_params_parse(Evas_Object *obj, const Eina_List *params); 02085 void _edje_external_parsed_params_free(Evas_Object *obj, void *params); 02086 02087 Eina_Module *_edje_module_handle_load(const char *module); 02088 void _edje_module_init(); 02089 void _edje_module_shutdown(); 02090 02091 static inline Eina_Bool 02092 edje_program_is_strncmp(const char *str) 02093 { 02094 size_t length; 02095 02096 length = strlen(str); 02097 02098 if (strpbrk(str, "*?[\\") != str + length) 02099 return EINA_FALSE; 02100 if (str[length] == '[' 02101 || str[length] == '\\') 02102 return EINA_FALSE; 02103 return EINA_TRUE; 02104 } 02105 02106 static inline Eina_Bool 02107 edje_program_is_strrncmp(const char *str) 02108 { 02109 if (*str != '*' && *str != '?') 02110 return EINA_FALSE; 02111 if (strpbrk(str + 1, "*?[\\")) 02112 return EINA_FALSE; 02113 return EINA_TRUE; 02114 } 02115 void edje_object_propagate_callback_add(Evas_Object *obj, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data); 02116 02117 02118 /* used by edje_cc - private still */ 02119 EAPI void _edje_program_insert(Edje_Part_Collection *ed, Edje_Program *p); 02120 EAPI void _edje_program_remove(Edje_Part_Collection *ed, Edje_Program *p); 02121 02122 void _edje_lua2_error_full(const char *file, const char *fnc, int line, lua_State *L, int err_code); 02123 #define _edje_lua2_error(L, err_code) _edje_lua2_error_full(__FILE__, __FUNCTION__, __LINE__, L, err_code) 02124 void _edje_lua2_script_init(Edje *ed); 02125 void _edje_lua2_script_shutdown(Edje *ed); 02126 void _edje_lua2_script_load(Edje_Part_Collection *edc, void *data, int size); 02127 void _edje_lua2_script_unload(Edje_Part_Collection *edc); 02128 02129 void _edje_lua2_script_func_shutdown(Edje *ed); 02130 void _edje_lua2_script_func_show(Edje *ed); 02131 void _edje_lua2_script_func_hide(Edje *ed); 02132 void _edje_lua2_script_func_move(Edje *ed); 02133 void _edje_lua2_script_func_resize(Edje *ed); 02134 void _edje_lua2_script_func_message(Edje *ed, Edje_Message *em); 02135 void _edje_lua2_script_func_signal(Edje *ed, const char *sig, const char *src); 02136 02137 const char *edje_string_get(const Edje_String *es); 02138 const char *edje_string_id_get(const Edje_String *es); 02139 02140 void _edje_object_orientation_inform(Evas_Object *obj); 02141 02142 void _edje_lib_ref(void); 02143 void _edje_lib_unref(void); 02144 02145 void _edje_subobj_register(Edje *ed, Evas_Object *ob); 02146 void _edje_subobj_unregister(Edje *ed, Evas_Object *ob); 02147 02148 void _edje_multisense_init(void); 02149 void _edje_multisense_shutdown(void); 02150 Eina_Bool _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, const double speed); 02151 Eina_Bool _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const double duration); 02152 02153 void _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *state); 02154 02155 void _edje_user_definition_remove(Edje_User_Defined *eud, Evas_Object *child); 02156 void _edje_user_definition_free(Edje_User_Defined *eud); 02157 02158 #ifdef HAVE_LIBREMIX 02159 #include <remix/remix.h> 02160 #endif 02161 #include <Eina.h> 02162 02163 typedef struct _Edje_Multisense_Env Edje_Multisense_Env; 02164 02165 struct _Edje_Multisense_Env 02166 { 02167 #ifdef HAVE_LIBREMIX 02168 RemixEnv *remixenv; 02169 #endif 02170 }; 02171 02172 typedef Eina_Bool (*MULTISENSE_FACTORY_INIT_FUNC) (Edje_Multisense_Env *); 02173 #ifdef HAVE_LIBREMIX 02174 typedef RemixBase* (*MULTISENSE_SOUND_PLAYER_GET_FUNC) (Edje_Multisense_Env *); 02175 #endif 02176 02177 #endif