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