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;
char *name;
};
-struct _Font_List
-{
- Eina_List *list;
-};
-
-struct _Font
-{
- char *name;
- char *file;
-};
-
struct _Code
{
int l1, l2;
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);
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);
struct _Fonts_Write
{
Eet_File *ef;
- Font *fn;
+ Edje_Font *fn;
char *errstr;
};
data_write_fonts(Eet_File *ef, int *font_num)
{
Eina_Iterator *it;
- Font *fn;
+ Edje_Font *fn;
if (!edje_file->fonts) return;
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;
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;
#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;
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);
\r
struct _Edje_Pick_Font\r
{\r
- Font *f;\r
+ Edje_Font *f;\r
Eina_Bool used;\r
};\r
typedef struct _Edje_Pick_Font Edje_Pick_Font;\r
\r
EINA_LIST_FREE(context.fontlist, ft)\r
{\r
- Font *st = ft->f;\r
+ Edje_Font *st = ft->f;\r
\r
eina_stringshare_del(st->name);\r
eina_stringshare_del(st->file);\r
static int\r
_font_cmp(const void *d1, const void *d2)\r
{\r
+ Edje_Font *f1 = d1;\r
+ Edje_Font *f2 = d2;\r
+\r
/* Same font if (d1->name == d2->name) AND (d1->file == d2->file) */\r
- return (strcmp(((Font *) d1)->name, ((Font *) d2)->name) |\r
- strcmp(((Font *) d1)->file, ((Font *) d2)->file));\r
+ return (strcmp(f1->name, f2->name) |\r
+ strcmp(f1->file, f2->file));\r
}\r
\r
static int\r
{\r
Eet_Data_Descriptor *_font_list_edd = NULL;\r
Eet_Data_Descriptor *_font_edd;\r
- Font_List *fl;\r
- Font *f;\r
+ Edje_Font_List *fl;\r
+ Edje_Font *f;\r
Eina_List *l;\r
\r
_edje_data_font_list_desc_make(&_font_list_edd, &_font_edd);\r
{\r
/* Add only fonts that are NOT regestered in our list */\r
Edje_Pick_Font *ft = malloc(sizeof(*ft));\r
- Font *st = malloc(sizeof(*st));\r
+ Edje_Font *st = malloc(sizeof(*st));\r
\r
st->name = (char *) eina_stringshare_add(f->name);\r
st->file = (char *) eina_stringshare_add(f->file);\r
Edje_Part_Collection *edc;\r
Edje_Part_Collection_Directory_Entry *ce;\r
Eet_File *ef;\r
- Font_List *fl;\r
+ Edje_Font_List *fl;\r
Eina_List *f, *l;\r
char buf[1024];\r
void *n;\r
-#include "edje_cc.h" /* For struct Font */
#include "edje_private.h"
EAPI Eet_Data_Descriptor *_edje_edd_edje_file = NULL;
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);
}
} 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);