edje: unbork amalgamation.

SVN revision: 80405
This commit is contained in:
Cedric BAIL 2012-12-07 02:04:44 +00:00
parent e3d5ac0cb7
commit 165ba39b2c
9 changed files with 41 additions and 51 deletions

View File

@ -45,8 +45,6 @@ typedef struct _New_Statement_Handler New_Statement_Handler;
typedef struct _New_Nested_Handler New_Nested_Handler;
typedef struct _External_List External_List;
typedef struct _External External;
typedef struct _Font_List Font_List;
typedef struct _Font Font;
typedef struct _Code Code;
typedef struct _Code_Program Code_Program;
typedef struct _SrcFile SrcFile;
@ -86,17 +84,6 @@ struct _External
char *name;
};
struct _Font_List
{
Eina_List *list;
};
struct _Font
{
char *name;
char *file;
};
struct _Code
{
int l1, l2;
@ -206,7 +193,7 @@ void source_fetch(void);
int source_append(Eet_File *ef);
SrcFile_List *source_load(Eet_File *ef);
int source_fontmap_save(Eet_File *ef, Eina_List *fonts);
Font_List *source_fontmap_load(Eet_File *ef);
Edje_Font_List *source_fontmap_load(Eet_File *ef);
void *mem_alloc(size_t size);
char *mem_strdup(const char *s);

View File

@ -1636,14 +1636,14 @@ st_images_set_image_size(void)
static void
st_fonts_font(void)
{
Font *fn;
Edje_Font *fn;
check_arg_count(2);
if (!edje_file->fonts)
edje_file->fonts = eina_hash_string_small_new(free);
fn = mem_alloc(SZ(Font));
fn = mem_alloc(SZ(Edje_Font));
fn->file = parse_str(0);
fn->name = parse_str(1);

View File

@ -147,7 +147,7 @@ struct _Head_Write
struct _Fonts_Write
{
Eet_File *ef;
Font *fn;
Edje_Font *fn;
char *errstr;
};
@ -532,7 +532,7 @@ static void
data_write_fonts(Eet_File *ef, int *font_num)
{
Eina_Iterator *it;
Font *fn;
Edje_Font *fn;
if (!edje_file->fonts) return;

View File

@ -235,17 +235,17 @@ source_load(Eet_File *ef)
int
source_fontmap_save(Eet_File *ef, Eina_List *font_list)
{
Font_List fl;
Edje_Font_List fl;
fl.list = font_list;
return eet_data_write(ef, _font_list_edd, "edje_source_fontmap", &fl,
compress_mode);
}
Font_List *
Edje_Font_List *
source_fontmap_load(Eet_File *ef)
{
Font_List *fl;
Edje_Font_List *fl;
fl = eet_data_read(ef, _font_list_edd, "edje_source_fontmap");
return fl;

View File

@ -26,7 +26,7 @@ int compress_mode = EET_COMPRESSION_DEFAULT;
Edje_File *edje_file = NULL;
SrcFile_List *srcfiles = NULL;
Font_List *fontlist = NULL;
Edje_Font_List *fontlist = NULL;
int line = 0;
int build_sh = 1;

View File

@ -29,22 +29,9 @@ extern int _edje_cc_log_dom ;
#define DBG(...) EINA_LOG_DOM_DBG(_edje_cc_log_dom, __VA_ARGS__)
/* types */
typedef struct _Font Font;
typedef struct _Font_List Font_List;
typedef struct _SrcFile SrcFile;
typedef struct _SrcFile_List SrcFile_List;
struct _Font
{
char *file;
char *name;
};
struct _Font_List
{
Eina_List *list;
};
struct _SrcFile
{
char *name;
@ -61,7 +48,7 @@ void source_fetch(void);
int source_append(Eet_File *ef);
SrcFile_List *source_load(Eet_File *ef);
int source_fontmap_save(Eet_File *ef, Eina_List *fonts);
Font_List *source_fontmap_load(Eet_File *ef);
Edje_Font_List *source_fontmap_load(Eet_File *ef);
void *mem_alloc(size_t size);
char *mem_strdup(const char *s);

View File

@ -89,7 +89,7 @@ typedef struct _Edje_Pick_Tone Edje_Pick_Tone;
struct _Edje_Pick_Font
{
Font *f;
Edje_Font *f;
Eina_Bool used;
};
typedef struct _Edje_Pick_Font Edje_Pick_Font;
@ -246,7 +246,7 @@ _edje_pick_cleanup(Eina_List *ifs, Edje_File *out_file, Edje_Pick_Status s)
EINA_LIST_FREE(context.fontlist, ft)
{
Font *st = ft->f;
Edje_Font *st = ft->f;
eina_stringshare_del(st->name);
eina_stringshare_del(st->file);
@ -836,9 +836,12 @@ _edje_pick_sounds_add(Edje_File *edf)
static int
_font_cmp(const void *d1, const void *d2)
{
Edje_Font *f1 = d1;
Edje_Font *f2 = d2;
/* Same font if (d1->name == d2->name) AND (d1->file == d2->file) */
return (strcmp(((Font *) d1)->name, ((Font *) d2)->name) |
strcmp(((Font *) d1)->file, ((Font *) d2)->file));
return (strcmp(f1->name, f2->name) |
strcmp(f1->file, f2->file));
}
static int
@ -846,8 +849,8 @@ _Edje_Pick_Fonts_add(Edje_File *edf)
{
Eet_Data_Descriptor *_font_list_edd = NULL;
Eet_Data_Descriptor *_font_edd;
Font_List *fl;
Font *f;
Edje_Font_List *fl;
Edje_Font *f;
Eina_List *l;
_edje_data_font_list_desc_make(&_font_list_edd, &_font_edd);
@ -860,7 +863,7 @@ _Edje_Pick_Fonts_add(Edje_File *edf)
{
/* Add only fonts that are NOT regestered in our list */
Edje_Pick_Font *ft = malloc(sizeof(*ft));
Font *st = malloc(sizeof(*st));
Edje_Font *st = malloc(sizeof(*st));
st->name = (char *) eina_stringshare_add(f->name);
st->file = (char *) eina_stringshare_add(f->file);
@ -1161,7 +1164,7 @@ main(int argc, char **argv)
Edje_Part_Collection *edc;
Edje_Part_Collection_Directory_Entry *ce;
Eet_File *ef;
Font_List *fl;
Edje_Font_List *fl;
Eina_List *f, *l;
char buf[1024];
void *n;

View File

@ -1,4 +1,3 @@
#include "edje_cc.h" /* For struct Font */
#include "edje_private.h"
EAPI Eet_Data_Descriptor *_edje_edd_edje_file = NULL;
@ -953,21 +952,21 @@ _edje_edd_init(void)
EAPI void
_edje_data_font_list_desc_make(Eet_Data_Descriptor **_font_list_edd,
Eet_Data_Descriptor **_font_edd)
Eet_Data_Descriptor **_font_edd)
{ /* User have to free: _font_list_edd, _font_edd */
Eet_Data_Descriptor_Class eddc;
eet_eina_stream_data_descriptor_class_set(&eddc, sizeof (eddc),
"font", sizeof (Font));
"font", sizeof (Edje_Font));
*_font_edd = eet_data_descriptor_stream_new(&eddc);
EET_DATA_DESCRIPTOR_ADD_BASIC(*_font_edd, Font,
EET_DATA_DESCRIPTOR_ADD_BASIC(*_font_edd, Edje_Font,
"file", file, EET_T_INLINED_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(*_font_edd, Font,
EET_DATA_DESCRIPTOR_ADD_BASIC(*_font_edd, Edje_Font,
"name", name, EET_T_INLINED_STRING);
eet_eina_stream_data_descriptor_class_set(&eddc, sizeof (eddc),
"font_list", sizeof (Font_List));
"font_list", sizeof (Edje_Font_List));
*_font_list_edd = eet_data_descriptor_stream_new(&eddc);
EET_DATA_DESCRIPTOR_ADD_LIST(*_font_list_edd, Font_List,
EET_DATA_DESCRIPTOR_ADD_LIST(*_font_list_edd, Edje_Font_List,
"list", list, *_font_edd);
}

View File

@ -1691,6 +1691,20 @@ struct _Edje_User_Defined
} u;
};
typedef struct _Edje_Font_List Edje_Font_List;
typedef struct _Edje_Font Edje_Font;
struct _Edje_Font_List
{
Eina_List *list;
};
struct _Edje_Font
{
char *name;
char *file;
};
Edje_Patterns *edje_match_collection_dir_init(const Eina_List *lst);
Edje_Patterns *edje_match_programs_signal_init(Edje_Program * const *array,
unsigned int count);