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