src/lib/edje_convert.h

Go to the documentation of this file.
00001 #ifndef EDJE_CONVERT_H__
00002 # define EDJE_CONVERT_H__
00003 
00004 typedef struct _Old_Edje_Image_Directory    Old_Edje_Image_Directory;
00005 typedef struct _Old_Edje_Font_Directory         Old_Edje_Font_Directory;
00006 typedef struct _Old_Edje_External_Directory Old_Edje_External_Directory;
00007 typedef struct _Old_Edje_Part           Old_Edje_Part;
00008 typedef struct _Old_Edje_Part_Collection    Old_Edje_Part_Collection;
00009 typedef struct _Old_Edje_Part_Description       Old_Edje_Part_Description;
00010 typedef struct _Old_Edje_Part_Description_Spec_Image Old_Edje_Part_Description_Spec_Image;
00011 typedef struct _Edje_Data                       Edje_Data;
00012 
00013 struct _Edje_Data
00014 {
00015    const char *key;
00016    char *value;
00017 };
00018 
00019 /*----------*/
00020 
00021 struct _Old_Edje_Font_Directory
00022 {
00023    Eina_List *entries; /* a list of Edje_Font_Directory_Entry */
00024 };
00025 
00026 struct _Old_Edje_Image_Directory
00027 {
00028    Eina_List *entries; /* a list of Edje_Image_Directory_Entry */
00029    Eina_List *sets; /* a list of Edje_Image_Directory_Set */
00030 };
00031 
00032 struct _Old_Edje_External_Directory
00033 {
00034    Eina_List *entries; /* a list of Edje_External_Directory_Entry */
00035 };
00036 
00037 struct _Old_Edje_File
00038 {
00039    const char                     *path;
00040    time_t                          mtime;
00041 
00042    Old_Edje_External_Directory    *external_dir;
00043    Old_Edje_Font_Directory        *font_dir;
00044    Old_Edje_Image_Directory       *image_dir;
00045    Edje_Part_Collection_Directory *collection_dir;
00046    Eina_List                      *data;
00047    Eina_List                      *styles;
00048    Eina_List                      *color_classes;
00049 
00050    const char                     *compiler;
00051    int                             version;
00052    int                             feature_ver;
00053 };
00054 
00055 struct _Old_Edje_Part_Collection
00056 {
00057    Eina_List *programs; /* a list of Edje_Program */
00058    Eina_List *parts; /* a list of Edje_Part */
00059    Eina_List *data;
00060 
00061    int        id; /* the collection id */
00062 
00063    Eina_Hash *alias; /* aliasing part*/
00064 
00065    struct {
00066       Edje_Size min, max;
00067    } prop;
00068 
00069    int        references;
00070 #ifdef EDJE_PROGRAM_CACHE
00071    struct {
00072       Eina_Hash                   *no_matches;
00073       Eina_Hash                   *matches;
00074    } prog_cache;
00075 #endif
00076 
00077    Embryo_Program   *script; /* all the embryo script code for this group */
00078    const char       *part;
00079 
00080    unsigned char    script_only;
00081 
00082    unsigned char    lua_script_only;
00083 
00084    unsigned char    checked : 1;
00085 };
00086 
00087 struct _Old_Edje_Part
00088 {
00089    const char            *name; /* the name if any of the part */
00090    Old_Edje_Part_Description *default_desc; /* the part descriptor for default */
00091    Eina_List             *other_desc; /* other possible descriptors */
00092    const char            *source, *source2, *source3, *source4, *source5, *source6;
00093    int                    id; /* its id number */
00094    int                    clip_to_id; /* the part id to clip this one to */
00095    Edje_Part_Dragable     dragable;
00096    Eina_List             *items; /* packed items for box and table */
00097    unsigned char          type; /* what type (image, rect, text) */
00098    unsigned char          effect; /* 0 = plain... */
00099    unsigned char          mouse_events; /* it will affect/respond to mouse events */
00100    unsigned char          repeat_events; /* it will repeat events to objects below */
00101    Evas_Event_Flags       ignore_flags;
00102    unsigned char          scale; /* should certain properties scale with edje scale factor? */
00103    unsigned char          precise_is_inside;
00104    unsigned char          use_alternate_font_metrics;
00105    unsigned char          pointer_mode;
00106    unsigned char          entry_mode;
00107    unsigned char          select_mode;
00108    unsigned char          multiline;
00109    Edje_Part_Api      api;
00110 };
00111 
00112 struct _Old_Edje_Part_Description_Spec_Image
00113 {
00114    Eina_List     *tween_list; /* list of Edje_Part_Image_Id */
00115    int            id; /* the image id to use */
00116    int            scale_hint; /* evas scale hint */
00117    Eina_Bool      set; /* if image condition it's content */
00118 
00119    Edje_Part_Description_Spec_Border border;
00120    Edje_Part_Description_Spec_Fill   fill;
00121 };
00122 
00123 struct _Old_Edje_Part_Description
00124 {
00125    Edje_Part_Description_Common common;
00126    Old_Edje_Part_Description_Spec_Image image;
00127    Edje_Part_Description_Spec_Text text;
00128    Edje_Part_Description_Spec_Box box;
00129    Edje_Part_Description_Spec_Table table;
00130 
00131    Eina_List *external_params; /* parameters for external objects */
00132 };
00133 
00134 Edje_File *_edje_file_convert(Eet_File *file, Old_Edje_File *oedf);
00135 Edje_Part_Collection *_edje_collection_convert(Edje_File *file,
00136                            Old_Edje_Part_Collection *oedc);
00137 Edje_Part_Description_Common *_edje_description_convert(int type,
00138                             Edje_Part_Collection_Directory_Entry *ce,
00139                             Old_Edje_Part_Description *oed);
00140 const Edje_File *_edje_file_get(void);
00141 void _edje_file_set(const Edje_File *edf);
00142 
00143 #endif