Remove Evas list from Edje and use Eina instead.
SVN revision: 36961
This commit is contained in:
parent
f7283eb333
commit
fa66dbf40a
|
@ -6,9 +6,9 @@
|
||||||
|
|
||||||
static void main_help(void);
|
static void main_help(void);
|
||||||
|
|
||||||
Evas_List *img_dirs = NULL;
|
Eina_List *img_dirs = NULL;
|
||||||
Evas_List *fnt_dirs = NULL;
|
Eina_List *fnt_dirs = NULL;
|
||||||
Evas_List *defines = NULL;
|
Eina_List *defines = NULL;
|
||||||
char *file_in = NULL;
|
char *file_in = NULL;
|
||||||
char *file_out = NULL;
|
char *file_out = NULL;
|
||||||
char *progname = NULL;
|
char *progname = NULL;
|
||||||
|
@ -79,12 +79,12 @@ main(int argc, char **argv)
|
||||||
else if ((!strcmp(argv[i], "-id") || !strcmp(argv[i], "--image_dir")) && (i < (argc - 1)))
|
else if ((!strcmp(argv[i], "-id") || !strcmp(argv[i], "--image_dir")) && (i < (argc - 1)))
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
img_dirs = evas_list_append(img_dirs, argv[i]);
|
img_dirs = eina_list_append(img_dirs, argv[i]);
|
||||||
}
|
}
|
||||||
else if ((!strcmp(argv[i], "-fd") || !strcmp(argv[i], "--font_dir")) && (i < (argc - 1)))
|
else if ((!strcmp(argv[i], "-fd") || !strcmp(argv[i], "--font_dir")) && (i < (argc - 1)))
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
fnt_dirs = evas_list_append(fnt_dirs, argv[i]);
|
fnt_dirs = eina_list_append(fnt_dirs, argv[i]);
|
||||||
}
|
}
|
||||||
else if ((!strcmp(argv[i], "-min-quality")) && (i < (argc - 1)))
|
else if ((!strcmp(argv[i], "-min-quality")) && (i < (argc - 1)))
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
else if (!strncmp(argv[i], "-D", 2))
|
else if (!strncmp(argv[i], "-D", 2))
|
||||||
{
|
{
|
||||||
defines = evas_list_append(defines, mem_strdup(argv[i]));
|
defines = eina_list_append(defines, mem_strdup(argv[i]));
|
||||||
}
|
}
|
||||||
else if ((!strcmp(argv[i], "-o")) && (i < (argc - 1)))
|
else if ((!strcmp(argv[i], "-o")) && (i < (argc - 1)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct _New_Statement_Handler
|
||||||
|
|
||||||
struct _Font_List
|
struct _Font_List
|
||||||
{
|
{
|
||||||
Evas_List *list;
|
Eina_List *list;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Font
|
struct _Font
|
||||||
|
@ -49,7 +49,7 @@ struct _Code
|
||||||
{
|
{
|
||||||
int l1, l2;
|
int l1, l2;
|
||||||
char *shared;
|
char *shared;
|
||||||
Evas_List *programs;
|
Eina_List *programs;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Code_Program
|
struct _Code_Program
|
||||||
|
@ -67,7 +67,7 @@ struct _SrcFile
|
||||||
|
|
||||||
struct _SrcFile_List
|
struct _SrcFile_List
|
||||||
{
|
{
|
||||||
Evas_List *list;
|
Eina_List *list;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* global fn calls */
|
/* global fn calls */
|
||||||
|
@ -112,7 +112,7 @@ void source_edd(void);
|
||||||
void source_fetch(void);
|
void source_fetch(void);
|
||||||
int source_append(Eet_File *ef);
|
int source_append(Eet_File *ef);
|
||||||
SrcFile_List *source_load(Eet_File *ef);
|
SrcFile_List *source_load(Eet_File *ef);
|
||||||
int source_fontmap_save(Eet_File *ef, Evas_List *fonts);
|
int source_fontmap_save(Eet_File *ef, Eina_List *fonts);
|
||||||
Font_List *source_fontmap_load(Eet_File *ef);
|
Font_List *source_fontmap_load(Eet_File *ef);
|
||||||
|
|
||||||
void *mem_alloc(size_t size);
|
void *mem_alloc(size_t size);
|
||||||
|
@ -120,8 +120,8 @@ char *mem_strdup(const char *s);
|
||||||
#define SZ sizeof
|
#define SZ sizeof
|
||||||
|
|
||||||
/* global vars */
|
/* global vars */
|
||||||
extern Evas_List *img_dirs;
|
extern Eina_List *img_dirs;
|
||||||
extern Evas_List *fnt_dirs;
|
extern Eina_List *fnt_dirs;
|
||||||
extern char *file_in;
|
extern char *file_in;
|
||||||
extern char *file_out;
|
extern char *file_out;
|
||||||
extern char *progname;
|
extern char *progname;
|
||||||
|
@ -132,14 +132,14 @@ extern int no_raw;
|
||||||
extern int min_quality;
|
extern int min_quality;
|
||||||
extern int max_quality;
|
extern int max_quality;
|
||||||
extern int line;
|
extern int line;
|
||||||
extern Evas_List *stack;
|
extern Eina_List *stack;
|
||||||
extern Evas_List *params;
|
extern Eina_List *params;
|
||||||
extern Edje_File *edje_file;
|
extern Edje_File *edje_file;
|
||||||
extern Evas_List *edje_collections;
|
extern Eina_List *edje_collections;
|
||||||
extern Evas_List *fonts;
|
extern Eina_List *fonts;
|
||||||
extern Evas_List *codes;
|
extern Eina_List *codes;
|
||||||
extern Evas_List *defines;
|
extern Eina_List *defines;
|
||||||
extern Evas_List *aliases;
|
extern Eina_List *aliases;
|
||||||
extern New_Object_Handler object_handlers[];
|
extern New_Object_Handler object_handlers[];
|
||||||
extern New_Statement_Handler statement_handlers[];
|
extern New_Statement_Handler statement_handlers[];
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,11 +53,11 @@ struct _Code_Lookup
|
||||||
static void data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, void (*func)(Edje_Part_Collection *pc, char *name, char *ptr, int len));
|
static void data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, void (*func)(Edje_Part_Collection *pc, char *name, char *ptr, int len));
|
||||||
|
|
||||||
Edje_File *edje_file = NULL;
|
Edje_File *edje_file = NULL;
|
||||||
Evas_List *edje_collections = NULL;
|
Eina_List *edje_collections = NULL;
|
||||||
Evas_List *fonts = NULL;
|
Eina_List *fonts = NULL;
|
||||||
Evas_List *codes = NULL;
|
Eina_List *codes = NULL;
|
||||||
Evas_List *code_lookups = NULL;
|
Eina_List *code_lookups = NULL;
|
||||||
Evas_List *aliases = NULL;
|
Eina_List *aliases = NULL;
|
||||||
|
|
||||||
static Eet_Data_Descriptor *edd_edje_file = NULL;
|
static Eet_Data_Descriptor *edd_edje_file = NULL;
|
||||||
static Eet_Data_Descriptor *edd_edje_image_directory = NULL;
|
static Eet_Data_Descriptor *edd_edje_image_directory = NULL;
|
||||||
|
@ -74,14 +74,14 @@ static Eet_Data_Descriptor *edd_edje_part_description = NULL;
|
||||||
static Eet_Data_Descriptor *edd_edje_part_image_id = NULL;
|
static Eet_Data_Descriptor *edd_edje_part_image_id = NULL;
|
||||||
static Eet_Data_Descriptor *edd_edje_spectrum_color = NULL;
|
static Eet_Data_Descriptor *edd_edje_spectrum_color = NULL;
|
||||||
|
|
||||||
static Evas_List *part_lookups = NULL;
|
static Eina_List *part_lookups = NULL;
|
||||||
static Evas_List *program_lookups = NULL;
|
static Eina_List *program_lookups = NULL;
|
||||||
static Evas_List *group_lookups = NULL;
|
static Eina_List *group_lookups = NULL;
|
||||||
static Evas_List *image_lookups = NULL;
|
static Eina_List *image_lookups = NULL;
|
||||||
static Evas_List *spectrum_lookups = NULL;
|
static Eina_List *spectrum_lookups = NULL;
|
||||||
static Evas_List *part_slave_lookups = NULL;
|
static Eina_List *part_slave_lookups = NULL;
|
||||||
static Evas_List *image_slave_lookups= NULL;
|
static Eina_List *image_slave_lookups= NULL;
|
||||||
static Evas_List *spectrum_slave_lookups= NULL;
|
static Eina_List *spectrum_slave_lookups= NULL;
|
||||||
|
|
||||||
#define ABORT_WRITE(eet_file, file) \
|
#define ABORT_WRITE(eet_file, file) \
|
||||||
eet_close(eet_file); \
|
eet_close(eet_file); \
|
||||||
|
@ -124,7 +124,8 @@ static void
|
||||||
check_image_part_desc (Edje_Part_Collection *pc, Edje_Part *ep,
|
check_image_part_desc (Edje_Part_Collection *pc, Edje_Part *ep,
|
||||||
Edje_Part_Description *epd, Eet_File *ef)
|
Edje_Part_Description *epd, Eet_File *ef)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Part_Image_Id *iid;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
if (epd->image.id == -1)
|
if (epd->image.id == -1)
|
||||||
|
@ -132,10 +133,8 @@ check_image_part_desc (Edje_Part_Collection *pc, Edje_Part *ep,
|
||||||
"part \"%s\", description \"%s\" %f\n",
|
"part \"%s\", description \"%s\" %f\n",
|
||||||
pc->id, ep->name, epd->state.name, epd->state.value);
|
pc->id, ep->name, epd->state.name, epd->state.value);
|
||||||
|
|
||||||
for (l = epd->image.tween_list; l; l = l->next)
|
EINA_LIST_FOREACH(epd->image.tween_list, l, iid)
|
||||||
{
|
{
|
||||||
Edje_Part_Image_Id *iid = l->data;
|
|
||||||
|
|
||||||
if (iid->id == -1)
|
if (iid->id == -1)
|
||||||
error_and_abort(ef, "Collection %i: tween image id missing for "
|
error_and_abort(ef, "Collection %i: tween image id missing for "
|
||||||
"part \"%s\", description \"%s\" %f\n",
|
"part \"%s\", description \"%s\" %f\n",
|
||||||
|
@ -147,7 +146,8 @@ static void
|
||||||
check_part (Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
|
check_part (Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
|
||||||
{
|
{
|
||||||
Edje_Part_Description *epd = ep->default_desc;
|
Edje_Part_Description *epd = ep->default_desc;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Part_Description *data;
|
||||||
|
|
||||||
if (!epd)
|
if (!epd)
|
||||||
error_and_abort(ef, "Collection %i: default description missing "
|
error_and_abort(ef, "Collection %i: default description missing "
|
||||||
|
@ -157,8 +157,8 @@ check_part (Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
|
||||||
{
|
{
|
||||||
check_image_part_desc (pc, ep, epd, ef);
|
check_image_part_desc (pc, ep, epd, ef);
|
||||||
|
|
||||||
for (l = ep->other_desc; l; l = l->next)
|
EINA_LIST_FOREACH(ep->other_desc, l, data)
|
||||||
check_image_part_desc (pc, ep, l->data, ef);
|
check_image_part_desc (pc, ep, data, ef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,8 +204,8 @@ data_write_header(Eet_File *ef)
|
||||||
/* copy aliases into collection directory */
|
/* copy aliases into collection directory */
|
||||||
while (aliases)
|
while (aliases)
|
||||||
{
|
{
|
||||||
edje_file->collection_dir->entries = evas_list_append(edje_file->collection_dir->entries, aliases->data);
|
edje_file->collection_dir->entries = eina_list_append(edje_file->collection_dir->entries, eina_list_data_get(aliases));
|
||||||
aliases = evas_list_remove_list(aliases, aliases);
|
aliases = eina_list_remove_list(aliases, aliases);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bytes = eet_data_write(ef, edd_edje_file, "edje_file", edje_file, 1);
|
bytes = eet_data_write(ef, edd_edje_file, "edje_file", edje_file, 1);
|
||||||
|
@ -226,19 +226,18 @@ data_write_header(Eet_File *ef)
|
||||||
static int
|
static int
|
||||||
data_write_fonts(Eet_File *ef, int *font_num, int *input_bytes, int *input_raw_bytes)
|
data_write_fonts(Eet_File *ef, int *font_num, int *input_bytes, int *input_raw_bytes)
|
||||||
{
|
{
|
||||||
Evas_List *l;;
|
Eina_List *l;;
|
||||||
int bytes = 0;
|
int bytes = 0;
|
||||||
int total_bytes = 0;
|
int total_bytes = 0;
|
||||||
|
Font *fn;
|
||||||
|
|
||||||
for (l = fonts; l; l = l->next)
|
EINA_LIST_FOREACH(fonts, l, fn)
|
||||||
{
|
{
|
||||||
Font *fn;
|
|
||||||
void *fdata = NULL;
|
void *fdata = NULL;
|
||||||
int fsize = 0;
|
int fsize = 0;
|
||||||
Evas_List *ll;
|
Eina_List *ll;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
fn = l->data;
|
|
||||||
f = fopen(fn->file, "rb");
|
f = fopen(fn->file, "rb");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
|
@ -259,11 +258,13 @@ data_write_fonts(Eet_File *ef, int *font_num, int *input_bytes, int *input_raw_b
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (ll = fnt_dirs; ll; ll = ll->next)
|
char *data;
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(fnt_dirs, ll, data)
|
||||||
{
|
{
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", (char *)(ll->data), fn->file);
|
snprintf(buf, sizeof(buf), "%s/%s", data, fn->file);
|
||||||
f = fopen(buf, "rb");
|
f = fopen(buf, "rb");
|
||||||
if (f)
|
if (f)
|
||||||
{
|
{
|
||||||
|
@ -322,7 +323,7 @@ data_write_fonts(Eet_File *ef, int *font_num, int *input_bytes, int *input_raw_b
|
||||||
static int
|
static int
|
||||||
data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw_bytes)
|
data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw_bytes)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
int bytes = 0;
|
int bytes = 0;
|
||||||
int total_bytes = 0;
|
int total_bytes = 0;
|
||||||
|
|
||||||
|
@ -330,6 +331,7 @@ data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
|
Edje_Image_Directory_Entry *img;
|
||||||
|
|
||||||
ecore_init();
|
ecore_init();
|
||||||
ecore_evas_init();
|
ecore_evas_init();
|
||||||
|
@ -340,26 +342,24 @@ data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw
|
||||||
"load.\n");
|
"load.\n");
|
||||||
|
|
||||||
evas = ecore_evas_get(ee);
|
evas = ecore_evas_get(ee);
|
||||||
for (l = edje_file->image_dir->entries; l; l = l->next)
|
EINA_LIST_FOREACH(edje_file->image_dir->entries, l, img)
|
||||||
{
|
{
|
||||||
Edje_Image_Directory_Entry *img;
|
|
||||||
|
|
||||||
img = l->data;
|
|
||||||
if (img->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL)
|
if (img->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Evas_Object *im;
|
Evas_Object *im;
|
||||||
Evas_List *ll;
|
Eina_List *ll;
|
||||||
|
char *data;
|
||||||
|
|
||||||
im = NULL;
|
im = NULL;
|
||||||
for (ll = img_dirs; ll; ll = ll->next)
|
EINA_LIST_FOREACH(img_dirs, ll, data)
|
||||||
{
|
{
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/%s",
|
snprintf(buf, sizeof(buf), "%s/%s",
|
||||||
(char *)(ll->data), img->entry);
|
data, img->entry);
|
||||||
im = evas_object_image_add(evas);
|
im = evas_object_image_add(evas);
|
||||||
if (im)
|
if (im)
|
||||||
{
|
{
|
||||||
|
@ -501,70 +501,64 @@ data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw
|
||||||
static void
|
static void
|
||||||
check_groups_names(Eet_File *ef)
|
check_groups_names(Eet_File *ef)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Part_Collection_Directory_Entry *de;
|
||||||
|
|
||||||
if (!edje_file->collection_dir)
|
if (!edje_file->collection_dir)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* check that all groups have names */
|
/* check that all groups have names */
|
||||||
for (l = edje_file->collection_dir->entries; l; l = l->next)
|
EINA_LIST_FOREACH(edje_file->collection_dir->entries, l, de)
|
||||||
{
|
|
||||||
Edje_Part_Collection_Directory_Entry *de;
|
|
||||||
de = l->data;
|
|
||||||
if (!de->entry)
|
if (!de->entry)
|
||||||
error_and_abort(ef, "Collection %i: name missing.\n", de->id);
|
error_and_abort(ef, "Collection %i: name missing.\n", de->id);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check_spectra(Eet_File *ef)
|
check_spectra(Eet_File *ef)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Spectrum_Directory_Entry *se;
|
||||||
|
|
||||||
if (!edje_file->spectrum_dir)
|
if (!edje_file->spectrum_dir)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* check that all spectra are valid */
|
/* check that all spectra are valid */
|
||||||
for (l = edje_file->spectrum_dir->entries; l; l = l->next)
|
EINA_LIST_FOREACH(edje_file->spectrum_dir->entries, l, se)
|
||||||
{
|
check_spectrum(se, ef);
|
||||||
Edje_Spectrum_Directory_Entry *se;
|
|
||||||
se = l->data;
|
|
||||||
check_spectrum(se, ef);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check_groups(Eet_File *ef)
|
check_groups(Eet_File *ef)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Part_Collection *pc;
|
||||||
|
|
||||||
/* sanity checks for parts and programs */
|
/* sanity checks for parts and programs */
|
||||||
for (l = edje_collections; l; l = l->next)
|
EINA_LIST_FOREACH(edje_collections, l, pc)
|
||||||
{
|
{
|
||||||
Edje_Part_Collection *pc;
|
Eina_List *ll;
|
||||||
Evas_List *ll;
|
Edje_Part *part;
|
||||||
|
Edje_Program *prog;
|
||||||
|
|
||||||
pc = l->data;
|
EINA_LIST_FOREACH(pc->parts, ll, part)
|
||||||
for (ll = pc->parts; ll; ll = ll->next)
|
check_part(pc, part, ef);
|
||||||
check_part(pc, ll->data, ef);
|
EINA_LIST_FOREACH(pc->programs, ll, prog)
|
||||||
for (ll = pc->programs; ll; ll = ll->next)
|
check_program(pc, prog, ef);
|
||||||
check_program(pc, ll->data, ef);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
data_write_groups(Eet_File *ef, int *collection_num)
|
data_write_groups(Eet_File *ef, int *collection_num)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Part_Collection *pc;
|
||||||
int bytes = 0;
|
int bytes = 0;
|
||||||
int total_bytes = 0;
|
int total_bytes = 0;
|
||||||
|
|
||||||
for (l = edje_collections; l; l = l->next)
|
EINA_LIST_FOREACH(edje_collections, l, pc)
|
||||||
{
|
{
|
||||||
Edje_Part_Collection *pc;
|
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
|
|
||||||
pc = l->data;
|
|
||||||
snprintf(buf, sizeof(buf), "collections/%i", pc->id);
|
snprintf(buf, sizeof(buf), "collections/%i", pc->id);
|
||||||
bytes = eet_data_write(ef, edd_edje_part_collection, buf, pc, 1);
|
bytes = eet_data_write(ef, edd_edje_part_collection, buf, pc, 1);
|
||||||
if (bytes <= 0)
|
if (bytes <= 0)
|
||||||
|
@ -592,7 +586,8 @@ create_script_file(Eet_File *ef, const char *filename, const Code *cd)
|
||||||
error_and_abort(ef, "Unable to open temp file \"%s\" for script "
|
error_and_abort(ef, "Unable to open temp file \"%s\" for script "
|
||||||
"compilation.\n", filename);
|
"compilation.\n", filename);
|
||||||
|
|
||||||
Evas_List *ll;
|
Eina_List *ll;
|
||||||
|
Code_Program *cp;
|
||||||
|
|
||||||
fprintf(f, "#include <edje>\n");
|
fprintf(f, "#include <edje>\n");
|
||||||
int ln = 2;
|
int ln = 2;
|
||||||
|
@ -624,11 +619,8 @@ create_script_file(Eet_File *ef, const char *filename, const Code *cd)
|
||||||
}
|
}
|
||||||
ln += cd->l2 - cd->l1 + 1;
|
ln += cd->l2 - cd->l1 + 1;
|
||||||
}
|
}
|
||||||
for (ll = cd->programs; ll; ll = ll->next)
|
EINA_LIST_FOREACH(cd->programs, ll, cp)
|
||||||
{
|
{
|
||||||
Code_Program *cp;
|
|
||||||
|
|
||||||
cp = ll->data;
|
|
||||||
if (cp->script)
|
if (cp->script)
|
||||||
{
|
{
|
||||||
while (ln < (cp->l1 - 1))
|
while (ln < (cp->l1 - 1))
|
||||||
|
@ -713,7 +705,7 @@ compile_script_file(Eet_File *ef, const char *source, const char *output,
|
||||||
static void
|
static void
|
||||||
data_write_scripts(Eet_File *ef)
|
data_write_scripts(Eet_File *ef)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef HAVE_EVIL
|
#ifdef HAVE_EVIL
|
||||||
|
@ -722,10 +714,10 @@ data_write_scripts(Eet_File *ef)
|
||||||
char *tmpdir = "/tmp";
|
char *tmpdir = "/tmp";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 0, l = codes; l; l = l->next, i++)
|
for (i = 0, l = codes; l; l = eina_list_next(l), i++)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
Code *cd = l->data;
|
Code *cd = eina_list_data_get(l);
|
||||||
|
|
||||||
if ((!cd->shared) && (!cd->programs))
|
if ((!cd->shared) && (!cd->programs))
|
||||||
continue;
|
continue;
|
||||||
|
@ -846,7 +838,7 @@ data_queue_group_lookup(char *name)
|
||||||
Group_Lookup *gl;
|
Group_Lookup *gl;
|
||||||
|
|
||||||
gl = mem_alloc(SZ(Group_Lookup));
|
gl = mem_alloc(SZ(Group_Lookup));
|
||||||
group_lookups = evas_list_append(group_lookups, gl);
|
group_lookups = eina_list_append(group_lookups, gl);
|
||||||
gl->name = mem_strdup(name);
|
gl->name = mem_strdup(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -856,7 +848,7 @@ data_queue_part_lookup(Edje_Part_Collection *pc, char *name, int *dest)
|
||||||
Part_Lookup *pl;
|
Part_Lookup *pl;
|
||||||
|
|
||||||
pl = mem_alloc(SZ(Part_Lookup));
|
pl = mem_alloc(SZ(Part_Lookup));
|
||||||
part_lookups = evas_list_append(part_lookups, pl);
|
part_lookups = eina_list_append(part_lookups, pl);
|
||||||
pl->pc = pc;
|
pl->pc = pc;
|
||||||
pl->name = mem_strdup(name);
|
pl->name = mem_strdup(name);
|
||||||
pl->dest = dest;
|
pl->dest = dest;
|
||||||
|
@ -868,7 +860,7 @@ data_queue_program_lookup(Edje_Part_Collection *pc, char *name, int *dest)
|
||||||
Program_Lookup *pl;
|
Program_Lookup *pl;
|
||||||
|
|
||||||
pl = mem_alloc(SZ(Program_Lookup));
|
pl = mem_alloc(SZ(Program_Lookup));
|
||||||
program_lookups = evas_list_append(program_lookups, pl);
|
program_lookups = eina_list_append(program_lookups, pl);
|
||||||
pl->pc = pc;
|
pl->pc = pc;
|
||||||
pl->name = mem_strdup(name);
|
pl->name = mem_strdup(name);
|
||||||
pl->dest = dest;
|
pl->dest = dest;
|
||||||
|
@ -880,7 +872,7 @@ data_queue_image_lookup(char *name, int *dest)
|
||||||
Image_Lookup *il;
|
Image_Lookup *il;
|
||||||
|
|
||||||
il = mem_alloc(SZ(Image_Lookup));
|
il = mem_alloc(SZ(Image_Lookup));
|
||||||
image_lookups = evas_list_append(image_lookups, il);
|
image_lookups = eina_list_append(image_lookups, il);
|
||||||
il->name = mem_strdup(name);
|
il->name = mem_strdup(name);
|
||||||
il->dest = dest;
|
il->dest = dest;
|
||||||
}
|
}
|
||||||
|
@ -891,7 +883,7 @@ data_queue_spectrum_lookup(char *name, int *dest)
|
||||||
Spectrum_Lookup *sl;
|
Spectrum_Lookup *sl;
|
||||||
|
|
||||||
sl = mem_alloc(SZ(Spectrum_Lookup));
|
sl = mem_alloc(SZ(Spectrum_Lookup));
|
||||||
spectrum_lookups = evas_list_append(spectrum_lookups, sl);
|
spectrum_lookups = eina_list_append(spectrum_lookups, sl);
|
||||||
sl->name = mem_strdup(name);
|
sl->name = mem_strdup(name);
|
||||||
sl->dest = dest;
|
sl->dest = dest;
|
||||||
}
|
}
|
||||||
|
@ -902,7 +894,7 @@ data_queue_part_slave_lookup(int *master, int *slave)
|
||||||
Slave_Lookup *sl;
|
Slave_Lookup *sl;
|
||||||
|
|
||||||
sl = mem_alloc(SZ(Slave_Lookup));
|
sl = mem_alloc(SZ(Slave_Lookup));
|
||||||
part_slave_lookups = evas_list_append(part_slave_lookups, sl);
|
part_slave_lookups = eina_list_append(part_slave_lookups, sl);
|
||||||
sl->master = master;
|
sl->master = master;
|
||||||
sl->slave = slave;
|
sl->slave = slave;
|
||||||
}
|
}
|
||||||
|
@ -913,7 +905,7 @@ data_queue_image_slave_lookup(int *master, int *slave)
|
||||||
Slave_Lookup *sl;
|
Slave_Lookup *sl;
|
||||||
|
|
||||||
sl = mem_alloc(SZ(Slave_Lookup));
|
sl = mem_alloc(SZ(Slave_Lookup));
|
||||||
image_slave_lookups = evas_list_append(image_slave_lookups, sl);
|
image_slave_lookups = eina_list_append(image_slave_lookups, sl);
|
||||||
sl->master = master;
|
sl->master = master;
|
||||||
sl->slave = slave;
|
sl->slave = slave;
|
||||||
}
|
}
|
||||||
|
@ -924,41 +916,36 @@ data_queue_spectrum_slave_lookup(int *master, int *slave)
|
||||||
Slave_Lookup *sl;
|
Slave_Lookup *sl;
|
||||||
|
|
||||||
sl = mem_alloc(SZ(Slave_Lookup));
|
sl = mem_alloc(SZ(Slave_Lookup));
|
||||||
spectrum_slave_lookups = evas_list_append(spectrum_slave_lookups, sl);
|
spectrum_slave_lookups = eina_list_append(spectrum_slave_lookups, sl);
|
||||||
sl->master = master;
|
sl->master = master;
|
||||||
sl->slave = slave;
|
sl->slave = slave;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
handle_slave_lookup(Evas_List *list, int *master, int value)
|
handle_slave_lookup(Eina_List *list, int *master, int value)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Slave_Lookup *sl;
|
||||||
|
|
||||||
for (l = list; l; l = l->next)
|
EINA_LIST_FOREACH(list, l, sl)
|
||||||
{
|
if (sl->master == master)
|
||||||
Slave_Lookup *sl = l->data;
|
*sl->slave = value;
|
||||||
|
|
||||||
if (sl->master == master)
|
|
||||||
*sl->slave = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
data_process_lookups(void)
|
data_process_lookups(void)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
while (part_lookups)
|
while (part_lookups)
|
||||||
{
|
{
|
||||||
Part_Lookup *pl;
|
Part_Lookup *pl;
|
||||||
|
Edje_Part *ep;
|
||||||
|
|
||||||
pl = part_lookups->data;
|
pl = eina_list_data_get(part_lookups);
|
||||||
|
|
||||||
for (l = pl->pc->parts; l; l = l->next)
|
EINA_LIST_FOREACH(pl->pc->parts, l, ep)
|
||||||
{
|
{
|
||||||
Edje_Part *ep;
|
|
||||||
|
|
||||||
ep = l->data;
|
|
||||||
if ((ep->name) && (!strcmp(ep->name, pl->name)))
|
if ((ep->name) && (!strcmp(ep->name, pl->name)))
|
||||||
{
|
{
|
||||||
handle_slave_lookup(part_slave_lookups, pl->dest, ep->id);
|
handle_slave_lookup(part_slave_lookups, pl->dest, ep->id);
|
||||||
|
@ -972,7 +959,7 @@ data_process_lookups(void)
|
||||||
progname, pl->name);
|
progname, pl->name);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
part_lookups = evas_list_remove(part_lookups, pl);
|
part_lookups = eina_list_remove(part_lookups, pl);
|
||||||
free(pl->name);
|
free(pl->name);
|
||||||
free(pl);
|
free(pl);
|
||||||
}
|
}
|
||||||
|
@ -980,14 +967,12 @@ data_process_lookups(void)
|
||||||
while (program_lookups)
|
while (program_lookups)
|
||||||
{
|
{
|
||||||
Program_Lookup *pl;
|
Program_Lookup *pl;
|
||||||
|
Edje_Program *ep;
|
||||||
|
|
||||||
pl = program_lookups->data;
|
pl = eina_list_data_get(program_lookups);
|
||||||
|
|
||||||
for (l = pl->pc->programs; l; l = l->next)
|
EINA_LIST_FOREACH(pl->pc->programs, l, ep)
|
||||||
{
|
{
|
||||||
Edje_Program *ep;
|
|
||||||
|
|
||||||
ep = l->data;
|
|
||||||
if ((ep->name) && (!strcmp(ep->name, pl->name)))
|
if ((ep->name) && (!strcmp(ep->name, pl->name)))
|
||||||
{
|
{
|
||||||
*(pl->dest) = ep->id;
|
*(pl->dest) = ep->id;
|
||||||
|
@ -1000,7 +985,7 @@ data_process_lookups(void)
|
||||||
progname, pl->name);
|
progname, pl->name);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
program_lookups = evas_list_remove(program_lookups, pl);
|
program_lookups = eina_list_remove(program_lookups, pl);
|
||||||
free(pl->name);
|
free(pl->name);
|
||||||
free(pl);
|
free(pl);
|
||||||
}
|
}
|
||||||
|
@ -1008,12 +993,12 @@ data_process_lookups(void)
|
||||||
while (group_lookups)
|
while (group_lookups)
|
||||||
{
|
{
|
||||||
Group_Lookup *gl;
|
Group_Lookup *gl;
|
||||||
|
Edje_Part_Collection_Directory_Entry *de;
|
||||||
|
|
||||||
gl = group_lookups->data;
|
gl = eina_list_data_get(group_lookups);
|
||||||
for (l = edje_file->collection_dir->entries; l; l = l->next)
|
|
||||||
|
EINA_LIST_FOREACH(edje_file->collection_dir->entries, l, de)
|
||||||
{
|
{
|
||||||
Edje_Part_Collection_Directory_Entry *de;
|
|
||||||
de = l->data;
|
|
||||||
if (!strcmp(de->entry, gl->name))
|
if (!strcmp(de->entry, gl->name))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
@ -1025,7 +1010,7 @@ data_process_lookups(void)
|
||||||
progname, gl->name);
|
progname, gl->name);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
group_lookups = evas_list_remove(group_lookups, gl);
|
group_lookups = eina_list_remove(group_lookups, gl);
|
||||||
free(gl->name);
|
free(gl->name);
|
||||||
free(gl);
|
free(gl);
|
||||||
}
|
}
|
||||||
|
@ -1033,18 +1018,16 @@ data_process_lookups(void)
|
||||||
while (image_lookups)
|
while (image_lookups)
|
||||||
{
|
{
|
||||||
Image_Lookup *il;
|
Image_Lookup *il;
|
||||||
|
Edje_Image_Directory_Entry *de;
|
||||||
|
|
||||||
il = image_lookups->data;
|
il = eina_list_data_get(image_lookups);
|
||||||
|
|
||||||
if (!edje_file->image_dir)
|
if (!edje_file->image_dir)
|
||||||
l = NULL;
|
l = NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (l = edje_file->image_dir->entries; l; l = l->next)
|
EINA_LIST_FOREACH(edje_file->image_dir->entries, l, de)
|
||||||
{
|
{
|
||||||
Edje_Image_Directory_Entry *de;
|
|
||||||
|
|
||||||
de = l->data;
|
|
||||||
if ((de->entry) && (!strcmp(de->entry, il->name)))
|
if ((de->entry) && (!strcmp(de->entry, il->name)))
|
||||||
{
|
{
|
||||||
handle_slave_lookup(image_slave_lookups, il->dest, de->id);
|
handle_slave_lookup(image_slave_lookups, il->dest, de->id);
|
||||||
|
@ -1063,7 +1046,7 @@ data_process_lookups(void)
|
||||||
progname, il->name);
|
progname, il->name);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
image_lookups = evas_list_remove(image_lookups, il);
|
image_lookups = eina_list_remove(image_lookups, il);
|
||||||
free(il->name);
|
free(il->name);
|
||||||
free(il);
|
free(il);
|
||||||
}
|
}
|
||||||
|
@ -1071,18 +1054,16 @@ data_process_lookups(void)
|
||||||
while (spectrum_lookups)
|
while (spectrum_lookups)
|
||||||
{
|
{
|
||||||
Spectrum_Lookup *il;
|
Spectrum_Lookup *il;
|
||||||
|
Edje_Spectrum_Directory_Entry *de;
|
||||||
|
|
||||||
il = spectrum_lookups->data;
|
il = eina_list_data_get(spectrum_lookups);
|
||||||
|
|
||||||
if (!edje_file->spectrum_dir)
|
if (!edje_file->spectrum_dir)
|
||||||
l = NULL;
|
l = NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (l = edje_file->spectrum_dir->entries; l; l = l->next)
|
EINA_LIST_FOREACH(edje_file->spectrum_dir->entries, l, de)
|
||||||
{
|
{
|
||||||
Edje_Spectrum_Directory_Entry *de;
|
|
||||||
|
|
||||||
de = l->data;
|
|
||||||
*(il->dest) = 1;
|
*(il->dest) = 1;
|
||||||
if ((de->entry) && (!strcmp(de->entry, il->name)))
|
if ((de->entry) && (!strcmp(de->entry, il->name)))
|
||||||
{
|
{
|
||||||
|
@ -1099,27 +1080,27 @@ data_process_lookups(void)
|
||||||
progname, il->name);
|
progname, il->name);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
spectrum_lookups = evas_list_remove(spectrum_lookups, il);
|
spectrum_lookups = eina_list_remove(spectrum_lookups, il);
|
||||||
free(il->name);
|
free(il->name);
|
||||||
free(il);
|
free(il);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (part_slave_lookups)
|
while (part_slave_lookups)
|
||||||
{
|
{
|
||||||
free(part_slave_lookups->data);
|
free(eina_list_data_get(part_slave_lookups));
|
||||||
part_slave_lookups = evas_list_remove_list(part_slave_lookups, part_slave_lookups);
|
part_slave_lookups = eina_list_remove_list(part_slave_lookups, part_slave_lookups);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (image_slave_lookups)
|
while (image_slave_lookups)
|
||||||
{
|
{
|
||||||
free(image_slave_lookups->data);
|
free(eina_list_data_get(image_slave_lookups));
|
||||||
image_slave_lookups = evas_list_remove_list(image_slave_lookups, image_slave_lookups);
|
image_slave_lookups = eina_list_remove_list(image_slave_lookups, image_slave_lookups);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (spectrum_slave_lookups)
|
while (spectrum_slave_lookups)
|
||||||
{
|
{
|
||||||
free(spectrum_slave_lookups->data);
|
free(eina_list_data_get(spectrum_slave_lookups));
|
||||||
spectrum_slave_lookups = evas_list_remove_list(spectrum_slave_lookups, spectrum_slave_lookups);
|
spectrum_slave_lookups = eina_list_remove_list(spectrum_slave_lookups, spectrum_slave_lookups);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1244,7 +1225,7 @@ _data_queue_part_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len
|
||||||
|
|
||||||
data_queue_part_lookup(pc, name, &(cl->val));
|
data_queue_part_lookup(pc, name, &(cl->val));
|
||||||
|
|
||||||
code_lookups = evas_list_append(code_lookups, cl);
|
code_lookups = eina_list_append(code_lookups, cl);
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
_data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len)
|
_data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len)
|
||||||
|
@ -1256,7 +1237,7 @@ _data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int
|
||||||
|
|
||||||
data_queue_program_lookup(pc, name, &(cl->val));
|
data_queue_program_lookup(pc, name, &(cl->val));
|
||||||
|
|
||||||
code_lookups = evas_list_append(code_lookups, cl);
|
code_lookups = eina_list_append(code_lookups, cl);
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
_data_queue_group_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len)
|
_data_queue_group_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len)
|
||||||
|
@ -1273,24 +1254,25 @@ _data_queue_image_pc_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int
|
||||||
|
|
||||||
data_queue_image_lookup(name, &(cl->val));
|
data_queue_image_lookup(name, &(cl->val));
|
||||||
|
|
||||||
code_lookups = evas_list_append(code_lookups, cl);
|
code_lookups = eina_list_append(code_lookups, cl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
data_process_scripts(void)
|
data_process_scripts(void)
|
||||||
{
|
{
|
||||||
Evas_List *l, *l2;
|
Eina_List *l, *l2;
|
||||||
|
|
||||||
for (l = codes, l2 = edje_collections; (l) && (l2); l = l->next, l2 = l2->next)
|
for (l = codes, l2 = edje_collections; (l) && (l2); l = eina_list_next(l), l2 = eina_list_next(l2))
|
||||||
{
|
{
|
||||||
Code *cd;
|
Code *cd;
|
||||||
Edje_Part_Collection *pc;
|
Edje_Part_Collection *pc;
|
||||||
|
|
||||||
cd = l->data;
|
cd = eina_list_data_get(l);
|
||||||
pc = l2->data;
|
pc = eina_list_data_get(l2);
|
||||||
if ((cd->shared) || (cd->programs))
|
if ((cd->shared) || (cd->programs))
|
||||||
{
|
{
|
||||||
Evas_List *ll;
|
Eina_List *ll;
|
||||||
|
Code_Program *cp;
|
||||||
|
|
||||||
if (cd->shared)
|
if (cd->shared)
|
||||||
{
|
{
|
||||||
|
@ -1299,11 +1281,8 @@ data_process_scripts(void)
|
||||||
data_process_string(pc, "IMAGE", cd->shared, _data_queue_image_pc_lookup);
|
data_process_string(pc, "IMAGE", cd->shared, _data_queue_image_pc_lookup);
|
||||||
data_process_string(pc, "GROUP", cd->shared, _data_queue_group_lookup);
|
data_process_string(pc, "GROUP", cd->shared, _data_queue_group_lookup);
|
||||||
}
|
}
|
||||||
for (ll = cd->programs; ll; ll = ll->next)
|
EINA_LIST_FOREACH(cd->programs, ll, cp)
|
||||||
{
|
{
|
||||||
Code_Program *cp;
|
|
||||||
|
|
||||||
cp = ll->data;
|
|
||||||
if (cp->script)
|
if (cp->script)
|
||||||
{
|
{
|
||||||
data_process_string(pc, "PART", cp->script, _data_queue_part_lookup);
|
data_process_string(pc, "PART", cp->script, _data_queue_part_lookup);
|
||||||
|
@ -1319,15 +1298,14 @@ data_process_scripts(void)
|
||||||
void
|
void
|
||||||
data_process_script_lookups(void)
|
data_process_script_lookups(void)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Code_Lookup *cl;
|
||||||
|
|
||||||
for (l = code_lookups; l; l = l->next)
|
EINA_LIST_FOREACH(code_lookups, l, cl)
|
||||||
{
|
{
|
||||||
Code_Lookup *cl;
|
|
||||||
char buf[256];
|
char buf[256];
|
||||||
int i, n;
|
int i, n;
|
||||||
|
|
||||||
cl = l->data;
|
|
||||||
snprintf(buf, sizeof(buf), "%i", cl->val);
|
snprintf(buf, sizeof(buf), "%i", cl->val);
|
||||||
n = strlen(buf);
|
n = strlen(buf);
|
||||||
if (n > cl->len)
|
if (n > cl->len)
|
||||||
|
|
|
@ -39,8 +39,8 @@ static int strstrip(const char *in, char *out, size_t size);
|
||||||
|
|
||||||
|
|
||||||
int line = 0;
|
int line = 0;
|
||||||
Evas_List *stack = NULL;
|
Eina_List *stack = NULL;
|
||||||
Evas_List *params = NULL;
|
Eina_List *params = NULL;
|
||||||
|
|
||||||
static char file_buf[4096];
|
static char file_buf[4096];
|
||||||
static int verbatim = 0;
|
static int verbatim = 0;
|
||||||
|
@ -83,7 +83,7 @@ new_object(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
|
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
|
||||||
progname, file_in, line - 1,
|
progname, file_in, line - 1,
|
||||||
(char *)evas_list_data(evas_list_last(stack)));
|
(char *)eina_list_data_get(eina_list_last(stack)));
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
free(id);
|
free(id);
|
||||||
|
@ -113,7 +113,7 @@ new_statement(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
|
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
|
||||||
progname, file_in, line - 1,
|
progname, file_in, line - 1,
|
||||||
(char *)evas_list_data(evas_list_last(stack)));
|
(char *)eina_list_data_get(eina_list_last(stack)));
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
free(id);
|
free(id);
|
||||||
|
@ -362,17 +362,18 @@ stack_id(void)
|
||||||
{
|
{
|
||||||
char *id;
|
char *id;
|
||||||
int len;
|
int len;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
char *data;
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
for (l = stack; l; l = l->next)
|
EINA_LIST_FOREACH(stack, l, data)
|
||||||
len += strlen(l->data) + 1;
|
len += strlen(data) + 1;
|
||||||
id = mem_alloc(len);
|
id = mem_alloc(len);
|
||||||
id[0] = 0;
|
id[0] = 0;
|
||||||
for (l = stack; l; l = l->next)
|
EINA_LIST_FOREACH(stack, l, data)
|
||||||
{
|
{
|
||||||
strcat(id, l->data);
|
strcat(id, data);
|
||||||
if (l->next) strcat(id, ".");
|
if (eina_list_next(l)) strcat(id, ".");
|
||||||
}
|
}
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
@ -383,11 +384,11 @@ stack_chop_top(void)
|
||||||
char *top;
|
char *top;
|
||||||
|
|
||||||
/* remove top from stack */
|
/* remove top from stack */
|
||||||
top = evas_list_data(evas_list_last(stack));
|
top = eina_list_data_get(eina_list_last(stack));
|
||||||
if (top)
|
if (top)
|
||||||
{
|
{
|
||||||
free(top);
|
free(top);
|
||||||
stack = evas_list_remove(stack, top);
|
stack = eina_list_remove(stack, top);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -446,8 +447,8 @@ parse(char *data, off_t size)
|
||||||
/* clear out params */
|
/* clear out params */
|
||||||
while (params)
|
while (params)
|
||||||
{
|
{
|
||||||
free(params->data);
|
free(eina_list_data_get(params));
|
||||||
params = evas_list_remove(params, params->data);
|
params = eina_list_remove(params, eina_list_data_get(params));
|
||||||
}
|
}
|
||||||
/* remove top from stack */
|
/* remove top from stack */
|
||||||
stack_chop_top();
|
stack_chop_top();
|
||||||
|
@ -467,10 +468,10 @@ parse(char *data, off_t size)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (do_params)
|
if (do_params)
|
||||||
params = evas_list_append(params, token);
|
params = eina_list_append(params, token);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stack = evas_list_append(stack, token);
|
stack = eina_list_append(stack, token);
|
||||||
new_object();
|
new_object();
|
||||||
if ((verbatim == 1) && (p < (end - 2)))
|
if ((verbatim == 1) && (p < (end - 2)))
|
||||||
{
|
{
|
||||||
|
@ -638,19 +639,18 @@ compile(void)
|
||||||
def = mem_strdup("");
|
def = mem_strdup("");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
int len;
|
int len;
|
||||||
|
char *data;
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
for (l = defines; l; l = l->next)
|
EINA_LIST_FOREACH(defines, l, data)
|
||||||
{
|
len += strlen(data) + 1;
|
||||||
len += strlen(l->data) + 1;
|
|
||||||
}
|
|
||||||
def = mem_alloc(len + 1);
|
def = mem_alloc(len + 1);
|
||||||
def[0] = 0;
|
def[0] = 0;
|
||||||
for (l = defines; l; l = l->next)
|
EINA_LIST_FOREACH(defines, l, data)
|
||||||
{
|
{
|
||||||
strcat(def, l->data);
|
strcat(def, data);
|
||||||
strcat(def, " ");
|
strcat(def, " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -726,7 +726,7 @@ is_param(int n)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
str = evas_list_nth(params, n);
|
str = eina_list_nth(params, n);
|
||||||
if (str) return 1;
|
if (str) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -738,7 +738,7 @@ is_num(int n)
|
||||||
long int ret;
|
long int ret;
|
||||||
char *end;
|
char *end;
|
||||||
|
|
||||||
str = evas_list_nth(params, n);
|
str = eina_list_nth(params, n);
|
||||||
if (!str)
|
if (!str)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||||
|
@ -758,7 +758,7 @@ parse_str(int n)
|
||||||
char *str;
|
char *str;
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
str = evas_list_nth(params, n);
|
str = eina_list_nth(params, n);
|
||||||
if (!str)
|
if (!str)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||||
|
@ -821,7 +821,7 @@ parse_enum(int n, ...)
|
||||||
int result;
|
int result;
|
||||||
va_list va;
|
va_list va;
|
||||||
|
|
||||||
str = evas_list_nth(params, n);
|
str = eina_list_nth(params, n);
|
||||||
if (!str)
|
if (!str)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||||
|
@ -839,13 +839,14 @@ parse_enum(int n, ...)
|
||||||
int
|
int
|
||||||
parse_flags(int n, ...)
|
parse_flags(int n, ...)
|
||||||
{
|
{
|
||||||
Evas_List *lst;
|
Eina_List *lst;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
va_list va;
|
va_list va;
|
||||||
|
char *data;
|
||||||
|
|
||||||
va_start(va, n);
|
va_start(va, n);
|
||||||
for (lst = evas_list_nth_list(params, n); lst != NULL; lst = lst->next)
|
EINA_LIST_FOREACH(eina_list_nth_list(params, n), lst, data)
|
||||||
result |= _parse_enum(lst->data, va);
|
result |= _parse_enum(data, va);
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -857,7 +858,7 @@ parse_int(int n)
|
||||||
char *str;
|
char *str;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
str = evas_list_nth(params, n);
|
str = eina_list_nth(params, n);
|
||||||
if (!str)
|
if (!str)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||||
|
@ -874,7 +875,7 @@ parse_int_range(int n, int f, int t)
|
||||||
char *str;
|
char *str;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
str = evas_list_nth(params, n);
|
str = eina_list_nth(params, n);
|
||||||
if (!str)
|
if (!str)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||||
|
@ -897,7 +898,7 @@ parse_bool(int n)
|
||||||
char *str, buf[4096];
|
char *str, buf[4096];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
str = evas_list_nth(params, n);
|
str = eina_list_nth(params, n);
|
||||||
if (!str)
|
if (!str)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||||
|
@ -933,7 +934,7 @@ parse_float(int n)
|
||||||
char *str;
|
char *str;
|
||||||
double i;
|
double i;
|
||||||
|
|
||||||
str = evas_list_nth(params, n);
|
str = eina_list_nth(params, n);
|
||||||
if (!str)
|
if (!str)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||||
|
@ -950,7 +951,7 @@ parse_float_range(int n, double f, double t)
|
||||||
char *str;
|
char *str;
|
||||||
double i;
|
double i;
|
||||||
|
|
||||||
str = evas_list_nth(params, n);
|
str = eina_list_nth(params, n);
|
||||||
if (!str)
|
if (!str)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||||
|
@ -970,7 +971,7 @@ parse_float_range(int n, double f, double t)
|
||||||
void
|
void
|
||||||
check_arg_count(int required_args)
|
check_arg_count(int required_args)
|
||||||
{
|
{
|
||||||
int num_args = evas_list_count (params);
|
int num_args = eina_list_count (params);
|
||||||
|
|
||||||
if (num_args != required_args)
|
if (num_args != required_args)
|
||||||
{
|
{
|
||||||
|
@ -983,7 +984,7 @@ check_arg_count(int required_args)
|
||||||
void
|
void
|
||||||
check_min_arg_count(int min_required_args)
|
check_min_arg_count(int min_required_args)
|
||||||
{
|
{
|
||||||
int num_args = evas_list_count (params);
|
int num_args = eina_list_count (params);
|
||||||
|
|
||||||
if (num_args < min_required_args)
|
if (num_args < min_required_args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,10 +36,10 @@ source_edd(void)
|
||||||
eddc.func.mem_free = NULL;
|
eddc.func.mem_free = NULL;
|
||||||
eddc.func.str_alloc = eina_stringshare_add;
|
eddc.func.str_alloc = eina_stringshare_add;
|
||||||
eddc.func.str_free = eina_stringshare_del;
|
eddc.func.str_free = eina_stringshare_del;
|
||||||
eddc.func.list_next = evas_list_next;
|
eddc.func.list_next = eina_list_next;
|
||||||
eddc.func.list_append = evas_list_append;
|
eddc.func.list_append = eina_list_append;
|
||||||
eddc.func.list_data = evas_list_data;
|
eddc.func.list_data = eina_list_data_get;
|
||||||
eddc.func.list_free = evas_list_free;
|
eddc.func.list_free = eina_list_free;
|
||||||
eddc.func.hash_foreach = evas_hash_foreach;
|
eddc.func.hash_foreach = evas_hash_foreach;
|
||||||
eddc.func.hash_add = evas_hash_add;
|
eddc.func.hash_add = evas_hash_add;
|
||||||
eddc.func.hash_free = evas_hash_free;
|
eddc.func.hash_free = evas_hash_free;
|
||||||
|
@ -93,7 +93,7 @@ source_fetch_file(const char *fil, const char *filname)
|
||||||
fread(sf->file, sz, 1, f);
|
fread(sf->file, sz, 1, f);
|
||||||
sf->file[sz] = '\0';
|
sf->file[sz] = '\0';
|
||||||
fseek(f, 0, SEEK_SET);
|
fseek(f, 0, SEEK_SET);
|
||||||
srcfiles.list = evas_list_append(srcfiles.list, sf);
|
srcfiles.list = eina_list_append(srcfiles.list, sf);
|
||||||
|
|
||||||
while (fgets(buf, sizeof(buf), f))
|
while (fgets(buf, sizeof(buf), f))
|
||||||
{
|
{
|
||||||
|
@ -244,7 +244,7 @@ source_load(Eet_File *ef)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
source_fontmap_save(Eet_File *ef, Evas_List *fonts)
|
source_fontmap_save(Eet_File *ef, Eina_List *fonts)
|
||||||
{
|
{
|
||||||
Font_List fl;
|
Font_List fl;
|
||||||
|
|
||||||
|
|
|
@ -94,9 +94,9 @@ decomp(void)
|
||||||
eet_close(ef);
|
eet_close(ef);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!srcfiles->list->data || !root_filename_is_sane())
|
if (!eina_list_data_get(srcfiles->list) || !root_filename_is_sane())
|
||||||
{
|
{
|
||||||
printf("ERROR: Invalid root filename: '%s'\n", (char *) srcfiles->list->data);
|
printf("ERROR: Invalid root filename: '%s'\n", (char *) eina_list_data_get(srcfiles->list));
|
||||||
eet_close(ef);
|
eet_close(ef);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -124,8 +124,9 @@ decomp(void)
|
||||||
void
|
void
|
||||||
output(void)
|
output(void)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
Eet_File *ef;
|
Eet_File *ef;
|
||||||
|
SrcFile *sf;
|
||||||
char *outdir, *p;
|
char *outdir, *p;
|
||||||
|
|
||||||
p = strrchr(file_in, '/');
|
p = strrchr(file_in, '/');
|
||||||
|
@ -142,11 +143,10 @@ output(void)
|
||||||
|
|
||||||
if (edje_file->image_dir)
|
if (edje_file->image_dir)
|
||||||
{
|
{
|
||||||
for (l = edje_file->image_dir->entries; l; l = l->next)
|
Edje_Image_Directory_Entry *ei;
|
||||||
{
|
|
||||||
Edje_Image_Directory_Entry *ei;
|
|
||||||
|
|
||||||
ei = l->data;
|
EINA_LIST_FOREACH(edje_file->image_dir->entries, l, ei)
|
||||||
|
{
|
||||||
if ((ei->source_type > EDJE_IMAGE_SOURCE_TYPE_NONE) &&
|
if ((ei->source_type > EDJE_IMAGE_SOURCE_TYPE_NONE) &&
|
||||||
(ei->source_type < EDJE_IMAGE_SOURCE_TYPE_LAST) &&
|
(ei->source_type < EDJE_IMAGE_SOURCE_TYPE_LAST) &&
|
||||||
(ei->source_type != EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) &&
|
(ei->source_type != EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) &&
|
||||||
|
@ -201,14 +201,12 @@ output(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (l = srcfiles->list; l; l = l->next)
|
EINA_LIST_FOREACH(srcfiles->list, l, sf)
|
||||||
{
|
{
|
||||||
SrcFile *sf;
|
|
||||||
char out[4096];
|
char out[4096];
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char *pp;
|
char *pp;
|
||||||
|
|
||||||
sf = l->data;
|
|
||||||
snprintf(out, sizeof(out), "%s/%s", outdir, sf->name);
|
snprintf(out, sizeof(out), "%s/%s", outdir, sf->name);
|
||||||
printf("Output Source File: %s\n", out);
|
printf("Output Source File: %s\n", out);
|
||||||
pp = strdup(out);
|
pp = strdup(out);
|
||||||
|
@ -241,14 +239,14 @@ output(void)
|
||||||
}
|
}
|
||||||
if (fontlist)
|
if (fontlist)
|
||||||
{
|
{
|
||||||
for (l = fontlist->list; l; l = l->next)
|
Font *fn;
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(fontlist->list, l, fn)
|
||||||
{
|
{
|
||||||
Font *fn;
|
|
||||||
void *font;
|
void *font;
|
||||||
int fontsize;
|
int fontsize;
|
||||||
char out[4096];
|
char out[4096];
|
||||||
|
|
||||||
fn = l->data;
|
|
||||||
snprintf(out, sizeof(out), "fonts/%s", fn->name);
|
snprintf(out, sizeof(out), "fonts/%s", fn->name);
|
||||||
font = eet_read(ef, out, &fontsize);
|
font = eet_read(ef, out, &fontsize);
|
||||||
if (font)
|
if (font)
|
||||||
|
@ -283,7 +281,7 @@ output(void)
|
||||||
{
|
{
|
||||||
char out[4096];
|
char out[4096];
|
||||||
FILE *f;
|
FILE *f;
|
||||||
SrcFile *sf = srcfiles->list->data;
|
SrcFile *sf = eina_list_data_get(srcfiles->list);
|
||||||
|
|
||||||
snprintf(out, sizeof(out), "%s/build.sh", outdir);
|
snprintf(out, sizeof(out), "%s/build.sh", outdir);
|
||||||
printf("Output Build Script: %s\n", out);
|
printf("Output Build Script: %s\n", out);
|
||||||
|
@ -337,7 +335,7 @@ compiler_cmd_is_sane()
|
||||||
static int
|
static int
|
||||||
root_filename_is_sane()
|
root_filename_is_sane()
|
||||||
{
|
{
|
||||||
SrcFile *sf = srcfiles->list->data;
|
SrcFile *sf = eina_list_data_get(srcfiles->list);
|
||||||
char *f = sf->name, *ptr;
|
char *f = sf->name, *ptr;
|
||||||
|
|
||||||
if (!f || !*f)
|
if (!f || !*f)
|
||||||
|
|
|
@ -17,7 +17,7 @@ struct _Font
|
||||||
|
|
||||||
struct _Font_List
|
struct _Font_List
|
||||||
{
|
{
|
||||||
Evas_List *list;
|
Eina_List *list;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _SrcFile
|
struct _SrcFile
|
||||||
|
@ -28,14 +28,14 @@ struct _SrcFile
|
||||||
|
|
||||||
struct _SrcFile_List
|
struct _SrcFile_List
|
||||||
{
|
{
|
||||||
Evas_List *list;
|
Eina_List *list;
|
||||||
};
|
};
|
||||||
|
|
||||||
void source_edd(void);
|
void source_edd(void);
|
||||||
void source_fetch(void);
|
void source_fetch(void);
|
||||||
int source_append(Eet_File *ef);
|
int source_append(Eet_File *ef);
|
||||||
SrcFile_List *source_load(Eet_File *ef);
|
SrcFile_List *source_load(Eet_File *ef);
|
||||||
int source_fontmap_save(Eet_File *ef, Evas_List *fonts);
|
int source_fontmap_save(Eet_File *ef, Eina_List *fonts);
|
||||||
Font_List *source_fontmap_load(Eet_File *ef);
|
Font_List *source_fontmap_load(Eet_File *ef);
|
||||||
|
|
||||||
void *mem_alloc(size_t size);
|
void *mem_alloc(size_t size);
|
||||||
|
|
|
@ -175,8 +175,8 @@ extern "C" {
|
||||||
EAPI double edje_scale_get (void);
|
EAPI double edje_scale_get (void);
|
||||||
|
|
||||||
/* edje_load.c */
|
/* edje_load.c */
|
||||||
EAPI Evas_List *edje_file_collection_list (const char *file);
|
EAPI Eina_List *edje_file_collection_list (const char *file);
|
||||||
EAPI void edje_file_collection_list_free (Evas_List *lst);
|
EAPI void edje_file_collection_list_free (Eina_List *lst);
|
||||||
EAPI int edje_file_group_exists (const char *file, const char *glob);
|
EAPI int edje_file_group_exists (const char *file, const char *glob);
|
||||||
EAPI char *edje_file_data_get (const char *file, const char *key);
|
EAPI char *edje_file_data_get (const char *file, const char *key);
|
||||||
EAPI void edje_file_cache_set (int count);
|
EAPI void edje_file_cache_set (int count);
|
||||||
|
@ -190,10 +190,10 @@ extern "C" {
|
||||||
/* edje_util.c */
|
/* edje_util.c */
|
||||||
EAPI void edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
|
EAPI void edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
|
||||||
EAPI void edje_color_class_del(const char *color_class);
|
EAPI void edje_color_class_del(const char *color_class);
|
||||||
EAPI Evas_List * edje_color_class_list(void);
|
EAPI Eina_List * edje_color_class_list(void);
|
||||||
EAPI void edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size size);
|
EAPI void edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size size);
|
||||||
EAPI void edje_text_class_del(const char *text_class);
|
EAPI void edje_text_class_del(const char *text_class);
|
||||||
EAPI Evas_List * edje_text_class_list(void);
|
EAPI Eina_List * edje_text_class_list(void);
|
||||||
EAPI void edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
|
EAPI void edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
|
||||||
EAPI void edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh);
|
EAPI void edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh);
|
||||||
EAPI void edje_extern_object_aspect_set(Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah);
|
EAPI void edje_extern_object_aspect_set(Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah);
|
||||||
|
@ -237,7 +237,7 @@ extern "C" {
|
||||||
EAPI const char *edje_object_part_text_get (const Evas_Object *obj, const char *part);
|
EAPI const char *edje_object_part_text_get (const Evas_Object *obj, const char *part);
|
||||||
EAPI const char *edje_object_part_text_selection_get(const Evas_Object *obj, const char *part);
|
EAPI const char *edje_object_part_text_selection_get(const Evas_Object *obj, const char *part);
|
||||||
EAPI void edje_object_part_text_insert (Evas_Object *obj, const char *part, const char *text);
|
EAPI void edje_object_part_text_insert (Evas_Object *obj, const char *part, const char *text);
|
||||||
EAPI Evas_List *edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part);
|
EAPI Eina_List *edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part);
|
||||||
EAPI void edje_object_part_text_cursor_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
EAPI void edje_object_part_text_cursor_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
|
||||||
|
|
||||||
EAPI void edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
|
EAPI void edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
|
||||||
|
|
|
@ -59,12 +59,12 @@ enum {
|
||||||
*
|
*
|
||||||
* Example: print all the part in a loaded edje_object
|
* Example: print all the part in a loaded edje_object
|
||||||
* @code
|
* @code
|
||||||
* Evas_List *parts, *l;
|
* Eina_List *parts, *l;
|
||||||
*
|
*
|
||||||
* parts = edje_edit_parts_list_get(edje_object);
|
* parts = edje_edit_parts_list_get(edje_object);
|
||||||
* while(l = parts; l; l = l->next)
|
* while(l = parts; l; l = eina_list_nexst(l))
|
||||||
* {
|
* {
|
||||||
* printf("Part: %s\n", (char*)l->data);
|
* printf("Part: %s\n", (char*)eina_list_data_get(l));
|
||||||
* }
|
* }
|
||||||
* edje_edit_string_list_free(parts);
|
* edje_edit_string_list_free(parts);
|
||||||
* @endcode
|
* @endcode
|
||||||
|
@ -93,10 +93,10 @@ extern "C" {
|
||||||
* General functions that don't fit in other cateories.
|
* General functions that don't fit in other cateories.
|
||||||
*/ //@{
|
*/ //@{
|
||||||
|
|
||||||
/** Free a generic Evas_List of (char *) allocated by an edje_edit_*_get() function.*/
|
/** Free a generic Eina_List of (char *) allocated by an edje_edit_*_get() function.*/
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_edit_string_list_free(
|
edje_edit_string_list_free(
|
||||||
Evas_List *lst ///< The list to free. Will also free all the strings.
|
Eina_List *lst ///< The list to free. Will also free all the strings.
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Free a generic string (char *) allocated by an edje_edit_*_get() function.*/
|
/** Free a generic string (char *) allocated by an edje_edit_*_get() function.*/
|
||||||
|
@ -233,7 +233,7 @@ edje_edit_group_max_h_set(
|
||||||
*/ //@{
|
*/ //@{
|
||||||
|
|
||||||
/** Retrieves a list with the item names inside the data block **/
|
/** Retrieves a list with the item names inside the data block **/
|
||||||
EAPI Evas_List * ///@return An Evas_List* of string (char *)containing all the data names.
|
EAPI Eina_List * ///@return An Eina_List* of string (char *)containing all the data names.
|
||||||
edje_edit_data_list_get(
|
edje_edit_data_list_get(
|
||||||
Evas_Object *obj ///< The edje object
|
Evas_Object *obj ///< The edje object
|
||||||
);
|
);
|
||||||
|
@ -289,7 +289,7 @@ edje_edit_data_name_set(
|
||||||
/** Get the list of all the Color Classes in the given edje object.
|
/** Get the list of all the Color Classes in the given edje object.
|
||||||
* Use edje_edit_string_list_free() when you don't need it anymore.
|
* Use edje_edit_string_list_free() when you don't need it anymore.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List * ///@return An Evas_List* of string (char *)containing all the classes names.
|
EAPI Eina_List * ///@return An Eina_List* of string (char *)containing all the classes names.
|
||||||
edje_edit_color_classes_list_get(
|
edje_edit_color_classes_list_get(
|
||||||
Evas_Object * obj ///< The edje object
|
Evas_Object * obj ///< The edje object
|
||||||
);
|
);
|
||||||
|
@ -372,7 +372,7 @@ edje_edit_color_class_name_set(
|
||||||
/**Get the list of all the parts in the given edje object.
|
/**Get the list of all the parts in the given edje object.
|
||||||
* Use edje_edit_string_list_free() when you don't need it anymore.
|
* Use edje_edit_string_list_free() when you don't need it anymore.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List * ///@return An Evas_List* of string (char *)containing all the part names.
|
EAPI Eina_List * ///@return An Eina_List* of string (char *)containing all the part names.
|
||||||
edje_edit_parts_list_get(
|
edje_edit_parts_list_get(
|
||||||
Evas_Object *obj ///< The edje object
|
Evas_Object *obj ///< The edje object
|
||||||
);
|
);
|
||||||
|
@ -685,7 +685,7 @@ edje_edit_part_drag_event_set(
|
||||||
*/ //@{
|
*/ //@{
|
||||||
|
|
||||||
/**Get the list of all the states in the given part.*/
|
/**Get the list of all the states in the given part.*/
|
||||||
EAPI Evas_List * /**@return An Evas_List* of string (char *)containing all the states names found
|
EAPI Eina_List * /**@return An Eina_List* of string (char *)containing all the states names found
|
||||||
* in part, including the float value (ex: "default 0.00").
|
* in part, including the float value (ex: "default 0.00").
|
||||||
* Use edje_edit_string_list_free() when you don't need it anymore. */
|
* Use edje_edit_string_list_free() when you don't need it anymore. */
|
||||||
edje_edit_part_states_list_get(
|
edje_edit_part_states_list_get(
|
||||||
|
@ -1424,7 +1424,7 @@ edje_edit_state_text_fit_y_set(
|
||||||
/**Get the list of all the fonts in the given edje.
|
/**Get the list of all the fonts in the given edje.
|
||||||
* Use edje_edit_string_list_free() when you don't need the list anymore.
|
* Use edje_edit_string_list_free() when you don't need the list anymore.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List * ///@return An Evas_List* of string (char *)containing all the fonts names found in the edje file.
|
EAPI Eina_List * ///@return An Eina_List* of string (char *)containing all the fonts names found in the edje file.
|
||||||
edje_edit_fonts_list_get(
|
edje_edit_fonts_list_get(
|
||||||
Evas_Object *obj ///< The edje object
|
Evas_Object *obj ///< The edje object
|
||||||
);
|
);
|
||||||
|
@ -1467,7 +1467,7 @@ edje_edit_state_font_set(
|
||||||
/**Get the list of all the images in the given edje.
|
/**Get the list of all the images in the given edje.
|
||||||
* Use edje_edit_string_list_free() when you don't need the list anymore.
|
* Use edje_edit_string_list_free() when you don't need the list anymore.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List * ///@return An Evas_List* of string (char *)containing all the images names found in the edje file.
|
EAPI Eina_List * ///@return An Eina_List* of string (char *)containing all the images names found in the edje file.
|
||||||
edje_edit_images_list_get(
|
edje_edit_images_list_get(
|
||||||
Evas_Object *obj ///< The edje object
|
Evas_Object *obj ///< The edje object
|
||||||
);
|
);
|
||||||
|
@ -1571,7 +1571,7 @@ edje_edit_state_image_border_fill_set(
|
||||||
/**Get the list of all the tweens images in the given part state.
|
/**Get the list of all the tweens images in the given part state.
|
||||||
* Use edje_edit_string_list_free() when you don't need it anymore.
|
* Use edje_edit_string_list_free() when you don't need it anymore.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List * ///@return A string list containing all the image name that form a tween animation in the given part state
|
EAPI Eina_List * ///@return A string list containing all the image name that form a tween animation in the given part state
|
||||||
edje_edit_state_tweens_list_get(
|
edje_edit_state_tweens_list_get(
|
||||||
Evas_Object *obj, ///< The edje object
|
Evas_Object *obj, ///< The edje object
|
||||||
const char *part, ///< The name of the part
|
const char *part, ///< The name of the part
|
||||||
|
@ -1612,7 +1612,7 @@ edje_edit_state_tween_del(
|
||||||
/**Get the list of all the spectrum in the given edje object.
|
/**Get the list of all the spectrum in the given edje object.
|
||||||
* Use edje_edit_string_list_free() when you don't need it anymore.
|
* Use edje_edit_string_list_free() when you don't need it anymore.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List * ///@return An Evas_List* of string(char *) containing all the spectra names.
|
EAPI Eina_List * ///@return An Eina_List* of string(char *) containing all the spectra names.
|
||||||
edje_edit_spectrum_list_get(
|
edje_edit_spectrum_list_get(
|
||||||
Evas_Object *obj ///< The edje object
|
Evas_Object *obj ///< The edje object
|
||||||
);
|
);
|
||||||
|
@ -1896,10 +1896,10 @@ edje_edit_state_gradient_rel2_offset_y_set(
|
||||||
|
|
||||||
/**Get the list of all the programs in the given edje object.
|
/**Get the list of all the programs in the given edje object.
|
||||||
* @param obj The edje object
|
* @param obj The edje object
|
||||||
* @return An Evas_List* of string (char *)containing all the program names.
|
* @return An Eina_List* of string (char *)containing all the program names.
|
||||||
* Use edje_edit_string_list_free() when you don't need it anymore.
|
* Use edje_edit_string_list_free() when you don't need it anymore.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List * ///@return A string list containing all the program names
|
EAPI Eina_List * ///@return A string list containing all the program names
|
||||||
edje_edit_programs_list_get(
|
edje_edit_programs_list_get(
|
||||||
Evas_Object *obj ///< The edje object
|
Evas_Object *obj ///< The edje object
|
||||||
);
|
);
|
||||||
|
@ -2027,7 +2027,7 @@ edje_edit_program_action_set(
|
||||||
* Return a list of target name
|
* Return a list of target name
|
||||||
* Use edje_edit_string_list_free() when you don't need it anymore.
|
* Use edje_edit_string_list_free() when you don't need it anymore.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List* ///@return An Evas_List of char*, or NULL on error
|
EAPI Eina_List* ///@return An Eina_List of char*, or NULL on error
|
||||||
edje_edit_program_targets_get(
|
edje_edit_program_targets_get(
|
||||||
Evas_Object *obj, ///< The edje object
|
Evas_Object *obj, ///< The edje object
|
||||||
const char *prog ///< The program name
|
const char *prog ///< The program name
|
||||||
|
@ -2055,7 +2055,7 @@ edje_edit_program_targets_clear(
|
||||||
* Return a list of program name.
|
* Return a list of program name.
|
||||||
* Use edje_edit_string_list_free() when you don't need it anymore.
|
* Use edje_edit_string_list_free() when you don't need it anymore.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List* ///@return An Evas_List of char*, or NULL on error
|
EAPI Eina_List* ///@return An Eina_List of char*, or NULL on error
|
||||||
edje_edit_program_afters_get(
|
edje_edit_program_afters_get(
|
||||||
Evas_Object *obj, ///< The edje object
|
Evas_Object *obj, ///< The edje object
|
||||||
const char *prog ///< The program name
|
const char *prog ///< The program name
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
static Evas_Hash *_edje_file_hash = NULL;
|
static Evas_Hash *_edje_file_hash = NULL;
|
||||||
static int _edje_file_cache_size = 16;
|
static int _edje_file_cache_size = 16;
|
||||||
static Evas_List *_edje_file_cache = NULL;
|
static Eina_List *_edje_file_cache = NULL;
|
||||||
|
|
||||||
static int _edje_collection_cache_size = 16;
|
static int _edje_collection_cache_size = 16;
|
||||||
|
|
||||||
|
@ -14,16 +14,14 @@ static Edje_Part_Collection *
|
||||||
_edje_file_coll_open(Edje_File *edf, const char *coll)
|
_edje_file_coll_open(Edje_File *edf, const char *coll)
|
||||||
{
|
{
|
||||||
Edje_Part_Collection *edc = NULL;
|
Edje_Part_Collection *edc = NULL;
|
||||||
Evas_List *l = NULL;
|
Edje_Part_Collection_Directory_Entry *ce;
|
||||||
|
Eina_List *l = NULL;
|
||||||
int id = -1, size = 0;
|
int id = -1, size = 0;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
void *data;
|
void *data;
|
||||||
|
|
||||||
for (l = edf->collection_dir->entries; l; l = l->next)
|
EINA_LIST_FOREACH(edf->collection_dir->entries, l, ce)
|
||||||
{
|
{
|
||||||
Edje_Part_Collection_Directory_Entry *ce;
|
|
||||||
|
|
||||||
ce = l->data;
|
|
||||||
if ((ce->entry) && (!strcmp(ce->entry, coll)))
|
if ((ce->entry) && (!strcmp(ce->entry, coll)))
|
||||||
{
|
{
|
||||||
id = ce->id;
|
id = ce->id;
|
||||||
|
@ -58,14 +56,14 @@ _edje_font_hash(Edje_File *edf)
|
||||||
|
|
||||||
if (edf->font_dir)
|
if (edf->font_dir)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
for (l = edf->font_dir->entries; l; l = evas_list_next(l))
|
Edje_Font_Directory_Entry *fnt;
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(edf->font_dir->entries, l, fnt)
|
||||||
{
|
{
|
||||||
Edje_Font_Directory_Entry *fnt;
|
|
||||||
int length;
|
int length;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
|
||||||
fnt = l->data;
|
|
||||||
length = strlen(fnt->entry) + 7;
|
length = strlen(fnt->entry) + 7;
|
||||||
tmp = alloca(length);
|
tmp = alloca(length);
|
||||||
|
|
||||||
|
@ -87,8 +85,9 @@ _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Co
|
||||||
{
|
{
|
||||||
Edje_File *edf;
|
Edje_File *edf;
|
||||||
Edje_Part_Collection *edc;
|
Edje_Part_Collection *edc;
|
||||||
|
Edje_Data *di;
|
||||||
Eet_File *ef;
|
Eet_File *ef;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
if (stat(file, &st) != 0)
|
if (stat(file, &st) != 0)
|
||||||
|
@ -133,11 +132,8 @@ _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Co
|
||||||
|
|
||||||
_edje_textblock_style_parse_and_fix(edf);
|
_edje_textblock_style_parse_and_fix(edf);
|
||||||
|
|
||||||
for (l = edf->data; l; l = l->next)
|
EINA_LIST_FOREACH(edf->data, l, di)
|
||||||
{
|
edf->data_cache = evas_hash_add(edf->data_cache, eina_stringshare_add(di->key), di->value);
|
||||||
Edje_Data *di = l->data;
|
|
||||||
edf->data_cache = evas_hash_add(edf->data_cache, eina_stringshare_add(di->key), di->value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (coll)
|
if (coll)
|
||||||
{
|
{
|
||||||
|
@ -160,8 +156,9 @@ Edje_File *
|
||||||
_edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret)
|
_edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret)
|
||||||
{
|
{
|
||||||
Edje_File *edf;
|
Edje_File *edf;
|
||||||
Evas_List *l, *hist;
|
Eina_List *l, *hist;
|
||||||
Edje_Part_Collection *edc;
|
Edje_Part_Collection *edc;
|
||||||
|
Edje_Part *ep;
|
||||||
|
|
||||||
edf = evas_hash_find(_edje_file_hash, file);
|
edf = evas_hash_find(_edje_file_hash, file);
|
||||||
if (edf)
|
if (edf)
|
||||||
|
@ -170,13 +167,12 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (l = _edje_file_cache; l; l = l->next)
|
EINA_LIST_FOREACH(_edje_file_cache, l, edf)
|
||||||
{
|
{
|
||||||
edf = l->data;
|
|
||||||
if (!strcmp(edf->path, file))
|
if (!strcmp(edf->path, file))
|
||||||
{
|
{
|
||||||
edf->references = 1;
|
edf->references = 1;
|
||||||
_edje_file_cache = evas_list_remove_list(_edje_file_cache, l);
|
_edje_file_cache = eina_list_remove_list(_edje_file_cache, l);
|
||||||
_edje_file_hash = evas_hash_add(_edje_file_hash, file, edf);
|
_edje_file_hash = evas_hash_add(_edje_file_hash, file, edf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -200,13 +196,12 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (l = edf->collection_cache; l; l = l->next)
|
EINA_LIST_FOREACH(edf->collection_cache, l, edc)
|
||||||
{
|
{
|
||||||
edc = l->data;
|
|
||||||
if (!strcmp(edc->part, coll))
|
if (!strcmp(edc->part, coll))
|
||||||
{
|
{
|
||||||
edc->references = 1;
|
edc->references = 1;
|
||||||
edf->collection_cache = evas_list_remove_list(edf->collection_cache, l);
|
edf->collection_cache = eina_list_remove_list(edf->collection_cache, l);
|
||||||
edf->collection_hash = evas_hash_add(edf->collection_hash, coll, edc);
|
edf->collection_hash = evas_hash_add(edf->collection_hash, coll, edc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -222,29 +217,28 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (l = edc->parts; l; l = l->next)
|
EINA_LIST_FOREACH(edc->parts, l, ep)
|
||||||
{
|
{
|
||||||
Edje_Part *ep, *ep2;
|
Edje_Part *ep2;
|
||||||
|
|
||||||
/* Register any color classes in this parts descriptions. */
|
/* Register any color classes in this parts descriptions. */
|
||||||
ep = l->data;
|
|
||||||
hist = NULL;
|
hist = NULL;
|
||||||
hist = evas_list_append(hist, ep);
|
hist = eina_list_append(hist, ep);
|
||||||
ep2 = ep;
|
ep2 = ep;
|
||||||
while (ep2->dragable.confine_id >= 0)
|
while (ep2->dragable.confine_id >= 0)
|
||||||
{
|
{
|
||||||
ep2 = evas_list_nth(edc->parts, ep2->dragable.confine_id);
|
ep2 = eina_list_nth(edc->parts, ep2->dragable.confine_id);
|
||||||
if (evas_list_find(hist, ep2))
|
if (eina_list_data_find(hist, ep2))
|
||||||
{
|
{
|
||||||
printf("EDJE ERROR: confine_to loops. invalidating loop.\n");
|
printf("EDJE ERROR: confine_to loops. invalidating loop.\n");
|
||||||
ep2->dragable.confine_id = -1;
|
ep2->dragable.confine_id = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hist = evas_list_append(hist, ep2);
|
hist = eina_list_append(hist, ep2);
|
||||||
}
|
}
|
||||||
evas_list_free(hist);
|
eina_list_free(hist);
|
||||||
hist = NULL;
|
hist = NULL;
|
||||||
hist = evas_list_append(hist, ep);
|
hist = eina_list_append(hist, ep);
|
||||||
ep2 = ep;
|
ep2 = ep;
|
||||||
while (ep2->dragable.events_id >= 0)
|
while (ep2->dragable.events_id >= 0)
|
||||||
{
|
{
|
||||||
|
@ -252,37 +246,37 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
||||||
|
|
||||||
prev = ep2;
|
prev = ep2;
|
||||||
|
|
||||||
ep2 = evas_list_nth(edc->parts, ep2->dragable.events_id);
|
ep2 = eina_list_nth(edc->parts, ep2->dragable.events_id);
|
||||||
if (!ep2->dragable.x && !ep2->dragable.y)
|
if (!ep2->dragable.x && !ep2->dragable.y)
|
||||||
{
|
{
|
||||||
prev->dragable.events_id = -1;
|
prev->dragable.events_id = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evas_list_find(hist, ep2))
|
if (eina_list_data_find(hist, ep2))
|
||||||
{
|
{
|
||||||
printf("EDJE ERROR: events_to loops. invalidating loop.\n");
|
printf("EDJE ERROR: events_to loops. invalidating loop.\n");
|
||||||
ep2->dragable.events_id = -1;
|
ep2->dragable.events_id = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hist = evas_list_append(hist, ep2);
|
hist = eina_list_append(hist, ep2);
|
||||||
}
|
}
|
||||||
evas_list_free(hist);
|
eina_list_free(hist);
|
||||||
hist = NULL;
|
hist = NULL;
|
||||||
hist = evas_list_append(hist, ep);
|
hist = eina_list_append(hist, ep);
|
||||||
ep2 = ep;
|
ep2 = ep;
|
||||||
while (ep2->clip_to_id >= 0)
|
while (ep2->clip_to_id >= 0)
|
||||||
{
|
{
|
||||||
ep2 = evas_list_nth(edc->parts, ep2->clip_to_id);
|
ep2 = eina_list_nth(edc->parts, ep2->clip_to_id);
|
||||||
if (evas_list_find(hist, ep2))
|
if (eina_list_data_find(hist, ep2))
|
||||||
{
|
{
|
||||||
printf("EDJE ERROR: clip_to loops. invalidating loop.\n");
|
printf("EDJE ERROR: clip_to loops. invalidating loop.\n");
|
||||||
ep2->clip_to_id = -1;
|
ep2->clip_to_id = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hist = evas_list_append(hist, ep2);
|
hist = eina_list_append(hist, ep2);
|
||||||
}
|
}
|
||||||
evas_list_free(hist);
|
eina_list_free(hist);
|
||||||
hist = NULL;
|
hist = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -297,15 +291,15 @@ _edje_cache_coll_clean(Edje_File *edf)
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
count = evas_list_count(edf->collection_cache);
|
count = eina_list_count(edf->collection_cache);
|
||||||
while ((edf->collection_cache) && (count > _edje_collection_cache_size))
|
while ((edf->collection_cache) && (count > _edje_collection_cache_size))
|
||||||
{
|
{
|
||||||
Edje_Part_Collection *edc;
|
Edje_Part_Collection *edc;
|
||||||
|
|
||||||
edc = evas_list_last(edf->collection_cache)->data;
|
edc = eina_list_data_get(eina_list_last(edf->collection_cache));
|
||||||
edf->collection_cache = evas_list_remove_list(edf->collection_cache, evas_list_last(edf->collection_cache));
|
edf->collection_cache = eina_list_remove_list(edf->collection_cache, eina_list_last(edf->collection_cache));
|
||||||
_edje_collection_free(edf, edc);
|
_edje_collection_free(edf, edc);
|
||||||
count = evas_list_count(edf->collection_cache);
|
count = eina_list_count(edf->collection_cache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,8 +310,8 @@ _edje_cache_coll_flush(Edje_File *edf)
|
||||||
{
|
{
|
||||||
Edje_Part_Collection *edc;
|
Edje_Part_Collection *edc;
|
||||||
|
|
||||||
edc = evas_list_last(edf->collection_cache)->data;
|
edc = eina_list_data_get(eina_list_last(edf->collection_cache));
|
||||||
edf->collection_cache = evas_list_remove_list(edf->collection_cache, evas_list_last(edf->collection_cache));
|
edf->collection_cache = eina_list_remove_list(edf->collection_cache, eina_list_last(edf->collection_cache));
|
||||||
_edje_collection_free(edf, edc);
|
_edje_collection_free(edf, edc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -328,7 +322,7 @@ _edje_cache_coll_unref(Edje_File *edf, Edje_Part_Collection *edc)
|
||||||
edc->references--;
|
edc->references--;
|
||||||
if (edc->references != 0) return;
|
if (edc->references != 0) return;
|
||||||
edf->collection_hash = evas_hash_del(edf->collection_hash, edc->part, edc);
|
edf->collection_hash = evas_hash_del(edf->collection_hash, edc->part, edc);
|
||||||
edf->collection_cache = evas_list_prepend(edf->collection_cache, edc);
|
edf->collection_cache = eina_list_prepend(edf->collection_cache, edc);
|
||||||
_edje_cache_coll_clean(edf);
|
_edje_cache_coll_clean(edf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,15 +331,15 @@ _edje_cache_file_clean(void)
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
count = evas_list_count(_edje_file_cache);
|
count = eina_list_count(_edje_file_cache);
|
||||||
while ((_edje_file_cache) && (count > _edje_file_cache_size))
|
while ((_edje_file_cache) && (count > _edje_file_cache_size))
|
||||||
{
|
{
|
||||||
Edje_File *edf;
|
Edje_File *edf;
|
||||||
|
|
||||||
edf = evas_list_last(_edje_file_cache)->data;
|
edf = eina_list_data_get(eina_list_last(_edje_file_cache));
|
||||||
_edje_file_cache = evas_list_remove_list(_edje_file_cache, evas_list_last(_edje_file_cache));
|
_edje_file_cache = eina_list_remove_list(_edje_file_cache, eina_list_last(_edje_file_cache));
|
||||||
_edje_file_free(edf);
|
_edje_file_free(edf);
|
||||||
count = evas_list_count(_edje_file_cache);
|
count = eina_list_count(_edje_file_cache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +349,7 @@ _edje_cache_file_unref(Edje_File *edf)
|
||||||
edf->references--;
|
edf->references--;
|
||||||
if (edf->references != 0) return;
|
if (edf->references != 0) return;
|
||||||
_edje_file_hash = evas_hash_del(_edje_file_hash, edf->path, edf);
|
_edje_file_hash = evas_hash_del(_edje_file_hash, edf->path, edf);
|
||||||
_edje_file_cache = evas_list_prepend(_edje_file_cache, edf);
|
_edje_file_cache = eina_list_prepend(_edje_file_cache, edf);
|
||||||
_edje_cache_file_clean();
|
_edje_cache_file_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,17 +392,13 @@ edje_file_cache_flush(void)
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_collection_cache_set(int count)
|
edje_collection_cache_set(int count)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_File *edf;
|
||||||
|
|
||||||
if (count < 0) count = 0;
|
if (count < 0) count = 0;
|
||||||
_edje_collection_cache_size = count;
|
_edje_collection_cache_size = count;
|
||||||
for (l = _edje_file_cache; l; l = l->next)
|
EINA_LIST_FOREACH(_edje_file_cache, l, edf)
|
||||||
{
|
_edje_cache_coll_clean(edf);
|
||||||
Edje_File *edf;
|
|
||||||
|
|
||||||
edf = l->data;
|
|
||||||
_edje_cache_coll_clean(edf);
|
|
||||||
}
|
|
||||||
/* FIXME: freach in file hash too! */
|
/* FIXME: freach in file hash too! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,17 +412,13 @@ EAPI void
|
||||||
edje_collection_cache_flush(void)
|
edje_collection_cache_flush(void)
|
||||||
{
|
{
|
||||||
int ps;
|
int ps;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_File *edf;
|
||||||
|
|
||||||
ps = _edje_collection_cache_size;
|
ps = _edje_collection_cache_size;
|
||||||
_edje_collection_cache_size = 0;
|
_edje_collection_cache_size = 0;
|
||||||
for (l = _edje_file_cache; l; l = l->next)
|
EINA_LIST_FOREACH(_edje_file_cache, l, edf)
|
||||||
{
|
_edje_cache_coll_flush(edf);
|
||||||
Edje_File *edf;
|
|
||||||
|
|
||||||
edf = l->data;
|
|
||||||
_edje_cache_coll_flush(edf);
|
|
||||||
}
|
|
||||||
/* FIXME: freach in file hash too! */
|
/* FIXME: freach in file hash too! */
|
||||||
_edje_collection_cache_size = ps;
|
_edje_collection_cache_size = ps;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,8 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *name,
|
||||||
{
|
{
|
||||||
Edje_Part *ep = rp->part;
|
Edje_Part *ep = rp->part;
|
||||||
Edje_Part_Description *ret = NULL;
|
Edje_Part_Description *ret = NULL;
|
||||||
Evas_List *l;
|
Edje_Part_Description *d;
|
||||||
|
Eina_List *l;
|
||||||
double min_dst = 999.0;
|
double min_dst = 999.0;
|
||||||
|
|
||||||
if (!strcmp(name, "default") && val == 0.0)
|
if (!strcmp(name, "default") && val == 0.0)
|
||||||
|
@ -67,11 +68,8 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *name,
|
||||||
ret = ep->default_desc;
|
ret = ep->default_desc;
|
||||||
min_dst = ABS(ep->default_desc->state.value - val);
|
min_dst = ABS(ep->default_desc->state.value - val);
|
||||||
}
|
}
|
||||||
|
EINA_LIST_FOREACH(ep->other_desc, l, d)
|
||||||
for (l = ep->other_desc; l; l = l->next)
|
|
||||||
{
|
{
|
||||||
Edje_Part_Description *d = l->data;
|
|
||||||
|
|
||||||
if (!strcmp(d->state.name, name))
|
if (!strcmp(d->state.name, name))
|
||||||
{
|
{
|
||||||
double dst;
|
double dst;
|
||||||
|
@ -602,7 +600,7 @@ _edje_part_recalc_single(Edje *ed,
|
||||||
const char *text = "";
|
const char *text = "";
|
||||||
const char *style = "";
|
const char *style = "";
|
||||||
Edje_Style *stl = NULL;
|
Edje_Style *stl = NULL;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
if (chosen_desc->text.id_source >= 0)
|
if (chosen_desc->text.id_source >= 0)
|
||||||
{
|
{
|
||||||
|
@ -630,9 +628,8 @@ _edje_part_recalc_single(Edje *ed,
|
||||||
if (ep->text.text) text = ep->text.text;
|
if (ep->text.text) text = ep->text.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (l = ed->file->styles; l; l = l->next)
|
EINA_LIST_FOREACH(ed->file->styles, l, stl)
|
||||||
{
|
{
|
||||||
stl = l->data;
|
|
||||||
if ((stl->name) && (!strcmp(stl->name, style))) break;
|
if ((stl->name) && (!strcmp(stl->name, style))) break;
|
||||||
stl = NULL;
|
stl = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1165,15 +1162,15 @@ _edje_gradient_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3,
|
||||||
p3->gradient.id != ep->gradient_id)
|
p3->gradient.id != ep->gradient_id)
|
||||||
{
|
{
|
||||||
Edje_Spectrum_Directory_Entry *se;
|
Edje_Spectrum_Directory_Entry *se;
|
||||||
Evas_List *l;
|
Edje_Spectrum_Color *sc;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
se = evas_list_nth(ed->file->spectrum_dir->entries, p3->gradient.id);
|
se = eina_list_nth(ed->file->spectrum_dir->entries, p3->gradient.id);
|
||||||
if (se)
|
if (se)
|
||||||
{
|
{
|
||||||
evas_object_gradient_clear(ep->object);
|
evas_object_gradient_clear(ep->object);
|
||||||
for (l = se->color_list; l; l = l->next)
|
EINA_LIST_FOREACH(se->color_list, l, sc)
|
||||||
{
|
{
|
||||||
Edje_Spectrum_Color *sc = l->data;
|
|
||||||
evas_object_gradient_color_stop_add(ep->object, sc->r,
|
evas_object_gradient_color_stop_add(ep->object, sc->r,
|
||||||
sc->g, sc->b, 255,
|
sc->g, sc->b, 255,
|
||||||
sc->d);
|
sc->d);
|
||||||
|
@ -1205,7 +1202,7 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
||||||
Edje_Image_Directory_Entry *ie;
|
Edje_Image_Directory_Entry *ie;
|
||||||
|
|
||||||
if (!ed->file->image_dir) ie = NULL;
|
if (!ed->file->image_dir) ie = NULL;
|
||||||
else ie = evas_list_nth(ed->file->image_dir->entries, (-image_id) - 1);
|
else ie = eina_list_nth(ed->file->image_dir->entries, (-image_id) - 1);
|
||||||
if ((ie) &&
|
if ((ie) &&
|
||||||
(ie->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) &&
|
(ie->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) &&
|
||||||
(ie->entry))
|
(ie->entry))
|
||||||
|
@ -1217,7 +1214,7 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
||||||
{
|
{
|
||||||
image_count = 2;
|
image_count = 2;
|
||||||
if (ep->param2.description)
|
if (ep->param2.description)
|
||||||
image_count += evas_list_count(ep->param2.description->image.tween_list);
|
image_count += eina_list_count(ep->param2.description->image.tween_list);
|
||||||
image_num = (pos * ((double)image_count - 0.5));
|
image_num = (pos * ((double)image_count - 0.5));
|
||||||
if (image_num > (image_count - 1))
|
if (image_num > (image_count - 1))
|
||||||
image_num = image_count - 1;
|
image_num = image_count - 1;
|
||||||
|
@ -1229,7 +1226,7 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
||||||
{
|
{
|
||||||
Edje_Part_Image_Id *imid;
|
Edje_Part_Image_Id *imid;
|
||||||
|
|
||||||
imid = evas_list_nth(ep->param2.description->image.tween_list,
|
imid = eina_list_nth(ep->param2.description->image.tween_list,
|
||||||
image_num - 1);
|
image_num - 1);
|
||||||
if (imid) image_id = imid->id;
|
if (imid) image_id = imid->id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -334,61 +334,62 @@ int
|
||||||
_edje_timer_cb(void *data)
|
_edje_timer_cb(void *data)
|
||||||
{
|
{
|
||||||
double t;
|
double t;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
Evas_List *animl = NULL;
|
Eina_List *animl = NULL;
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
t = ecore_time_get();
|
t = ecore_time_get();
|
||||||
for (l = _edje_animators; l; l = l->next)
|
EINA_LIST_FOREACH(_edje_animators, l, ed)
|
||||||
{
|
{
|
||||||
ed = l->data;
|
|
||||||
_edje_ref(ed);
|
_edje_ref(ed);
|
||||||
animl = evas_list_append(animl, l->data);
|
animl = eina_list_append(animl, ed);
|
||||||
}
|
}
|
||||||
while (animl)
|
while (animl)
|
||||||
{
|
{
|
||||||
Evas_List *newl = NULL;
|
Eina_List *newl = NULL;
|
||||||
|
|
||||||
ed = animl->data;
|
ed = eina_list_data_get(animl);
|
||||||
_edje_block(ed);
|
_edje_block(ed);
|
||||||
_edje_freeze(ed);
|
_edje_freeze(ed);
|
||||||
animl = evas_list_remove(animl, animl->data);
|
animl = eina_list_remove(animl, eina_list_data_get(animl));
|
||||||
if ((!ed->paused) && (!ed->delete_me))
|
if ((!ed->paused) && (!ed->delete_me))
|
||||||
{
|
{
|
||||||
|
const void *tmp;
|
||||||
|
|
||||||
ed->walking_actions = 1;
|
ed->walking_actions = 1;
|
||||||
for (l = ed->actions; l; l = l->next)
|
EINA_LIST_FOREACH(ed->actions, l, tmp)
|
||||||
newl = evas_list_append(newl, l->data);
|
newl = eina_list_append(newl, tmp);
|
||||||
while (newl)
|
while (newl)
|
||||||
{
|
{
|
||||||
Edje_Running_Program *runp;
|
Edje_Running_Program *runp;
|
||||||
|
|
||||||
runp = newl->data;
|
runp = eina_list_data_get(newl);
|
||||||
newl = evas_list_remove(newl, newl->data);
|
newl = eina_list_remove(newl, eina_list_data_get(newl));
|
||||||
if (!runp->delete_me)
|
if (!runp->delete_me)
|
||||||
_edje_program_run_iterate(runp, t);
|
_edje_program_run_iterate(runp, t);
|
||||||
if (_edje_block_break(ed))
|
if (_edje_block_break(ed))
|
||||||
{
|
{
|
||||||
evas_list_free(newl);
|
eina_list_free(newl);
|
||||||
newl = NULL;
|
newl = NULL;
|
||||||
goto break_prog;
|
goto break_prog;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (l = ed->actions; l; l = l->next)
|
EINA_LIST_FOREACH(ed->actions, l, tmp)
|
||||||
newl = evas_list_append(newl, l->data);
|
newl = eina_list_append(newl, tmp);
|
||||||
while (newl)
|
while (newl)
|
||||||
{
|
{
|
||||||
Edje_Running_Program *runp;
|
Edje_Running_Program *runp;
|
||||||
|
|
||||||
runp = newl->data;
|
runp = eina_list_data_get(newl);
|
||||||
newl = evas_list_remove(newl, newl->data);
|
newl = eina_list_remove(newl, eina_list_data_get(newl));
|
||||||
if (runp->delete_me)
|
if (runp->delete_me)
|
||||||
{
|
{
|
||||||
_edje_anim_count--;
|
_edje_anim_count--;
|
||||||
runp->edje->actions =
|
runp->edje->actions =
|
||||||
evas_list_remove(runp->edje->actions, runp);
|
eina_list_remove(runp->edje->actions, runp);
|
||||||
if (!runp->edje->actions)
|
if (!runp->edje->actions)
|
||||||
_edje_animators =
|
_edje_animators =
|
||||||
evas_list_remove(_edje_animators, runp->edje);
|
eina_list_remove(_edje_animators, runp->edje);
|
||||||
free(runp);
|
free(runp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -411,7 +412,7 @@ _edje_pending_timer_cb(void *data)
|
||||||
Edje_Pending_Program *pp;
|
Edje_Pending_Program *pp;
|
||||||
|
|
||||||
pp = data;
|
pp = data;
|
||||||
pp->edje->pending_actions = evas_list_remove(pp->edje->pending_actions, pp);
|
pp->edje->pending_actions = eina_list_remove(pp->edje->pending_actions, pp);
|
||||||
_edje_program_run(pp->edje, pp->program, 1, "", "");
|
_edje_program_run(pp->edje, pp->program, 1, "", "");
|
||||||
free(pp);
|
free(pp);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -10,8 +10,9 @@
|
||||||
static void
|
static void
|
||||||
_edje_container_relayout(Smart_Data *sd)
|
_edje_container_relayout(Smart_Data *sd)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
Evas_Coord x, y, w, h, sw;
|
Evas_Coord x, y, w, h, sw;
|
||||||
|
Edje_Item *ei;
|
||||||
|
|
||||||
if (sd->freeze > 0) return;
|
if (sd->freeze > 0) return;
|
||||||
if (!sd->need_layout) return;
|
if (!sd->need_layout) return;
|
||||||
|
@ -25,11 +26,8 @@ _edje_container_relayout(Smart_Data *sd)
|
||||||
w = 0;
|
w = 0;
|
||||||
h = 0;
|
h = 0;
|
||||||
|
|
||||||
for (l = sd->children; l; l = l->next)
|
EINA_LIST_FOREACH(sd->children, l, ei)
|
||||||
{
|
{
|
||||||
Edje_Item *ei;
|
|
||||||
|
|
||||||
ei = l->data;
|
|
||||||
if (sd->homogenous) h = sd->min_row_h;
|
if (sd->homogenous) h = sd->min_row_h;
|
||||||
|
|
||||||
ei->y = y;
|
ei->y = y;
|
||||||
|
@ -44,7 +42,8 @@ _edje_container_relayout(Smart_Data *sd)
|
||||||
static void
|
static void
|
||||||
_edje_container_recalc(Smart_Data *sd)
|
_edje_container_recalc(Smart_Data *sd)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Item *ei;
|
||||||
int any_max_h = 0, any_max_w = 0;
|
int any_max_h = 0, any_max_w = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -80,11 +79,8 @@ _edje_container_recalc(Smart_Data *sd)
|
||||||
else if ((sd->max_w >= 0) && (sd->w < sd->max_w))
|
else if ((sd->max_w >= 0) && (sd->w < sd->max_w))
|
||||||
sd->w = sd->max_w;
|
sd->w = sd->max_w;
|
||||||
|
|
||||||
for (l = sd->children; l; l = l->next)
|
EINA_LIST_FOREACH(sd->children, l, ei)
|
||||||
{
|
{
|
||||||
Edje_Item *ei;
|
|
||||||
|
|
||||||
ei = l->data;
|
|
||||||
if (ei->minh > sd->min_row_h)
|
if (ei->minh > sd->min_row_h)
|
||||||
sd->min_row_h = ei->minh;
|
sd->min_row_h = ei->minh;
|
||||||
if (sd->max_row_h >= 0)
|
if (sd->max_row_h >= 0)
|
||||||
|
@ -115,7 +111,7 @@ _edje_container_recalc(Smart_Data *sd)
|
||||||
}
|
}
|
||||||
if (sd->homogenous)
|
if (sd->homogenous)
|
||||||
{
|
{
|
||||||
sd->min_h = evas_list_count(sd->children) * sd->min_row_h;
|
sd->min_h = eina_list_count(sd->children) * sd->min_row_h;
|
||||||
}
|
}
|
||||||
|
|
||||||
sd->changed = 0;
|
sd->changed = 0;
|
||||||
|
@ -451,10 +447,10 @@ edje_container_item_append(Evas_Object *obj, Edje_Item *ei)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
sd->children = evas_list_append(sd->children, ei);
|
sd->children = eina_list_append(sd->children, ei);
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
sd->change_child_list = 1;
|
sd->change_child_list = 1;
|
||||||
sd->rows = evas_list_count(sd->children);
|
sd->rows = eina_list_count(sd->children);
|
||||||
_edje_container_recalc(sd);
|
_edje_container_recalc(sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,10 +461,10 @@ edje_container_item_prepend(Evas_Object *obj, Edje_Item *ei)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
sd->children = evas_list_prepend(sd->children, ei);
|
sd->children = eina_list_prepend(sd->children, ei);
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
sd->change_child_list = 1;
|
sd->change_child_list = 1;
|
||||||
sd->rows = evas_list_count(sd->children);
|
sd->rows = eina_list_count(sd->children);
|
||||||
_edje_container_recalc(sd);
|
_edje_container_recalc(sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -479,10 +475,10 @@ edje_container_item_append_relative(Evas_Object *obj, Edje_Item *ei, Edje_Item *
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
sd->children = evas_list_append_relative(sd->children, ei, rel);
|
sd->children = eina_list_append_relative(sd->children, ei, rel);
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
sd->change_child_list = 1;
|
sd->change_child_list = 1;
|
||||||
sd->rows = evas_list_count(sd->children);
|
sd->rows = eina_list_count(sd->children);
|
||||||
_edje_container_recalc(sd);
|
_edje_container_recalc(sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -493,10 +489,10 @@ edje_container_item_prepend_relative(Evas_Object *obj, Edje_Item *ei, Edje_Item
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
sd->children = evas_list_prepend_relative(sd->children, ei, rel);
|
sd->children = eina_list_prepend_relative(sd->children, ei, rel);
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
sd->change_child_list = 1;
|
sd->change_child_list = 1;
|
||||||
sd->rows = evas_list_count(sd->children);
|
sd->rows = eina_list_count(sd->children);
|
||||||
_edje_container_recalc(sd);
|
_edje_container_recalc(sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -508,14 +504,14 @@ edje_container_item_insert(Evas_Object *obj, Edje_Item *ei, int n)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
rel = evas_list_nth(sd->children, n);
|
rel = eina_list_nth(sd->children, n);
|
||||||
if (!rel)
|
if (!rel)
|
||||||
sd->children = evas_list_append(sd->children, ei);
|
sd->children = eina_list_append(sd->children, ei);
|
||||||
else
|
else
|
||||||
sd->children = evas_list_append_relative(sd->children, ei, rel);
|
sd->children = eina_list_append_relative(sd->children, ei, rel);
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
sd->change_child_list = 1;
|
sd->change_child_list = 1;
|
||||||
sd->rows = evas_list_count(sd->children);
|
sd->rows = eina_list_count(sd->children);
|
||||||
_edje_container_recalc(sd);
|
_edje_container_recalc(sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,10 +522,10 @@ edje_container_item_remove(Evas_Object *obj, Edje_Item *ei)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
sd->children = evas_list_remove(sd->children, ei);
|
sd->children = eina_list_remove(sd->children, ei);
|
||||||
sd->changed = 1;
|
sd->changed = 1;
|
||||||
sd->change_child_list = 1;
|
sd->change_child_list = 1;
|
||||||
sd->rows = evas_list_count(sd->children);
|
sd->rows = eina_list_count(sd->children);
|
||||||
_edje_container_recalc(sd);
|
_edje_container_recalc(sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -640,7 +636,7 @@ edje_container_count_get(Evas_Object *obj)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return 0;
|
if (!sd) return 0;
|
||||||
return evas_list_count(sd->children);
|
return eina_list_count(sd->children);
|
||||||
}
|
}
|
||||||
|
|
||||||
Edje_Item *
|
Edje_Item *
|
||||||
|
@ -651,7 +647,7 @@ edje_container_item_first_get(Evas_Object *obj)
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return NULL;
|
if (!sd) return NULL;
|
||||||
if (!sd->children) return NULL;
|
if (!sd->children) return NULL;
|
||||||
return sd->children->data;
|
return eina_list_data_get(sd->children);
|
||||||
}
|
}
|
||||||
|
|
||||||
Edje_Item *
|
Edje_Item *
|
||||||
|
@ -662,7 +658,7 @@ edje_container_item_last_get(Evas_Object *obj)
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return NULL;
|
if (!sd) return NULL;
|
||||||
if (!sd->children) return NULL;
|
if (!sd->children) return NULL;
|
||||||
return evas_list_last(sd->children)->data;
|
return0 eina_list_data_get(eina_list_last(sd->children));
|
||||||
}
|
}
|
||||||
|
|
||||||
Edje_Item *
|
Edje_Item *
|
||||||
|
@ -672,7 +668,7 @@ edje_container_item_nth_get(Evas_Object *obj, int n)
|
||||||
|
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return NULL;
|
if (!sd) return NULL;
|
||||||
return evas_list_nth(sd->children, n);
|
return eina_list_nth(sd->children, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -37,7 +37,7 @@ typedef struct _Smart_Data_Colinfo Smart_Data_Colinfo;
|
||||||
struct _Smart_Data
|
struct _Smart_Data
|
||||||
{
|
{
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
Evas_List *children;
|
Eina_List *children;
|
||||||
Evas_Object *smart_obj;
|
Evas_Object *smart_obj;
|
||||||
int cols, rows;
|
int cols, rows;
|
||||||
|
|
||||||
|
|
|
@ -83,10 +83,10 @@ _edje_edd_setup(void)
|
||||||
eddc.func.mem_free = NULL;
|
eddc.func.mem_free = NULL;
|
||||||
eddc.func.str_alloc = (char *(*)(const char *))eina_stringshare_add;
|
eddc.func.str_alloc = (char *(*)(const char *))eina_stringshare_add;
|
||||||
eddc.func.str_free = eina_stringshare_del;
|
eddc.func.str_free = eina_stringshare_del;
|
||||||
eddc.func.list_next = (void *(*)(void *))evas_list_next;
|
eddc.func.list_next = (void *(*)(void *))eina_list_next;
|
||||||
eddc.func.list_append = (void *(*)(void *, void *))evas_list_append;
|
eddc.func.list_append = (void *(*)(void *, void *))eina_list_append;
|
||||||
eddc.func.list_data = (void *(*)(void *))evas_list_data;
|
eddc.func.list_data = (void *(*)(void *))eina_list_data_get;
|
||||||
eddc.func.list_free = (void *(*)(void *))evas_list_free;
|
eddc.func.list_free = (void *(*)(void *))eina_list_free;
|
||||||
eddc.func.hash_foreach = (void (*)(void *, int (*)(void *, const char *, void *, void *), void *))evas_hash_foreach;
|
eddc.func.hash_foreach = (void (*)(void *, int (*)(void *, const char *, void *, void *), void *))evas_hash_foreach;
|
||||||
eddc.func.hash_add = (void *(*)(void *, const char *, void *))evas_hash_add;
|
eddc.func.hash_add = (void *(*)(void *, const char *, void *))evas_hash_add;
|
||||||
eddc.func.hash_free = (void (*)(void *))evas_hash_free;
|
eddc.func.hash_free = (void (*)(void *))evas_hash_free;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -688,7 +688,7 @@ _edje_embryo_fn_stop_program(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
int program_id = 0;
|
int program_id = 0;
|
||||||
Edje_Running_Program *runp;
|
Edje_Running_Program *runp;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
CHKPARAM(1);
|
CHKPARAM(1);
|
||||||
ed = embryo_program_data_get(ep);
|
ed = embryo_program_data_get(ep);
|
||||||
|
@ -697,12 +697,9 @@ _edje_embryo_fn_stop_program(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
|
|
||||||
ed->walking_actions = 1;
|
ed->walking_actions = 1;
|
||||||
|
|
||||||
for (l = ed->actions; l; l = l->next)
|
EINA_LIST_FOREACH(ed->actions, l, runp)
|
||||||
{
|
if (program_id == runp->program->id)
|
||||||
runp = l->data;
|
_edje_program_end(ed, runp);
|
||||||
if (program_id == runp->program->id)
|
|
||||||
_edje_program_end(ed, runp);
|
|
||||||
}
|
|
||||||
|
|
||||||
ed->walking_actions = 0;
|
ed->walking_actions = 0;
|
||||||
|
|
||||||
|
@ -1507,7 +1504,8 @@ _edje_embryo_fn_custom_state(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
Edje *ed = embryo_program_data_get(ep);
|
Edje *ed = embryo_program_data_get(ep);
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
Edje_Part_Description *parent, *d;
|
Edje_Part_Description *parent, *d;
|
||||||
Evas_List *l;
|
Edje_Part_Image_Id *iid;
|
||||||
|
Eina_List *l;
|
||||||
char *name;
|
char *name;
|
||||||
float val;
|
float val;
|
||||||
|
|
||||||
|
@ -1546,14 +1544,14 @@ _edje_embryo_fn_custom_state(Embryo_Program *ep, Embryo_Cell *params)
|
||||||
*/
|
*/
|
||||||
d->image.tween_list = NULL;
|
d->image.tween_list = NULL;
|
||||||
|
|
||||||
for (l = parent->image.tween_list; l; l = l->next)
|
EINA_LIST_FOREACH(parent->image.tween_list, l, iid)
|
||||||
{
|
{
|
||||||
Edje_Part_Image_Id *iid = l->data, *iid_new;
|
Edje_Part_Image_Id *iid_new;
|
||||||
|
|
||||||
iid_new = calloc(1, sizeof(Edje_Part_Image_Id));
|
iid_new = calloc(1, sizeof(Edje_Part_Image_Id));
|
||||||
iid_new->id = iid->id;
|
iid_new->id = iid->id;
|
||||||
|
|
||||||
d->image.tween_list = evas_list_append(d->image.tween_list, iid_new);
|
d->image.tween_list = eina_list_append(d->image.tween_list, iid_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DUP(x) x ? (char *)eina_stringshare_add(x) : NULL
|
#define DUP(x) x ? (char *)eina_stringshare_add(x) : NULL
|
||||||
|
|
|
@ -23,9 +23,9 @@ struct _Entry
|
||||||
Evas_Object *cursor_fg;
|
Evas_Object *cursor_fg;
|
||||||
Evas_Textblock_Cursor *cursor;
|
Evas_Textblock_Cursor *cursor;
|
||||||
Evas_Textblock_Cursor *sel_start, *sel_end;
|
Evas_Textblock_Cursor *sel_start, *sel_end;
|
||||||
Evas_List *sel;
|
Eina_List *sel;
|
||||||
Evas_List *anchors;
|
Eina_List *anchors;
|
||||||
Evas_List *anchorlist;
|
Eina_List *anchorlist;
|
||||||
char *selection;
|
char *selection;
|
||||||
Evas_Bool selecting : 1;
|
Evas_Bool selecting : 1;
|
||||||
Evas_Bool have_selection : 1;
|
Evas_Bool have_selection : 1;
|
||||||
|
@ -42,7 +42,7 @@ struct _Anchor
|
||||||
Entry *en;
|
Entry *en;
|
||||||
char *name;
|
char *name;
|
||||||
Evas_Textblock_Cursor *start, *end;
|
Evas_Textblock_Cursor *start, *end;
|
||||||
Evas_List *sel;
|
Eina_List *sel;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -253,7 +253,7 @@ _sel_clear(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
if (sel->obj_bg) evas_object_del(sel->obj_bg);
|
if (sel->obj_bg) evas_object_del(sel->obj_bg);
|
||||||
if (sel->obj_fg) evas_object_del(sel->obj_fg);
|
if (sel->obj_fg) evas_object_del(sel->obj_fg);
|
||||||
free(sel);
|
free(sel);
|
||||||
en->sel = evas_list_remove_list(en->sel, en->sel);
|
en->sel = eina_list_remove_list(en->sel, en->sel);
|
||||||
}
|
}
|
||||||
if (en->have_selection)
|
if (en->have_selection)
|
||||||
{
|
{
|
||||||
|
@ -265,7 +265,7 @@ _sel_clear(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
static void
|
static void
|
||||||
_sel_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
_sel_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
{
|
{
|
||||||
Evas_List *range = NULL, *l;
|
Eina_List *range = NULL, *l;
|
||||||
Sel *sel;
|
Sel *sel;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
Evas_Object *smart, *clip;
|
Evas_Object *smart, *clip;
|
||||||
|
@ -274,7 +274,7 @@ _sel_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
clip = evas_object_clip_get(o);
|
clip = evas_object_clip_get(o);
|
||||||
if (en->sel_start)
|
if (en->sel_start)
|
||||||
range = evas_textblock_cursor_range_geometry_get(en->sel_start, en->sel_end);
|
range = evas_textblock_cursor_range_geometry_get(en->sel_start, en->sel_end);
|
||||||
if (evas_list_count(range) != evas_list_count(en->sel))
|
if (eina_list_count(range) != eina_list_count(en->sel))
|
||||||
{
|
{
|
||||||
while (en->sel)
|
while (en->sel)
|
||||||
{
|
{
|
||||||
|
@ -282,16 +282,16 @@ _sel_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
if (sel->obj_bg) evas_object_del(sel->obj_bg);
|
if (sel->obj_bg) evas_object_del(sel->obj_bg);
|
||||||
if (sel->obj_fg) evas_object_del(sel->obj_fg);
|
if (sel->obj_fg) evas_object_del(sel->obj_fg);
|
||||||
free(sel);
|
free(sel);
|
||||||
en->sel = evas_list_remove_list(en->sel, en->sel);
|
en->sel = eina_list_remove_list(en->sel, en->sel);
|
||||||
}
|
}
|
||||||
if (en->have_selection)
|
if (en->have_selection)
|
||||||
{
|
{
|
||||||
for (l = range; l; l = l->next)
|
for (l = range; l; l = eina_list_next(l))
|
||||||
{
|
{
|
||||||
Evas_Object *ob;
|
Evas_Object *ob;
|
||||||
|
|
||||||
sel = calloc(1, sizeof(Sel));
|
sel = calloc(1, sizeof(Sel));
|
||||||
en->sel = evas_list_append(en->sel, sel);
|
en->sel = eina_list_append(en->sel, sel);
|
||||||
ob = edje_object_add(en->rp->edje->evas);
|
ob = edje_object_add(en->rp->edje->evas);
|
||||||
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source);
|
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source);
|
||||||
evas_object_smart_member_add(ob, smart);
|
evas_object_smart_member_add(ob, smart);
|
||||||
|
@ -313,11 +313,10 @@ _sel_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
}
|
}
|
||||||
x = y = w = h = -1;
|
x = y = w = h = -1;
|
||||||
evas_object_geometry_get(o, &x, &y, &w, &h);
|
evas_object_geometry_get(o, &x, &y, &w, &h);
|
||||||
for (l = en->sel; l; l = l->next)
|
EINA_LIST_FOREACH(en->sel, l, sel)
|
||||||
{
|
{
|
||||||
Evas_Textblock_Rectangle *r;
|
Evas_Textblock_Rectangle *r;
|
||||||
|
|
||||||
sel = l->data;
|
|
||||||
r = range->data;
|
r = range->data;
|
||||||
if (sel->obj_bg)
|
if (sel->obj_bg)
|
||||||
{
|
{
|
||||||
|
@ -329,7 +328,7 @@ _sel_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
evas_object_move(sel->obj_fg, x + r->x, y + r->y);
|
evas_object_move(sel->obj_fg, x + r->x, y + r->y);
|
||||||
evas_object_resize(sel->obj_fg, r->w, r->h);
|
evas_object_resize(sel->obj_fg, r->w, r->h);
|
||||||
}
|
}
|
||||||
range = evas_list_remove_list(range, range);
|
range = eina_list_remove_list(range, range);
|
||||||
free(r);
|
free(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -452,20 +451,20 @@ _edje_anchor_mouse_out_cb(void *data, Evas *e, Evas_Object *obj, void *event_inf
|
||||||
static void
|
static void
|
||||||
_anchors_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
_anchors_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
{
|
{
|
||||||
Evas_List *l, *ll, *range;
|
Eina_List *l, *ll, *range;
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
Evas_Object *smart, *clip;
|
Evas_Object *smart, *clip;
|
||||||
Sel *sel;
|
Sel *sel;
|
||||||
|
Anchor *an;
|
||||||
|
|
||||||
smart = evas_object_smart_parent_get(o);
|
smart = evas_object_smart_parent_get(o);
|
||||||
clip = evas_object_clip_get(o);
|
clip = evas_object_clip_get(o);
|
||||||
x = y = w = h = -1;
|
x = y = w = h = -1;
|
||||||
evas_object_geometry_get(o, &x, &y, &w, &h);
|
evas_object_geometry_get(o, &x, &y, &w, &h);
|
||||||
for (l = en->anchors; l; l = l->next)
|
EINA_LIST_FOREACH(en->anchors, l, an)
|
||||||
{
|
{
|
||||||
Anchor *an = l->data;
|
|
||||||
range = evas_textblock_cursor_range_geometry_get(an->start, an->end);
|
range = evas_textblock_cursor_range_geometry_get(an->start, an->end);
|
||||||
if (evas_list_count(range) != evas_list_count(an->sel))
|
if (eina_list_count(range) != eina_list_count(an->sel))
|
||||||
{
|
{
|
||||||
while (an->sel)
|
while (an->sel)
|
||||||
{
|
{
|
||||||
|
@ -474,14 +473,14 @@ _anchors_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
if (sel->obj_fg) evas_object_del(sel->obj_fg);
|
if (sel->obj_fg) evas_object_del(sel->obj_fg);
|
||||||
if (sel->obj) evas_object_del(sel->obj);
|
if (sel->obj) evas_object_del(sel->obj);
|
||||||
free(sel);
|
free(sel);
|
||||||
an->sel = evas_list_remove_list(an->sel, an->sel);
|
an->sel = eina_list_remove_list(an->sel, an->sel);
|
||||||
}
|
}
|
||||||
for (ll = range; ll; ll = ll->next)
|
for (ll = range; ll; ll = eina_list_next(ll))
|
||||||
{
|
{
|
||||||
Evas_Object *ob;
|
Evas_Object *ob;
|
||||||
|
|
||||||
sel = calloc(1, sizeof(Sel));
|
sel = calloc(1, sizeof(Sel));
|
||||||
an->sel = evas_list_append(an->sel, sel);
|
an->sel = eina_list_append(an->sel, sel);
|
||||||
ob = edje_object_add(en->rp->edje->evas);
|
ob = edje_object_add(en->rp->edje->evas);
|
||||||
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source5);
|
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source5);
|
||||||
evas_object_smart_member_add(ob, smart);
|
evas_object_smart_member_add(ob, smart);
|
||||||
|
@ -513,11 +512,10 @@ _anchors_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
sel->obj = ob;
|
sel->obj = ob;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (ll = an->sel; ll; ll = ll->next)
|
EINA_LIST_FOREACH(an->sel, ll, sel)
|
||||||
{
|
{
|
||||||
Evas_Textblock_Rectangle *r;
|
Evas_Textblock_Rectangle *r;
|
||||||
|
|
||||||
sel = ll->data;
|
|
||||||
r = range->data;
|
r = range->data;
|
||||||
if (sel->obj_bg)
|
if (sel->obj_bg)
|
||||||
{
|
{
|
||||||
|
@ -534,7 +532,7 @@ _anchors_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
evas_object_move(sel->obj, x + r->x, y + r->y);
|
evas_object_move(sel->obj, x + r->x, y + r->y);
|
||||||
evas_object_resize(sel->obj, r->w, r->h);
|
evas_object_resize(sel->obj, r->w, r->h);
|
||||||
}
|
}
|
||||||
range = evas_list_remove_list(range, range);
|
range = eina_list_remove_list(range, range);
|
||||||
free(r);
|
free(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -546,7 +544,7 @@ _anchors_clear(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
while (en->anchorlist)
|
while (en->anchorlist)
|
||||||
{
|
{
|
||||||
free(en->anchorlist->data);
|
free(en->anchorlist->data);
|
||||||
en->anchorlist = evas_list_remove_list(en->anchorlist, en->anchorlist);
|
en->anchorlist = eina_list_remove_list(en->anchorlist, en->anchorlist);
|
||||||
}
|
}
|
||||||
while (en->anchors)
|
while (en->anchors)
|
||||||
{
|
{
|
||||||
|
@ -561,9 +559,9 @@ _anchors_clear(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
if (sel->obj_fg) evas_object_del(sel->obj_fg);
|
if (sel->obj_fg) evas_object_del(sel->obj_fg);
|
||||||
if (sel->obj) evas_object_del(sel->obj);
|
if (sel->obj) evas_object_del(sel->obj);
|
||||||
free(sel);
|
free(sel);
|
||||||
an->sel = evas_list_remove_list(an->sel, an->sel);
|
an->sel = eina_list_remove_list(an->sel, an->sel);
|
||||||
}
|
}
|
||||||
en->anchors = evas_list_remove_list(en->anchors, en->anchors);
|
en->anchors = eina_list_remove_list(en->anchors, en->anchors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,7 +595,7 @@ _anchors_get(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
{
|
{
|
||||||
an->name = strdup(p + 5);
|
an->name = strdup(p + 5);
|
||||||
}
|
}
|
||||||
en->anchors = evas_list_append(en->anchors, an);
|
en->anchors = eina_list_append(en->anchors, an);
|
||||||
an->start = evas_object_textblock_cursor_new(o);
|
an->start = evas_object_textblock_cursor_new(o);
|
||||||
an->end = evas_object_textblock_cursor_new(o);
|
an->end = evas_object_textblock_cursor_new(o);
|
||||||
evas_textblock_cursor_copy(c1, an->start);
|
evas_textblock_cursor_copy(c1, an->start);
|
||||||
|
@ -613,7 +611,7 @@ _anchors_get(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||||
if (an->name) free(an->name);
|
if (an->name) free(an->name);
|
||||||
evas_textblock_cursor_free(an->start);
|
evas_textblock_cursor_free(an->start);
|
||||||
evas_textblock_cursor_free(an->end);
|
evas_textblock_cursor_free(an->end);
|
||||||
en->anchors = evas_list_remove(en->anchors, an);
|
en->anchors = eina_list_remove(en->anchors, an);
|
||||||
free(an);
|
free(an);
|
||||||
}
|
}
|
||||||
firsttext = 0;
|
firsttext = 0;
|
||||||
|
@ -1259,22 +1257,23 @@ _edje_entry_set_cursor_end(Edje_Real_Part *rp)
|
||||||
_curs_end(en->cursor, rp->object, en);
|
_curs_end(en->cursor, rp->object, en);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Evas_List *
|
const Eina_List *
|
||||||
_edje_entry_anchors_list(Edje_Real_Part *rp)
|
_edje_entry_anchors_list(Edje_Real_Part *rp)
|
||||||
{
|
{
|
||||||
Entry *en = rp->entry_data;
|
Entry *en = rp->entry_data;
|
||||||
Evas_List *l, *anchors = NULL;
|
Eina_List *l, *anchors = NULL;
|
||||||
|
Anchor *an;
|
||||||
|
|
||||||
if (!en) return NULL;
|
if (!en) return NULL;
|
||||||
if (!en->anchorlist)
|
if (!en->anchorlist)
|
||||||
{
|
{
|
||||||
for (l = en->anchors; l; l = l->next)
|
EINA_LIST_FOREACH(en->anchors, l, an)
|
||||||
{
|
{
|
||||||
Anchor *an = l->data;
|
|
||||||
char *n;
|
char *n;
|
||||||
|
|
||||||
n = an->name;
|
n = an->name;
|
||||||
if (!n) n = "";
|
if (!n) n = "";
|
||||||
anchors = evas_list_append(anchors, strdup(n));
|
anchors = eina_list_append(anchors, strdup(n));
|
||||||
}
|
}
|
||||||
en->anchorlist = anchors;
|
en->anchorlist = anchors;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,10 @@ static Evas_Bool _edje_file_collection_hash_foreach(const Evas_Hash *hash, const
|
||||||
#ifdef EDJE_PROGRAM_CACHE
|
#ifdef EDJE_PROGRAM_CACHE
|
||||||
static Evas_Bool _edje_collection_free_prog_cache_matches_free_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata);
|
static Evas_Bool _edje_collection_free_prog_cache_matches_free_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata);
|
||||||
#endif
|
#endif
|
||||||
static int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Evas_List *group_path);
|
static int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Eina_List *group_path);
|
||||||
static void _cb_signal_repeat(void *data, Evas_Object *obj, const char *signal, const char *source);
|
static void _cb_signal_repeat(void *data, Evas_Object *obj, const char *signal, const char *source);
|
||||||
|
|
||||||
static Evas_List *_edje_swallows_collect(Edje *ed);
|
static Eina_List *_edje_swallows_collect(Edje *ed);
|
||||||
|
|
||||||
/************************** API Routines **************************/
|
/************************** API Routines **************************/
|
||||||
|
|
||||||
|
@ -91,15 +91,15 @@ edje_object_load_error_get(const Evas_Object *obj)
|
||||||
/** Get a list of groups in an edje file
|
/** Get a list of groups in an edje file
|
||||||
* @param file The path to the edje file
|
* @param file The path to the edje file
|
||||||
*
|
*
|
||||||
* @return The Evas_List of group names (char *)
|
* @return The Eina_List of group names (char *)
|
||||||
*
|
*
|
||||||
* Note: the list must be freed using edje_file_collection_list_free()
|
* Note: the list must be freed using edje_file_collection_list_free()
|
||||||
* when you are done with it.
|
* when you are done with it.
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List *
|
EAPI Eina_List *
|
||||||
edje_file_collection_list(const char *file)
|
edje_file_collection_list(const char *file)
|
||||||
{
|
{
|
||||||
Evas_List *lst = NULL;
|
Eina_List *lst = NULL;
|
||||||
Edje_File *edf;
|
Edje_File *edf;
|
||||||
int error_ret = 0;
|
int error_ret = 0;
|
||||||
|
|
||||||
|
@ -109,15 +109,11 @@ edje_file_collection_list(const char *file)
|
||||||
{
|
{
|
||||||
if (edf->collection_dir)
|
if (edf->collection_dir)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Part_Collection_Directory_Entry *ce;
|
||||||
|
|
||||||
for (l = edf->collection_dir->entries; l; l = l->next)
|
EINA_LIST_FOREACH(edf->collection_dir->entries, l, ce)
|
||||||
{
|
lst = eina_list_append(lst, eina_stringshare_add(ce->entry));
|
||||||
Edje_Part_Collection_Directory_Entry *ce;
|
|
||||||
|
|
||||||
ce = l->data;
|
|
||||||
lst = evas_list_append(lst, eina_stringshare_add(ce->entry));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_edje_cache_file_unref(edf);
|
_edje_cache_file_unref(edf);
|
||||||
}
|
}
|
||||||
|
@ -125,17 +121,17 @@ edje_file_collection_list(const char *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Free file collection list
|
/** Free file collection list
|
||||||
* @param lst The Evas_List of groups
|
* @param lst The Eina_List of groups
|
||||||
*
|
*
|
||||||
* Frees the list returned by edje_file_collection_list().
|
* Frees the list returned by edje_file_collection_list().
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_file_collection_list_free(Evas_List *lst)
|
edje_file_collection_list_free(Eina_List *lst)
|
||||||
{
|
{
|
||||||
while (lst)
|
while (lst)
|
||||||
{
|
{
|
||||||
if (lst->data) eina_stringshare_del(lst->data);
|
if (eina_list_data_get(lst)) eina_stringshare_del(eina_list_data_get(lst));
|
||||||
lst = evas_list_remove(lst, lst->data);
|
lst = eina_list_remove(lst, eina_list_data_get(lst));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +218,7 @@ static void
|
||||||
_edje_programs_patterns_init(Edje *ed)
|
_edje_programs_patterns_init(Edje *ed)
|
||||||
{
|
{
|
||||||
Edje_Signals_Sources_Patterns *ssp = &ed->patterns.programs;
|
Edje_Signals_Sources_Patterns *ssp = &ed->patterns.programs;
|
||||||
Evas_List *programs = ed->collection->programs;
|
Eina_List *programs = ed->collection->programs;
|
||||||
|
|
||||||
if (ssp->signals_patterns)
|
if (ssp->signals_patterns)
|
||||||
return;
|
return;
|
||||||
|
@ -232,12 +228,12 @@ _edje_programs_patterns_init(Edje *ed)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Evas_List *group_path)
|
_edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Eina_List *group_path)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
int n;
|
int n;
|
||||||
Evas_List *parts = NULL;
|
Eina_List *parts = NULL;
|
||||||
Evas_List *old_swallows;
|
Eina_List *old_swallows;
|
||||||
int group_path_started = 0;
|
int group_path_started = 0;
|
||||||
|
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
|
@ -273,36 +269,34 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
int i;
|
int i;
|
||||||
int errors = 0;
|
int errors = 0;
|
||||||
|
Edje_Part *ep;
|
||||||
|
|
||||||
/* colorclass stuff */
|
/* colorclass stuff */
|
||||||
for (l = ed->collection->parts; (l && ! errors); l = l->next)
|
EINA_LIST_FOREACH(ed->collection->parts, l, ep)
|
||||||
{
|
{
|
||||||
Edje_Part *ep;
|
Eina_List *hist = NULL;
|
||||||
Evas_List *hist = NULL;
|
Edje_Part_Description *desc;
|
||||||
|
|
||||||
|
if (errors)
|
||||||
|
break;
|
||||||
/* Register any color classes in this parts descriptions. */
|
/* Register any color classes in this parts descriptions. */
|
||||||
ep = l->data;
|
|
||||||
if ((ep->default_desc) && (ep->default_desc->color_class))
|
if ((ep->default_desc) && (ep->default_desc->color_class))
|
||||||
_edje_color_class_member_add(ed, ep->default_desc->color_class);
|
_edje_color_class_member_add(ed, ep->default_desc->color_class);
|
||||||
for (hist = ep->other_desc; hist; hist = hist->next)
|
|
||||||
{
|
EINA_LIST_FOREACH(ep->other_desc, hist, desc)
|
||||||
Edje_Part_Description *desc;
|
if (desc->color_class)
|
||||||
|
_edje_color_class_member_add(ed, desc->color_class);
|
||||||
desc = hist->data;
|
|
||||||
if (desc->color_class)
|
|
||||||
_edje_color_class_member_add(ed, desc->color_class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* build real parts */
|
/* build real parts */
|
||||||
for (n = 0, l = ed->collection->parts; l; l = l->next, n++)
|
for (n = 0, l = ed->collection->parts; l; l = eina_list_next(l), n++)
|
||||||
{
|
{
|
||||||
Edje_Part *ep;
|
Edje_Part *ep;
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
|
|
||||||
ep = l->data;
|
ep = eina_list_data_get(l);
|
||||||
rp = calloc(1, sizeof(Edje_Real_Part));
|
rp = calloc(1, sizeof(Edje_Real_Part));
|
||||||
if (!rp)
|
if (!rp)
|
||||||
{
|
{
|
||||||
|
@ -312,7 +306,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
rp->edje = ed;
|
rp->edje = ed;
|
||||||
_edje_ref(rp->edje);
|
_edje_ref(rp->edje);
|
||||||
rp->part = ep;
|
rp->part = ep;
|
||||||
parts = evas_list_append(parts, rp);
|
parts = eina_list_append(parts, rp);
|
||||||
rp->param1.description = ep->default_desc;
|
rp->param1.description = ep->default_desc;
|
||||||
rp->chosen_description = rp->param1.description;
|
rp->chosen_description = rp->param1.description;
|
||||||
if (!rp->param1.description)
|
if (!rp->param1.description)
|
||||||
|
@ -377,13 +371,12 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
ed->table_parts_size = n;
|
ed->table_parts_size = n;
|
||||||
/* FIXME: check malloc return */
|
/* FIXME: check malloc return */
|
||||||
n = 0;
|
n = 0;
|
||||||
for (l = parts; l; l = l->next)
|
EINA_LIST_FOREACH(parts, l, rp)
|
||||||
{
|
{
|
||||||
rp = l->data;
|
|
||||||
ed->table_parts[n] = rp;
|
ed->table_parts[n] = rp;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
evas_list_free(parts);
|
eina_list_free(parts);
|
||||||
for (i = 0; i < ed->table_parts_size; i++)
|
for (i = 0; i < ed->table_parts_size; i++)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[i];
|
rp = ed->table_parts[i];
|
||||||
|
@ -441,19 +434,17 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
|
|
||||||
_edje_programs_patterns_init(ed);
|
_edje_programs_patterns_init(ed);
|
||||||
|
|
||||||
n = evas_list_count(ed->collection->programs);
|
n = eina_list_count(ed->collection->programs);
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
{
|
{
|
||||||
|
Edje_Program *pr;
|
||||||
/* FIXME: keeping a table AND a list is just bad - nuke list */
|
/* FIXME: keeping a table AND a list is just bad - nuke list */
|
||||||
ed->table_programs = malloc(sizeof(Edje_Program *) * n);
|
ed->table_programs = malloc(sizeof(Edje_Program *) * n);
|
||||||
ed->table_programs_size = n;
|
ed->table_programs_size = n;
|
||||||
/* FIXME: check malloc return */
|
/* FIXME: check malloc return */
|
||||||
n = 0;
|
n = 0;
|
||||||
for (l = ed->collection->programs; l; l = l->next)
|
EINA_LIST_FOREACH(ed->collection->programs, l, pr)
|
||||||
{
|
{
|
||||||
Edje_Program *pr;
|
|
||||||
|
|
||||||
pr = l->data;
|
|
||||||
ed->table_programs[n] = pr;
|
ed->table_programs[n] = pr;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
@ -488,19 +479,21 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
if (rp->part->type != EDJE_PART_TYPE_GROUP) continue;
|
if (rp->part->type != EDJE_PART_TYPE_GROUP) continue;
|
||||||
if (rp->part->source)
|
if (rp->part->source)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
Evas_Object *child_obj;
|
Evas_Object *child_obj;
|
||||||
Edje *child_ed;
|
Edje *child_ed;
|
||||||
const char *group_path_entry = eina_stringshare_add(rp->part->source);
|
const char *group_path_entry = eina_stringshare_add(rp->part->source);
|
||||||
|
const char *data;
|
||||||
|
|
||||||
if (!group_path)
|
if (!group_path)
|
||||||
{
|
{
|
||||||
group_path = evas_list_append(NULL, eina_stringshare_add(group));
|
group_path = eina_list_append(NULL, eina_stringshare_add(group));
|
||||||
group_path_started = 1;
|
group_path_started = 1;
|
||||||
}
|
}
|
||||||
/* make sure that this group isn't already in the tree of parents */
|
/* make sure that this group isn't already in the tree of parents */
|
||||||
for (l = group_path; l; l = l->next)
|
EINA_LIST_FOREACH(group_path, l, data)
|
||||||
{
|
{
|
||||||
if (l->data == group_path_entry)
|
if (data == group_path_entry)
|
||||||
{
|
{
|
||||||
_edje_thaw(ed);
|
_edje_thaw(ed);
|
||||||
_edje_unblock(ed);
|
_edje_unblock(ed);
|
||||||
|
@ -509,8 +502,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
eina_stringshare_del(group_path_entry);
|
eina_stringshare_del(group_path_entry);
|
||||||
if (group_path_started)
|
if (group_path_started)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(group_path->data);
|
eina_stringshare_del(eina_list_data_get(group_path));
|
||||||
evas_list_free(group_path);
|
eina_list_free(group_path);
|
||||||
}
|
}
|
||||||
ed->load_error = EDJE_LOAD_ERROR_RECURSIVE_REFERENCE;
|
ed->load_error = EDJE_LOAD_ERROR_RECURSIVE_REFERENCE;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -518,7 +511,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
}
|
}
|
||||||
|
|
||||||
child_obj = edje_object_add(ed->evas);
|
child_obj = edje_object_add(ed->evas);
|
||||||
group_path = evas_list_append(group_path, group_path_entry);
|
group_path = eina_list_append(group_path, group_path_entry);
|
||||||
if (!_edje_object_file_set_internal(child_obj, file, rp->part->source, group_path))
|
if (!_edje_object_file_set_internal(child_obj, file, rp->part->source, group_path))
|
||||||
{
|
{
|
||||||
_edje_thaw(ed);
|
_edje_thaw(ed);
|
||||||
|
@ -530,8 +523,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
{
|
{
|
||||||
while (group_path)
|
while (group_path)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(group_path->data);
|
eina_stringshare_del(eina_list_data_get(group_path));
|
||||||
group_path = evas_list_remove_list(group_path, group_path);
|
group_path = eina_list_remove_list(group_path, group_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ed->load_error = edje_object_load_error_get(child_obj);
|
ed->load_error = edje_object_load_error_get(child_obj);
|
||||||
|
@ -540,7 +533,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
child_ed = _edje_fetch(child_obj);
|
child_ed = _edje_fetch(child_obj);
|
||||||
child_ed->parent = eina_stringshare_add(rp->part->name);
|
child_ed->parent = eina_stringshare_add(rp->part->name);
|
||||||
|
|
||||||
group_path = evas_list_remove(group_path, group_path_entry);
|
group_path = eina_list_remove(group_path, group_path_entry);
|
||||||
eina_stringshare_del(group_path_entry);
|
eina_stringshare_del(group_path_entry);
|
||||||
|
|
||||||
edje_object_signal_callback_add(child_obj, "*", "*", _cb_signal_repeat, obj);
|
edje_object_signal_callback_add(child_obj, "*", "*", _cb_signal_repeat, obj);
|
||||||
|
@ -552,8 +545,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
{
|
{
|
||||||
while (group_path)
|
while (group_path)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(group_path->data);
|
eina_stringshare_del(eina_list_data_get(group_path));
|
||||||
group_path = evas_list_remove_list(group_path, group_path);
|
group_path = eina_list_remove_list(group_path, group_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,11 +558,11 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
const char *name;
|
const char *name;
|
||||||
Evas_Object *swallow;
|
Evas_Object *swallow;
|
||||||
|
|
||||||
name = old_swallows->data;
|
name = eina_list_data_get(old_swallows);
|
||||||
old_swallows = evas_list_remove_list(old_swallows, old_swallows);
|
old_swallows = eina_list_remove_list(old_swallows, old_swallows);
|
||||||
|
|
||||||
swallow = old_swallows->data;
|
swallow = eina_list_data_get(old_swallows);
|
||||||
old_swallows = evas_list_remove_list(old_swallows, old_swallows);
|
old_swallows = eina_list_remove_list(old_swallows, old_swallows);
|
||||||
|
|
||||||
edje_object_part_swallow(obj, name, swallow);
|
edje_object_part_swallow(obj, name, swallow);
|
||||||
eina_stringshare_del(name);
|
eina_stringshare_del(name);
|
||||||
|
@ -609,10 +602,10 @@ _edje_file_add(Edje *ed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_List *
|
static Eina_List *
|
||||||
_edje_swallows_collect(Edje *ed)
|
_edje_swallows_collect(Edje *ed)
|
||||||
{
|
{
|
||||||
Evas_List *swallows = NULL;
|
Eina_List *swallows = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!ed->file || !ed->table_parts) return NULL;
|
if (!ed->file || !ed->table_parts) return NULL;
|
||||||
|
@ -622,8 +615,8 @@ _edje_swallows_collect(Edje *ed)
|
||||||
|
|
||||||
rp = ed->table_parts[i];
|
rp = ed->table_parts[i];
|
||||||
if (rp->part->type != EDJE_PART_TYPE_SWALLOW || !rp->swallowed_object) continue;
|
if (rp->part->type != EDJE_PART_TYPE_SWALLOW || !rp->swallowed_object) continue;
|
||||||
swallows = evas_list_append(swallows, eina_stringshare_add(rp->part->name));
|
swallows = eina_list_append(swallows, eina_stringshare_add(rp->part->name));
|
||||||
swallows = evas_list_append(swallows, rp->swallowed_object);
|
swallows = eina_list_append(swallows, rp->swallowed_object);
|
||||||
}
|
}
|
||||||
return swallows;
|
return swallows;
|
||||||
}
|
}
|
||||||
|
@ -639,14 +632,12 @@ _edje_file_del(Edje *ed)
|
||||||
if (!((ed->file) && (ed->collection))) return;
|
if (!((ed->file) && (ed->collection))) return;
|
||||||
if ((ed->file) && (ed->collection))
|
if ((ed->file) && (ed->collection))
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Part *ep;
|
||||||
|
|
||||||
_edje_textblock_styles_del(ed);
|
_edje_textblock_styles_del(ed);
|
||||||
for (l = ed->collection->parts; l; l = l->next)
|
EINA_LIST_FOREACH(ed->collection->parts, l, ep)
|
||||||
{
|
{
|
||||||
Edje_Part *ep;
|
|
||||||
|
|
||||||
ep = l->data;
|
|
||||||
_edje_text_part_on_del(ed, ep);
|
_edje_text_part_on_del(ed, ep);
|
||||||
_edje_color_class_on_del(ed, ep);
|
_edje_color_class_on_del(ed, ep);
|
||||||
}
|
}
|
||||||
|
@ -711,20 +702,20 @@ _edje_file_del(Edje *ed)
|
||||||
Edje_Running_Program *runp;
|
Edje_Running_Program *runp;
|
||||||
|
|
||||||
_edje_anim_count--;
|
_edje_anim_count--;
|
||||||
runp = ed->actions->data;
|
runp = eina_list_data_get(ed->actions);
|
||||||
ed->actions = evas_list_remove(ed->actions, runp);
|
ed->actions = eina_list_remove(ed->actions, runp);
|
||||||
free(runp);
|
free(runp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_edje_animators = evas_list_remove(_edje_animators, ed);
|
_edje_animators = eina_list_remove(_edje_animators, ed);
|
||||||
if (ed->pending_actions)
|
if (ed->pending_actions)
|
||||||
{
|
{
|
||||||
while (ed->pending_actions)
|
while (ed->pending_actions)
|
||||||
{
|
{
|
||||||
Edje_Pending_Program *pp;
|
Edje_Pending_Program *pp;
|
||||||
|
|
||||||
pp = ed->pending_actions->data;
|
pp = eina_list_data_get(ed->pending_actions);
|
||||||
ed->pending_actions = evas_list_remove(ed->pending_actions, pp);
|
ed->pending_actions = eina_list_remove(ed->pending_actions, pp);
|
||||||
ecore_timer_del(pp->timer);
|
ecore_timer_del(pp->timer);
|
||||||
free(pp);
|
free(pp);
|
||||||
}
|
}
|
||||||
|
@ -758,9 +749,9 @@ _edje_file_free(Edje_File *edf)
|
||||||
{
|
{
|
||||||
Edje_Font_Directory_Entry *fe;
|
Edje_Font_Directory_Entry *fe;
|
||||||
|
|
||||||
fe = edf->font_dir->entries->data;
|
fe = eina_list_data_get(edf->font_dir->entries);
|
||||||
edf->font_dir->entries =
|
edf->font_dir->entries =
|
||||||
evas_list_remove_list(edf->font_dir->entries, edf->font_dir->entries);
|
eina_list_remove_list(edf->font_dir->entries, edf->font_dir->entries);
|
||||||
edf->font_hash = evas_hash_del(edf->font_hash, fe->entry, edf);
|
edf->font_hash = evas_hash_del(edf->font_hash, fe->entry, edf);
|
||||||
if (edf->free_strings && fe->path) eina_stringshare_del(fe->path);
|
if (edf->free_strings && fe->path) eina_stringshare_del(fe->path);
|
||||||
free(fe);
|
free(fe);
|
||||||
|
@ -773,9 +764,9 @@ _edje_file_free(Edje_File *edf)
|
||||||
{
|
{
|
||||||
Edje_Image_Directory_Entry *ie;
|
Edje_Image_Directory_Entry *ie;
|
||||||
|
|
||||||
ie = edf->image_dir->entries->data;
|
ie = eina_list_data_get(edf->image_dir->entries);
|
||||||
edf->image_dir->entries =
|
edf->image_dir->entries =
|
||||||
evas_list_remove_list(edf->image_dir->entries, edf->image_dir->entries);
|
eina_list_remove_list(edf->image_dir->entries, edf->image_dir->entries);
|
||||||
if (edf->free_strings && ie->entry) eina_stringshare_del(ie->entry);
|
if (edf->free_strings && ie->entry) eina_stringshare_del(ie->entry);
|
||||||
free(ie);
|
free(ie);
|
||||||
}
|
}
|
||||||
|
@ -787,9 +778,9 @@ _edje_file_free(Edje_File *edf)
|
||||||
{
|
{
|
||||||
Edje_Part_Collection_Directory_Entry *ce;
|
Edje_Part_Collection_Directory_Entry *ce;
|
||||||
|
|
||||||
ce = edf->collection_dir->entries->data;
|
ce = eina_list_data_get(edf->collection_dir->entries);
|
||||||
edf->collection_dir->entries =
|
edf->collection_dir->entries =
|
||||||
evas_list_remove_list(edf->collection_dir->entries, edf->collection_dir->entries);
|
eina_list_remove_list(edf->collection_dir->entries, edf->collection_dir->entries);
|
||||||
if (edf->free_strings && ce->entry) eina_stringshare_del(ce->entry);
|
if (edf->free_strings && ce->entry) eina_stringshare_del(ce->entry);
|
||||||
free(ce);
|
free(ce);
|
||||||
}
|
}
|
||||||
|
@ -801,14 +792,14 @@ _edje_file_free(Edje_File *edf)
|
||||||
{
|
{
|
||||||
Edje_Spectrum_Directory_Entry *se;
|
Edje_Spectrum_Directory_Entry *se;
|
||||||
|
|
||||||
se = edf->spectrum_dir->entries->data;
|
se = eina_list_data_get(edf->spectrum_dir->entries);
|
||||||
edf->spectrum_dir->entries =
|
edf->spectrum_dir->entries =
|
||||||
evas_list_remove_list(edf->spectrum_dir->entries, edf->spectrum_dir->entries);
|
eina_list_remove_list(edf->spectrum_dir->entries, edf->spectrum_dir->entries);
|
||||||
while (se->color_list)
|
while (se->color_list)
|
||||||
{
|
{
|
||||||
free(se->color_list->data);
|
free(eina_list_data_get(se->color_list));
|
||||||
se->color_list =
|
se->color_list =
|
||||||
evas_list_remove_list(se->color_list, se->color_list);
|
eina_list_remove_list(se->color_list, se->color_list);
|
||||||
}
|
}
|
||||||
if (edf->free_strings)
|
if (edf->free_strings)
|
||||||
{
|
{
|
||||||
|
@ -823,8 +814,8 @@ _edje_file_free(Edje_File *edf)
|
||||||
{
|
{
|
||||||
Edje_Data *edt;
|
Edje_Data *edt;
|
||||||
|
|
||||||
edt = edf->data->data;
|
edt = eina_list_data_get(edf->data);
|
||||||
edf->data = evas_list_remove(edf->data, edt);
|
edf->data = eina_list_remove(edf->data, edt);
|
||||||
if (edf->free_strings)
|
if (edf->free_strings)
|
||||||
{
|
{
|
||||||
if (edt->key) eina_stringshare_del(edt->key);
|
if (edt->key) eina_stringshare_del(edt->key);
|
||||||
|
@ -843,9 +834,9 @@ _edje_file_free(Edje_File *edf)
|
||||||
{
|
{
|
||||||
Edje_Color_Class *ecc;
|
Edje_Color_Class *ecc;
|
||||||
|
|
||||||
ecc = edf->color_classes->data;
|
ecc = eina_list_data_get(edf->color_classes);
|
||||||
edf->color_classes =
|
edf->color_classes =
|
||||||
evas_list_remove_list(edf->color_classes, edf->color_classes);
|
eina_list_remove_list(edf->color_classes, edf->color_classes);
|
||||||
if (edf->free_strings && ecc->name) eina_stringshare_del(ecc->name);
|
if (edf->free_strings && ecc->name) eina_stringshare_del(ecc->name);
|
||||||
free(ecc);
|
free(ecc);
|
||||||
}
|
}
|
||||||
|
@ -882,8 +873,8 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
||||||
{
|
{
|
||||||
Edje_Program *pr;
|
Edje_Program *pr;
|
||||||
|
|
||||||
pr = ec->programs->data;
|
pr = eina_list_data_get(ec->programs);
|
||||||
ec->programs = evas_list_remove_list(ec->programs, ec->programs);
|
ec->programs = eina_list_remove_list(ec->programs, ec->programs);
|
||||||
if (edf->free_strings)
|
if (edf->free_strings)
|
||||||
{
|
{
|
||||||
if (pr->name) eina_stringshare_del(pr->name);
|
if (pr->name) eina_stringshare_del(pr->name);
|
||||||
|
@ -896,16 +887,16 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
||||||
{
|
{
|
||||||
Edje_Program_Target *prt;
|
Edje_Program_Target *prt;
|
||||||
|
|
||||||
prt = pr->targets->data;
|
prt = eina_list_data_get(pr->targets);
|
||||||
pr->targets = evas_list_remove_list(pr->targets, pr->targets);
|
pr->targets = eina_list_remove_list(pr->targets, pr->targets);
|
||||||
free(prt);
|
free(prt);
|
||||||
}
|
}
|
||||||
while (pr->after)
|
while (pr->after)
|
||||||
{
|
{
|
||||||
Edje_Program_After *pa;
|
Edje_Program_After *pa;
|
||||||
|
|
||||||
pa = pr->after->data;
|
pa = eina_list_data_get(pr->after);
|
||||||
pr->after = evas_list_remove_list(pr->after, pr->after);
|
pr->after = eina_list_remove_list(pr->after, pr->after);
|
||||||
free(pa);
|
free(pa);
|
||||||
}
|
}
|
||||||
free(pr);
|
free(pr);
|
||||||
|
@ -914,8 +905,8 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
||||||
{
|
{
|
||||||
Edje_Part *ep;
|
Edje_Part *ep;
|
||||||
|
|
||||||
ep = ec->parts->data;
|
ep = eina_list_data_get(ec->parts);
|
||||||
ec->parts = evas_list_remove(ec->parts, ep);
|
ec->parts = eina_list_remove(ec->parts, ep);
|
||||||
if (edf->free_strings && ep->name) eina_stringshare_del(ep->name);
|
if (edf->free_strings && ep->name) eina_stringshare_del(ep->name);
|
||||||
if (ep->default_desc)
|
if (ep->default_desc)
|
||||||
{
|
{
|
||||||
|
@ -926,8 +917,8 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
||||||
{
|
{
|
||||||
Edje_Part_Description *desc;
|
Edje_Part_Description *desc;
|
||||||
|
|
||||||
desc = ep->other_desc->data;
|
desc = eina_list_data_get(ep->other_desc);
|
||||||
ep->other_desc = evas_list_remove(ep->other_desc, desc);
|
ep->other_desc = eina_list_remove(ep->other_desc, desc);
|
||||||
_edje_collection_free_part_description_free(desc, edf->free_strings);
|
_edje_collection_free_part_description_free(desc, edf->free_strings);
|
||||||
}
|
}
|
||||||
free(ep);
|
free(ep);
|
||||||
|
@ -938,8 +929,8 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
||||||
{
|
{
|
||||||
Edje_Data *edt;
|
Edje_Data *edt;
|
||||||
|
|
||||||
edt = ec->data->data;
|
edt = eina_list_data_get(ec->data);
|
||||||
ec->data = evas_list_remove(ec->data, edt);
|
ec->data = eina_list_remove(ec->data, edt);
|
||||||
if (edf->free_strings)
|
if (edf->free_strings)
|
||||||
{
|
{
|
||||||
if (edt->key) eina_stringshare_del(edt->key);
|
if (edt->key) eina_stringshare_del(edt->key);
|
||||||
|
@ -970,8 +961,8 @@ _edje_collection_free_part_description_free(Edje_Part_Description *desc, unsigne
|
||||||
{
|
{
|
||||||
Edje_Part_Image_Id *pi;
|
Edje_Part_Image_Id *pi;
|
||||||
|
|
||||||
pi = desc->image.tween_list->data;
|
pi = eina_list_data_get(desc->image.tween_list);
|
||||||
desc->image.tween_list = evas_list_remove(desc->image.tween_list, pi);
|
desc->image.tween_list = eina_list_remove(desc->image.tween_list, pi);
|
||||||
free(pi);
|
free(pi);
|
||||||
}
|
}
|
||||||
if (free_strings)
|
if (free_strings)
|
||||||
|
@ -1007,7 +998,7 @@ _edje_file_collection_hash_foreach(const Evas_Hash *hash, const char *key, void
|
||||||
static Evas_Bool
|
static Evas_Bool
|
||||||
_edje_collection_free_prog_cache_matches_free_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata)
|
_edje_collection_free_prog_cache_matches_free_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata)
|
||||||
{
|
{
|
||||||
evas_list_free((Evas_List *)data);
|
eina_list_free((Eina_List *)data);
|
||||||
return 1;
|
return 1;
|
||||||
hash = NULL;
|
hash = NULL;
|
||||||
fdata = NULL;
|
fdata = NULL;
|
||||||
|
|
|
@ -98,30 +98,30 @@ _edje_del(Edje *ed)
|
||||||
ed->group = NULL;
|
ed->group = NULL;
|
||||||
if ((ed->actions) || (ed->pending_actions))
|
if ((ed->actions) || (ed->pending_actions))
|
||||||
{
|
{
|
||||||
_edje_animators = evas_list_remove(_edje_animators, ed);
|
_edje_animators = eina_list_remove(_edje_animators, ed);
|
||||||
}
|
}
|
||||||
while (ed->actions)
|
while (ed->actions)
|
||||||
{
|
{
|
||||||
Edje_Running_Program *runp;
|
Edje_Running_Program *runp;
|
||||||
|
|
||||||
runp = ed->actions->data;
|
runp = eina_list_data_get(ed->actions);
|
||||||
ed->actions = evas_list_remove(ed->actions, runp);
|
ed->actions = eina_list_remove(ed->actions, runp);
|
||||||
free(runp);
|
free(runp);
|
||||||
}
|
}
|
||||||
while (ed->pending_actions)
|
while (ed->pending_actions)
|
||||||
{
|
{
|
||||||
Edje_Pending_Program *pp;
|
Edje_Pending_Program *pp;
|
||||||
|
|
||||||
pp = ed->pending_actions->data;
|
pp = eina_list_data_get(ed->pending_actions);
|
||||||
ed->pending_actions = evas_list_remove(ed->pending_actions, pp);
|
ed->pending_actions = eina_list_remove(ed->pending_actions, pp);
|
||||||
free(pp);
|
free(pp);
|
||||||
}
|
}
|
||||||
while (ed->callbacks)
|
while (ed->callbacks)
|
||||||
{
|
{
|
||||||
Edje_Signal_Callback *escb;
|
Edje_Signal_Callback *escb;
|
||||||
|
|
||||||
escb = ed->callbacks->data;
|
escb = eina_list_data_get(ed->callbacks);
|
||||||
ed->callbacks = evas_list_remove(ed->callbacks, escb);
|
ed->callbacks = eina_list_remove(ed->callbacks, escb);
|
||||||
if (escb->signal) eina_stringshare_del(escb->signal);
|
if (escb->signal) eina_stringshare_del(escb->signal);
|
||||||
if (escb->source) eina_stringshare_del(escb->source);
|
if (escb->source) eina_stringshare_del(escb->source);
|
||||||
free(escb);
|
free(escb);
|
||||||
|
@ -130,8 +130,8 @@ _edje_del(Edje *ed)
|
||||||
{
|
{
|
||||||
Edje_Color_Class *cc;
|
Edje_Color_Class *cc;
|
||||||
|
|
||||||
cc = ed->color_classes->data;
|
cc = eina_list_data_get(ed->color_classes);
|
||||||
ed->color_classes = evas_list_remove(ed->color_classes, cc);
|
ed->color_classes = eina_list_remove(ed->color_classes, cc);
|
||||||
if (cc->name) eina_stringshare_del(cc->name);
|
if (cc->name) eina_stringshare_del(cc->name);
|
||||||
free(cc);
|
free(cc);
|
||||||
}
|
}
|
||||||
|
@ -139,8 +139,8 @@ _edje_del(Edje *ed)
|
||||||
{
|
{
|
||||||
Edje_Text_Class *tc;
|
Edje_Text_Class *tc;
|
||||||
|
|
||||||
tc = ed->text_classes->data;
|
tc = eina_list_data_get(ed->text_classes);
|
||||||
ed->text_classes = evas_list_remove(ed->text_classes, tc);
|
ed->text_classes = eina_list_remove(ed->text_classes, tc);
|
||||||
if (tc->name) eina_stringshare_del(tc->name);
|
if (tc->name) eina_stringshare_del(tc->name);
|
||||||
if (tc->font) eina_stringshare_del(tc->font);
|
if (tc->font) eina_stringshare_del(tc->font);
|
||||||
free(tc);
|
free(tc);
|
||||||
|
|
|
@ -250,21 +250,21 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
||||||
|
|
||||||
#define EDJE_MATCH_INIT(Func, Type, Source, Show) \
|
#define EDJE_MATCH_INIT(Func, Type, Source, Show) \
|
||||||
Edje_Patterns* \
|
Edje_Patterns* \
|
||||||
Func(Evas_List *lst) \
|
Func(Eina_List *lst) \
|
||||||
{ \
|
{ \
|
||||||
Edje_Patterns *r; \
|
Edje_Patterns *r; \
|
||||||
size_t i; \
|
size_t i; \
|
||||||
\
|
\
|
||||||
if (!lst || evas_list_count(lst) <= 0) \
|
if (!lst || eina_list_count(lst) <= 0) \
|
||||||
return NULL; \
|
return NULL; \
|
||||||
\
|
\
|
||||||
r = malloc(sizeof (Edje_Patterns) + \
|
r = malloc(sizeof (Edje_Patterns) + \
|
||||||
evas_list_count(lst) \
|
eina_list_count(lst) \
|
||||||
* sizeof (*r->finals) \
|
* sizeof (*r->finals) \
|
||||||
* sizeof(*r->patterns)); \
|
* sizeof(*r->patterns)); \
|
||||||
if (!r) return NULL; \
|
if (!r) return NULL; \
|
||||||
\
|
\
|
||||||
r->patterns_size = evas_list_count(lst); \
|
r->patterns_size = eina_list_count(lst); \
|
||||||
r->max_length = 0; \
|
r->max_length = 0; \
|
||||||
r->patterns = (const char **) r->finals + r->patterns_size + 1; \
|
r->patterns = (const char **) r->finals + r->patterns_size + 1; \
|
||||||
\
|
\
|
||||||
|
@ -274,7 +274,7 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
||||||
Type *data; \
|
Type *data; \
|
||||||
size_t j; \
|
size_t j; \
|
||||||
\
|
\
|
||||||
data = evas_list_data(lst); \
|
data = eina_list_data_get(lst); \
|
||||||
if (!data) \
|
if (!data) \
|
||||||
{ \
|
{ \
|
||||||
free(r); \
|
free(r); \
|
||||||
|
@ -296,7 +296,7 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
||||||
if (j > r->max_length) \
|
if (j > r->max_length) \
|
||||||
r->max_length = j; \
|
r->max_length = j; \
|
||||||
\
|
\
|
||||||
lst = evas_list_next(lst); \
|
lst = eina_list_next(lst); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
if (!_edje_match_states_alloc(r, 2)) \
|
if (!_edje_match_states_alloc(r, 2)) \
|
||||||
|
@ -341,7 +341,7 @@ edje_match_programs_exec_check_finals(const size_t *signal_finals,
|
||||||
const size_t *source_finals,
|
const size_t *source_finals,
|
||||||
const Edje_States *signal_states,
|
const Edje_States *signal_states,
|
||||||
const Edje_States *source_states,
|
const Edje_States *source_states,
|
||||||
Evas_List *programs,
|
Eina_List *programs,
|
||||||
int (*func)(Edje_Program *pr, void *data),
|
int (*func)(Edje_Program *pr, void *data),
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
|
@ -356,7 +356,7 @@ edje_match_programs_exec_check_finals(const size_t *signal_finals,
|
||||||
{
|
{
|
||||||
Edje_Program *pr;
|
Edje_Program *pr;
|
||||||
|
|
||||||
pr = evas_list_nth(programs, signal_states->states[i].idx);
|
pr = eina_list_nth(programs, signal_states->states[i].idx);
|
||||||
if (pr)
|
if (pr)
|
||||||
{
|
{
|
||||||
if (func(pr, data))
|
if (func(pr, data))
|
||||||
|
@ -374,7 +374,7 @@ edje_match_callback_exec_check_finals(const size_t *signal_finals,
|
||||||
const Edje_States *source_states,
|
const Edje_States *source_states,
|
||||||
const char *signal,
|
const char *signal,
|
||||||
const char *source,
|
const char *source,
|
||||||
Evas_List *callbacks,
|
Eina_List *callbacks,
|
||||||
Edje *ed)
|
Edje *ed)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -389,7 +389,7 @@ edje_match_callback_exec_check_finals(const size_t *signal_finals,
|
||||||
{
|
{
|
||||||
Edje_Signal_Callback *escb;
|
Edje_Signal_Callback *escb;
|
||||||
|
|
||||||
escb = evas_list_nth(callbacks, signal_states->states[i].idx);
|
escb = eina_list_nth(callbacks, signal_states->states[i].idx);
|
||||||
if (escb)
|
if (escb)
|
||||||
{
|
{
|
||||||
if ((!escb->just_added)
|
if ((!escb->just_added)
|
||||||
|
@ -479,7 +479,7 @@ edje_match_programs_exec(const Edje_Patterns *ppat_signal,
|
||||||
const Edje_Patterns *ppat_source,
|
const Edje_Patterns *ppat_source,
|
||||||
const char *signal,
|
const char *signal,
|
||||||
const char *source,
|
const char *source,
|
||||||
Evas_List *programs,
|
Eina_List *programs,
|
||||||
int (*func)(Edje_Program *pr, void *data),
|
int (*func)(Edje_Program *pr, void *data),
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
|
@ -513,7 +513,7 @@ edje_match_callback_exec(const Edje_Patterns *ppat_signal,
|
||||||
const Edje_Patterns *ppat_source,
|
const Edje_Patterns *ppat_source,
|
||||||
const char *signal,
|
const char *signal,
|
||||||
const char *source,
|
const char *source,
|
||||||
Evas_List *callbacks,
|
Eina_List *callbacks,
|
||||||
Edje *ed)
|
Edje *ed)
|
||||||
{
|
{
|
||||||
Edje_States *signal_result;
|
Edje_States *signal_result;
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
static Ecore_Job *job = NULL;
|
static Ecore_Job *job = NULL;
|
||||||
static Ecore_Timer *job_loss_timer = NULL;
|
static Ecore_Timer *job_loss_timer = NULL;
|
||||||
|
|
||||||
static Evas_List *msgq = NULL;
|
static Eina_List *msgq = NULL;
|
||||||
static Evas_List *tmp_msgq = NULL;
|
static Eina_List *tmp_msgq = NULL;
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_message_send(Evas_Object *obj, Edje_Message_Type type, int id, void *msg)
|
edje_object_message_send(Evas_Object *obj, Edje_Message_Type type, int id, void *msg)
|
||||||
|
@ -41,30 +41,27 @@ edje_object_message_handler_set(Evas_Object *obj, void (*func) (void *data, Evas
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_object_message_signal_process(Evas_Object *obj)
|
edje_object_message_signal_process(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Evas_List *l, *tmpq = NULL;
|
Eina_List *l, *tmpq = NULL;
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
Edje_Message *em;
|
||||||
|
const void *data;
|
||||||
|
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
if (!ed) return;
|
if (!ed) return;
|
||||||
|
|
||||||
for (l = msgq; l; l = l->next)
|
EINA_LIST_FOREACH(msgq, l, em)
|
||||||
{
|
if (em->edje == ed)
|
||||||
Edje_Message *em;
|
tmpq = eina_list_append(tmpq, em);
|
||||||
|
|
||||||
em = l->data;
|
|
||||||
if (em->edje == ed)
|
|
||||||
tmpq = evas_list_append(tmpq, em);
|
|
||||||
}
|
|
||||||
/* now remove them from the old queue */
|
/* now remove them from the old queue */
|
||||||
for (l = tmpq; l; l = l->next)
|
EINA_LIST_FOREACH(tmpq, l, data)
|
||||||
msgq = evas_list_remove(msgq, l->data);
|
msgq = eina_list_remove(msgq, data);
|
||||||
/* a temporary message queue */
|
/* a temporary message queue */
|
||||||
if (tmp_msgq)
|
if (tmp_msgq)
|
||||||
{
|
{
|
||||||
while (tmpq)
|
while (tmpq)
|
||||||
{
|
{
|
||||||
tmp_msgq = evas_list_append(tmp_msgq, tmpq->data);
|
tmp_msgq = eina_list_append(tmp_msgq, tmpq->data);
|
||||||
tmpq = evas_list_remove_list(tmpq, tmpq);
|
tmpq = eina_list_remove_list(tmpq, tmpq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -78,7 +75,7 @@ edje_object_message_signal_process(Evas_Object *obj)
|
||||||
Edje_Message *em;
|
Edje_Message *em;
|
||||||
|
|
||||||
em = tmp_msgq->data;
|
em = tmp_msgq->data;
|
||||||
tmp_msgq = evas_list_remove_list(tmp_msgq, tmp_msgq);
|
tmp_msgq = eina_list_remove_list(tmp_msgq, tmp_msgq);
|
||||||
em->edje->message.num--;
|
em->edje->message.num--;
|
||||||
_edje_message_process(em);
|
_edje_message_process(em);
|
||||||
_edje_message_free(em);
|
_edje_message_free(em);
|
||||||
|
@ -418,7 +415,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
||||||
}
|
}
|
||||||
|
|
||||||
em->msg = msg;
|
em->msg = msg;
|
||||||
msgq = evas_list_append(msgq, em);
|
msgq = eina_list_append(msgq, em);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -598,8 +595,8 @@ _edje_message_queue_process(void)
|
||||||
{
|
{
|
||||||
while (msgq)
|
while (msgq)
|
||||||
{
|
{
|
||||||
tmp_msgq = evas_list_append(tmp_msgq, msgq->data);
|
tmp_msgq = eina_list_append(tmp_msgq, msgq->data);
|
||||||
msgq = evas_list_remove_list(msgq, msgq);
|
msgq = eina_list_remove_list(msgq, msgq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -615,7 +612,7 @@ _edje_message_queue_process(void)
|
||||||
|
|
||||||
em = tmp_msgq->data;
|
em = tmp_msgq->data;
|
||||||
ed = em->edje;
|
ed = em->edje;
|
||||||
tmp_msgq = evas_list_remove_list(tmp_msgq, tmp_msgq);
|
tmp_msgq = eina_list_remove_list(tmp_msgq, tmp_msgq);
|
||||||
em->edje->message.num--;
|
em->edje->message.num--;
|
||||||
if (!ed->delete_me)
|
if (!ed->delete_me)
|
||||||
{
|
{
|
||||||
|
@ -649,7 +646,7 @@ _edje_message_queue_clear(void)
|
||||||
Edje_Message *em;
|
Edje_Message *em;
|
||||||
|
|
||||||
em = msgq->data;
|
em = msgq->data;
|
||||||
msgq = evas_list_remove_list(msgq, msgq);
|
msgq = eina_list_remove_list(msgq, msgq);
|
||||||
em->edje->message.num--;
|
em->edje->message.num--;
|
||||||
_edje_message_free(em);
|
_edje_message_free(em);
|
||||||
}
|
}
|
||||||
|
@ -658,7 +655,7 @@ _edje_message_queue_clear(void)
|
||||||
Edje_Message *em;
|
Edje_Message *em;
|
||||||
|
|
||||||
em = tmp_msgq->data;
|
em = tmp_msgq->data;
|
||||||
tmp_msgq = evas_list_remove_list(tmp_msgq, tmp_msgq);
|
tmp_msgq = eina_list_remove_list(tmp_msgq, tmp_msgq);
|
||||||
em->edje->message.num--;
|
em->edje->message.num--;
|
||||||
_edje_message_free(em);
|
_edje_message_free(em);
|
||||||
}
|
}
|
||||||
|
@ -667,21 +664,21 @@ _edje_message_queue_clear(void)
|
||||||
void
|
void
|
||||||
_edje_message_del(Edje *ed)
|
_edje_message_del(Edje *ed)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
if (ed->message.num <= 0) return;
|
if (ed->message.num <= 0) return;
|
||||||
/* delete any messages on the main queue for this edje object */
|
/* delete any messages on the main queue for this edje object */
|
||||||
for (l = msgq; l; )
|
for (l = msgq; l; )
|
||||||
{
|
{
|
||||||
Edje_Message *em;
|
Edje_Message *em;
|
||||||
Evas_List *lp;
|
Eina_List *lp;
|
||||||
|
|
||||||
em = l->data;
|
em = eina_list_data_get(l);
|
||||||
lp = l;
|
lp = l;
|
||||||
l = l->next;
|
l = eina_list_next(l);
|
||||||
if (em->edje == ed)
|
if (em->edje == ed)
|
||||||
{
|
{
|
||||||
msgq = evas_list_remove_list(msgq, lp);
|
msgq = eina_list_remove_list(msgq, lp);
|
||||||
em->edje->message.num--;
|
em->edje->message.num--;
|
||||||
_edje_message_free(em);
|
_edje_message_free(em);
|
||||||
}
|
}
|
||||||
|
@ -691,14 +688,14 @@ _edje_message_del(Edje *ed)
|
||||||
for (l = tmp_msgq; l; )
|
for (l = tmp_msgq; l; )
|
||||||
{
|
{
|
||||||
Edje_Message *em;
|
Edje_Message *em;
|
||||||
Evas_List *lp;
|
Eina_List *lp;
|
||||||
|
|
||||||
em = l->data;
|
em = eina_list_data_get(l);
|
||||||
lp = l;
|
lp = l;
|
||||||
l = l->next;
|
l = eina_list_next(l);
|
||||||
if (em->edje == ed)
|
if (em->edje == ed)
|
||||||
{
|
{
|
||||||
tmp_msgq = evas_list_remove_list(tmp_msgq, lp);
|
tmp_msgq = eina_list_remove_list(tmp_msgq, lp);
|
||||||
em->edje->message.num--;
|
em->edje->message.num--;
|
||||||
_edje_message_free(em);
|
_edje_message_free(em);
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,9 +279,9 @@ struct _Edje_File
|
||||||
Edje_Image_Directory *image_dir;
|
Edje_Image_Directory *image_dir;
|
||||||
Edje_Spectrum_Directory *spectrum_dir;
|
Edje_Spectrum_Directory *spectrum_dir;
|
||||||
Edje_Part_Collection_Directory *collection_dir;
|
Edje_Part_Collection_Directory *collection_dir;
|
||||||
Evas_List *data;
|
Eina_List *data;
|
||||||
Evas_List *styles;
|
Eina_List *styles;
|
||||||
Evas_List *color_classes;
|
Eina_List *color_classes;
|
||||||
|
|
||||||
int references;
|
int references;
|
||||||
char *compiler;
|
char *compiler;
|
||||||
|
@ -290,7 +290,7 @@ struct _Edje_File
|
||||||
|
|
||||||
Evas_Hash *collection_hash;
|
Evas_Hash *collection_hash;
|
||||||
Evas_Hash *font_hash;
|
Evas_Hash *font_hash;
|
||||||
Evas_List *collection_cache;
|
Eina_List *collection_cache;
|
||||||
Evas_Hash *data_cache;
|
Evas_Hash *data_cache;
|
||||||
|
|
||||||
Eet_File *ef;
|
Eet_File *ef;
|
||||||
|
@ -301,7 +301,7 @@ struct _Edje_File
|
||||||
struct _Edje_Style
|
struct _Edje_Style
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
Evas_List *tags;
|
Eina_List *tags;
|
||||||
Evas_Textblock_Style *style;
|
Evas_Textblock_Style *style;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ struct _Edje_Data
|
||||||
|
|
||||||
struct _Edje_Font_Directory
|
struct _Edje_Font_Directory
|
||||||
{
|
{
|
||||||
Evas_List *entries; /* a list of Edje_Font_Directory_Entry */
|
Eina_List *entries; /* a list of Edje_Font_Directory_Entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Edje_Font_Directory_Entry
|
struct _Edje_Font_Directory_Entry
|
||||||
|
@ -340,7 +340,7 @@ struct _Edje_Font_Directory_Entry
|
||||||
|
|
||||||
struct _Edje_Image_Directory
|
struct _Edje_Image_Directory
|
||||||
{
|
{
|
||||||
Evas_List *entries; /* a list of Edje_Image_Directory_Entry */
|
Eina_List *entries; /* a list of Edje_Image_Directory_Entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Edje_Image_Directory_Entry
|
struct _Edje_Image_Directory_Entry
|
||||||
|
@ -355,7 +355,7 @@ struct _Edje_Image_Directory_Entry
|
||||||
|
|
||||||
struct _Edje_Spectrum_Directory
|
struct _Edje_Spectrum_Directory
|
||||||
{
|
{
|
||||||
Evas_List *entries; /* a list of Edje_Spectrum_Directory_Entry */
|
Eina_List *entries; /* a list of Edje_Spectrum_Directory_Entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Edje_Spectrum_Directory_Entry
|
struct _Edje_Spectrum_Directory_Entry
|
||||||
|
@ -363,7 +363,7 @@ struct _Edje_Spectrum_Directory_Entry
|
||||||
char *entry;
|
char *entry;
|
||||||
/* only one of the following two should be included. filename takes precedence */
|
/* only one of the following two should be included. filename takes precedence */
|
||||||
char *filename; /* filename of external spectrum. */
|
char *filename; /* filename of external spectrum. */
|
||||||
Evas_List *color_list; /* list of Edje_Spectrum_Color */
|
Eina_List *color_list; /* list of Edje_Spectrum_Color */
|
||||||
int id;
|
int id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -400,9 +400,9 @@ struct _Edje_Program /* a conditional program to be run */
|
||||||
double time; /* time to graduate between current and new state */
|
double time; /* time to graduate between current and new state */
|
||||||
} tween;
|
} tween;
|
||||||
|
|
||||||
Evas_List *targets; /* list of target parts to apply the state to */
|
Eina_List *targets; /* list of target parts to apply the state to */
|
||||||
|
|
||||||
Evas_List *after; /* list of actions to run at the end of this, for looping */
|
Eina_List *after; /* list of actions to run at the end of this, for looping */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Edje_Program_Target /* the target of an action */
|
struct _Edje_Program_Target /* the target of an action */
|
||||||
|
@ -419,7 +419,7 @@ struct _Edje_Program_After /* the action to run after another action */
|
||||||
|
|
||||||
struct _Edje_Part_Collection_Directory
|
struct _Edje_Part_Collection_Directory
|
||||||
{
|
{
|
||||||
Evas_List *entries; /* a list of Edje_Part_Collection_Directory_Entry */
|
Eina_List *entries; /* a list of Edje_Part_Collection_Directory_Entry */
|
||||||
|
|
||||||
int references;
|
int references;
|
||||||
};
|
};
|
||||||
|
@ -434,9 +434,9 @@ struct _Edje_Part_Collection_Directory_Entry
|
||||||
|
|
||||||
struct _Edje_Part_Collection
|
struct _Edje_Part_Collection
|
||||||
{
|
{
|
||||||
Evas_List *programs; /* a list of Edje_Program */
|
Eina_List *programs; /* a list of Edje_Program */
|
||||||
Evas_List *parts; /* a list of Edje_Part */
|
Eina_List *parts; /* a list of Edje_Part */
|
||||||
Evas_List *data;
|
Eina_List *data;
|
||||||
|
|
||||||
int id; /* the collection id */
|
int id; /* the collection id */
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ struct _Edje_Part
|
||||||
{
|
{
|
||||||
const char *name; /* the name if any of the part */
|
const char *name; /* the name if any of the part */
|
||||||
Edje_Part_Description *default_desc; /* the part descriptor for default */
|
Edje_Part_Description *default_desc; /* the part descriptor for default */
|
||||||
Evas_List *other_desc; /* other possible descriptors */
|
Eina_List *other_desc; /* other possible descriptors */
|
||||||
const char *source, *source2, *source3, *source4, *source5, *source6;
|
const char *source, *source2, *source3, *source4, *source5, *source6;
|
||||||
int id; /* its id number */
|
int id; /* its id number */
|
||||||
int clip_to_id; /* the part id to clip this one to */
|
int clip_to_id; /* the part id to clip this one to */
|
||||||
|
@ -527,7 +527,7 @@ struct _Edje_Part_Description
|
||||||
} rel1, rel2;
|
} rel1, rel2;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
Evas_List *tween_list; /* list of Edje_Part_Image_Id */
|
Eina_List *tween_list; /* list of Edje_Part_Image_Id */
|
||||||
int id; /* the image id to use */
|
int id; /* the image id to use */
|
||||||
} image;
|
} image;
|
||||||
|
|
||||||
|
@ -638,11 +638,11 @@ struct _Edje
|
||||||
Evas_Object *clipper; /* a big rect to clip this Edje to */
|
Evas_Object *clipper; /* a big rect to clip this Edje to */
|
||||||
Edje_File *file; /* the file the data comes form */
|
Edje_File *file; /* the file the data comes form */
|
||||||
Edje_Part_Collection *collection; /* the description being used */
|
Edje_Part_Collection *collection; /* the description being used */
|
||||||
Evas_List *actions; /* currently running actions */
|
Eina_List *actions; /* currently running actions */
|
||||||
Evas_List *callbacks;
|
Eina_List *callbacks;
|
||||||
Evas_List *pending_actions;
|
Eina_List *pending_actions;
|
||||||
Evas_List *color_classes;
|
Eina_List *color_classes;
|
||||||
Evas_List *text_classes;
|
Eina_List *text_classes;
|
||||||
/* variable pool for Edje Embryo scripts */
|
/* variable pool for Edje Embryo scripts */
|
||||||
Edje_Var_Pool *var_pool;
|
Edje_Var_Pool *var_pool;
|
||||||
/* for faster lookups to avoid nth list walks */
|
/* for faster lookups to avoid nth list walks */
|
||||||
|
@ -693,7 +693,7 @@ struct _Edje_Real_Part
|
||||||
{
|
{
|
||||||
Edje *edje;
|
Edje *edje;
|
||||||
Evas_Object *object;
|
Evas_Object *object;
|
||||||
Evas_List *extra_objects;
|
Eina_List *extra_objects;
|
||||||
Evas_Object *swallowed_object;
|
Evas_Object *swallowed_object;
|
||||||
void *entry_data;
|
void *entry_data;
|
||||||
Evas_Object *cursorbg_object;
|
Evas_Object *cursorbg_object;
|
||||||
|
@ -862,7 +862,7 @@ struct _Edje_Var_String
|
||||||
|
|
||||||
struct _Edje_Var_List
|
struct _Edje_Var_List
|
||||||
{
|
{
|
||||||
Evas_List *v;
|
Eina_List *v;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Edje_Var_Hash
|
struct _Edje_Var_Hash
|
||||||
|
@ -892,8 +892,8 @@ struct _Edje_Var_Animator
|
||||||
struct _Edje_Var_Pool
|
struct _Edje_Var_Pool
|
||||||
{
|
{
|
||||||
int id_count;
|
int id_count;
|
||||||
Evas_List *timers;
|
Eina_List *timers;
|
||||||
Evas_List *animators;
|
Eina_List *animators;
|
||||||
int size;
|
int size;
|
||||||
Edje_Var *vars;
|
Edje_Var *vars;
|
||||||
int walking_list;
|
int walking_list;
|
||||||
|
@ -962,11 +962,11 @@ struct _Edje_Patterns
|
||||||
size_t finals[];
|
size_t finals[];
|
||||||
};
|
};
|
||||||
|
|
||||||
Edje_Patterns *edje_match_collection_dir_init(Evas_List *lst);
|
Edje_Patterns *edje_match_collection_dir_init(Eina_List *lst);
|
||||||
Edje_Patterns *edje_match_programs_signal_init(Evas_List *lst);
|
Edje_Patterns *edje_match_programs_signal_init(Eina_List *lst);
|
||||||
Edje_Patterns *edje_match_programs_source_init(Evas_List *lst);
|
Edje_Patterns *edje_match_programs_source_init(Eina_List *lst);
|
||||||
Edje_Patterns *edje_match_callback_signal_init(Evas_List *lst);
|
Edje_Patterns *edje_match_callback_signal_init(Eina_List *lst);
|
||||||
Edje_Patterns *edje_match_callback_source_init(Evas_List *lst);
|
Edje_Patterns *edje_match_callback_source_init(Eina_List *lst);
|
||||||
|
|
||||||
int edje_match_collection_dir_exec(const Edje_Patterns *ppat,
|
int edje_match_collection_dir_exec(const Edje_Patterns *ppat,
|
||||||
const char *string);
|
const char *string);
|
||||||
|
@ -974,14 +974,14 @@ int edje_match_programs_exec(const Edje_Patterns *ppat_signal,
|
||||||
const Edje_Patterns *ppat_source,
|
const Edje_Patterns *ppat_source,
|
||||||
const char *signal,
|
const char *signal,
|
||||||
const char *source,
|
const char *source,
|
||||||
Evas_List *programs,
|
Eina_List *programs,
|
||||||
int (*func)(Edje_Program *pr, void *data),
|
int (*func)(Edje_Program *pr, void *data),
|
||||||
void *data);
|
void *data);
|
||||||
int edje_match_callback_exec(const Edje_Patterns *ppat_signal,
|
int edje_match_callback_exec(const Edje_Patterns *ppat_signal,
|
||||||
const Edje_Patterns *ppat_source,
|
const Edje_Patterns *ppat_source,
|
||||||
const char *signal,
|
const char *signal,
|
||||||
const char *source,
|
const char *source,
|
||||||
Evas_List *callbacks,
|
Eina_List *callbacks,
|
||||||
Edje *ed);
|
Edje *ed);
|
||||||
|
|
||||||
void edje_match_patterns_free(Edje_Patterns *ppat);
|
void edje_match_patterns_free(Edje_Patterns *ppat);
|
||||||
|
@ -1008,8 +1008,8 @@ EAPI extern Eet_Data_Descriptor *_edje_edd_edje_spectrum_color;
|
||||||
|
|
||||||
extern int _edje_anim_count;
|
extern int _edje_anim_count;
|
||||||
extern Ecore_Animator *_edje_timer;
|
extern Ecore_Animator *_edje_timer;
|
||||||
extern Evas_List *_edje_animators;
|
extern Eina_List *_edje_animators;
|
||||||
extern Evas_List *_edje_edjes;
|
extern Eina_List *_edje_edjes;
|
||||||
|
|
||||||
extern char *_edje_fontset_append;
|
extern char *_edje_fontset_append;
|
||||||
extern double _edje_scale;
|
extern double _edje_scale;
|
||||||
|
@ -1244,7 +1244,7 @@ void _edje_entry_text_markup_set(Edje_Real_Part *rp, const char *text);
|
||||||
void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text);
|
void _edje_entry_text_markup_insert(Edje_Real_Part *rp, const char *text);
|
||||||
void _edje_entry_set_cursor_start(Edje_Real_Part *rp);
|
void _edje_entry_set_cursor_start(Edje_Real_Part *rp);
|
||||||
void _edje_entry_set_cursor_end(Edje_Real_Part *rp);
|
void _edje_entry_set_cursor_end(Edje_Real_Part *rp);
|
||||||
const Evas_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
|
const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
|
||||||
void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
|
void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,7 +8,7 @@ static void _edje_emit_cb(Edje *ed, const char *sig, const char *src);
|
||||||
|
|
||||||
int _edje_anim_count = 0;
|
int _edje_anim_count = 0;
|
||||||
Ecore_Animator *_edje_timer = NULL;
|
Ecore_Animator *_edje_timer = NULL;
|
||||||
Evas_List *_edje_animators = NULL;
|
Eina_List *_edje_animators = NULL;
|
||||||
|
|
||||||
/************************** API Routines **************************/
|
/************************** API Routines **************************/
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ edje_object_signal_callback_add(Evas_Object *obj, const char *emission, const ch
|
||||||
escb->source = eina_stringshare_add(source);
|
escb->source = eina_stringshare_add(source);
|
||||||
escb->func = func;
|
escb->func = func;
|
||||||
escb->data = data;
|
escb->data = data;
|
||||||
ed->callbacks = evas_list_append(ed->callbacks, escb);
|
ed->callbacks = eina_list_append(ed->callbacks, escb);
|
||||||
if (ed->walking_callbacks)
|
if (ed->walking_callbacks)
|
||||||
{
|
{
|
||||||
escb->just_added = 1;
|
escb->just_added = 1;
|
||||||
|
@ -125,17 +125,15 @@ EAPI void *
|
||||||
edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source))
|
edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source))
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Signal_Callback *escb;
|
||||||
|
|
||||||
if ((!emission) || (!source) || (!func)) return NULL;
|
if ((!emission) || (!source) || (!func)) return NULL;
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
if (!ed) return NULL;
|
if (!ed) return NULL;
|
||||||
if (ed->delete_me) return NULL;
|
if (ed->delete_me) return NULL;
|
||||||
for (l = ed->callbacks; l; l = l->next)
|
EINA_LIST_FOREACH(ed->callbacks, l, escb)
|
||||||
{
|
{
|
||||||
Edje_Signal_Callback *escb;
|
|
||||||
|
|
||||||
escb = l->data;
|
|
||||||
if ((escb->func == func) &&
|
if ((escb->func == func) &&
|
||||||
((!escb->signal && !emission[0]) ||
|
((!escb->signal && !emission[0]) ||
|
||||||
(escb->signal && !strcmp(escb->signal, emission))) &&
|
(escb->signal && !strcmp(escb->signal, emission))) &&
|
||||||
|
@ -154,7 +152,7 @@ edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const ch
|
||||||
{
|
{
|
||||||
_edje_callbacks_patterns_clean(ed);
|
_edje_callbacks_patterns_clean(ed);
|
||||||
|
|
||||||
ed->callbacks = evas_list_remove_list(ed->callbacks, l);
|
ed->callbacks = eina_list_remove_list(ed->callbacks, l);
|
||||||
if (escb->signal) eina_stringshare_del(escb->signal);
|
if (escb->signal) eina_stringshare_del(escb->signal);
|
||||||
if (escb->source) eina_stringshare_del(escb->source);
|
if (escb->source) eina_stringshare_del(escb->source);
|
||||||
free(escb);
|
free(escb);
|
||||||
|
@ -220,7 +218,8 @@ edje_object_play_set(Evas_Object *obj, int play)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
double t;
|
double t;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Running_Program *runp;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
|
@ -231,13 +230,8 @@ edje_object_play_set(Evas_Object *obj, int play)
|
||||||
if (!ed->paused) return;
|
if (!ed->paused) return;
|
||||||
ed->paused = 0;
|
ed->paused = 0;
|
||||||
t = ecore_time_get() - ed->paused_at;
|
t = ecore_time_get() - ed->paused_at;
|
||||||
for (l = ed->actions; l; l = l->next)
|
EINA_LIST_FOREACH(ed->actions, l, runp)
|
||||||
{
|
runp->start_time += t;
|
||||||
Edje_Running_Program *runp;
|
|
||||||
|
|
||||||
runp = l->data;
|
|
||||||
runp->start_time += t;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -284,7 +278,7 @@ EAPI void
|
||||||
edje_object_animation_set(Evas_Object *obj, int on)
|
edje_object_animation_set(Evas_Object *obj, int on)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
|
@ -295,20 +289,21 @@ edje_object_animation_set(Evas_Object *obj, int on)
|
||||||
_edje_freeze(ed);
|
_edje_freeze(ed);
|
||||||
if (!on)
|
if (!on)
|
||||||
{
|
{
|
||||||
Evas_List *newl = NULL;
|
Eina_List *newl = NULL;
|
||||||
|
const void *data;
|
||||||
|
|
||||||
for (l = ed->actions; l; l = l->next)
|
EINA_LIST_FOREACH(ed->actions, l, data)
|
||||||
newl = evas_list_append(newl, l->data);
|
newl = eina_list_append(newl, data);
|
||||||
while (newl)
|
while (newl)
|
||||||
{
|
{
|
||||||
Edje_Running_Program *runp;
|
Edje_Running_Program *runp;
|
||||||
|
|
||||||
runp = newl->data;
|
runp = eina_list_data_get(newl);
|
||||||
newl = evas_list_remove(newl, newl->data);
|
newl = eina_list_remove(newl, eina_list_data_get(newl));
|
||||||
_edje_program_run_iterate(runp, runp->start_time + runp->program->tween.time);
|
_edje_program_run_iterate(runp, runp->start_time + runp->program->tween.time);
|
||||||
if (_edje_block_break(ed))
|
if (_edje_block_break(ed))
|
||||||
{
|
{
|
||||||
evas_list_free(newl);
|
eina_list_free(newl);
|
||||||
goto break_prog;
|
goto break_prog;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -360,8 +355,10 @@ int
|
||||||
_edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
_edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
||||||
{
|
{
|
||||||
double t, total;
|
double t, total;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
Edje_Program_Target *pt;
|
||||||
|
Edje_Real_Part *rp;
|
||||||
|
|
||||||
ed = runp->edje;
|
ed = runp->edje;
|
||||||
if (ed->delete_me) return 0;
|
if (ed->delete_me) return 0;
|
||||||
|
@ -372,12 +369,8 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
||||||
total = runp->program->tween.time;
|
total = runp->program->tween.time;
|
||||||
t /= total;
|
t /= total;
|
||||||
if (t > 1.0) t = 1.0;
|
if (t > 1.0) t = 1.0;
|
||||||
for (l = runp->program->targets; l; l = l->next)
|
EINA_LIST_FOREACH(runp->program->targets, l, pt)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
|
||||||
Edje_Program_Target *pt;
|
|
||||||
|
|
||||||
pt = l->data;
|
|
||||||
if (pt->id >= 0)
|
if (pt->id >= 0)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||||
|
@ -387,12 +380,10 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
||||||
}
|
}
|
||||||
if (t >= 1.0)
|
if (t >= 1.0)
|
||||||
{
|
{
|
||||||
for (l = runp->program->targets; l; l = l->next)
|
Edje_Program_After *pa;
|
||||||
{
|
|
||||||
Edje_Real_Part *rp;
|
|
||||||
Edje_Program_Target *pt;
|
|
||||||
|
|
||||||
pt = l->data;
|
EINA_LIST_FOREACH(runp->program->targets, l, pt)
|
||||||
|
{
|
||||||
if (pt->id >= 0)
|
if (pt->id >= 0)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||||
|
@ -414,9 +405,9 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
||||||
if (!ed->walking_actions)
|
if (!ed->walking_actions)
|
||||||
{
|
{
|
||||||
_edje_anim_count--;
|
_edje_anim_count--;
|
||||||
ed->actions = evas_list_remove(ed->actions, runp);
|
ed->actions = eina_list_remove(ed->actions, runp);
|
||||||
if (!ed->actions)
|
if (!ed->actions)
|
||||||
_edje_animators = evas_list_remove(_edje_animators, ed);
|
_edje_animators = eina_list_remove(_edje_animators, ed);
|
||||||
}
|
}
|
||||||
// _edje_emit(ed, "program,stop", runp->program->name);
|
// _edje_emit(ed, "program,stop", runp->program->name);
|
||||||
if (_edje_block_break(ed))
|
if (_edje_block_break(ed))
|
||||||
|
@ -424,10 +415,9 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
||||||
if (!ed->walking_actions) free(runp);
|
if (!ed->walking_actions) free(runp);
|
||||||
goto break_prog;
|
goto break_prog;
|
||||||
}
|
}
|
||||||
for (l = runp->program->after; l; l = l->next)
|
EINA_LIST_FOREACH(runp->program->after, l, pa)
|
||||||
{
|
{
|
||||||
Edje_Program *pr;
|
Edje_Program *pr;
|
||||||
Edje_Program_After *pa = l->data;
|
|
||||||
|
|
||||||
if (pa->id >= 0)
|
if (pa->id >= 0)
|
||||||
{
|
{
|
||||||
|
@ -457,19 +447,18 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
||||||
void
|
void
|
||||||
_edje_program_end(Edje *ed, Edje_Running_Program *runp)
|
_edje_program_end(Edje *ed, Edje_Running_Program *runp)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Program_Target *pt;
|
||||||
const char *pname = NULL;
|
const char *pname = NULL;
|
||||||
int free_runp = 0;
|
int free_runp = 0;
|
||||||
|
|
||||||
if (ed->delete_me) return;
|
if (ed->delete_me) return;
|
||||||
_edje_ref(ed);
|
_edje_ref(ed);
|
||||||
_edje_freeze(ed);
|
_edje_freeze(ed);
|
||||||
for (l = runp->program->targets; l; l = l->next)
|
EINA_LIST_FOREACH(runp->program->targets, l, pt)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
Edje_Real_Part *rp;
|
||||||
Edje_Program_Target *pt;
|
|
||||||
|
|
||||||
pt = l->data;
|
|
||||||
if (pt->id >= 0)
|
if (pt->id >= 0)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||||
|
@ -492,11 +481,11 @@ _edje_program_end(Edje *ed, Edje_Running_Program *runp)
|
||||||
if (!ed->walking_actions)
|
if (!ed->walking_actions)
|
||||||
{
|
{
|
||||||
_edje_anim_count--;
|
_edje_anim_count--;
|
||||||
ed->actions = evas_list_remove(ed->actions, runp);
|
ed->actions = eina_list_remove(ed->actions, runp);
|
||||||
free_runp = 1;
|
free_runp = 1;
|
||||||
if (!ed->actions)
|
if (!ed->actions)
|
||||||
{
|
{
|
||||||
_edje_animators = evas_list_remove(_edje_animators, ed);
|
_edje_animators = eina_list_remove(_edje_animators, ed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// _edje_emit(ed, "program,stop", pname);
|
// _edje_emit(ed, "program,stop", pname);
|
||||||
|
@ -508,7 +497,11 @@ _edje_program_end(Edje *ed, Edje_Running_Program *runp)
|
||||||
void
|
void
|
||||||
_edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const char *ssrc)
|
_edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const char *ssrc)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Real_Part *rp;
|
||||||
|
Edje_Program_Target *pt;
|
||||||
|
Edje_Program *pr2;
|
||||||
|
Edje_Program_After *pa;
|
||||||
/* limit self-feeding loops in programs to 64 levels */
|
/* limit self-feeding loops in programs to 64 levels */
|
||||||
static int recursions = 0;
|
static int recursions = 0;
|
||||||
static int recursion_limit = 0;
|
static int recursion_limit = 0;
|
||||||
|
@ -531,7 +524,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
}
|
}
|
||||||
pp->edje = ed;
|
pp->edje = ed;
|
||||||
pp->program = pr;
|
pp->program = pr;
|
||||||
ed->pending_actions = evas_list_append(ed->pending_actions, pp);
|
ed->pending_actions = eina_list_append(ed->pending_actions, pp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((recursions >= 64) || (recursion_limit))
|
if ((recursions >= 64) || (recursion_limit))
|
||||||
|
@ -552,12 +545,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
Edje_Running_Program *runp;
|
Edje_Running_Program *runp;
|
||||||
|
|
||||||
runp = calloc(1, sizeof(Edje_Running_Program));
|
runp = calloc(1, sizeof(Edje_Running_Program));
|
||||||
for (l = pr->targets; l; l = l->next)
|
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
|
||||||
Edje_Program_Target *pt;
|
|
||||||
|
|
||||||
pt = l->data;
|
|
||||||
if (pt->id >= 0)
|
if (pt->id >= 0)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||||
|
@ -578,12 +567,12 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
// _edje_emit(ed, "program,start", pr->name);
|
// _edje_emit(ed, "program,start", pr->name);
|
||||||
if (_edje_block_break(ed))
|
if (_edje_block_break(ed))
|
||||||
{
|
{
|
||||||
ed->actions = evas_list_append(ed->actions, runp);
|
ed->actions = eina_list_append(ed->actions, runp);
|
||||||
goto break_prog;
|
goto break_prog;
|
||||||
}
|
}
|
||||||
if (!ed->actions)
|
if (!ed->actions)
|
||||||
_edje_animators = evas_list_append(_edje_animators, ed);
|
_edje_animators = eina_list_append(_edje_animators, ed);
|
||||||
ed->actions = evas_list_append(ed->actions, runp);
|
ed->actions = eina_list_append(ed->actions, runp);
|
||||||
runp->start_time = ecore_time_get();
|
runp->start_time = ecore_time_get();
|
||||||
runp->edje = ed;
|
runp->edje = ed;
|
||||||
runp->program = pr;
|
runp->program = pr;
|
||||||
|
@ -593,12 +582,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (l = pr->targets; l; l = l->next)
|
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
|
||||||
Edje_Program_Target *pt;
|
|
||||||
|
|
||||||
pt = l->data;
|
|
||||||
if (pt->id >= 0)
|
if (pt->id >= 0)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||||
|
@ -620,11 +605,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
// _edje_emit(ed, "program,stop", pr->name);
|
// _edje_emit(ed, "program,stop", pr->name);
|
||||||
if (_edje_block_break(ed)) goto break_prog;
|
if (_edje_block_break(ed)) goto break_prog;
|
||||||
|
|
||||||
for (l = pr->after; l; l = l->next)
|
EINA_LIST_FOREACH(pr->after, l, pa)
|
||||||
{
|
{
|
||||||
Edje_Program *pr2;
|
|
||||||
Edje_Program_After *pa = l->data;
|
|
||||||
|
|
||||||
if (pa->id >= 0)
|
if (pa->id >= 0)
|
||||||
{
|
{
|
||||||
pr2 = ed->table_programs[pa->id % ed->table_programs_size];
|
pr2 = ed->table_programs[pa->id % ed->table_programs_size];
|
||||||
|
@ -638,31 +620,25 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
else if (pr->action == EDJE_ACTION_TYPE_ACTION_STOP)
|
else if (pr->action == EDJE_ACTION_TYPE_ACTION_STOP)
|
||||||
{
|
{
|
||||||
// _edje_emit(ed, "program,start", pr->name);
|
// _edje_emit(ed, "program,start", pr->name);
|
||||||
for (l = pr->targets; l; l = l->next)
|
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||||
{
|
{
|
||||||
Edje_Program_Target *pt;
|
Eina_List *ll;
|
||||||
Evas_List *ll;
|
Edje_Running_Program *runp;
|
||||||
|
Edje_Pending_Program *pp;
|
||||||
|
|
||||||
pt = l->data;
|
EINA_LIST_FOREACH(ed->actions, ll, runp)
|
||||||
for (ll = ed->actions; ll; ll = ll->next)
|
|
||||||
{
|
{
|
||||||
Edje_Running_Program *runp;
|
|
||||||
|
|
||||||
runp = ll->data;
|
|
||||||
if (pt->id == runp->program->id)
|
if (pt->id == runp->program->id)
|
||||||
{
|
{
|
||||||
_edje_program_end(ed, runp);
|
_edje_program_end(ed, runp);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (ll = ed->pending_actions; ll; ll = ll->next)
|
EINA_LIST_FOREACH(ed->pending_actions, ll, pp)
|
||||||
{
|
{
|
||||||
Edje_Pending_Program *pp;
|
|
||||||
|
|
||||||
pp = ll->data;
|
|
||||||
if (pt->id == pp->program->id)
|
if (pt->id == pp->program->id)
|
||||||
{
|
{
|
||||||
ed->pending_actions = evas_list_remove(ed->pending_actions, pp);
|
ed->pending_actions = eina_list_remove(ed->pending_actions, pp);
|
||||||
ecore_timer_del(pp->timer);
|
ecore_timer_del(pp->timer);
|
||||||
free(pp);
|
free(pp);
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -687,12 +663,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
{
|
{
|
||||||
// _edje_emit(ed, "program,start", pr->name);
|
// _edje_emit(ed, "program,start", pr->name);
|
||||||
if (_edje_block_break(ed)) goto break_prog;
|
if (_edje_block_break(ed)) goto break_prog;
|
||||||
for (l = pr->targets; l; l = l->next)
|
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
|
||||||
Edje_Program_Target *pt;
|
|
||||||
|
|
||||||
pt = l->data;
|
|
||||||
if (pt->id >= 0)
|
if (pt->id >= 0)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||||
|
@ -717,12 +689,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
{
|
{
|
||||||
// _edje_emit(ed, "program,start", pr->name);
|
// _edje_emit(ed, "program,start", pr->name);
|
||||||
if (_edje_block_break(ed)) goto break_prog;
|
if (_edje_block_break(ed)) goto break_prog;
|
||||||
for (l = pr->targets; l; l = l->next)
|
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
|
||||||
Edje_Program_Target *pt;
|
|
||||||
|
|
||||||
pt = l->data;
|
|
||||||
if (pt->id >= 0)
|
if (pt->id >= 0)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||||
|
@ -747,12 +715,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
{
|
{
|
||||||
// _edje_emit(ed, "program,start", pr->name);
|
// _edje_emit(ed, "program,start", pr->name);
|
||||||
if (_edje_block_break(ed)) goto break_prog;
|
if (_edje_block_break(ed)) goto break_prog;
|
||||||
for (l = pr->targets; l; l = l->next)
|
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
|
||||||
Edje_Program_Target *pt;
|
|
||||||
|
|
||||||
pt = l->data;
|
|
||||||
if (pt->id >= 0)
|
if (pt->id >= 0)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||||
|
@ -793,12 +757,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (l = pr->targets; l; l = l->next)
|
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||||
{
|
{
|
||||||
Edje_Real_Part *rp;
|
|
||||||
Edje_Program_Target *pt;
|
|
||||||
|
|
||||||
pt = l->data;
|
|
||||||
if (pt->id >= 0)
|
if (pt->id >= 0)
|
||||||
{
|
{
|
||||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||||
|
@ -828,11 +788,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
||||||
/* && (pr->tween.time > 0.0) && (!ed->no_anim))) */
|
/* && (pr->tween.time > 0.0) && (!ed->no_anim))) */
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
for (l= pr->after; l; l = l->next)
|
EINA_LIST_FOREACH(pr->after, l, pa)
|
||||||
{
|
{
|
||||||
Edje_Program *pr2;
|
|
||||||
Edje_Program_After *pa = l->data;
|
|
||||||
|
|
||||||
if (pa->id >= 0)
|
if (pa->id >= 0)
|
||||||
{
|
{
|
||||||
pr2 = ed->table_programs[pa->id % ed->table_programs_size];
|
pr2 = ed->table_programs[pa->id % ed->table_programs_size];
|
||||||
|
@ -863,7 +820,7 @@ _edje_emit(Edje *ed, const char *sig, const char *src)
|
||||||
struct _Edje_Program_Data
|
struct _Edje_Program_Data
|
||||||
{
|
{
|
||||||
#ifdef EDJE_PROGRAM_CACHE
|
#ifdef EDJE_PROGRAM_CACHE
|
||||||
Evas_List *matches;
|
Eina_List *matches;
|
||||||
int matched;
|
int matched;
|
||||||
#endif
|
#endif
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
@ -883,14 +840,14 @@ static int _edje_glob_callback(Edje_Program *pr, void *dt)
|
||||||
if (_edje_block_break(data->ed))
|
if (_edje_block_break(data->ed))
|
||||||
{
|
{
|
||||||
#ifdef EDJE_PROGRAM_CACHE
|
#ifdef EDJE_PROGRAM_CACHE
|
||||||
evas_list_free(data->matches);
|
eina_list_free(data->matches);
|
||||||
data->matches = NULL;
|
data->matches = NULL;
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EDJE_PROGRAM_CACHE
|
#ifdef EDJE_PROGRAM_CACHE
|
||||||
data->matches = evas_list_append(data->matches, pr);
|
data->matches = eina_list_append(data->matches, pr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -948,8 +905,9 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
|
||||||
|
|
||||||
#ifdef EDJE_PROGRAM_CACHE
|
#ifdef EDJE_PROGRAM_CACHE
|
||||||
{
|
{
|
||||||
Evas_List *matches;
|
Eina_List *matches;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Program *pr;
|
||||||
|
|
||||||
if (evas_hash_find(ec->prog_cache.no_matches, tmps))
|
if (evas_hash_find(ec->prog_cache.no_matches, tmps))
|
||||||
{
|
{
|
||||||
|
@ -957,11 +915,8 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
|
||||||
}
|
}
|
||||||
else if ((matches = evas_hash_find(ec->prog_cache.matches, tmps)))
|
else if ((matches = evas_hash_find(ec->prog_cache.matches, tmps)))
|
||||||
{
|
{
|
||||||
for (l = matches; l; l = l->next)
|
EINA_LIST_FOREACH(matches, l, pr)
|
||||||
{
|
{
|
||||||
Edje_Program *pr;
|
|
||||||
|
|
||||||
pr = l->data;
|
|
||||||
_edje_program_run(ed, pr, 0, sig, src);
|
_edje_program_run(ed, pr, 0, sig, src);
|
||||||
if (_edje_block_break(ed))
|
if (_edje_block_break(ed))
|
||||||
{
|
{
|
||||||
|
@ -1023,7 +978,7 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
|
||||||
static void
|
static void
|
||||||
_edje_emit_cb(Edje *ed, const char *sig, const char *src)
|
_edje_emit_cb(Edje *ed, const char *sig, const char *src)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
if (ed->delete_me) return;
|
if (ed->delete_me) return;
|
||||||
_edje_ref(ed);
|
_edje_ref(ed);
|
||||||
|
@ -1054,20 +1009,20 @@ _edje_emit_cb(Edje *ed, const char *sig, const char *src)
|
||||||
ed->walking_callbacks = 0;
|
ed->walking_callbacks = 0;
|
||||||
if ((ed->delete_callbacks) || (ed->just_added_callbacks))
|
if ((ed->delete_callbacks) || (ed->just_added_callbacks))
|
||||||
{
|
{
|
||||||
|
Edje_Signal_Callback *escb;
|
||||||
|
|
||||||
ed->delete_callbacks = 0;
|
ed->delete_callbacks = 0;
|
||||||
ed->just_added_callbacks = 0;
|
ed->just_added_callbacks = 0;
|
||||||
for (l = ed->callbacks; l;)
|
EINA_LIST_FOREACH(ed->callbacks, l, escb)
|
||||||
{
|
{
|
||||||
Edje_Signal_Callback *escb;
|
Eina_List *next_l;
|
||||||
Evas_List *next_l;
|
|
||||||
|
|
||||||
escb = l->data;
|
next_l = eina_list_next(l);
|
||||||
next_l = l->next;
|
|
||||||
if (escb->just_added)
|
if (escb->just_added)
|
||||||
escb->just_added = 0;
|
escb->just_added = 0;
|
||||||
if (escb->delete_me)
|
if (escb->delete_me)
|
||||||
{
|
{
|
||||||
ed->callbacks = evas_list_remove_list(ed->callbacks, l);
|
ed->callbacks = eina_list_remove_list(ed->callbacks, l);
|
||||||
if (escb->signal) eina_stringshare_del(escb->signal);
|
if (escb->signal) eina_stringshare_del(escb->signal);
|
||||||
if (escb->source) eina_stringshare_del(escb->source);
|
if (escb->source) eina_stringshare_del(escb->source);
|
||||||
free(escb);
|
free(escb);
|
||||||
|
|
|
@ -16,7 +16,7 @@ static void _edje_smart_clip_unset(Evas_Object * obj);
|
||||||
|
|
||||||
static Evas_Smart *_edje_smart = NULL;
|
static Evas_Smart *_edje_smart = NULL;
|
||||||
|
|
||||||
Evas_List *_edje_edjes = NULL;
|
Eina_List *_edje_edjes = NULL;
|
||||||
|
|
||||||
/************************** API Routines **************************/
|
/************************** API Routines **************************/
|
||||||
|
|
||||||
|
@ -64,19 +64,20 @@ _edje_smart_add(Evas_Object *obj)
|
||||||
evas_object_smart_data_set(obj, ed);
|
evas_object_smart_data_set(obj, ed);
|
||||||
evas_object_geometry_get(obj, &(ed->x), &(ed->y), &(ed->w), &(ed->h));
|
evas_object_geometry_get(obj, &(ed->x), &(ed->y), &(ed->w), &(ed->h));
|
||||||
ed->obj = obj;
|
ed->obj = obj;
|
||||||
_edje_edjes = evas_list_append(_edje_edjes, obj);
|
_edje_edjes = eina_list_append(_edje_edjes, obj);
|
||||||
_edje_entry_init(ed);
|
_edje_entry_init(ed);
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
const void *data;
|
||||||
|
|
||||||
printf("--- EDJE DUMP [%i]\n", evas_list_count(_edje_edjes));
|
printf("--- EDJE DUMP [%i]\n", eina_list_count(_edje_edjes));
|
||||||
for (l = _edje_edjes; l; l = l->next)
|
EINA_LIST_FOREACH(_edge_edges, l, data)
|
||||||
{
|
{
|
||||||
ed = _edje_fetch(l->data);
|
ed = _edje_fetch(data);
|
||||||
printf("EDJE: %80s | %80s\n", ed->path, ed->part);
|
printf("EDJE: %80s | %80s\n", ed->path, ed->part);
|
||||||
}
|
}
|
||||||
printf("--- EDJE DUMP [%i]\n", evas_list_count(_edje_edjes));
|
printf("--- EDJE DUMP [%i]\n", eina_list_count(_edje_edjes));
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
@ -92,7 +93,7 @@ _edje_smart_del(Evas_Object * obj)
|
||||||
_edje_entry_shutdown(ed);
|
_edje_entry_shutdown(ed);
|
||||||
ed->delete_me = 1;
|
ed->delete_me = 1;
|
||||||
_edje_clean_objects(ed);
|
_edje_clean_objects(ed);
|
||||||
_edje_edjes = evas_list_remove(_edje_edjes, obj);
|
_edje_edjes = eina_list_remove(_edje_edjes, obj);
|
||||||
evas_object_smart_data_set(obj, NULL);
|
evas_object_smart_data_set(obj, NULL);
|
||||||
if (_edje_script_only(ed)) _edje_script_only_shutdown(ed);
|
if (_edje_script_only(ed)) _edje_script_only_shutdown(ed);
|
||||||
_edje_file_del(ed);
|
_edje_file_del(ed);
|
||||||
|
@ -135,14 +136,13 @@ _edje_smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y)
|
||||||
}
|
}
|
||||||
if (ep->extra_objects)
|
if (ep->extra_objects)
|
||||||
{
|
{
|
||||||
Evas_List *el;
|
Eina_List *el;
|
||||||
|
Evas_Object *o;
|
||||||
|
|
||||||
for (el = ep->extra_objects; el; el = el->next)
|
EINA_LIST_FOREACH(ep->extra_objects, el, o)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
|
||||||
Evas_Coord oox, ooy;
|
Evas_Coord oox, ooy;
|
||||||
|
|
||||||
o = el->data;
|
|
||||||
evas_object_geometry_get(o, &oox, &ooy, NULL, NULL);
|
evas_object_geometry_get(o, &oox, &ooy, NULL, NULL);
|
||||||
evas_object_move(o, ed->x + ep->x + ep->offset.x + (oox - ox), ed->y + ep->y + ep->offset.y + (ooy - oy));
|
evas_object_move(o, ed->x + ep->x + ep->offset.x + (oox - ox), ed->y + ep->y + ep->offset.y + (ooy - oy));
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,9 @@ _edje_text_init(void)
|
||||||
void
|
void
|
||||||
_edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep)
|
_edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep)
|
||||||
{
|
{
|
||||||
Evas_List *tmp;
|
Eina_List *tmp;
|
||||||
Edje_Part *pt = ep->part;
|
Edje_Part *pt = ep->part;
|
||||||
|
Edje_Part_Description *desc;
|
||||||
|
|
||||||
if (ep->part->type != EDJE_PART_TYPE_TEXT) return;
|
if (ep->part->type != EDJE_PART_TYPE_TEXT) return;
|
||||||
|
|
||||||
|
@ -48,26 +49,19 @@ _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep)
|
||||||
_edje_text_class_member_add(ed, pt->default_desc->text.text_class);
|
_edje_text_class_member_add(ed, pt->default_desc->text.text_class);
|
||||||
|
|
||||||
/* If any other classes exist add them */
|
/* If any other classes exist add them */
|
||||||
for (tmp = pt->other_desc; tmp; tmp = tmp->next)
|
EINA_LIST_FOREACH(pt->other_desc, tmp, desc)
|
||||||
{
|
if ((desc) && (desc->text.text_class))
|
||||||
Edje_Part_Description *desc;
|
_edje_text_class_member_add(ed, desc->text.text_class);
|
||||||
|
|
||||||
desc = tmp->data;
|
|
||||||
if ((desc) && (desc->text.text_class))
|
|
||||||
_edje_text_class_member_add(ed, desc->text.text_class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_edje_text_part_on_add_clippers(Edje *ed, Edje_Real_Part *ep)
|
_edje_text_part_on_add_clippers(Edje *ed, Edje_Real_Part *ep)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Evas_Object *o;
|
||||||
|
|
||||||
for (l = ep->extra_objects; l; l = l->next)
|
EINA_LIST_FOREACH(ep->extra_objects, l, o)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
|
||||||
|
|
||||||
o = l->data;
|
|
||||||
if (ep->part->clip_to_id >= 0)
|
if (ep->part->clip_to_id >= 0)
|
||||||
{
|
{
|
||||||
ep->clip_to = ed->table_parts[ep->part->clip_to_id % ed->table_parts_size];
|
ep->clip_to = ed->table_parts[ep->part->clip_to_id % ed->table_parts_size];
|
||||||
|
@ -83,19 +77,15 @@ _edje_text_part_on_add_clippers(Edje *ed, Edje_Real_Part *ep)
|
||||||
void
|
void
|
||||||
_edje_text_part_on_del(Edje *ed, Edje_Part *pt)
|
_edje_text_part_on_del(Edje *ed, Edje_Part *pt)
|
||||||
{
|
{
|
||||||
Evas_List *tmp;
|
Eina_List *tmp;
|
||||||
|
Edje_Part_Description *desc;
|
||||||
|
|
||||||
if ((pt->default_desc) && (pt->default_desc->text.text_class))
|
if ((pt->default_desc) && (pt->default_desc->text.text_class))
|
||||||
_edje_text_class_member_del(ed, pt->default_desc->text.text_class);
|
_edje_text_class_member_del(ed, pt->default_desc->text.text_class);
|
||||||
|
|
||||||
for (tmp = pt->other_desc; tmp; tmp = tmp->next)
|
EINA_LIST_FOREACH(pt->other_desc, tmp, desc)
|
||||||
{
|
if (desc->text.text_class)
|
||||||
Edje_Part_Description *desc;
|
_edje_text_class_member_del(ed, desc->text.text_class);
|
||||||
|
|
||||||
desc = tmp->data;
|
|
||||||
if (desc->text.text_class)
|
|
||||||
_edje_text_class_member_del(ed, desc->text.text_class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -105,8 +95,8 @@ _edje_text_real_part_on_del(Edje *ed, Edje_Real_Part *ep)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = ep->extra_objects->data;
|
o = eina_list_data_get(ep->extra_objects);
|
||||||
ep->extra_objects = evas_list_remove(ep->extra_objects, o);
|
ep->extra_objects = eina_list_remove(ep->extra_objects, o);
|
||||||
evas_object_del(o);
|
evas_object_del(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,13 +228,14 @@ _edje_format_reparse(Edje_File *edf, const char *str, Edje_Style_Tag **tag_ret)
|
||||||
void
|
void
|
||||||
_edje_textblock_style_all_update(Edje *ed)
|
_edje_textblock_style_all_update(Edje *ed)
|
||||||
{
|
{
|
||||||
Evas_List *l, *ll;
|
Eina_List *l, *ll;
|
||||||
|
Edje_Style *stl;
|
||||||
|
|
||||||
if (!ed->file) return;
|
if (!ed->file) return;
|
||||||
|
|
||||||
for (l = ed->file->styles; l; l = l->next)
|
EINA_LIST_FOREACH(ed->file->styles, l, stl)
|
||||||
{
|
{
|
||||||
Edje_Style *stl;
|
|
||||||
Edje_Style_Tag *tag;
|
Edje_Style_Tag *tag;
|
||||||
Edje_Text_Class *tc;
|
Edje_Text_Class *tc;
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
|
@ -243,17 +244,13 @@ _edje_textblock_style_all_update(Edje *ed)
|
||||||
int found = 0;
|
int found = 0;
|
||||||
char *fontset = NULL, *fontsource = NULL;
|
char *fontset = NULL, *fontsource = NULL;
|
||||||
|
|
||||||
stl = l->data;
|
|
||||||
/* Make sure the style is already defined */
|
/* Make sure the style is already defined */
|
||||||
if (!stl->style) break;
|
if (!stl->style) break;
|
||||||
|
|
||||||
/* Make sure the style contains a text_class */
|
/* Make sure the style contains a text_class */
|
||||||
for (ll = stl->tags; ll; ll = ll->next)
|
EINA_LIST_FOREACH(stl->tags, ll, tag)
|
||||||
{
|
if (tag->text_class)
|
||||||
tag = ll->data;
|
found = 1;
|
||||||
if (tag->text_class)
|
|
||||||
found = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* No text classes , goto next style */
|
/* No text classes , goto next style */
|
||||||
if (!found) continue;
|
if (!found) continue;
|
||||||
|
@ -264,9 +261,8 @@ _edje_textblock_style_all_update(Edje *ed)
|
||||||
fontsource = _edje_str_escape(ed->file->path);
|
fontsource = _edje_str_escape(ed->file->path);
|
||||||
|
|
||||||
/* Build the style from each tag */
|
/* Build the style from each tag */
|
||||||
for (ll = stl->tags; ll; ll = ll->next)
|
EINA_LIST_FOREACH(stl->tags, ll, tag)
|
||||||
{
|
{
|
||||||
tag = ll->data;
|
|
||||||
if (!tag->key) continue;
|
if (!tag->key) continue;
|
||||||
|
|
||||||
/* Add Tag Key */
|
/* Add Tag Key */
|
||||||
|
@ -335,23 +331,20 @@ _edje_textblock_style_all_update(Edje *ed)
|
||||||
void
|
void
|
||||||
_edje_textblock_styles_add(Edje *ed)
|
_edje_textblock_styles_add(Edje *ed)
|
||||||
{
|
{
|
||||||
Evas_List *l, *ll;
|
Eina_List *l, *ll;
|
||||||
|
Edje_Style *stl;
|
||||||
|
|
||||||
if (!ed->file) return;
|
if (!ed->file) return;
|
||||||
|
|
||||||
for (l = ed->file->styles; l; l = l->next)
|
EINA_LIST_FOREACH(ed->file->styles, l, stl)
|
||||||
{
|
{
|
||||||
Edje_Style *stl;
|
|
||||||
Edje_Style_Tag *tag;
|
Edje_Style_Tag *tag;
|
||||||
|
|
||||||
stl = l->data;
|
|
||||||
|
|
||||||
/* Make sure the style contains the text_class */
|
/* Make sure the style contains the text_class */
|
||||||
for (ll = stl->tags; ll; ll = ll->next)
|
EINA_LIST_FOREACH(stl->tags, ll, tag)
|
||||||
{
|
{
|
||||||
tag = ll->data;
|
if (!tag->text_class) continue;
|
||||||
if (!tag->text_class) continue;
|
_edje_text_class_member_add(ed, tag->text_class);
|
||||||
_edje_text_class_member_add(ed, tag->text_class);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -359,21 +352,18 @@ _edje_textblock_styles_add(Edje *ed)
|
||||||
void
|
void
|
||||||
_edje_textblock_styles_del(Edje *ed)
|
_edje_textblock_styles_del(Edje *ed)
|
||||||
{
|
{
|
||||||
Evas_List *l, *ll;
|
Eina_List *l, *ll;
|
||||||
|
Edje_Style *stl;
|
||||||
|
|
||||||
if (!ed->file) return;
|
if (!ed->file) return;
|
||||||
|
|
||||||
for (l = ed->file->styles; l; l = l->next)
|
EINA_LIST_FOREACH(ed->file->styles, l, stl)
|
||||||
{
|
{
|
||||||
Edje_Style *stl;
|
|
||||||
Edje_Style_Tag *tag;
|
Edje_Style_Tag *tag;
|
||||||
|
|
||||||
stl = l->data;
|
|
||||||
|
|
||||||
/* Make sure the style contains the text_class */
|
/* Make sure the style contains the text_class */
|
||||||
for (ll = stl->tags; ll; ll = ll->next)
|
EINA_LIST_FOREACH(stl->tags, ll, tag)
|
||||||
{
|
{
|
||||||
tag = ll->data;
|
|
||||||
if (!tag->text_class) continue;
|
if (!tag->text_class) continue;
|
||||||
_edje_text_class_member_del(ed, tag->text_class);
|
_edje_text_class_member_del(ed, tag->text_class);
|
||||||
}
|
}
|
||||||
|
@ -389,18 +379,17 @@ _edje_textblock_styles_del(Edje *ed)
|
||||||
void
|
void
|
||||||
_edje_textblock_style_parse_and_fix(Edje_File *edf)
|
_edje_textblock_style_parse_and_fix(Edje_File *edf)
|
||||||
{
|
{
|
||||||
Evas_List *l, *ll;
|
Eina_List *l, *ll;
|
||||||
|
Edje_Style *stl;
|
||||||
|
|
||||||
for (l = edf->styles; l; l = l->next)
|
EINA_LIST_FOREACH(edf->styles, l, stl)
|
||||||
{
|
{
|
||||||
Edje_Style *stl;
|
|
||||||
Edje_Style_Tag *tag;
|
Edje_Style_Tag *tag;
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
int bufalloc = 0;
|
int bufalloc = 0;
|
||||||
int buflen = 0;
|
int buflen = 0;
|
||||||
char *fontset = NULL, *fontsource = NULL, *ts;
|
char *fontset = NULL, *fontsource = NULL, *ts;
|
||||||
|
|
||||||
stl = l->data;
|
|
||||||
if (stl->style) break;
|
if (stl->style) break;
|
||||||
|
|
||||||
stl->style = evas_textblock_style_new();
|
stl->style = evas_textblock_style_new();
|
||||||
|
@ -411,9 +400,8 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
|
||||||
fontsource = _edje_str_escape(edf->path);
|
fontsource = _edje_str_escape(edf->path);
|
||||||
|
|
||||||
/* Build the style from each tag */
|
/* Build the style from each tag */
|
||||||
for (ll = stl->tags; ll; ll = ll->next)
|
EINA_LIST_FOREACH(stl->tags, ll, tag)
|
||||||
{
|
{
|
||||||
tag = ll->data;
|
|
||||||
if (!tag->key) continue;
|
if (!tag->key) continue;
|
||||||
|
|
||||||
/* Add Tag Key */
|
/* Add Tag Key */
|
||||||
|
@ -479,13 +467,13 @@ _edje_textblock_style_cleanup(Edje_File *edf)
|
||||||
Edje_Style *stl;
|
Edje_Style *stl;
|
||||||
|
|
||||||
stl = edf->styles->data;
|
stl = edf->styles->data;
|
||||||
edf->styles = evas_list_remove_list(edf->styles, edf->styles);
|
edf->styles = eina_list_remove_list(edf->styles, edf->styles);
|
||||||
while (stl->tags)
|
while (stl->tags)
|
||||||
{
|
{
|
||||||
Edje_Style_Tag *tag;
|
Edje_Style_Tag *tag;
|
||||||
|
|
||||||
tag = stl->tags->data;
|
tag = stl->tags->data;
|
||||||
stl->tags = evas_list_remove_list(stl->tags, stl->tags);
|
stl->tags = eina_list_remove_list(stl->tags, stl->tags);
|
||||||
if (edf->free_strings)
|
if (edf->free_strings)
|
||||||
{
|
{
|
||||||
if (tag->key) eina_stringshare_del(tag->key);
|
if (tag->key) eina_stringshare_del(tag->key);
|
||||||
|
|
|
@ -19,7 +19,7 @@ typedef struct _Edje_List_Foreach_Data Edje_List_Foreach_Data;
|
||||||
|
|
||||||
struct _Edje_List_Foreach_Data
|
struct _Edje_List_Foreach_Data
|
||||||
{
|
{
|
||||||
Evas_List *list;
|
Eina_List *list;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Evas_Bool _edje_color_class_list_foreach(const Evas_Hash *hash, const char *key, void *data, void *fdata);
|
static Evas_Bool _edje_color_class_list_foreach(const Evas_Hash *hash, const char *key, void *data, void *fdata);
|
||||||
|
@ -46,10 +46,11 @@ edje_freeze(void)
|
||||||
#else
|
#else
|
||||||
// FIXME: could just have a global freeze instead of per object
|
// FIXME: could just have a global freeze instead of per object
|
||||||
// above i tried.. but this broke some things. notable e17's menus. why?
|
// above i tried.. but this broke some things. notable e17's menus. why?
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Evas_Object *data;
|
||||||
|
|
||||||
for (l = _edje_edjes; l; l = l->next)
|
EINA_LIST_FOREACH(_edje_edjes, l, data)
|
||||||
edje_object_freeze((Evas_Object *)(l->data));
|
edje_object_freeze(data);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,29 +84,30 @@ _edje_thaw_edje(Edje *ed)
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_thaw(void)
|
edje_thaw(void)
|
||||||
{
|
{
|
||||||
|
Evas_Object *data;
|
||||||
#ifdef FASTFREEZE
|
#ifdef FASTFREEZE
|
||||||
_edje_freeze_val--;
|
_edje_freeze_val--;
|
||||||
printf("fr -- ->%i\n", _edje_freeze_val);
|
printf("fr -- ->%i\n", _edje_freeze_val);
|
||||||
if ((_edje_freeze_val <= 0) && (_edje_freeze_calc_count > 0))
|
if ((_edje_freeze_val <= 0) && (_edje_freeze_calc_count > 0))
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
_edje_freeze_calc_count = 0;
|
_edje_freeze_calc_count = 0;
|
||||||
for (l = _edje_edjes; l; l = l->next)
|
EINA_LIST_FOREACH(_edje_edjes, l, data)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
ed = _edje_fetch(l->data);
|
ed = _edje_fetch(data);
|
||||||
if (ed) _edje_thaw_edje(ed);
|
if (ed) _edje_thaw_edje(ed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// FIXME: could just have a global freeze instead of per object
|
// FIXME: could just have a global freeze instead of per object
|
||||||
// comment as above.. why?
|
// comment as above.. why?
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
|
||||||
for (l = _edje_edjes; l; l = l->next)
|
EINA_LIST_FOREACH(_edje_edjes, l, data)
|
||||||
edje_object_thaw((Evas_Object *)(l->data));
|
edje_object_thaw(data);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,12 +130,13 @@ edje_fontset_append_get(void)
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_scale_set(double scale)
|
edje_scale_set(double scale)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Evas_Object *data;
|
||||||
|
|
||||||
if (_edje_scale == scale) return;
|
if (_edje_scale == scale) return;
|
||||||
_edje_scale = scale;
|
_edje_scale = scale;
|
||||||
for (l = _edje_edjes; l; l = l->next)
|
EINA_LIST_FOREACH(_edje_edjes, l, data)
|
||||||
edje_object_calc_force((Evas_Object *)(l->data));
|
edje_object_calc_force(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI double
|
EAPI double
|
||||||
|
@ -169,20 +172,16 @@ EAPI const char *
|
||||||
edje_object_data_get(const Evas_Object *obj, const char *key)
|
edje_object_data_get(const Evas_Object *obj, const char *key)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Data *di;
|
||||||
|
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
if ((!ed) || (!key))
|
if ((!ed) || (!key))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (!ed->collection) return NULL;
|
if (!ed->collection) return NULL;
|
||||||
for (l = ed->collection->data; l; l = l->next)
|
EINA_LIST_FOREACH(ed->collection->data, l, di)
|
||||||
{
|
if ((di->key) && (!strcmp(di->key, key)))
|
||||||
Edje_Data *di;
|
return (const char *)di->value;
|
||||||
|
|
||||||
di = l->data;
|
|
||||||
if ((di->key) && (!strcmp(di->key, key)))
|
|
||||||
return (const char *)di->value;
|
|
||||||
}
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,7 +264,7 @@ edje_object_thaw(Evas_Object *obj)
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
|
edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
|
||||||
{
|
{
|
||||||
Evas_List *members;
|
Eina_List *members;
|
||||||
Edje_Color_Class *cc;
|
Edje_Color_Class *cc;
|
||||||
|
|
||||||
if (!color_class) return;
|
if (!color_class) return;
|
||||||
|
@ -325,10 +324,10 @@ edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
ed = members->data;
|
ed = eina_list_data_get(members);
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
members = members->next;
|
members = eina_list_next(members);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,7 +340,7 @@ void
|
||||||
edje_color_class_del(const char *color_class)
|
edje_color_class_del(const char *color_class)
|
||||||
{
|
{
|
||||||
Edje_Color_Class *cc;
|
Edje_Color_Class *cc;
|
||||||
Evas_List *members;
|
Eina_List *members;
|
||||||
|
|
||||||
if (!color_class) return;
|
if (!color_class) return;
|
||||||
|
|
||||||
|
@ -358,10 +357,10 @@ edje_color_class_del(const char *color_class)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
ed = members->data;
|
ed = eina_list_data_get(members);
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
members = members->next;
|
members = eina_list_next(members);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,7 +370,7 @@ edje_color_class_del(const char *color_class)
|
||||||
* @return A list of color class names (strings). These strings and the list
|
* @return A list of color class names (strings). These strings and the list
|
||||||
* must be free()'d by the caller.
|
* must be free()'d by the caller.
|
||||||
*/
|
*/
|
||||||
Evas_List *
|
Eina_List *
|
||||||
edje_color_class_list(void)
|
edje_color_class_list(void)
|
||||||
{
|
{
|
||||||
Edje_List_Foreach_Data fdata;
|
Edje_List_Foreach_Data fdata;
|
||||||
|
@ -389,7 +388,7 @@ _edje_color_class_list_foreach(const Evas_Hash *hash, const char *key, void *dat
|
||||||
Edje_List_Foreach_Data *fd;
|
Edje_List_Foreach_Data *fd;
|
||||||
|
|
||||||
fd = fdata;
|
fd = fdata;
|
||||||
fd->list = evas_list_append(fd->list, strdup(key));
|
fd->list = eina_list_append(fd->list, strdup(key));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,7 +419,7 @@ EAPI void
|
||||||
edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
|
edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
Edje_Color_Class *cc;
|
Edje_Color_Class *cc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -434,9 +433,8 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in
|
||||||
if (b > 255) b = 255;
|
if (b > 255) b = 255;
|
||||||
if (a < 0) a = 0;
|
if (a < 0) a = 0;
|
||||||
if (a > 255) a = 255;
|
if (a > 255) a = 255;
|
||||||
for (l = ed->color_classes; l; l = l->next)
|
EINA_LIST_FOREACH(ed->color_classes, l, cc)
|
||||||
{
|
{
|
||||||
cc = l->data;
|
|
||||||
if ((cc->name) && (!strcmp(cc->name, color_class)))
|
if ((cc->name) && (!strcmp(cc->name, color_class)))
|
||||||
{
|
{
|
||||||
if ((cc->r == r) && (cc->g == g) &&
|
if ((cc->r == r) && (cc->g == g) &&
|
||||||
|
@ -483,7 +481,7 @@ edje_object_color_class_set(Evas_Object *obj, const char *color_class, int r, in
|
||||||
cc->g3 = g3;
|
cc->g3 = g3;
|
||||||
cc->b3 = b3;
|
cc->b3 = b3;
|
||||||
cc->a3 = a3;
|
cc->a3 = a3;
|
||||||
ed->color_classes = evas_list_append(ed->color_classes, cc);
|
ed->color_classes = eina_list_append(ed->color_classes, cc);
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
|
|
||||||
for (i = 0; i < ed->table_parts_size; i++)
|
for (i = 0; i < ed->table_parts_size; i++)
|
||||||
|
@ -507,19 +505,18 @@ void
|
||||||
edje_object_color_class_del(Evas_Object *obj, const char *color_class)
|
edje_object_color_class_del(Evas_Object *obj, const char *color_class)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
Edje_Color_Class *cc = NULL;
|
Edje_Color_Class *cc = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!color_class) return;
|
if (!color_class) return;
|
||||||
|
|
||||||
ed = _edje_fetch(obj);
|
ed = _edje_fetch(obj);
|
||||||
for (l = ed->color_classes; l; l = l->next)
|
EINA_LIST_FOREACH(ed->color_classes, l, cc)
|
||||||
{
|
{
|
||||||
cc = l->data;
|
|
||||||
if (!strcmp(cc->name, color_class))
|
if (!strcmp(cc->name, color_class))
|
||||||
{
|
{
|
||||||
ed->color_classes = evas_list_remove(ed->color_classes, cc);
|
ed->color_classes = eina_list_remove(ed->color_classes, cc);
|
||||||
eina_stringshare_del(cc->name);
|
eina_stringshare_del(cc->name);
|
||||||
free(cc);
|
free(cc);
|
||||||
return;
|
return;
|
||||||
|
@ -549,7 +546,7 @@ edje_object_color_class_del(Evas_Object *obj, const char *color_class)
|
||||||
EAPI void
|
EAPI void
|
||||||
edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size size)
|
edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size size)
|
||||||
{
|
{
|
||||||
Evas_List *members;
|
Eina_List *members;
|
||||||
Edje_Text_Class *tc;
|
Edje_Text_Class *tc;
|
||||||
|
|
||||||
if (!text_class) return;
|
if (!text_class) return;
|
||||||
|
@ -603,11 +600,11 @@ edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size siz
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
ed = members->data;
|
ed = eina_list_data_get(members);
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_textblock_style_all_update(ed);
|
_edje_textblock_style_all_update(ed);
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
members = members->next;
|
members = eina_list_next(members);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -620,7 +617,7 @@ void
|
||||||
edje_text_class_del(const char *text_class)
|
edje_text_class_del(const char *text_class)
|
||||||
{
|
{
|
||||||
Edje_Text_Class *tc;
|
Edje_Text_Class *tc;
|
||||||
Evas_List *members;
|
Eina_List *members;
|
||||||
|
|
||||||
if (!text_class) return;
|
if (!text_class) return;
|
||||||
|
|
||||||
|
@ -638,11 +635,11 @@ edje_text_class_del(const char *text_class)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
|
||||||
ed = members->data;
|
ed = eina_list_data_get(members);
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_textblock_style_all_update(ed);
|
_edje_textblock_style_all_update(ed);
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
members = members->next;
|
members = eina_list_next(members);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,7 +649,7 @@ edje_text_class_del(const char *text_class)
|
||||||
* @return A list of text class names (strings). These strings are stringshares and
|
* @return A list of text class names (strings). These strings are stringshares and
|
||||||
* the list must be free()'d by the caller.
|
* the list must be free()'d by the caller.
|
||||||
*/
|
*/
|
||||||
Evas_List *
|
Eina_List *
|
||||||
edje_text_class_list(void)
|
edje_text_class_list(void)
|
||||||
{
|
{
|
||||||
Edje_List_Foreach_Data fdata;
|
Edje_List_Foreach_Data fdata;
|
||||||
|
@ -670,7 +667,7 @@ _edje_text_class_list_foreach(const Evas_Hash *hash, const char *key, void *data
|
||||||
Edje_List_Foreach_Data *fd;
|
Edje_List_Foreach_Data *fd;
|
||||||
|
|
||||||
fd = fdata;
|
fd = fdata;
|
||||||
fd->list = evas_list_append(fd->list, eina_stringshare_add(key));
|
fd->list = eina_list_append(fd->list, eina_stringshare_add(key));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -686,7 +683,7 @@ EAPI void
|
||||||
edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size)
|
edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
Edje_Text_Class *tc;
|
Edje_Text_Class *tc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -694,9 +691,8 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
|
||||||
if ((!ed) || (!text_class)) return;
|
if ((!ed) || (!text_class)) return;
|
||||||
|
|
||||||
/* for each text_class in the edje */
|
/* for each text_class in the edje */
|
||||||
for (l = ed->text_classes; l; l = l->next)
|
EINA_LIST_FOREACH(ed->text_classes, l, tc)
|
||||||
{
|
{
|
||||||
tc = l->data;
|
|
||||||
if ((tc->name) && (!strcmp(tc->name, text_class)))
|
if ((tc->name) && (!strcmp(tc->name, text_class)))
|
||||||
{
|
{
|
||||||
/* Match and the same, return */
|
/* Match and the same, return */
|
||||||
|
@ -742,7 +738,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add to edje's text class list */
|
/* Add to edje's text class list */
|
||||||
ed->text_classes = evas_list_append(ed->text_classes, tc);
|
ed->text_classes = eina_list_append(ed->text_classes, tc);
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_textblock_style_all_update(ed);
|
_edje_textblock_style_all_update(ed);
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
|
@ -966,7 +962,7 @@ edje_object_part_text_insert(Evas_Object *obj, const char *part, const char *tex
|
||||||
* @param part The part name
|
* @param part The part name
|
||||||
* @return The list of anchors
|
* @return The list of anchors
|
||||||
*/
|
*/
|
||||||
EAPI Evas_List *
|
EAPI Eina_List *
|
||||||
edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part)
|
edje_object_part_text_anchor_list_get(const Evas_Object *obj, const char *part)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
|
@ -1866,28 +1862,22 @@ _edje_real_part_get(Edje *ed, const char *part)
|
||||||
Edje_Color_Class *
|
Edje_Color_Class *
|
||||||
_edje_color_class_find(Edje *ed, const char *color_class)
|
_edje_color_class_find(Edje *ed, const char *color_class)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
Edje_Color_Class *cc = NULL;
|
Edje_Color_Class *cc = NULL;
|
||||||
|
|
||||||
if ((!ed) || (!color_class)) return NULL;
|
if ((!ed) || (!color_class)) return NULL;
|
||||||
|
|
||||||
/* first look through the object scope */
|
/* first look through the object scope */
|
||||||
for (l = ed->color_classes; l; l = l->next)
|
EINA_LIST_FOREACH(ed->color_classes, l, cc)
|
||||||
{
|
if ((cc->name) && (!strcmp(color_class, cc->name))) return cc;
|
||||||
cc = l->data;
|
|
||||||
if ((cc->name) && (!strcmp(color_class, cc->name))) return cc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* next look through the global scope */
|
/* next look through the global scope */
|
||||||
cc = evas_hash_find(_edje_color_class_hash, color_class);
|
cc = evas_hash_find(_edje_color_class_hash, color_class);
|
||||||
if (cc) return cc;
|
if (cc) return cc;
|
||||||
|
|
||||||
/* finally, look through the file scope */
|
/* finally, look through the file scope */
|
||||||
for (l = ed->file->color_classes; l; l = l->next)
|
EINA_LIST_FOREACH(ed->file->color_classes, l, cc)
|
||||||
{
|
if ((cc->name) && (!strcmp(color_class, cc->name))) return cc;
|
||||||
cc = l->data;
|
|
||||||
if ((cc->name) && (!strcmp(color_class, cc->name))) return cc;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1895,7 +1885,7 @@ _edje_color_class_find(Edje *ed, const char *color_class)
|
||||||
void
|
void
|
||||||
_edje_color_class_member_add(Edje *ed, const char *color_class)
|
_edje_color_class_member_add(Edje *ed, const char *color_class)
|
||||||
{
|
{
|
||||||
Evas_List *members;
|
Eina_List *members;
|
||||||
|
|
||||||
if ((!ed) || (!color_class)) return;
|
if ((!ed) || (!color_class)) return;
|
||||||
members = evas_hash_find(_edje_color_class_member_hash, color_class);
|
members = evas_hash_find(_edje_color_class_member_hash, color_class);
|
||||||
|
@ -1905,7 +1895,7 @@ _edje_color_class_member_add(Edje *ed, const char *color_class)
|
||||||
evas_hash_del(_edje_color_class_member_hash, color_class, members);
|
evas_hash_del(_edje_color_class_member_hash, color_class, members);
|
||||||
}
|
}
|
||||||
|
|
||||||
members = evas_list_prepend(members, ed);
|
members = eina_list_prepend(members, ed);
|
||||||
_edje_color_class_member_hash =
|
_edje_color_class_member_hash =
|
||||||
evas_hash_add(_edje_color_class_member_hash, color_class, members);
|
evas_hash_add(_edje_color_class_member_hash, color_class, members);
|
||||||
}
|
}
|
||||||
|
@ -1913,7 +1903,7 @@ _edje_color_class_member_add(Edje *ed, const char *color_class)
|
||||||
void
|
void
|
||||||
_edje_color_class_member_del(Edje *ed, const char *color_class)
|
_edje_color_class_member_del(Edje *ed, const char *color_class)
|
||||||
{
|
{
|
||||||
Evas_List *members;
|
Eina_List *members;
|
||||||
|
|
||||||
if ((!ed) || (!color_class)) return;
|
if ((!ed) || (!color_class)) return;
|
||||||
members = evas_hash_find(_edje_color_class_member_hash, color_class);
|
members = evas_hash_find(_edje_color_class_member_hash, color_class);
|
||||||
|
@ -1921,7 +1911,7 @@ _edje_color_class_member_del(Edje *ed, const char *color_class)
|
||||||
|
|
||||||
_edje_color_class_member_hash =
|
_edje_color_class_member_hash =
|
||||||
evas_hash_del(_edje_color_class_member_hash, color_class, members);
|
evas_hash_del(_edje_color_class_member_hash, color_class, members);
|
||||||
members = evas_list_remove(members, ed);
|
members = eina_list_remove(members, ed);
|
||||||
if (members)
|
if (members)
|
||||||
{
|
{
|
||||||
_edje_color_class_member_hash =
|
_edje_color_class_member_hash =
|
||||||
|
@ -1936,7 +1926,7 @@ _edje_color_class_member_del(Edje *ed, const char *color_class)
|
||||||
static Evas_Bool
|
static Evas_Bool
|
||||||
member_list_free(const Evas_Hash *hash, const char *key, void *data, void *fdata)
|
member_list_free(const Evas_Hash *hash, const char *key, void *data, void *fdata)
|
||||||
{
|
{
|
||||||
evas_list_free(data);
|
eina_list_free(data);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1972,41 +1962,33 @@ _edje_color_class_hash_free(void)
|
||||||
void
|
void
|
||||||
_edje_color_class_on_del(Edje *ed, Edje_Part *ep)
|
_edje_color_class_on_del(Edje *ed, Edje_Part *ep)
|
||||||
{
|
{
|
||||||
Evas_List *tmp;
|
Eina_List *tmp;
|
||||||
|
Edje_Part_Description *desc;
|
||||||
|
|
||||||
if ((ep->default_desc) && (ep->default_desc->color_class))
|
if ((ep->default_desc) && (ep->default_desc->color_class))
|
||||||
_edje_color_class_member_del(ed, ep->default_desc->color_class);
|
_edje_color_class_member_del(ed, ep->default_desc->color_class);
|
||||||
|
|
||||||
for (tmp = ep->other_desc; tmp; tmp = tmp->next)
|
EINA_LIST_FOREACH(ep->other_desc, tmp, desc)
|
||||||
{
|
if (desc->color_class)
|
||||||
Edje_Part_Description *desc;
|
_edje_color_class_member_del(ed, desc->color_class);
|
||||||
|
|
||||||
desc = tmp->data;
|
|
||||||
if (desc->color_class)
|
|
||||||
_edje_color_class_member_del(ed, desc->color_class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Edje_Text_Class *
|
Edje_Text_Class *
|
||||||
_edje_text_class_find(Edje *ed, const char *text_class)
|
_edje_text_class_find(Edje *ed, const char *text_class)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Text_Class *tc;
|
||||||
|
|
||||||
if ((!ed) || (!text_class)) return NULL;
|
if ((!ed) || (!text_class)) return NULL;
|
||||||
for (l = ed->text_classes; l; l = l->next)
|
EINA_LIST_FOREACH(ed->text_classes, l, tc)
|
||||||
{
|
if ((tc->name) && (!strcmp(text_class, tc->name))) return tc;
|
||||||
Edje_Text_Class *tc;
|
|
||||||
|
|
||||||
tc = l->data;
|
|
||||||
if ((tc->name) && (!strcmp(text_class, tc->name))) return tc;
|
|
||||||
}
|
|
||||||
return evas_hash_find(_edje_text_class_hash, text_class);
|
return evas_hash_find(_edje_text_class_hash, text_class);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_edje_text_class_member_add(Edje *ed, const char *text_class)
|
_edje_text_class_member_add(Edje *ed, const char *text_class)
|
||||||
{
|
{
|
||||||
Evas_List *members;
|
Eina_List *members;
|
||||||
|
|
||||||
if ((!ed) || (!text_class)) return;
|
if ((!ed) || (!text_class)) return;
|
||||||
|
|
||||||
|
@ -2021,7 +2003,7 @@ _edje_text_class_member_add(Edje *ed, const char *text_class)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the member list */
|
/* Update the member list */
|
||||||
members = evas_list_prepend(members, ed);
|
members = eina_list_prepend(members, ed);
|
||||||
|
|
||||||
/* Add the member list back */
|
/* Add the member list back */
|
||||||
_edje_text_class_member_hash =
|
_edje_text_class_member_hash =
|
||||||
|
@ -2031,7 +2013,7 @@ _edje_text_class_member_add(Edje *ed, const char *text_class)
|
||||||
void
|
void
|
||||||
_edje_text_class_member_del(Edje *ed, const char *text_class)
|
_edje_text_class_member_del(Edje *ed, const char *text_class)
|
||||||
{
|
{
|
||||||
Evas_List *members;
|
Eina_List *members;
|
||||||
|
|
||||||
if ((!ed) || (!text_class)) return;
|
if ((!ed) || (!text_class)) return;
|
||||||
members = evas_hash_find(_edje_text_class_member_hash, text_class);
|
members = evas_hash_find(_edje_text_class_member_hash, text_class);
|
||||||
|
@ -2040,7 +2022,7 @@ _edje_text_class_member_del(Edje *ed, const char *text_class)
|
||||||
_edje_text_class_member_hash =
|
_edje_text_class_member_hash =
|
||||||
evas_hash_del(_edje_text_class_member_hash, text_class, members);
|
evas_hash_del(_edje_text_class_member_hash, text_class, members);
|
||||||
|
|
||||||
members = evas_list_remove(members, ed);
|
members = eina_list_remove(members, ed);
|
||||||
if (members)
|
if (members)
|
||||||
{
|
{
|
||||||
_edje_text_class_member_hash =
|
_edje_text_class_member_hash =
|
||||||
|
|
|
@ -8,7 +8,7 @@ static int _edje_var_timer_cb(void *data);
|
||||||
static int _edje_var_anim_cb(void *data);
|
static int _edje_var_anim_cb(void *data);
|
||||||
|
|
||||||
static Ecore_Animator *_edje_animator = NULL;
|
static Ecore_Animator *_edje_animator = NULL;
|
||||||
static Evas_List *_edje_anim_list = NULL;
|
static Eina_List *_edje_anim_list = NULL;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_edje_var_timer_cb(void *data)
|
_edje_var_timer_cb(void *data)
|
||||||
|
@ -24,7 +24,7 @@ _edje_var_timer_cb(void *data)
|
||||||
embryo_program_vm_push(ed->collection->script);
|
embryo_program_vm_push(ed->collection->script);
|
||||||
_edje_embryo_globals_init(ed);
|
_edje_embryo_globals_init(ed);
|
||||||
embryo_parameter_cell_push(ed->collection->script, (Embryo_Cell)et->val);
|
embryo_parameter_cell_push(ed->collection->script, (Embryo_Cell)et->val);
|
||||||
ed->var_pool->timers = evas_list_remove(ed->var_pool->timers, et);
|
ed->var_pool->timers = eina_list_remove(ed->var_pool->timers, et);
|
||||||
fn = et->func;
|
fn = et->func;
|
||||||
free(et);
|
free(et);
|
||||||
{
|
{
|
||||||
|
@ -44,32 +44,34 @@ _edje_var_timer_cb(void *data)
|
||||||
static int
|
static int
|
||||||
_edje_var_anim_cb(void *data)
|
_edje_var_anim_cb(void *data)
|
||||||
{
|
{
|
||||||
Evas_List *l, *tl = NULL;
|
Eina_List *l, *tl = NULL;
|
||||||
double t;
|
double t;
|
||||||
|
const void *tmp;
|
||||||
|
|
||||||
t = ecore_time_get();
|
t = ecore_time_get();
|
||||||
for (l = _edje_anim_list; l; l = l->next)
|
EINA_LIST_FOREACH(_edje_anim_list, l, tmp)
|
||||||
tl = evas_list_append(tl, l->data);
|
tl = eina_list_append(tl, tmp);
|
||||||
while (tl)
|
while (tl)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *tl2;
|
Eina_List *tl2;
|
||||||
|
Edje_Var_Animator *ea;
|
||||||
|
|
||||||
ed = tl->data;
|
ed = eina_list_data_get(tl);
|
||||||
_edje_ref(ed);
|
_edje_ref(ed);
|
||||||
_edje_block(ed);
|
_edje_block(ed);
|
||||||
_edje_freeze(ed);
|
_edje_freeze(ed);
|
||||||
tl = evas_list_remove(tl, ed);
|
tl = eina_list_remove(tl, ed);
|
||||||
if (!ed->var_pool) continue;
|
if (!ed->var_pool) continue;
|
||||||
tl2 = NULL;
|
tl2 = NULL;
|
||||||
for (l = ed->var_pool->animators; l; l = l->next)
|
EINA_LIST_FOREACH(ed->var_pool->animators, l, tmp)
|
||||||
tl2 = evas_list_append(tl2, l->data);
|
tl2 = eina_list_append(tl2, tmp);
|
||||||
ed->var_pool->walking_list++;
|
ed->var_pool->walking_list++;
|
||||||
while (tl2)
|
while (tl2)
|
||||||
{
|
{
|
||||||
Edje_Var_Animator *ea;
|
Edje_Var_Animator *ea;
|
||||||
|
|
||||||
ea = tl2->data;
|
ea = eina_list_data_get(tl2);
|
||||||
if ((ed->var_pool) && (!ea->delete_me))
|
if ((ed->var_pool) && (!ea->delete_me))
|
||||||
{
|
{
|
||||||
if ((!ed->paused) && (!ed->delete_me))
|
if ((!ed->paused) && (!ed->delete_me))
|
||||||
|
@ -99,30 +101,27 @@ _edje_var_anim_cb(void *data)
|
||||||
if (v == 1.0) ea->delete_me = 1;
|
if (v == 1.0) ea->delete_me = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tl2 = evas_list_remove(tl2, ea);
|
tl2 = eina_list_remove(tl2, ea);
|
||||||
if (ed->block_break)
|
if (ed->block_break)
|
||||||
{
|
{
|
||||||
evas_list_free(tl2);
|
eina_list_free(tl2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ed->var_pool->walking_list--;
|
ed->var_pool->walking_list--;
|
||||||
for (l = ed->var_pool->animators; l;)
|
EINA_LIST_FOREACH(ed->var_pool->animators, l, ea)
|
||||||
{
|
{
|
||||||
Edje_Var_Animator *ea;
|
|
||||||
|
|
||||||
ea = l->data;
|
|
||||||
if (ea->delete_me)
|
if (ea->delete_me)
|
||||||
{
|
{
|
||||||
l = l->next;
|
l = eina_list_next(l);
|
||||||
ed->var_pool->animators = evas_list_remove(ed->var_pool->animators, ea);
|
ed->var_pool->animators = eina_list_remove(ed->var_pool->animators, ea);
|
||||||
free(ea);
|
free(ea);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
l = l->next;
|
l = eina_list_next(l);
|
||||||
}
|
}
|
||||||
if (!ed->var_pool->animators)
|
if (!ed->var_pool->animators)
|
||||||
_edje_anim_list = evas_list_remove(_edje_anim_list, ed);
|
_edje_anim_list = eina_list_remove(_edje_anim_list, ed);
|
||||||
_edje_unblock(ed);
|
_edje_unblock(ed);
|
||||||
_edje_thaw(ed);
|
_edje_thaw(ed);
|
||||||
_edje_unref(ed);
|
_edje_unref(ed);
|
||||||
|
@ -195,8 +194,8 @@ _edje_var_shutdown(Edje *ed)
|
||||||
{
|
{
|
||||||
while (ed->var_pool->vars[i].data.l.v)
|
while (ed->var_pool->vars[i].data.l.v)
|
||||||
{
|
{
|
||||||
_edje_var_free(ed->var_pool->vars[i].data.l.v->data);
|
_edje_var_free(eina_list_data_get(ed->var_pool->vars[i].data.l.v));
|
||||||
ed->var_pool->vars[i].data.l.v = evas_list_remove_list(ed->var_pool->vars[i].data.l.v, ed->var_pool->vars[i].data.l.v);
|
ed->var_pool->vars[i].data.l.v = eina_list_remove_list(ed->var_pool->vars[i].data.l.v, ed->var_pool->vars[i].data.l.v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,14 +205,14 @@ _edje_var_shutdown(Edje *ed)
|
||||||
{
|
{
|
||||||
Edje_Var_Timer *et;
|
Edje_Var_Timer *et;
|
||||||
|
|
||||||
et = ed->var_pool->timers->data;
|
et = eina_list_data_get(ed->var_pool->timers);
|
||||||
ecore_timer_del(et->timer);
|
ecore_timer_del(et->timer);
|
||||||
free(et);
|
free(et);
|
||||||
ed->var_pool->timers = evas_list_remove(ed->var_pool->timers, et);
|
ed->var_pool->timers = eina_list_remove(ed->var_pool->timers, et);
|
||||||
}
|
}
|
||||||
if (ed->var_pool->animators)
|
if (ed->var_pool->animators)
|
||||||
{
|
{
|
||||||
_edje_anim_list = evas_list_remove(_edje_anim_list, ed);
|
_edje_anim_list = eina_list_remove(_edje_anim_list, ed);
|
||||||
if (!_edje_anim_list)
|
if (!_edje_anim_list)
|
||||||
{
|
{
|
||||||
if (_edje_animator)
|
if (_edje_animator)
|
||||||
|
@ -227,9 +226,9 @@ _edje_var_shutdown(Edje *ed)
|
||||||
{
|
{
|
||||||
Edje_Var_Animator *ea;
|
Edje_Var_Animator *ea;
|
||||||
|
|
||||||
ea = ed->var_pool->animators->data;
|
ea = eina_list_data_get(ed->var_pool->animators);
|
||||||
free(ea);
|
free(ea);
|
||||||
ed->var_pool->animators = evas_list_remove(ed->var_pool->animators, ea);
|
ed->var_pool->animators = eina_list_remove(ed->var_pool->animators, ea);
|
||||||
}
|
}
|
||||||
free(ed->var_pool);
|
free(ed->var_pool);
|
||||||
ed->var_pool = NULL;
|
ed->var_pool = NULL;
|
||||||
|
@ -532,7 +531,7 @@ _edje_var_list_var_append(Edje *ed, int id, Edje_Var *var)
|
||||||
id -= EDJE_VAR_MAGIC_BASE;
|
id -= EDJE_VAR_MAGIC_BASE;
|
||||||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||||
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||||
ed->var_pool->vars[id].data.l.v = evas_list_append(ed->var_pool->vars[id].data.l.v, var);
|
ed->var_pool->vars[id].data.l.v = eina_list_append(ed->var_pool->vars[id].data.l.v, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -543,7 +542,7 @@ _edje_var_list_var_prepend(Edje *ed, int id, Edje_Var *var)
|
||||||
id -= EDJE_VAR_MAGIC_BASE;
|
id -= EDJE_VAR_MAGIC_BASE;
|
||||||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||||
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||||
ed->var_pool->vars[id].data.l.v = evas_list_prepend(ed->var_pool->vars[id].data.l.v, var);
|
ed->var_pool->vars[id].data.l.v = eina_list_prepend(ed->var_pool->vars[id].data.l.v, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -554,7 +553,7 @@ _edje_var_list_var_append_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *re
|
||||||
id -= EDJE_VAR_MAGIC_BASE;
|
id -= EDJE_VAR_MAGIC_BASE;
|
||||||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||||
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||||
ed->var_pool->vars[id].data.l.v = evas_list_append_relative(ed->var_pool->vars[id].data.l.v, var, relative);
|
ed->var_pool->vars[id].data.l.v = eina_list_append_relative(ed->var_pool->vars[id].data.l.v, var, relative);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -565,7 +564,7 @@ _edje_var_list_var_prepend_relative(Edje *ed, int id, Edje_Var *var, Edje_Var *r
|
||||||
id -= EDJE_VAR_MAGIC_BASE;
|
id -= EDJE_VAR_MAGIC_BASE;
|
||||||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||||
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||||
ed->var_pool->vars[id].data.l.v = evas_list_prepend_relative(ed->var_pool->vars[id].data.l.v, var, relative);
|
ed->var_pool->vars[id].data.l.v = eina_list_prepend_relative(ed->var_pool->vars[id].data.l.v, var, relative);
|
||||||
}
|
}
|
||||||
|
|
||||||
Edje_Var *
|
Edje_Var *
|
||||||
|
@ -576,7 +575,7 @@ _edje_var_list_nth(Edje *ed, int id, int n)
|
||||||
id -= EDJE_VAR_MAGIC_BASE;
|
id -= EDJE_VAR_MAGIC_BASE;
|
||||||
if ((id < 0) || (id >= ed->var_pool->size)) return NULL;
|
if ((id < 0) || (id >= ed->var_pool->size)) return NULL;
|
||||||
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return NULL;
|
if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return NULL;
|
||||||
return evas_list_nth(ed->var_pool->vars[id].data.l.v, n);
|
return eina_list_nth(ed->var_pool->vars[id].data.l.v, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -589,7 +588,7 @@ _edje_var_list_count_get(Edje *ed, int id)
|
||||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return 0;
|
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return 0;
|
||||||
return evas_list_count(ed->var_pool->vars[id].data.l.v);
|
return eina_list_count(ed->var_pool->vars[id].data.l.v);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -603,13 +602,13 @@ _edje_var_list_remove_nth(Edje *ed, int id, int n)
|
||||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||||
{
|
{
|
||||||
Evas_List *nth;
|
Eina_List *nth;
|
||||||
|
|
||||||
nth = evas_list_nth_list(ed->var_pool->vars[id].data.l.v, n);
|
nth = eina_list_nth_list(ed->var_pool->vars[id].data.l.v, n);
|
||||||
if (nth)
|
if (nth)
|
||||||
{
|
{
|
||||||
_edje_var_free(nth->data);
|
_edje_var_free(eina_list_data_get(nth));
|
||||||
ed->var_pool->vars[id].data.l.v = evas_list_remove_list(ed->var_pool->vars[id].data.l.v, nth);
|
ed->var_pool->vars[id].data.l.v = eina_list_remove_list(ed->var_pool->vars[id].data.l.v, nth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -956,23 +955,20 @@ _edje_var_timer_add(Edje *ed, double in, const char *fname, int val)
|
||||||
free(et);
|
free(et);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ed->var_pool->timers = evas_list_prepend(ed->var_pool->timers, et);
|
ed->var_pool->timers = eina_list_prepend(ed->var_pool->timers, et);
|
||||||
return et->id;
|
return et->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Edje_Var_Timer *
|
static Edje_Var_Timer *
|
||||||
_edje_var_timer_find(Edje *ed, int id)
|
_edje_var_timer_find(Edje *ed, int id)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Var_Timer *et;
|
||||||
|
|
||||||
if (!ed->var_pool) return NULL;
|
if (!ed->var_pool) return NULL;
|
||||||
|
|
||||||
for (l = ed->var_pool->timers; l; l = l->next)
|
EINA_LIST_FOREACH(ed->var_pool->timers, l, et)
|
||||||
{
|
if (et->id == id) return et;
|
||||||
Edje_Var_Timer *et = l->data;
|
|
||||||
|
|
||||||
if (et->id == id) return et;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -985,7 +981,7 @@ _edje_var_timer_del(Edje *ed, int id)
|
||||||
et = _edje_var_timer_find(ed, id);
|
et = _edje_var_timer_find(ed, id);
|
||||||
if (!et) return;
|
if (!et) return;
|
||||||
|
|
||||||
ed->var_pool->timers = evas_list_remove(ed->var_pool->timers, et);
|
ed->var_pool->timers = eina_list_remove(ed->var_pool->timers, et);
|
||||||
ecore_timer_del(et->timer);
|
ecore_timer_del(et->timer);
|
||||||
free(et);
|
free(et);
|
||||||
}
|
}
|
||||||
|
@ -1008,8 +1004,8 @@ _edje_var_anim_add(Edje *ed, double len, const char *fname, int val)
|
||||||
ea->edje = ed;
|
ea->edje = ed;
|
||||||
ea->func = fn;
|
ea->func = fn;
|
||||||
ea->val = val;
|
ea->val = val;
|
||||||
_edje_anim_list = evas_list_append(_edje_anim_list, ed);
|
_edje_anim_list = eina_list_append(_edje_anim_list, ed);
|
||||||
ed->var_pool->animators = evas_list_prepend(ed->var_pool->animators, ea);
|
ed->var_pool->animators = eina_list_prepend(ed->var_pool->animators, ea);
|
||||||
if (!_edje_animator)
|
if (!_edje_animator)
|
||||||
_edje_animator = ecore_animator_add(_edje_var_anim_cb, NULL);
|
_edje_animator = ecore_animator_add(_edje_var_anim_cb, NULL);
|
||||||
return ea->id;
|
return ea->id;
|
||||||
|
@ -1018,16 +1014,13 @@ _edje_var_anim_add(Edje *ed, double len, const char *fname, int val)
|
||||||
static Edje_Var_Animator *
|
static Edje_Var_Animator *
|
||||||
_edje_var_anim_find(Edje *ed, int id)
|
_edje_var_anim_find(Edje *ed, int id)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Eina_List *l;
|
||||||
|
Edje_Var_Animator *ea;
|
||||||
|
|
||||||
if (!ed->var_pool) return NULL;
|
if (!ed->var_pool) return NULL;
|
||||||
|
|
||||||
for (l = ed->var_pool->animators; l; l = l->next)
|
EINA_LIST_FOREACH(ed->var_pool->animators, l, ea)
|
||||||
{
|
if (ea->id == id) return ea;
|
||||||
Edje_Var_Animator *ea = l->data;
|
|
||||||
|
|
||||||
if (ea->id == id) return ea;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1046,12 +1039,12 @@ _edje_var_anim_del(Edje *ed, int id)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ed->var_pool->animators = evas_list_remove(ed->var_pool->animators, ea);
|
ed->var_pool->animators = eina_list_remove(ed->var_pool->animators, ea);
|
||||||
free(ea);
|
free(ea);
|
||||||
|
|
||||||
if (ed->var_pool->animators) return;
|
if (ed->var_pool->animators) return;
|
||||||
|
|
||||||
_edje_anim_list = evas_list_remove(_edje_anim_list, ed);
|
_edje_anim_list = eina_list_remove(_edje_anim_list, ed);
|
||||||
if (!_edje_anim_list)
|
if (!_edje_anim_list)
|
||||||
{
|
{
|
||||||
if (_edje_animator)
|
if (_edje_animator)
|
||||||
|
|
Loading…
Reference in New Issue