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