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);
|
||||
|
||||
Evas_List *img_dirs = NULL;
|
||||
Evas_List *fnt_dirs = NULL;
|
||||
Evas_List *defines = NULL;
|
||||
Eina_List *img_dirs = NULL;
|
||||
Eina_List *fnt_dirs = NULL;
|
||||
Eina_List *defines = NULL;
|
||||
char *file_in = NULL;
|
||||
char *file_out = 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)))
|
||||
{
|
||||
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)))
|
||||
{
|
||||
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)))
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
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)))
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ struct _New_Statement_Handler
|
|||
|
||||
struct _Font_List
|
||||
{
|
||||
Evas_List *list;
|
||||
Eina_List *list;
|
||||
};
|
||||
|
||||
struct _Font
|
||||
|
@ -49,7 +49,7 @@ struct _Code
|
|||
{
|
||||
int l1, l2;
|
||||
char *shared;
|
||||
Evas_List *programs;
|
||||
Eina_List *programs;
|
||||
};
|
||||
|
||||
struct _Code_Program
|
||||
|
@ -67,7 +67,7 @@ struct _SrcFile
|
|||
|
||||
struct _SrcFile_List
|
||||
{
|
||||
Evas_List *list;
|
||||
Eina_List *list;
|
||||
};
|
||||
|
||||
/* global fn calls */
|
||||
|
@ -112,7 +112,7 @@ void source_edd(void);
|
|||
void source_fetch(void);
|
||||
int source_append(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);
|
||||
|
||||
void *mem_alloc(size_t size);
|
||||
|
@ -120,8 +120,8 @@ char *mem_strdup(const char *s);
|
|||
#define SZ sizeof
|
||||
|
||||
/* global vars */
|
||||
extern Evas_List *img_dirs;
|
||||
extern Evas_List *fnt_dirs;
|
||||
extern Eina_List *img_dirs;
|
||||
extern Eina_List *fnt_dirs;
|
||||
extern char *file_in;
|
||||
extern char *file_out;
|
||||
extern char *progname;
|
||||
|
@ -132,14 +132,14 @@ extern int no_raw;
|
|||
extern int min_quality;
|
||||
extern int max_quality;
|
||||
extern int line;
|
||||
extern Evas_List *stack;
|
||||
extern Evas_List *params;
|
||||
extern Eina_List *stack;
|
||||
extern Eina_List *params;
|
||||
extern Edje_File *edje_file;
|
||||
extern Evas_List *edje_collections;
|
||||
extern Evas_List *fonts;
|
||||
extern Evas_List *codes;
|
||||
extern Evas_List *defines;
|
||||
extern Evas_List *aliases;
|
||||
extern Eina_List *edje_collections;
|
||||
extern Eina_List *fonts;
|
||||
extern Eina_List *codes;
|
||||
extern Eina_List *defines;
|
||||
extern Eina_List *aliases;
|
||||
extern New_Object_Handler object_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));
|
||||
|
||||
Edje_File *edje_file = NULL;
|
||||
Evas_List *edje_collections = NULL;
|
||||
Evas_List *fonts = NULL;
|
||||
Evas_List *codes = NULL;
|
||||
Evas_List *code_lookups = NULL;
|
||||
Evas_List *aliases = NULL;
|
||||
Eina_List *edje_collections = NULL;
|
||||
Eina_List *fonts = NULL;
|
||||
Eina_List *codes = NULL;
|
||||
Eina_List *code_lookups = NULL;
|
||||
Eina_List *aliases = NULL;
|
||||
|
||||
static Eet_Data_Descriptor *edd_edje_file = 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_spectrum_color = NULL;
|
||||
|
||||
static Evas_List *part_lookups = NULL;
|
||||
static Evas_List *program_lookups = NULL;
|
||||
static Evas_List *group_lookups = NULL;
|
||||
static Evas_List *image_lookups = NULL;
|
||||
static Evas_List *spectrum_lookups = NULL;
|
||||
static Evas_List *part_slave_lookups = NULL;
|
||||
static Evas_List *image_slave_lookups= NULL;
|
||||
static Evas_List *spectrum_slave_lookups= NULL;
|
||||
static Eina_List *part_lookups = NULL;
|
||||
static Eina_List *program_lookups = NULL;
|
||||
static Eina_List *group_lookups = NULL;
|
||||
static Eina_List *image_lookups = NULL;
|
||||
static Eina_List *spectrum_lookups = NULL;
|
||||
static Eina_List *part_slave_lookups = NULL;
|
||||
static Eina_List *image_slave_lookups= NULL;
|
||||
static Eina_List *spectrum_slave_lookups= NULL;
|
||||
|
||||
#define ABORT_WRITE(eet_file, file) \
|
||||
eet_close(eet_file); \
|
||||
|
@ -124,7 +124,8 @@ static void
|
|||
check_image_part_desc (Edje_Part_Collection *pc, Edje_Part *ep,
|
||||
Edje_Part_Description *epd, Eet_File *ef)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Part_Image_Id *iid;
|
||||
|
||||
return;
|
||||
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",
|
||||
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)
|
||||
error_and_abort(ef, "Collection %i: tween image id missing for "
|
||||
"part \"%s\", description \"%s\" %f\n",
|
||||
|
@ -147,7 +146,8 @@ static void
|
|||
check_part (Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
|
||||
{
|
||||
Edje_Part_Description *epd = ep->default_desc;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Part_Description *data;
|
||||
|
||||
if (!epd)
|
||||
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);
|
||||
|
||||
for (l = ep->other_desc; l; l = l->next)
|
||||
check_image_part_desc (pc, ep, l->data, ef);
|
||||
EINA_LIST_FOREACH(ep->other_desc, l, data)
|
||||
check_image_part_desc (pc, ep, data, ef);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,8 +204,8 @@ data_write_header(Eet_File *ef)
|
|||
/* copy aliases into collection directory */
|
||||
while (aliases)
|
||||
{
|
||||
edje_file->collection_dir->entries = evas_list_append(edje_file->collection_dir->entries, aliases->data);
|
||||
aliases = evas_list_remove_list(aliases, aliases);
|
||||
edje_file->collection_dir->entries = eina_list_append(edje_file->collection_dir->entries, eina_list_data_get(aliases));
|
||||
aliases = eina_list_remove_list(aliases, aliases);
|
||||
}
|
||||
}
|
||||
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
|
||||
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 total_bytes = 0;
|
||||
|
||||
for (l = fonts; l; l = l->next)
|
||||
{
|
||||
Font *fn;
|
||||
|
||||
EINA_LIST_FOREACH(fonts, l, fn)
|
||||
{
|
||||
void *fdata = NULL;
|
||||
int fsize = 0;
|
||||
Evas_List *ll;
|
||||
Eina_List *ll;
|
||||
FILE *f;
|
||||
|
||||
fn = l->data;
|
||||
f = fopen(fn->file, "rb");
|
||||
if (f)
|
||||
{
|
||||
|
@ -259,11 +258,13 @@ data_write_fonts(Eet_File *ef, int *font_num, int *input_bytes, int *input_raw_b
|
|||
}
|
||||
else
|
||||
{
|
||||
for (ll = fnt_dirs; ll; ll = ll->next)
|
||||
char *data;
|
||||
|
||||
EINA_LIST_FOREACH(fnt_dirs, ll, data)
|
||||
{
|
||||
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");
|
||||
if (f)
|
||||
{
|
||||
|
@ -322,7 +323,7 @@ data_write_fonts(Eet_File *ef, int *font_num, int *input_bytes, int *input_raw_b
|
|||
static int
|
||||
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 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;
|
||||
Evas *evas;
|
||||
Edje_Image_Directory_Entry *img;
|
||||
|
||||
ecore_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");
|
||||
|
||||
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)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Object *im;
|
||||
Evas_List *ll;
|
||||
Eina_List *ll;
|
||||
char *data;
|
||||
|
||||
im = NULL;
|
||||
for (ll = img_dirs; ll; ll = ll->next)
|
||||
EINA_LIST_FOREACH(img_dirs, ll, data)
|
||||
{
|
||||
char buf[4096];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/%s",
|
||||
(char *)(ll->data), img->entry);
|
||||
data, img->entry);
|
||||
im = evas_object_image_add(evas);
|
||||
if (im)
|
||||
{
|
||||
|
@ -501,70 +501,64 @@ data_write_images(Eet_File *ef, int *image_num, int *input_bytes, int *input_raw
|
|||
static void
|
||||
check_groups_names(Eet_File *ef)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Part_Collection_Directory_Entry *de;
|
||||
|
||||
if (!edje_file->collection_dir)
|
||||
return;
|
||||
|
||||
/* check that all groups have names */
|
||||
for (l = edje_file->collection_dir->entries; l; l = l->next)
|
||||
{
|
||||
Edje_Part_Collection_Directory_Entry *de;
|
||||
de = l->data;
|
||||
EINA_LIST_FOREACH(edje_file->collection_dir->entries, l, de)
|
||||
if (!de->entry)
|
||||
error_and_abort(ef, "Collection %i: name missing.\n", de->id);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
check_spectra(Eet_File *ef)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Spectrum_Directory_Entry *se;
|
||||
|
||||
if (!edje_file->spectrum_dir)
|
||||
return;
|
||||
|
||||
/* check that all spectra are valid */
|
||||
for (l = edje_file->spectrum_dir->entries; l; l = l->next)
|
||||
{
|
||||
Edje_Spectrum_Directory_Entry *se;
|
||||
se = l->data;
|
||||
EINA_LIST_FOREACH(edje_file->spectrum_dir->entries, l, se)
|
||||
check_spectrum(se, ef);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
check_groups(Eet_File *ef)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Part_Collection *pc;
|
||||
|
||||
/* 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;
|
||||
Evas_List *ll;
|
||||
Eina_List *ll;
|
||||
Edje_Part *part;
|
||||
Edje_Program *prog;
|
||||
|
||||
pc = l->data;
|
||||
for (ll = pc->parts; ll; ll = ll->next)
|
||||
check_part(pc, ll->data, ef);
|
||||
for (ll = pc->programs; ll; ll = ll->next)
|
||||
check_program(pc, ll->data, ef);
|
||||
EINA_LIST_FOREACH(pc->parts, ll, part)
|
||||
check_part(pc, part, ef);
|
||||
EINA_LIST_FOREACH(pc->programs, ll, prog)
|
||||
check_program(pc, prog, ef);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
data_write_groups(Eet_File *ef, int *collection_num)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Part_Collection *pc;
|
||||
int 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];
|
||||
|
||||
pc = l->data;
|
||||
snprintf(buf, sizeof(buf), "collections/%i", pc->id);
|
||||
bytes = eet_data_write(ef, edd_edje_part_collection, buf, pc, 1);
|
||||
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 "
|
||||
"compilation.\n", filename);
|
||||
|
||||
Evas_List *ll;
|
||||
Eina_List *ll;
|
||||
Code_Program *cp;
|
||||
|
||||
fprintf(f, "#include <edje>\n");
|
||||
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;
|
||||
}
|
||||
for (ll = cd->programs; ll; ll = ll->next)
|
||||
EINA_LIST_FOREACH(cd->programs, ll, cp)
|
||||
{
|
||||
Code_Program *cp;
|
||||
|
||||
cp = ll->data;
|
||||
if (cp->script)
|
||||
{
|
||||
while (ln < (cp->l1 - 1))
|
||||
|
@ -713,7 +705,7 @@ compile_script_file(Eet_File *ef, const char *source, const char *output,
|
|||
static void
|
||||
data_write_scripts(Eet_File *ef)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
int i;
|
||||
|
||||
#ifdef HAVE_EVIL
|
||||
|
@ -722,10 +714,10 @@ data_write_scripts(Eet_File *ef)
|
|||
char *tmpdir = "/tmp";
|
||||
#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;
|
||||
Code *cd = l->data;
|
||||
Code *cd = eina_list_data_get(l);
|
||||
|
||||
if ((!cd->shared) && (!cd->programs))
|
||||
continue;
|
||||
|
@ -846,7 +838,7 @@ data_queue_group_lookup(char *name)
|
|||
Group_Lookup *gl;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -856,7 +848,7 @@ data_queue_part_lookup(Edje_Part_Collection *pc, char *name, int *dest)
|
|||
Part_Lookup *pl;
|
||||
|
||||
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->name = mem_strdup(name);
|
||||
pl->dest = dest;
|
||||
|
@ -868,7 +860,7 @@ data_queue_program_lookup(Edje_Part_Collection *pc, char *name, int *dest)
|
|||
Program_Lookup *pl;
|
||||
|
||||
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->name = mem_strdup(name);
|
||||
pl->dest = dest;
|
||||
|
@ -880,7 +872,7 @@ data_queue_image_lookup(char *name, int *dest)
|
|||
Image_Lookup *il;
|
||||
|
||||
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->dest = dest;
|
||||
}
|
||||
|
@ -891,7 +883,7 @@ data_queue_spectrum_lookup(char *name, int *dest)
|
|||
Spectrum_Lookup *sl;
|
||||
|
||||
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->dest = dest;
|
||||
}
|
||||
|
@ -902,7 +894,7 @@ data_queue_part_slave_lookup(int *master, int *slave)
|
|||
Slave_Lookup *sl;
|
||||
|
||||
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->slave = slave;
|
||||
}
|
||||
|
@ -913,7 +905,7 @@ data_queue_image_slave_lookup(int *master, int *slave)
|
|||
Slave_Lookup *sl;
|
||||
|
||||
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->slave = slave;
|
||||
}
|
||||
|
@ -924,41 +916,36 @@ data_queue_spectrum_slave_lookup(int *master, int *slave)
|
|||
Slave_Lookup *sl;
|
||||
|
||||
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->slave = slave;
|
||||
}
|
||||
|
||||
void
|
||||
handle_slave_lookup(Evas_List *list, int *master, int value)
|
||||
handle_slave_lookup(Eina_List *list, int *master, int value)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
Slave_Lookup *sl = l->data;
|
||||
Eina_List *l;
|
||||
Slave_Lookup *sl;
|
||||
|
||||
EINA_LIST_FOREACH(list, l, sl)
|
||||
if (sl->master == master)
|
||||
*sl->slave = value;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
data_process_lookups(void)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
|
||||
while (part_lookups)
|
||||
{
|
||||
Part_Lookup *pl;
|
||||
|
||||
pl = part_lookups->data;
|
||||
|
||||
for (l = pl->pc->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Part *ep;
|
||||
|
||||
ep = l->data;
|
||||
pl = eina_list_data_get(part_lookups);
|
||||
|
||||
EINA_LIST_FOREACH(pl->pc->parts, l, ep)
|
||||
{
|
||||
if ((ep->name) && (!strcmp(ep->name, pl->name)))
|
||||
{
|
||||
handle_slave_lookup(part_slave_lookups, pl->dest, ep->id);
|
||||
|
@ -972,7 +959,7 @@ data_process_lookups(void)
|
|||
progname, pl->name);
|
||||
exit(-1);
|
||||
}
|
||||
part_lookups = evas_list_remove(part_lookups, pl);
|
||||
part_lookups = eina_list_remove(part_lookups, pl);
|
||||
free(pl->name);
|
||||
free(pl);
|
||||
}
|
||||
|
@ -980,14 +967,12 @@ data_process_lookups(void)
|
|||
while (program_lookups)
|
||||
{
|
||||
Program_Lookup *pl;
|
||||
|
||||
pl = program_lookups->data;
|
||||
|
||||
for (l = pl->pc->programs; l; l = l->next)
|
||||
{
|
||||
Edje_Program *ep;
|
||||
|
||||
ep = l->data;
|
||||
pl = eina_list_data_get(program_lookups);
|
||||
|
||||
EINA_LIST_FOREACH(pl->pc->programs, l, ep)
|
||||
{
|
||||
if ((ep->name) && (!strcmp(ep->name, pl->name)))
|
||||
{
|
||||
*(pl->dest) = ep->id;
|
||||
|
@ -1000,7 +985,7 @@ data_process_lookups(void)
|
|||
progname, pl->name);
|
||||
exit(-1);
|
||||
}
|
||||
program_lookups = evas_list_remove(program_lookups, pl);
|
||||
program_lookups = eina_list_remove(program_lookups, pl);
|
||||
free(pl->name);
|
||||
free(pl);
|
||||
}
|
||||
|
@ -1008,12 +993,12 @@ data_process_lookups(void)
|
|||
while (group_lookups)
|
||||
{
|
||||
Group_Lookup *gl;
|
||||
|
||||
gl = group_lookups->data;
|
||||
for (l = edje_file->collection_dir->entries; l; l = l->next)
|
||||
{
|
||||
Edje_Part_Collection_Directory_Entry *de;
|
||||
de = l->data;
|
||||
|
||||
gl = eina_list_data_get(group_lookups);
|
||||
|
||||
EINA_LIST_FOREACH(edje_file->collection_dir->entries, l, de)
|
||||
{
|
||||
if (!strcmp(de->entry, gl->name))
|
||||
{
|
||||
break;
|
||||
|
@ -1025,7 +1010,7 @@ data_process_lookups(void)
|
|||
progname, gl->name);
|
||||
exit(-1);
|
||||
}
|
||||
group_lookups = evas_list_remove(group_lookups, gl);
|
||||
group_lookups = eina_list_remove(group_lookups, gl);
|
||||
free(gl->name);
|
||||
free(gl);
|
||||
}
|
||||
|
@ -1033,18 +1018,16 @@ data_process_lookups(void)
|
|||
while (image_lookups)
|
||||
{
|
||||
Image_Lookup *il;
|
||||
Edje_Image_Directory_Entry *de;
|
||||
|
||||
il = image_lookups->data;
|
||||
il = eina_list_data_get(image_lookups);
|
||||
|
||||
if (!edje_file->image_dir)
|
||||
l = NULL;
|
||||
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)))
|
||||
{
|
||||
handle_slave_lookup(image_slave_lookups, il->dest, de->id);
|
||||
|
@ -1063,7 +1046,7 @@ data_process_lookups(void)
|
|||
progname, il->name);
|
||||
exit(-1);
|
||||
}
|
||||
image_lookups = evas_list_remove(image_lookups, il);
|
||||
image_lookups = eina_list_remove(image_lookups, il);
|
||||
free(il->name);
|
||||
free(il);
|
||||
}
|
||||
|
@ -1071,18 +1054,16 @@ data_process_lookups(void)
|
|||
while (spectrum_lookups)
|
||||
{
|
||||
Spectrum_Lookup *il;
|
||||
Edje_Spectrum_Directory_Entry *de;
|
||||
|
||||
il = spectrum_lookups->data;
|
||||
il = eina_list_data_get(spectrum_lookups);
|
||||
|
||||
if (!edje_file->spectrum_dir)
|
||||
l = NULL;
|
||||
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;
|
||||
if ((de->entry) && (!strcmp(de->entry, il->name)))
|
||||
{
|
||||
|
@ -1099,27 +1080,27 @@ data_process_lookups(void)
|
|||
progname, il->name);
|
||||
exit(-1);
|
||||
}
|
||||
spectrum_lookups = evas_list_remove(spectrum_lookups, il);
|
||||
spectrum_lookups = eina_list_remove(spectrum_lookups, il);
|
||||
free(il->name);
|
||||
free(il);
|
||||
}
|
||||
|
||||
while (part_slave_lookups)
|
||||
{
|
||||
free(part_slave_lookups->data);
|
||||
part_slave_lookups = evas_list_remove_list(part_slave_lookups, part_slave_lookups);
|
||||
free(eina_list_data_get(part_slave_lookups));
|
||||
part_slave_lookups = eina_list_remove_list(part_slave_lookups, part_slave_lookups);
|
||||
}
|
||||
|
||||
while (image_slave_lookups)
|
||||
{
|
||||
free(image_slave_lookups->data);
|
||||
image_slave_lookups = evas_list_remove_list(image_slave_lookups, image_slave_lookups);
|
||||
free(eina_list_data_get(image_slave_lookups));
|
||||
image_slave_lookups = eina_list_remove_list(image_slave_lookups, image_slave_lookups);
|
||||
}
|
||||
|
||||
while (spectrum_slave_lookups)
|
||||
{
|
||||
free(spectrum_slave_lookups->data);
|
||||
spectrum_slave_lookups = evas_list_remove_list(spectrum_slave_lookups, spectrum_slave_lookups);
|
||||
free(eina_list_data_get(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));
|
||||
|
||||
code_lookups = evas_list_append(code_lookups, cl);
|
||||
code_lookups = eina_list_append(code_lookups, cl);
|
||||
}
|
||||
static void
|
||||
_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));
|
||||
|
||||
code_lookups = evas_list_append(code_lookups, cl);
|
||||
code_lookups = eina_list_append(code_lookups, cl);
|
||||
}
|
||||
static void
|
||||
_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));
|
||||
|
||||
code_lookups = evas_list_append(code_lookups, cl);
|
||||
code_lookups = eina_list_append(code_lookups, cl);
|
||||
}
|
||||
|
||||
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;
|
||||
Edje_Part_Collection *pc;
|
||||
|
||||
cd = l->data;
|
||||
pc = l2->data;
|
||||
cd = eina_list_data_get(l);
|
||||
pc = eina_list_data_get(l2);
|
||||
if ((cd->shared) || (cd->programs))
|
||||
{
|
||||
Evas_List *ll;
|
||||
Eina_List *ll;
|
||||
Code_Program *cp;
|
||||
|
||||
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, "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)
|
||||
{
|
||||
data_process_string(pc, "PART", cp->script, _data_queue_part_lookup);
|
||||
|
@ -1319,15 +1298,14 @@ data_process_scripts(void)
|
|||
void
|
||||
data_process_script_lookups(void)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
for (l = code_lookups; l; l = l->next)
|
||||
{
|
||||
Eina_List *l;
|
||||
Code_Lookup *cl;
|
||||
|
||||
EINA_LIST_FOREACH(code_lookups, l, cl)
|
||||
{
|
||||
char buf[256];
|
||||
int i, n;
|
||||
|
||||
cl = l->data;
|
||||
snprintf(buf, sizeof(buf), "%i", cl->val);
|
||||
n = strlen(buf);
|
||||
if (n > cl->len)
|
||||
|
|
|
@ -39,8 +39,8 @@ static int strstrip(const char *in, char *out, size_t size);
|
|||
|
||||
|
||||
int line = 0;
|
||||
Evas_List *stack = NULL;
|
||||
Evas_List *params = NULL;
|
||||
Eina_List *stack = NULL;
|
||||
Eina_List *params = NULL;
|
||||
|
||||
static char file_buf[4096];
|
||||
static int verbatim = 0;
|
||||
|
@ -83,7 +83,7 @@ new_object(void)
|
|||
{
|
||||
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
|
||||
progname, file_in, line - 1,
|
||||
(char *)evas_list_data(evas_list_last(stack)));
|
||||
(char *)eina_list_data_get(eina_list_last(stack)));
|
||||
exit(-1);
|
||||
}
|
||||
free(id);
|
||||
|
@ -113,7 +113,7 @@ new_statement(void)
|
|||
{
|
||||
fprintf(stderr, "%s: Error. %s:%i unhandled keyword %s\n",
|
||||
progname, file_in, line - 1,
|
||||
(char *)evas_list_data(evas_list_last(stack)));
|
||||
(char *)eina_list_data_get(eina_list_last(stack)));
|
||||
exit(-1);
|
||||
}
|
||||
free(id);
|
||||
|
@ -362,17 +362,18 @@ stack_id(void)
|
|||
{
|
||||
char *id;
|
||||
int len;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
char *data;
|
||||
|
||||
len = 0;
|
||||
for (l = stack; l; l = l->next)
|
||||
len += strlen(l->data) + 1;
|
||||
EINA_LIST_FOREACH(stack, l, data)
|
||||
len += strlen(data) + 1;
|
||||
id = mem_alloc(len);
|
||||
id[0] = 0;
|
||||
for (l = stack; l; l = l->next)
|
||||
EINA_LIST_FOREACH(stack, l, data)
|
||||
{
|
||||
strcat(id, l->data);
|
||||
if (l->next) strcat(id, ".");
|
||||
strcat(id, data);
|
||||
if (eina_list_next(l)) strcat(id, ".");
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
@ -383,11 +384,11 @@ stack_chop_top(void)
|
|||
char *top;
|
||||
|
||||
/* remove top from stack */
|
||||
top = evas_list_data(evas_list_last(stack));
|
||||
top = eina_list_data_get(eina_list_last(stack));
|
||||
if (top)
|
||||
{
|
||||
free(top);
|
||||
stack = evas_list_remove(stack, top);
|
||||
stack = eina_list_remove(stack, top);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -446,8 +447,8 @@ parse(char *data, off_t size)
|
|||
/* clear out params */
|
||||
while (params)
|
||||
{
|
||||
free(params->data);
|
||||
params = evas_list_remove(params, params->data);
|
||||
free(eina_list_data_get(params));
|
||||
params = eina_list_remove(params, eina_list_data_get(params));
|
||||
}
|
||||
/* remove top from stack */
|
||||
stack_chop_top();
|
||||
|
@ -467,10 +468,10 @@ parse(char *data, off_t size)
|
|||
else
|
||||
{
|
||||
if (do_params)
|
||||
params = evas_list_append(params, token);
|
||||
params = eina_list_append(params, token);
|
||||
else
|
||||
{
|
||||
stack = evas_list_append(stack, token);
|
||||
stack = eina_list_append(stack, token);
|
||||
new_object();
|
||||
if ((verbatim == 1) && (p < (end - 2)))
|
||||
{
|
||||
|
@ -638,19 +639,18 @@ compile(void)
|
|||
def = mem_strdup("");
|
||||
else
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
int len;
|
||||
char *data;
|
||||
|
||||
len = 0;
|
||||
for (l = defines; l; l = l->next)
|
||||
{
|
||||
len += strlen(l->data) + 1;
|
||||
}
|
||||
EINA_LIST_FOREACH(defines, l, data)
|
||||
len += strlen(data) + 1;
|
||||
def = mem_alloc(len + 1);
|
||||
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, " ");
|
||||
}
|
||||
}
|
||||
|
@ -726,7 +726,7 @@ is_param(int n)
|
|||
{
|
||||
char *str;
|
||||
|
||||
str = evas_list_nth(params, n);
|
||||
str = eina_list_nth(params, n);
|
||||
if (str) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ is_num(int n)
|
|||
long int ret;
|
||||
char *end;
|
||||
|
||||
str = evas_list_nth(params, n);
|
||||
str = eina_list_nth(params, n);
|
||||
if (!str)
|
||||
{
|
||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||
|
@ -758,7 +758,7 @@ parse_str(int n)
|
|||
char *str;
|
||||
char *s;
|
||||
|
||||
str = evas_list_nth(params, n);
|
||||
str = eina_list_nth(params, n);
|
||||
if (!str)
|
||||
{
|
||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||
|
@ -821,7 +821,7 @@ parse_enum(int n, ...)
|
|||
int result;
|
||||
va_list va;
|
||||
|
||||
str = evas_list_nth(params, n);
|
||||
str = eina_list_nth(params, n);
|
||||
if (!str)
|
||||
{
|
||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||
|
@ -839,13 +839,14 @@ parse_enum(int n, ...)
|
|||
int
|
||||
parse_flags(int n, ...)
|
||||
{
|
||||
Evas_List *lst;
|
||||
Eina_List *lst;
|
||||
int result = 0;
|
||||
va_list va;
|
||||
char *data;
|
||||
|
||||
va_start(va, n);
|
||||
for (lst = evas_list_nth_list(params, n); lst != NULL; lst = lst->next)
|
||||
result |= _parse_enum(lst->data, va);
|
||||
EINA_LIST_FOREACH(eina_list_nth_list(params, n), lst, data)
|
||||
result |= _parse_enum(data, va);
|
||||
va_end(va);
|
||||
|
||||
return result;
|
||||
|
@ -857,7 +858,7 @@ parse_int(int n)
|
|||
char *str;
|
||||
int i;
|
||||
|
||||
str = evas_list_nth(params, n);
|
||||
str = eina_list_nth(params, n);
|
||||
if (!str)
|
||||
{
|
||||
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;
|
||||
int i;
|
||||
|
||||
str = evas_list_nth(params, n);
|
||||
str = eina_list_nth(params, n);
|
||||
if (!str)
|
||||
{
|
||||
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];
|
||||
int i;
|
||||
|
||||
str = evas_list_nth(params, n);
|
||||
str = eina_list_nth(params, n);
|
||||
if (!str)
|
||||
{
|
||||
fprintf(stderr, "%s: Error. %s:%i no parameter supplied as argument %i\n",
|
||||
|
@ -933,7 +934,7 @@ parse_float(int n)
|
|||
char *str;
|
||||
double i;
|
||||
|
||||
str = evas_list_nth(params, n);
|
||||
str = eina_list_nth(params, n);
|
||||
if (!str)
|
||||
{
|
||||
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;
|
||||
double i;
|
||||
|
||||
str = evas_list_nth(params, n);
|
||||
str = eina_list_nth(params, n);
|
||||
if (!str)
|
||||
{
|
||||
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
|
||||
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)
|
||||
{
|
||||
|
@ -983,7 +984,7 @@ check_arg_count(int required_args)
|
|||
void
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -36,10 +36,10 @@ source_edd(void)
|
|||
eddc.func.mem_free = NULL;
|
||||
eddc.func.str_alloc = eina_stringshare_add;
|
||||
eddc.func.str_free = eina_stringshare_del;
|
||||
eddc.func.list_next = evas_list_next;
|
||||
eddc.func.list_append = evas_list_append;
|
||||
eddc.func.list_data = evas_list_data;
|
||||
eddc.func.list_free = evas_list_free;
|
||||
eddc.func.list_next = eina_list_next;
|
||||
eddc.func.list_append = eina_list_append;
|
||||
eddc.func.list_data = eina_list_data_get;
|
||||
eddc.func.list_free = eina_list_free;
|
||||
eddc.func.hash_foreach = evas_hash_foreach;
|
||||
eddc.func.hash_add = evas_hash_add;
|
||||
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);
|
||||
sf->file[sz] = '\0';
|
||||
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))
|
||||
{
|
||||
|
@ -244,7 +244,7 @@ source_load(Eet_File *ef)
|
|||
}
|
||||
|
||||
int
|
||||
source_fontmap_save(Eet_File *ef, Evas_List *fonts)
|
||||
source_fontmap_save(Eet_File *ef, Eina_List *fonts)
|
||||
{
|
||||
Font_List fl;
|
||||
|
||||
|
|
|
@ -94,9 +94,9 @@ decomp(void)
|
|||
eet_close(ef);
|
||||
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);
|
||||
return 0;
|
||||
}
|
||||
|
@ -124,8 +124,9 @@ decomp(void)
|
|||
void
|
||||
output(void)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Eet_File *ef;
|
||||
SrcFile *sf;
|
||||
char *outdir, *p;
|
||||
|
||||
p = strrchr(file_in, '/');
|
||||
|
@ -141,12 +142,11 @@ output(void)
|
|||
ef = eet_open(file_in, EET_FILE_MODE_READ);
|
||||
|
||||
if (edje_file->image_dir)
|
||||
{
|
||||
for (l = edje_file->image_dir->entries; l; l = l->next)
|
||||
{
|
||||
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) &&
|
||||
(ei->source_type < EDJE_IMAGE_SOURCE_TYPE_LAST) &&
|
||||
(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];
|
||||
FILE *f;
|
||||
char *pp;
|
||||
|
||||
sf = l->data;
|
||||
snprintf(out, sizeof(out), "%s/%s", outdir, sf->name);
|
||||
printf("Output Source File: %s\n", out);
|
||||
pp = strdup(out);
|
||||
|
@ -240,15 +238,15 @@ output(void)
|
|||
fclose(f);
|
||||
}
|
||||
if (fontlist)
|
||||
{
|
||||
for (l = fontlist->list; l; l = l->next)
|
||||
{
|
||||
Font *fn;
|
||||
|
||||
EINA_LIST_FOREACH(fontlist->list, l, fn)
|
||||
{
|
||||
void *font;
|
||||
int fontsize;
|
||||
char out[4096];
|
||||
|
||||
fn = l->data;
|
||||
snprintf(out, sizeof(out), "fonts/%s", fn->name);
|
||||
font = eet_read(ef, out, &fontsize);
|
||||
if (font)
|
||||
|
@ -283,7 +281,7 @@ output(void)
|
|||
{
|
||||
char out[4096];
|
||||
FILE *f;
|
||||
SrcFile *sf = srcfiles->list->data;
|
||||
SrcFile *sf = eina_list_data_get(srcfiles->list);
|
||||
|
||||
snprintf(out, sizeof(out), "%s/build.sh", outdir);
|
||||
printf("Output Build Script: %s\n", out);
|
||||
|
@ -337,7 +335,7 @@ compiler_cmd_is_sane()
|
|||
static int
|
||||
root_filename_is_sane()
|
||||
{
|
||||
SrcFile *sf = srcfiles->list->data;
|
||||
SrcFile *sf = eina_list_data_get(srcfiles->list);
|
||||
char *f = sf->name, *ptr;
|
||||
|
||||
if (!f || !*f)
|
||||
|
|
|
@ -17,7 +17,7 @@ struct _Font
|
|||
|
||||
struct _Font_List
|
||||
{
|
||||
Evas_List *list;
|
||||
Eina_List *list;
|
||||
};
|
||||
|
||||
struct _SrcFile
|
||||
|
@ -28,14 +28,14 @@ struct _SrcFile
|
|||
|
||||
struct _SrcFile_List
|
||||
{
|
||||
Evas_List *list;
|
||||
Eina_List *list;
|
||||
};
|
||||
|
||||
void source_edd(void);
|
||||
void source_fetch(void);
|
||||
int source_append(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);
|
||||
|
||||
void *mem_alloc(size_t size);
|
||||
|
|
|
@ -175,8 +175,8 @@ extern "C" {
|
|||
EAPI double edje_scale_get (void);
|
||||
|
||||
/* edje_load.c */
|
||||
EAPI Evas_List *edje_file_collection_list (const char *file);
|
||||
EAPI void edje_file_collection_list_free (Evas_List *lst);
|
||||
EAPI Eina_List *edje_file_collection_list (const char *file);
|
||||
EAPI void edje_file_collection_list_free (Eina_List *lst);
|
||||
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 void edje_file_cache_set (int count);
|
||||
|
@ -190,10 +190,10 @@ extern "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_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_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_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);
|
||||
|
@ -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_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 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_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
|
||||
* @code
|
||||
* Evas_List *parts, *l;
|
||||
* Eina_List *parts, *l;
|
||||
*
|
||||
* 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);
|
||||
* @endcode
|
||||
|
@ -93,10 +93,10 @@ extern "C" {
|
|||
* 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
|
||||
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.*/
|
||||
|
@ -233,7 +233,7 @@ edje_edit_group_max_h_set(
|
|||
*/ //@{
|
||||
|
||||
/** 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(
|
||||
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.
|
||||
* 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(
|
||||
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.
|
||||
* 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(
|
||||
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.*/
|
||||
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").
|
||||
* Use edje_edit_string_list_free() when you don't need it anymore. */
|
||||
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.
|
||||
* 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(
|
||||
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.
|
||||
* 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(
|
||||
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.
|
||||
* 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(
|
||||
Evas_Object *obj, ///< The edje object
|
||||
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.
|
||||
* 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(
|
||||
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.
|
||||
* @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.
|
||||
*/
|
||||
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(
|
||||
Evas_Object *obj ///< The edje object
|
||||
);
|
||||
|
@ -2027,7 +2027,7 @@ edje_edit_program_action_set(
|
|||
* Return a list of target name
|
||||
* 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(
|
||||
Evas_Object *obj, ///< The edje object
|
||||
const char *prog ///< The program name
|
||||
|
@ -2055,7 +2055,7 @@ edje_edit_program_targets_clear(
|
|||
* Return a list of program name.
|
||||
* 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(
|
||||
Evas_Object *obj, ///< The edje object
|
||||
const char *prog ///< The program name
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
static Evas_Hash *_edje_file_hash = NULL;
|
||||
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;
|
||||
|
||||
|
@ -14,16 +14,14 @@ static Edje_Part_Collection *
|
|||
_edje_file_coll_open(Edje_File *edf, const char *coll)
|
||||
{
|
||||
Edje_Part_Collection *edc = NULL;
|
||||
Evas_List *l = NULL;
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
Eina_List *l = NULL;
|
||||
int id = -1, size = 0;
|
||||
char buf[256];
|
||||
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)))
|
||||
{
|
||||
id = ce->id;
|
||||
|
@ -58,14 +56,14 @@ _edje_font_hash(Edje_File *edf)
|
|||
|
||||
if (edf->font_dir)
|
||||
{
|
||||
Evas_List *l;
|
||||
for (l = edf->font_dir->entries; l; l = evas_list_next(l))
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Font_Directory_Entry *fnt;
|
||||
|
||||
EINA_LIST_FOREACH(edf->font_dir->entries, l, fnt)
|
||||
{
|
||||
int length;
|
||||
char *tmp;
|
||||
|
||||
fnt = l->data;
|
||||
length = strlen(fnt->entry) + 7;
|
||||
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_Part_Collection *edc;
|
||||
Edje_Data *di;
|
||||
Eet_File *ef;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
struct stat st;
|
||||
|
||||
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);
|
||||
|
||||
for (l = edf->data; l; l = l->next)
|
||||
{
|
||||
Edje_Data *di = l->data;
|
||||
EINA_LIST_FOREACH(edf->data, l, di)
|
||||
edf->data_cache = evas_hash_add(edf->data_cache, eina_stringshare_add(di->key), di->value);
|
||||
}
|
||||
|
||||
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_File *edf;
|
||||
Evas_List *l, *hist;
|
||||
Eina_List *l, *hist;
|
||||
Edje_Part_Collection *edc;
|
||||
Edje_Part *ep;
|
||||
|
||||
edf = evas_hash_find(_edje_file_hash, file);
|
||||
if (edf)
|
||||
|
@ -170,13 +167,12 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
}
|
||||
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))
|
||||
{
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
@ -200,13 +196,12 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
}
|
||||
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))
|
||||
{
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
@ -222,29 +217,28 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
}
|
||||
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. */
|
||||
ep = l->data;
|
||||
hist = NULL;
|
||||
hist = evas_list_append(hist, ep);
|
||||
hist = eina_list_append(hist, ep);
|
||||
ep2 = ep;
|
||||
while (ep2->dragable.confine_id >= 0)
|
||||
{
|
||||
ep2 = evas_list_nth(edc->parts, ep2->dragable.confine_id);
|
||||
if (evas_list_find(hist, ep2))
|
||||
ep2 = eina_list_nth(edc->parts, ep2->dragable.confine_id);
|
||||
if (eina_list_data_find(hist, ep2))
|
||||
{
|
||||
printf("EDJE ERROR: confine_to loops. invalidating loop.\n");
|
||||
ep2->dragable.confine_id = -1;
|
||||
break;
|
||||
}
|
||||
hist = evas_list_append(hist, ep2);
|
||||
hist = eina_list_append(hist, ep2);
|
||||
}
|
||||
evas_list_free(hist);
|
||||
eina_list_free(hist);
|
||||
hist = NULL;
|
||||
hist = evas_list_append(hist, ep);
|
||||
hist = eina_list_append(hist, ep);
|
||||
ep2 = ep;
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
prev->dragable.events_id = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (evas_list_find(hist, ep2))
|
||||
if (eina_list_data_find(hist, ep2))
|
||||
{
|
||||
printf("EDJE ERROR: events_to loops. invalidating loop.\n");
|
||||
ep2->dragable.events_id = -1;
|
||||
break;
|
||||
}
|
||||
hist = evas_list_append(hist, ep2);
|
||||
hist = eina_list_append(hist, ep2);
|
||||
}
|
||||
evas_list_free(hist);
|
||||
eina_list_free(hist);
|
||||
hist = NULL;
|
||||
hist = evas_list_append(hist, ep);
|
||||
hist = eina_list_append(hist, ep);
|
||||
ep2 = ep;
|
||||
while (ep2->clip_to_id >= 0)
|
||||
{
|
||||
ep2 = evas_list_nth(edc->parts, ep2->clip_to_id);
|
||||
if (evas_list_find(hist, ep2))
|
||||
ep2 = eina_list_nth(edc->parts, ep2->clip_to_id);
|
||||
if (eina_list_data_find(hist, ep2))
|
||||
{
|
||||
printf("EDJE ERROR: clip_to loops. invalidating loop.\n");
|
||||
ep2->clip_to_id = -1;
|
||||
break;
|
||||
}
|
||||
hist = evas_list_append(hist, ep2);
|
||||
hist = eina_list_append(hist, ep2);
|
||||
}
|
||||
evas_list_free(hist);
|
||||
eina_list_free(hist);
|
||||
hist = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -297,15 +291,15 @@ _edje_cache_coll_clean(Edje_File *edf)
|
|||
{
|
||||
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))
|
||||
{
|
||||
Edje_Part_Collection *edc;
|
||||
|
||||
edc = evas_list_last(edf->collection_cache)->data;
|
||||
edf->collection_cache = evas_list_remove_list(edf->collection_cache, evas_list_last(edf->collection_cache));
|
||||
edc = eina_list_data_get(eina_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);
|
||||
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;
|
||||
|
||||
edc = evas_list_last(edf->collection_cache)->data;
|
||||
edf->collection_cache = evas_list_remove_list(edf->collection_cache, evas_list_last(edf->collection_cache));
|
||||
edc = eina_list_data_get(eina_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);
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +322,7 @@ _edje_cache_coll_unref(Edje_File *edf, Edje_Part_Collection *edc)
|
|||
edc->references--;
|
||||
if (edc->references != 0) return;
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -337,15 +331,15 @@ _edje_cache_file_clean(void)
|
|||
{
|
||||
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))
|
||||
{
|
||||
Edje_File *edf;
|
||||
|
||||
edf = evas_list_last(_edje_file_cache)->data;
|
||||
_edje_file_cache = evas_list_remove_list(_edje_file_cache, evas_list_last(_edje_file_cache));
|
||||
edf = eina_list_data_get(eina_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);
|
||||
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--;
|
||||
if (edf->references != 0) return;
|
||||
_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();
|
||||
}
|
||||
|
||||
|
@ -398,17 +392,13 @@ edje_file_cache_flush(void)
|
|||
EAPI void
|
||||
edje_collection_cache_set(int count)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_File *edf;
|
||||
|
||||
if (count < 0) count = 0;
|
||||
_edje_collection_cache_size = count;
|
||||
for (l = _edje_file_cache; l; l = l->next)
|
||||
{
|
||||
Edje_File *edf;
|
||||
|
||||
edf = l->data;
|
||||
EINA_LIST_FOREACH(_edje_file_cache, l, edf)
|
||||
_edje_cache_coll_clean(edf);
|
||||
}
|
||||
/* FIXME: freach in file hash too! */
|
||||
}
|
||||
|
||||
|
@ -422,17 +412,13 @@ EAPI void
|
|||
edje_collection_cache_flush(void)
|
||||
{
|
||||
int ps;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_File *edf;
|
||||
|
||||
ps = _edje_collection_cache_size;
|
||||
_edje_collection_cache_size = 0;
|
||||
for (l = _edje_file_cache; l; l = l->next)
|
||||
{
|
||||
Edje_File *edf;
|
||||
|
||||
edf = l->data;
|
||||
EINA_LIST_FOREACH(_edje_file_cache, l, edf)
|
||||
_edje_cache_coll_flush(edf);
|
||||
}
|
||||
/* FIXME: freach in file hash too! */
|
||||
_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_Description *ret = NULL;
|
||||
Evas_List *l;
|
||||
Edje_Part_Description *d;
|
||||
Eina_List *l;
|
||||
double min_dst = 999.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;
|
||||
min_dst = ABS(ep->default_desc->state.value - val);
|
||||
}
|
||||
|
||||
for (l = ep->other_desc; l; l = l->next)
|
||||
EINA_LIST_FOREACH(ep->other_desc, l, d)
|
||||
{
|
||||
Edje_Part_Description *d = l->data;
|
||||
|
||||
if (!strcmp(d->state.name, name))
|
||||
{
|
||||
double dst;
|
||||
|
@ -602,7 +600,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
const char *text = "";
|
||||
const char *style = "";
|
||||
Edje_Style *stl = NULL;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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,
|
||||
sc->g, sc->b, 255,
|
||||
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;
|
||||
|
||||
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) &&
|
||||
(ie->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) &&
|
||||
(ie->entry))
|
||||
|
@ -1217,7 +1214,7 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
{
|
||||
image_count = 2;
|
||||
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));
|
||||
if (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;
|
||||
|
||||
imid = evas_list_nth(ep->param2.description->image.tween_list,
|
||||
imid = eina_list_nth(ep->param2.description->image.tween_list,
|
||||
image_num - 1);
|
||||
if (imid) image_id = imid->id;
|
||||
}
|
||||
|
|
|
@ -334,61 +334,62 @@ int
|
|||
_edje_timer_cb(void *data)
|
||||
{
|
||||
double t;
|
||||
Evas_List *l;
|
||||
Evas_List *animl = NULL;
|
||||
Eina_List *l;
|
||||
Eina_List *animl = NULL;
|
||||
Edje *ed;
|
||||
|
||||
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);
|
||||
animl = evas_list_append(animl, l->data);
|
||||
animl = eina_list_append(animl, ed);
|
||||
}
|
||||
while (animl)
|
||||
{
|
||||
Evas_List *newl = NULL;
|
||||
Eina_List *newl = NULL;
|
||||
|
||||
ed = animl->data;
|
||||
ed = eina_list_data_get(animl);
|
||||
_edje_block(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))
|
||||
{
|
||||
const void *tmp;
|
||||
|
||||
ed->walking_actions = 1;
|
||||
for (l = ed->actions; l; l = l->next)
|
||||
newl = evas_list_append(newl, l->data);
|
||||
EINA_LIST_FOREACH(ed->actions, l, tmp)
|
||||
newl = eina_list_append(newl, tmp);
|
||||
while (newl)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
runp = newl->data;
|
||||
newl = evas_list_remove(newl, newl->data);
|
||||
runp = eina_list_data_get(newl);
|
||||
newl = eina_list_remove(newl, eina_list_data_get(newl));
|
||||
if (!runp->delete_me)
|
||||
_edje_program_run_iterate(runp, t);
|
||||
if (_edje_block_break(ed))
|
||||
{
|
||||
evas_list_free(newl);
|
||||
eina_list_free(newl);
|
||||
newl = NULL;
|
||||
goto break_prog;
|
||||
}
|
||||
}
|
||||
for (l = ed->actions; l; l = l->next)
|
||||
newl = evas_list_append(newl, l->data);
|
||||
EINA_LIST_FOREACH(ed->actions, l, tmp)
|
||||
newl = eina_list_append(newl, tmp);
|
||||
while (newl)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
runp = newl->data;
|
||||
newl = evas_list_remove(newl, newl->data);
|
||||
runp = eina_list_data_get(newl);
|
||||
newl = eina_list_remove(newl, eina_list_data_get(newl));
|
||||
if (runp->delete_me)
|
||||
{
|
||||
_edje_anim_count--;
|
||||
runp->edje->actions =
|
||||
evas_list_remove(runp->edje->actions, runp);
|
||||
eina_list_remove(runp->edje->actions, runp);
|
||||
if (!runp->edje->actions)
|
||||
_edje_animators =
|
||||
evas_list_remove(_edje_animators, runp->edje);
|
||||
eina_list_remove(_edje_animators, runp->edje);
|
||||
free(runp);
|
||||
}
|
||||
}
|
||||
|
@ -411,7 +412,7 @@ _edje_pending_timer_cb(void *data)
|
|||
Edje_Pending_Program *pp;
|
||||
|
||||
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, "", "");
|
||||
free(pp);
|
||||
return 0;
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
static void
|
||||
_edje_container_relayout(Smart_Data *sd)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Evas_Coord x, y, w, h, sw;
|
||||
Edje_Item *ei;
|
||||
|
||||
if (sd->freeze > 0) return;
|
||||
if (!sd->need_layout) return;
|
||||
|
@ -25,11 +26,8 @@ _edje_container_relayout(Smart_Data *sd)
|
|||
w = 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;
|
||||
|
||||
ei->y = y;
|
||||
|
@ -44,7 +42,8 @@ _edje_container_relayout(Smart_Data *sd)
|
|||
static void
|
||||
_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 i;
|
||||
|
||||
|
@ -80,11 +79,8 @@ _edje_container_recalc(Smart_Data *sd)
|
|||
else if ((sd->max_w >= 0) && (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)
|
||||
sd->min_row_h = ei->minh;
|
||||
if (sd->max_row_h >= 0)
|
||||
|
@ -115,7 +111,7 @@ _edje_container_recalc(Smart_Data *sd)
|
|||
}
|
||||
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;
|
||||
|
@ -451,10 +447,10 @@ edje_container_item_append(Evas_Object *obj, Edje_Item *ei)
|
|||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
sd->children = evas_list_append(sd->children, ei);
|
||||
sd->children = eina_list_append(sd->children, ei);
|
||||
sd->changed = 1;
|
||||
sd->change_child_list = 1;
|
||||
sd->rows = evas_list_count(sd->children);
|
||||
sd->rows = eina_list_count(sd->children);
|
||||
_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);
|
||||
if (!sd) return;
|
||||
sd->children = evas_list_prepend(sd->children, ei);
|
||||
sd->children = eina_list_prepend(sd->children, ei);
|
||||
sd->changed = 1;
|
||||
sd->change_child_list = 1;
|
||||
sd->rows = evas_list_count(sd->children);
|
||||
sd->rows = eina_list_count(sd->children);
|
||||
_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);
|
||||
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->change_child_list = 1;
|
||||
sd->rows = evas_list_count(sd->children);
|
||||
sd->rows = eina_list_count(sd->children);
|
||||
_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);
|
||||
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->change_child_list = 1;
|
||||
sd->rows = evas_list_count(sd->children);
|
||||
sd->rows = eina_list_count(sd->children);
|
||||
_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);
|
||||
if (!sd) return;
|
||||
rel = evas_list_nth(sd->children, n);
|
||||
rel = eina_list_nth(sd->children, n);
|
||||
if (!rel)
|
||||
sd->children = evas_list_append(sd->children, ei);
|
||||
sd->children = eina_list_append(sd->children, ei);
|
||||
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->change_child_list = 1;
|
||||
sd->rows = evas_list_count(sd->children);
|
||||
sd->rows = eina_list_count(sd->children);
|
||||
_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);
|
||||
if (!sd) return;
|
||||
sd->children = evas_list_remove(sd->children, ei);
|
||||
sd->children = eina_list_remove(sd->children, ei);
|
||||
sd->changed = 1;
|
||||
sd->change_child_list = 1;
|
||||
sd->rows = evas_list_count(sd->children);
|
||||
sd->rows = eina_list_count(sd->children);
|
||||
_edje_container_recalc(sd);
|
||||
}
|
||||
|
||||
|
@ -640,7 +636,7 @@ edje_container_count_get(Evas_Object *obj)
|
|||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return 0;
|
||||
return evas_list_count(sd->children);
|
||||
return eina_list_count(sd->children);
|
||||
}
|
||||
|
||||
Edje_Item *
|
||||
|
@ -651,7 +647,7 @@ edje_container_item_first_get(Evas_Object *obj)
|
|||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return NULL;
|
||||
if (!sd->children) return NULL;
|
||||
return sd->children->data;
|
||||
return eina_list_data_get(sd->children);
|
||||
}
|
||||
|
||||
Edje_Item *
|
||||
|
@ -662,7 +658,7 @@ edje_container_item_last_get(Evas_Object *obj)
|
|||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) 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 *
|
||||
|
@ -672,7 +668,7 @@ edje_container_item_nth_get(Evas_Object *obj, int n)
|
|||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return NULL;
|
||||
return evas_list_nth(sd->children, n);
|
||||
return eina_list_nth(sd->children, n);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -37,7 +37,7 @@ typedef struct _Smart_Data_Colinfo Smart_Data_Colinfo;
|
|||
struct _Smart_Data
|
||||
{
|
||||
Evas_Coord x, y, w, h;
|
||||
Evas_List *children;
|
||||
Eina_List *children;
|
||||
Evas_Object *smart_obj;
|
||||
int cols, rows;
|
||||
|
||||
|
|
|
@ -83,10 +83,10 @@ _edje_edd_setup(void)
|
|||
eddc.func.mem_free = NULL;
|
||||
eddc.func.str_alloc = (char *(*)(const char *))eina_stringshare_add;
|
||||
eddc.func.str_free = eina_stringshare_del;
|
||||
eddc.func.list_next = (void *(*)(void *))evas_list_next;
|
||||
eddc.func.list_append = (void *(*)(void *, void *))evas_list_append;
|
||||
eddc.func.list_data = (void *(*)(void *))evas_list_data;
|
||||
eddc.func.list_free = (void *(*)(void *))evas_list_free;
|
||||
eddc.func.list_next = (void *(*)(void *))eina_list_next;
|
||||
eddc.func.list_append = (void *(*)(void *, void *))eina_list_append;
|
||||
eddc.func.list_data = (void *(*)(void *))eina_list_data_get;
|
||||
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_add = (void *(*)(void *, const char *, void *))evas_hash_add;
|
||||
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;
|
||||
int program_id = 0;
|
||||
Edje_Running_Program *runp;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
|
||||
CHKPARAM(1);
|
||||
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;
|
||||
|
||||
for (l = ed->actions; l; l = l->next)
|
||||
{
|
||||
runp = l->data;
|
||||
EINA_LIST_FOREACH(ed->actions, l, runp)
|
||||
if (program_id == runp->program->id)
|
||||
_edje_program_end(ed, runp);
|
||||
}
|
||||
|
||||
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_Real_Part *rp;
|
||||
Edje_Part_Description *parent, *d;
|
||||
Evas_List *l;
|
||||
Edje_Part_Image_Id *iid;
|
||||
Eina_List *l;
|
||||
char *name;
|
||||
float val;
|
||||
|
||||
|
@ -1546,14 +1544,14 @@ _edje_embryo_fn_custom_state(Embryo_Program *ep, Embryo_Cell *params)
|
|||
*/
|
||||
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->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
|
||||
|
|
|
@ -23,9 +23,9 @@ struct _Entry
|
|||
Evas_Object *cursor_fg;
|
||||
Evas_Textblock_Cursor *cursor;
|
||||
Evas_Textblock_Cursor *sel_start, *sel_end;
|
||||
Evas_List *sel;
|
||||
Evas_List *anchors;
|
||||
Evas_List *anchorlist;
|
||||
Eina_List *sel;
|
||||
Eina_List *anchors;
|
||||
Eina_List *anchorlist;
|
||||
char *selection;
|
||||
Evas_Bool selecting : 1;
|
||||
Evas_Bool have_selection : 1;
|
||||
|
@ -42,7 +42,7 @@ struct _Anchor
|
|||
Entry *en;
|
||||
char *name;
|
||||
Evas_Textblock_Cursor *start, *end;
|
||||
Evas_List *sel;
|
||||
Eina_List *sel;
|
||||
};
|
||||
|
||||
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_fg) evas_object_del(sel->obj_fg);
|
||||
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)
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ _sel_clear(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
|||
static void
|
||||
_sel_update(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
||||
{
|
||||
Evas_List *range = NULL, *l;
|
||||
Eina_List *range = NULL, *l;
|
||||
Sel *sel;
|
||||
Evas_Coord x, y, w, h;
|
||||
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);
|
||||
if (en->sel_start)
|
||||
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)
|
||||
{
|
||||
|
@ -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_fg) evas_object_del(sel->obj_fg);
|
||||
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)
|
||||
{
|
||||
for (l = range; l; l = l->next)
|
||||
for (l = range; l; l = eina_list_next(l))
|
||||
{
|
||||
Evas_Object *ob;
|
||||
|
||||
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);
|
||||
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source);
|
||||
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;
|
||||
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;
|
||||
|
||||
sel = l->data;
|
||||
r = range->data;
|
||||
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_resize(sel->obj_fg, r->w, r->h);
|
||||
}
|
||||
range = evas_list_remove_list(range, range);
|
||||
range = eina_list_remove_list(range, range);
|
||||
free(r);
|
||||
}
|
||||
}
|
||||
|
@ -452,20 +451,20 @@ _edje_anchor_mouse_out_cb(void *data, Evas *e, Evas_Object *obj, void *event_inf
|
|||
static void
|
||||
_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_Object *smart, *clip;
|
||||
Sel *sel;
|
||||
Anchor *an;
|
||||
|
||||
smart = evas_object_smart_parent_get(o);
|
||||
clip = evas_object_clip_get(o);
|
||||
x = y = w = h = -1;
|
||||
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);
|
||||
if (evas_list_count(range) != evas_list_count(an->sel))
|
||||
if (eina_list_count(range) != eina_list_count(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) evas_object_del(sel->obj);
|
||||
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;
|
||||
|
||||
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);
|
||||
edje_object_file_set(ob, en->rp->edje->path, en->rp->part->source5);
|
||||
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;
|
||||
}
|
||||
}
|
||||
for (ll = an->sel; ll; ll = ll->next)
|
||||
EINA_LIST_FOREACH(an->sel, ll, sel)
|
||||
{
|
||||
Evas_Textblock_Rectangle *r;
|
||||
|
||||
sel = ll->data;
|
||||
r = range->data;
|
||||
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_resize(sel->obj, r->w, r->h);
|
||||
}
|
||||
range = evas_list_remove_list(range, range);
|
||||
range = eina_list_remove_list(range, range);
|
||||
free(r);
|
||||
}
|
||||
}
|
||||
|
@ -546,7 +544,7 @@ _anchors_clear(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
|||
while (en->anchorlist)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
@ -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) evas_object_del(sel->obj);
|
||||
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);
|
||||
}
|
||||
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->end = evas_object_textblock_cursor_new(o);
|
||||
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);
|
||||
evas_textblock_cursor_free(an->start);
|
||||
evas_textblock_cursor_free(an->end);
|
||||
en->anchors = evas_list_remove(en->anchors, an);
|
||||
en->anchors = eina_list_remove(en->anchors, an);
|
||||
free(an);
|
||||
}
|
||||
firsttext = 0;
|
||||
|
@ -1259,22 +1257,23 @@ _edje_entry_set_cursor_end(Edje_Real_Part *rp)
|
|||
_curs_end(en->cursor, rp->object, en);
|
||||
}
|
||||
|
||||
const Evas_List *
|
||||
const Eina_List *
|
||||
_edje_entry_anchors_list(Edje_Real_Part *rp)
|
||||
{
|
||||
Entry *en = rp->entry_data;
|
||||
Evas_List *l, *anchors = NULL;
|
||||
Eina_List *l, *anchors = NULL;
|
||||
Anchor *an;
|
||||
|
||||
if (!en) return NULL;
|
||||
if (!en->anchorlist)
|
||||
{
|
||||
for (l = en->anchors; l; l = l->next)
|
||||
EINA_LIST_FOREACH(en->anchors, l, an)
|
||||
{
|
||||
Anchor *an = l->data;
|
||||
char *n;
|
||||
|
||||
n = an->name;
|
||||
if (!n) n = "";
|
||||
anchors = evas_list_append(anchors, strdup(n));
|
||||
anchors = eina_list_append(anchors, strdup(n));
|
||||
}
|
||||
en->anchorlist = anchors;
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ static Evas_Bool _edje_file_collection_hash_foreach(const Evas_Hash *hash, const
|
|||
#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);
|
||||
#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 Evas_List *_edje_swallows_collect(Edje *ed);
|
||||
static Eina_List *_edje_swallows_collect(Edje *ed);
|
||||
|
||||
/************************** API Routines **************************/
|
||||
|
||||
|
@ -91,15 +91,15 @@ edje_object_load_error_get(const Evas_Object *obj)
|
|||
/** Get a list of groups in an 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()
|
||||
* when you are done with it.
|
||||
*/
|
||||
EAPI Evas_List *
|
||||
EAPI Eina_List *
|
||||
edje_file_collection_list(const char *file)
|
||||
{
|
||||
Evas_List *lst = NULL;
|
||||
Eina_List *lst = NULL;
|
||||
Edje_File *edf;
|
||||
int error_ret = 0;
|
||||
|
||||
|
@ -109,15 +109,11 @@ edje_file_collection_list(const char *file)
|
|||
{
|
||||
if (edf->collection_dir)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
for (l = edf->collection_dir->entries; l; l = l->next)
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
|
||||
ce = l->data;
|
||||
lst = evas_list_append(lst, eina_stringshare_add(ce->entry));
|
||||
}
|
||||
EINA_LIST_FOREACH(edf->collection_dir->entries, l, ce)
|
||||
lst = eina_list_append(lst, eina_stringshare_add(ce->entry));
|
||||
}
|
||||
_edje_cache_file_unref(edf);
|
||||
}
|
||||
|
@ -125,17 +121,17 @@ edje_file_collection_list(const char *file)
|
|||
}
|
||||
|
||||
/** 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().
|
||||
*/
|
||||
EAPI void
|
||||
edje_file_collection_list_free(Evas_List *lst)
|
||||
edje_file_collection_list_free(Eina_List *lst)
|
||||
{
|
||||
while (lst)
|
||||
{
|
||||
if (lst->data) eina_stringshare_del(lst->data);
|
||||
lst = evas_list_remove(lst, lst->data);
|
||||
if (eina_list_data_get(lst)) eina_stringshare_del(eina_list_data_get(lst));
|
||||
lst = eina_list_remove(lst, eina_list_data_get(lst));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,7 +218,7 @@ static void
|
|||
_edje_programs_patterns_init(Edje *ed)
|
||||
{
|
||||
Edje_Signals_Sources_Patterns *ssp = &ed->patterns.programs;
|
||||
Evas_List *programs = ed->collection->programs;
|
||||
Eina_List *programs = ed->collection->programs;
|
||||
|
||||
if (ssp->signals_patterns)
|
||||
return;
|
||||
|
@ -232,12 +228,12 @@ _edje_programs_patterns_init(Edje *ed)
|
|||
}
|
||||
|
||||
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;
|
||||
int n;
|
||||
Evas_List *parts = NULL;
|
||||
Evas_List *old_swallows;
|
||||
Eina_List *parts = NULL;
|
||||
Eina_List *old_swallows;
|
||||
int group_path_started = 0;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
|
@ -273,36 +269,34 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
}
|
||||
else
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
int i;
|
||||
int errors = 0;
|
||||
Edje_Part *ep;
|
||||
|
||||
/* colorclass stuff */
|
||||
for (l = ed->collection->parts; (l && ! errors); l = l->next)
|
||||
{
|
||||
Edje_Part *ep;
|
||||
Evas_List *hist = NULL;
|
||||
|
||||
/* Register any color classes in this parts descriptions. */
|
||||
ep = l->data;
|
||||
if ((ep->default_desc) && (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(ed->collection->parts, l, ep)
|
||||
{
|
||||
Eina_List *hist = NULL;
|
||||
Edje_Part_Description *desc;
|
||||
|
||||
desc = hist->data;
|
||||
if (errors)
|
||||
break;
|
||||
/* Register any color classes in this parts descriptions. */
|
||||
if ((ep->default_desc) && (ep->default_desc->color_class))
|
||||
_edje_color_class_member_add(ed, ep->default_desc->color_class);
|
||||
|
||||
EINA_LIST_FOREACH(ep->other_desc, hist, desc)
|
||||
if (desc->color_class)
|
||||
_edje_color_class_member_add(ed, desc->color_class);
|
||||
}
|
||||
}
|
||||
/* 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_Real_Part *rp;
|
||||
|
||||
ep = l->data;
|
||||
ep = eina_list_data_get(l);
|
||||
rp = calloc(1, sizeof(Edje_Real_Part));
|
||||
if (!rp)
|
||||
{
|
||||
|
@ -312,7 +306,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
rp->edje = ed;
|
||||
_edje_ref(rp->edje);
|
||||
rp->part = ep;
|
||||
parts = evas_list_append(parts, rp);
|
||||
parts = eina_list_append(parts, rp);
|
||||
rp->param1.description = ep->default_desc;
|
||||
rp->chosen_description = 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;
|
||||
/* FIXME: check malloc return */
|
||||
n = 0;
|
||||
for (l = parts; l; l = l->next)
|
||||
EINA_LIST_FOREACH(parts, l, rp)
|
||||
{
|
||||
rp = l->data;
|
||||
ed->table_parts[n] = rp;
|
||||
n++;
|
||||
}
|
||||
evas_list_free(parts);
|
||||
eina_list_free(parts);
|
||||
for (i = 0; i < ed->table_parts_size; 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);
|
||||
|
||||
n = evas_list_count(ed->collection->programs);
|
||||
n = eina_list_count(ed->collection->programs);
|
||||
if (n > 0)
|
||||
{
|
||||
Edje_Program *pr;
|
||||
/* FIXME: keeping a table AND a list is just bad - nuke list */
|
||||
ed->table_programs = malloc(sizeof(Edje_Program *) * n);
|
||||
ed->table_programs_size = n;
|
||||
/* FIXME: check malloc return */
|
||||
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;
|
||||
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->source)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Evas_Object *child_obj;
|
||||
Edje *child_ed;
|
||||
const char *group_path_entry = eina_stringshare_add(rp->part->source);
|
||||
const char *data;
|
||||
|
||||
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;
|
||||
}
|
||||
/* 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_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);
|
||||
if (group_path_started)
|
||||
{
|
||||
eina_stringshare_del(group_path->data);
|
||||
evas_list_free(group_path);
|
||||
eina_stringshare_del(eina_list_data_get(group_path));
|
||||
eina_list_free(group_path);
|
||||
}
|
||||
ed->load_error = EDJE_LOAD_ERROR_RECURSIVE_REFERENCE;
|
||||
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);
|
||||
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))
|
||||
{
|
||||
_edje_thaw(ed);
|
||||
|
@ -530,8 +523,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
{
|
||||
while (group_path)
|
||||
{
|
||||
eina_stringshare_del(group_path->data);
|
||||
group_path = evas_list_remove_list(group_path, group_path);
|
||||
eina_stringshare_del(eina_list_data_get(group_path));
|
||||
group_path = eina_list_remove_list(group_path, group_path);
|
||||
}
|
||||
}
|
||||
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->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);
|
||||
|
||||
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)
|
||||
{
|
||||
eina_stringshare_del(group_path->data);
|
||||
group_path = evas_list_remove_list(group_path, group_path);
|
||||
eina_stringshare_del(eina_list_data_get(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;
|
||||
Evas_Object *swallow;
|
||||
|
||||
name = old_swallows->data;
|
||||
old_swallows = evas_list_remove_list(old_swallows, old_swallows);
|
||||
name = eina_list_data_get(old_swallows);
|
||||
old_swallows = eina_list_remove_list(old_swallows, old_swallows);
|
||||
|
||||
swallow = old_swallows->data;
|
||||
old_swallows = evas_list_remove_list(old_swallows, old_swallows);
|
||||
swallow = eina_list_data_get(old_swallows);
|
||||
old_swallows = eina_list_remove_list(old_swallows, old_swallows);
|
||||
|
||||
edje_object_part_swallow(obj, name, swallow);
|
||||
eina_stringshare_del(name);
|
||||
|
@ -609,10 +602,10 @@ _edje_file_add(Edje *ed)
|
|||
}
|
||||
}
|
||||
|
||||
static Evas_List *
|
||||
static Eina_List *
|
||||
_edje_swallows_collect(Edje *ed)
|
||||
{
|
||||
Evas_List *swallows = NULL;
|
||||
Eina_List *swallows = NULL;
|
||||
int i;
|
||||
|
||||
if (!ed->file || !ed->table_parts) return NULL;
|
||||
|
@ -622,8 +615,8 @@ _edje_swallows_collect(Edje *ed)
|
|||
|
||||
rp = ed->table_parts[i];
|
||||
if (rp->part->type != EDJE_PART_TYPE_SWALLOW || !rp->swallowed_object) continue;
|
||||
swallows = evas_list_append(swallows, eina_stringshare_add(rp->part->name));
|
||||
swallows = evas_list_append(swallows, rp->swallowed_object);
|
||||
swallows = eina_list_append(swallows, eina_stringshare_add(rp->part->name));
|
||||
swallows = eina_list_append(swallows, rp->swallowed_object);
|
||||
}
|
||||
return swallows;
|
||||
}
|
||||
|
@ -639,14 +632,12 @@ _edje_file_del(Edje *ed)
|
|||
if (!((ed->file) && (ed->collection))) return;
|
||||
if ((ed->file) && (ed->collection))
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
_edje_textblock_styles_del(ed);
|
||||
for (l = ed->collection->parts; l; l = l->next)
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Part *ep;
|
||||
|
||||
ep = l->data;
|
||||
_edje_textblock_styles_del(ed);
|
||||
EINA_LIST_FOREACH(ed->collection->parts, l, ep)
|
||||
{
|
||||
_edje_text_part_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_anim_count--;
|
||||
runp = ed->actions->data;
|
||||
ed->actions = evas_list_remove(ed->actions, runp);
|
||||
runp = eina_list_data_get(ed->actions);
|
||||
ed->actions = eina_list_remove(ed->actions, runp);
|
||||
free(runp);
|
||||
}
|
||||
}
|
||||
_edje_animators = evas_list_remove(_edje_animators, ed);
|
||||
_edje_animators = eina_list_remove(_edje_animators, ed);
|
||||
if (ed->pending_actions)
|
||||
{
|
||||
while (ed->pending_actions)
|
||||
{
|
||||
Edje_Pending_Program *pp;
|
||||
|
||||
pp = ed->pending_actions->data;
|
||||
ed->pending_actions = evas_list_remove(ed->pending_actions, pp);
|
||||
pp = eina_list_data_get(ed->pending_actions);
|
||||
ed->pending_actions = eina_list_remove(ed->pending_actions, pp);
|
||||
ecore_timer_del(pp->timer);
|
||||
free(pp);
|
||||
}
|
||||
|
@ -758,9 +749,9 @@ _edje_file_free(Edje_File *edf)
|
|||
{
|
||||
Edje_Font_Directory_Entry *fe;
|
||||
|
||||
fe = edf->font_dir->entries->data;
|
||||
fe = eina_list_data_get(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);
|
||||
if (edf->free_strings && fe->path) eina_stringshare_del(fe->path);
|
||||
free(fe);
|
||||
|
@ -773,9 +764,9 @@ _edje_file_free(Edje_File *edf)
|
|||
{
|
||||
Edje_Image_Directory_Entry *ie;
|
||||
|
||||
ie = edf->image_dir->entries->data;
|
||||
ie = eina_list_data_get(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);
|
||||
free(ie);
|
||||
}
|
||||
|
@ -787,9 +778,9 @@ _edje_file_free(Edje_File *edf)
|
|||
{
|
||||
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 =
|
||||
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);
|
||||
free(ce);
|
||||
}
|
||||
|
@ -801,14 +792,14 @@ _edje_file_free(Edje_File *edf)
|
|||
{
|
||||
Edje_Spectrum_Directory_Entry *se;
|
||||
|
||||
se = edf->spectrum_dir->entries->data;
|
||||
se = eina_list_data_get(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)
|
||||
{
|
||||
free(se->color_list->data);
|
||||
free(eina_list_data_get(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)
|
||||
{
|
||||
|
@ -823,8 +814,8 @@ _edje_file_free(Edje_File *edf)
|
|||
{
|
||||
Edje_Data *edt;
|
||||
|
||||
edt = edf->data->data;
|
||||
edf->data = evas_list_remove(edf->data, edt);
|
||||
edt = eina_list_data_get(edf->data);
|
||||
edf->data = eina_list_remove(edf->data, edt);
|
||||
if (edf->free_strings)
|
||||
{
|
||||
if (edt->key) eina_stringshare_del(edt->key);
|
||||
|
@ -843,9 +834,9 @@ _edje_file_free(Edje_File *edf)
|
|||
{
|
||||
Edje_Color_Class *ecc;
|
||||
|
||||
ecc = edf->color_classes->data;
|
||||
ecc = eina_list_data_get(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);
|
||||
free(ecc);
|
||||
}
|
||||
|
@ -882,8 +873,8 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
{
|
||||
Edje_Program *pr;
|
||||
|
||||
pr = ec->programs->data;
|
||||
ec->programs = evas_list_remove_list(ec->programs, ec->programs);
|
||||
pr = eina_list_data_get(ec->programs);
|
||||
ec->programs = eina_list_remove_list(ec->programs, ec->programs);
|
||||
if (edf->free_strings)
|
||||
{
|
||||
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;
|
||||
|
||||
prt = pr->targets->data;
|
||||
pr->targets = evas_list_remove_list(pr->targets, pr->targets);
|
||||
prt = eina_list_data_get(pr->targets);
|
||||
pr->targets = eina_list_remove_list(pr->targets, pr->targets);
|
||||
free(prt);
|
||||
}
|
||||
while (pr->after)
|
||||
{
|
||||
Edje_Program_After *pa;
|
||||
|
||||
pa = pr->after->data;
|
||||
pr->after = evas_list_remove_list(pr->after, pr->after);
|
||||
pa = eina_list_data_get(pr->after);
|
||||
pr->after = eina_list_remove_list(pr->after, pr->after);
|
||||
free(pa);
|
||||
}
|
||||
free(pr);
|
||||
|
@ -914,8 +905,8 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
{
|
||||
Edje_Part *ep;
|
||||
|
||||
ep = ec->parts->data;
|
||||
ec->parts = evas_list_remove(ec->parts, ep);
|
||||
ep = eina_list_data_get(ec->parts);
|
||||
ec->parts = eina_list_remove(ec->parts, ep);
|
||||
if (edf->free_strings && ep->name) eina_stringshare_del(ep->name);
|
||||
if (ep->default_desc)
|
||||
{
|
||||
|
@ -926,8 +917,8 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
{
|
||||
Edje_Part_Description *desc;
|
||||
|
||||
desc = ep->other_desc->data;
|
||||
ep->other_desc = evas_list_remove(ep->other_desc, desc);
|
||||
desc = eina_list_data_get(ep->other_desc);
|
||||
ep->other_desc = eina_list_remove(ep->other_desc, desc);
|
||||
_edje_collection_free_part_description_free(desc, edf->free_strings);
|
||||
}
|
||||
free(ep);
|
||||
|
@ -938,8 +929,8 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
{
|
||||
Edje_Data *edt;
|
||||
|
||||
edt = ec->data->data;
|
||||
ec->data = evas_list_remove(ec->data, edt);
|
||||
edt = eina_list_data_get(ec->data);
|
||||
ec->data = eina_list_remove(ec->data, edt);
|
||||
if (edf->free_strings)
|
||||
{
|
||||
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;
|
||||
|
||||
pi = desc->image.tween_list->data;
|
||||
desc->image.tween_list = evas_list_remove(desc->image.tween_list, pi);
|
||||
pi = eina_list_data_get(desc->image.tween_list);
|
||||
desc->image.tween_list = eina_list_remove(desc->image.tween_list, pi);
|
||||
free(pi);
|
||||
}
|
||||
if (free_strings)
|
||||
|
@ -1007,7 +998,7 @@ _edje_file_collection_hash_foreach(const Evas_Hash *hash, const char *key, void
|
|||
static Evas_Bool
|
||||
_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;
|
||||
hash = NULL;
|
||||
fdata = NULL;
|
||||
|
|
|
@ -98,30 +98,30 @@ _edje_del(Edje *ed)
|
|||
ed->group = NULL;
|
||||
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)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
runp = ed->actions->data;
|
||||
ed->actions = evas_list_remove(ed->actions, runp);
|
||||
runp = eina_list_data_get(ed->actions);
|
||||
ed->actions = eina_list_remove(ed->actions, runp);
|
||||
free(runp);
|
||||
}
|
||||
while (ed->pending_actions)
|
||||
{
|
||||
Edje_Pending_Program *pp;
|
||||
|
||||
pp = ed->pending_actions->data;
|
||||
ed->pending_actions = evas_list_remove(ed->pending_actions, pp);
|
||||
pp = eina_list_data_get(ed->pending_actions);
|
||||
ed->pending_actions = eina_list_remove(ed->pending_actions, pp);
|
||||
free(pp);
|
||||
}
|
||||
while (ed->callbacks)
|
||||
{
|
||||
Edje_Signal_Callback *escb;
|
||||
|
||||
escb = ed->callbacks->data;
|
||||
ed->callbacks = evas_list_remove(ed->callbacks, escb);
|
||||
escb = eina_list_data_get(ed->callbacks);
|
||||
ed->callbacks = eina_list_remove(ed->callbacks, escb);
|
||||
if (escb->signal) eina_stringshare_del(escb->signal);
|
||||
if (escb->source) eina_stringshare_del(escb->source);
|
||||
free(escb);
|
||||
|
@ -130,8 +130,8 @@ _edje_del(Edje *ed)
|
|||
{
|
||||
Edje_Color_Class *cc;
|
||||
|
||||
cc = ed->color_classes->data;
|
||||
ed->color_classes = evas_list_remove(ed->color_classes, cc);
|
||||
cc = eina_list_data_get(ed->color_classes);
|
||||
ed->color_classes = eina_list_remove(ed->color_classes, cc);
|
||||
if (cc->name) eina_stringshare_del(cc->name);
|
||||
free(cc);
|
||||
}
|
||||
|
@ -139,8 +139,8 @@ _edje_del(Edje *ed)
|
|||
{
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
tc = ed->text_classes->data;
|
||||
ed->text_classes = evas_list_remove(ed->text_classes, tc);
|
||||
tc = eina_list_data_get(ed->text_classes);
|
||||
ed->text_classes = eina_list_remove(ed->text_classes, tc);
|
||||
if (tc->name) eina_stringshare_del(tc->name);
|
||||
if (tc->font) eina_stringshare_del(tc->font);
|
||||
free(tc);
|
||||
|
|
|
@ -250,21 +250,21 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
|||
|
||||
#define EDJE_MATCH_INIT(Func, Type, Source, Show) \
|
||||
Edje_Patterns* \
|
||||
Func(Evas_List *lst) \
|
||||
Func(Eina_List *lst) \
|
||||
{ \
|
||||
Edje_Patterns *r; \
|
||||
size_t i; \
|
||||
\
|
||||
if (!lst || evas_list_count(lst) <= 0) \
|
||||
if (!lst || eina_list_count(lst) <= 0) \
|
||||
return NULL; \
|
||||
\
|
||||
r = malloc(sizeof (Edje_Patterns) + \
|
||||
evas_list_count(lst) \
|
||||
eina_list_count(lst) \
|
||||
* sizeof (*r->finals) \
|
||||
* sizeof(*r->patterns)); \
|
||||
if (!r) return NULL; \
|
||||
\
|
||||
r->patterns_size = evas_list_count(lst); \
|
||||
r->patterns_size = eina_list_count(lst); \
|
||||
r->max_length = 0; \
|
||||
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; \
|
||||
size_t j; \
|
||||
\
|
||||
data = evas_list_data(lst); \
|
||||
data = eina_list_data_get(lst); \
|
||||
if (!data) \
|
||||
{ \
|
||||
free(r); \
|
||||
|
@ -296,7 +296,7 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
|||
if (j > r->max_length) \
|
||||
r->max_length = j; \
|
||||
\
|
||||
lst = evas_list_next(lst); \
|
||||
lst = eina_list_next(lst); \
|
||||
} \
|
||||
\
|
||||
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 Edje_States *signal_states,
|
||||
const Edje_States *source_states,
|
||||
Evas_List *programs,
|
||||
Eina_List *programs,
|
||||
int (*func)(Edje_Program *pr, void *data),
|
||||
void *data)
|
||||
{
|
||||
|
@ -356,7 +356,7 @@ edje_match_programs_exec_check_finals(const size_t *signal_finals,
|
|||
{
|
||||
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 (func(pr, data))
|
||||
|
@ -374,7 +374,7 @@ edje_match_callback_exec_check_finals(const size_t *signal_finals,
|
|||
const Edje_States *source_states,
|
||||
const char *signal,
|
||||
const char *source,
|
||||
Evas_List *callbacks,
|
||||
Eina_List *callbacks,
|
||||
Edje *ed)
|
||||
{
|
||||
size_t i;
|
||||
|
@ -389,7 +389,7 @@ edje_match_callback_exec_check_finals(const size_t *signal_finals,
|
|||
{
|
||||
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->just_added)
|
||||
|
@ -479,7 +479,7 @@ edje_match_programs_exec(const Edje_Patterns *ppat_signal,
|
|||
const Edje_Patterns *ppat_source,
|
||||
const char *signal,
|
||||
const char *source,
|
||||
Evas_List *programs,
|
||||
Eina_List *programs,
|
||||
int (*func)(Edje_Program *pr, void *data),
|
||||
void *data)
|
||||
{
|
||||
|
@ -513,7 +513,7 @@ edje_match_callback_exec(const Edje_Patterns *ppat_signal,
|
|||
const Edje_Patterns *ppat_source,
|
||||
const char *signal,
|
||||
const char *source,
|
||||
Evas_List *callbacks,
|
||||
Eina_List *callbacks,
|
||||
Edje *ed)
|
||||
{
|
||||
Edje_States *signal_result;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
static Ecore_Job *job = NULL;
|
||||
static Ecore_Timer *job_loss_timer = NULL;
|
||||
|
||||
static Evas_List *msgq = NULL;
|
||||
static Evas_List *tmp_msgq = NULL;
|
||||
static Eina_List *msgq = NULL;
|
||||
static Eina_List *tmp_msgq = NULL;
|
||||
|
||||
EAPI void
|
||||
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
|
||||
edje_object_message_signal_process(Evas_Object *obj)
|
||||
{
|
||||
Evas_List *l, *tmpq = NULL;
|
||||
Eina_List *l, *tmpq = NULL;
|
||||
Edje *ed;
|
||||
Edje_Message *em;
|
||||
const void *data;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return;
|
||||
|
||||
for (l = msgq; l; l = l->next)
|
||||
{
|
||||
Edje_Message *em;
|
||||
|
||||
em = l->data;
|
||||
EINA_LIST_FOREACH(msgq, l, em)
|
||||
if (em->edje == ed)
|
||||
tmpq = evas_list_append(tmpq, em);
|
||||
}
|
||||
tmpq = eina_list_append(tmpq, em);
|
||||
/* now remove them from the old queue */
|
||||
for (l = tmpq; l; l = l->next)
|
||||
msgq = evas_list_remove(msgq, l->data);
|
||||
EINA_LIST_FOREACH(tmpq, l, data)
|
||||
msgq = eina_list_remove(msgq, data);
|
||||
/* a temporary message queue */
|
||||
if (tmp_msgq)
|
||||
{
|
||||
while (tmpq)
|
||||
{
|
||||
tmp_msgq = evas_list_append(tmp_msgq, tmpq->data);
|
||||
tmpq = evas_list_remove_list(tmpq, tmpq);
|
||||
tmp_msgq = eina_list_append(tmp_msgq, tmpq->data);
|
||||
tmpq = eina_list_remove_list(tmpq, tmpq);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -78,7 +75,7 @@ edje_object_message_signal_process(Evas_Object *obj)
|
|||
Edje_Message *em;
|
||||
|
||||
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--;
|
||||
_edje_message_process(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;
|
||||
msgq = evas_list_append(msgq, em);
|
||||
msgq = eina_list_append(msgq, em);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -598,8 +595,8 @@ _edje_message_queue_process(void)
|
|||
{
|
||||
while (msgq)
|
||||
{
|
||||
tmp_msgq = evas_list_append(tmp_msgq, msgq->data);
|
||||
msgq = evas_list_remove_list(msgq, msgq);
|
||||
tmp_msgq = eina_list_append(tmp_msgq, msgq->data);
|
||||
msgq = eina_list_remove_list(msgq, msgq);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -615,7 +612,7 @@ _edje_message_queue_process(void)
|
|||
|
||||
em = tmp_msgq->data;
|
||||
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--;
|
||||
if (!ed->delete_me)
|
||||
{
|
||||
|
@ -649,7 +646,7 @@ _edje_message_queue_clear(void)
|
|||
Edje_Message *em;
|
||||
|
||||
em = msgq->data;
|
||||
msgq = evas_list_remove_list(msgq, msgq);
|
||||
msgq = eina_list_remove_list(msgq, msgq);
|
||||
em->edje->message.num--;
|
||||
_edje_message_free(em);
|
||||
}
|
||||
|
@ -658,7 +655,7 @@ _edje_message_queue_clear(void)
|
|||
Edje_Message *em;
|
||||
|
||||
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--;
|
||||
_edje_message_free(em);
|
||||
}
|
||||
|
@ -667,21 +664,21 @@ _edje_message_queue_clear(void)
|
|||
void
|
||||
_edje_message_del(Edje *ed)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
|
||||
if (ed->message.num <= 0) return;
|
||||
/* delete any messages on the main queue for this edje object */
|
||||
for (l = msgq; l; )
|
||||
{
|
||||
Edje_Message *em;
|
||||
Evas_List *lp;
|
||||
Eina_List *lp;
|
||||
|
||||
em = l->data;
|
||||
em = eina_list_data_get(l);
|
||||
lp = l;
|
||||
l = l->next;
|
||||
l = eina_list_next(l);
|
||||
if (em->edje == ed)
|
||||
{
|
||||
msgq = evas_list_remove_list(msgq, lp);
|
||||
msgq = eina_list_remove_list(msgq, lp);
|
||||
em->edje->message.num--;
|
||||
_edje_message_free(em);
|
||||
}
|
||||
|
@ -691,14 +688,14 @@ _edje_message_del(Edje *ed)
|
|||
for (l = tmp_msgq; l; )
|
||||
{
|
||||
Edje_Message *em;
|
||||
Evas_List *lp;
|
||||
Eina_List *lp;
|
||||
|
||||
em = l->data;
|
||||
em = eina_list_data_get(l);
|
||||
lp = l;
|
||||
l = l->next;
|
||||
l = eina_list_next(l);
|
||||
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--;
|
||||
_edje_message_free(em);
|
||||
}
|
||||
|
|
|
@ -279,9 +279,9 @@ struct _Edje_File
|
|||
Edje_Image_Directory *image_dir;
|
||||
Edje_Spectrum_Directory *spectrum_dir;
|
||||
Edje_Part_Collection_Directory *collection_dir;
|
||||
Evas_List *data;
|
||||
Evas_List *styles;
|
||||
Evas_List *color_classes;
|
||||
Eina_List *data;
|
||||
Eina_List *styles;
|
||||
Eina_List *color_classes;
|
||||
|
||||
int references;
|
||||
char *compiler;
|
||||
|
@ -290,7 +290,7 @@ struct _Edje_File
|
|||
|
||||
Evas_Hash *collection_hash;
|
||||
Evas_Hash *font_hash;
|
||||
Evas_List *collection_cache;
|
||||
Eina_List *collection_cache;
|
||||
Evas_Hash *data_cache;
|
||||
|
||||
Eet_File *ef;
|
||||
|
@ -301,7 +301,7 @@ struct _Edje_File
|
|||
struct _Edje_Style
|
||||
{
|
||||
char *name;
|
||||
Evas_List *tags;
|
||||
Eina_List *tags;
|
||||
Evas_Textblock_Style *style;
|
||||
};
|
||||
|
||||
|
@ -326,7 +326,7 @@ struct _Edje_Data
|
|||
|
||||
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
|
||||
|
@ -340,7 +340,7 @@ struct _Edje_Font_Directory_Entry
|
|||
|
||||
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
|
||||
|
@ -355,7 +355,7 @@ struct _Edje_Image_Directory_Entry
|
|||
|
||||
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
|
||||
|
@ -363,7 +363,7 @@ struct _Edje_Spectrum_Directory_Entry
|
|||
char *entry;
|
||||
/* only one of the following two should be included. filename takes precedence */
|
||||
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;
|
||||
};
|
||||
|
||||
|
@ -400,9 +400,9 @@ struct _Edje_Program /* a conditional program to be run */
|
|||
double time; /* time to graduate between current and new state */
|
||||
} 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 */
|
||||
|
@ -419,7 +419,7 @@ struct _Edje_Program_After /* the action to run after another action */
|
|||
|
||||
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;
|
||||
};
|
||||
|
@ -434,9 +434,9 @@ struct _Edje_Part_Collection_Directory_Entry
|
|||
|
||||
struct _Edje_Part_Collection
|
||||
{
|
||||
Evas_List *programs; /* a list of Edje_Program */
|
||||
Evas_List *parts; /* a list of Edje_Part */
|
||||
Evas_List *data;
|
||||
Eina_List *programs; /* a list of Edje_Program */
|
||||
Eina_List *parts; /* a list of Edje_Part */
|
||||
Eina_List *data;
|
||||
|
||||
int id; /* the collection id */
|
||||
|
||||
|
@ -463,7 +463,7 @@ struct _Edje_Part
|
|||
{
|
||||
const char *name; /* the name if any of the part */
|
||||
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;
|
||||
int id; /* its id number */
|
||||
int clip_to_id; /* the part id to clip this one to */
|
||||
|
@ -527,7 +527,7 @@ struct _Edje_Part_Description
|
|||
} rel1, rel2;
|
||||
|
||||
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 */
|
||||
} image;
|
||||
|
||||
|
@ -638,11 +638,11 @@ struct _Edje
|
|||
Evas_Object *clipper; /* a big rect to clip this Edje to */
|
||||
Edje_File *file; /* the file the data comes form */
|
||||
Edje_Part_Collection *collection; /* the description being used */
|
||||
Evas_List *actions; /* currently running actions */
|
||||
Evas_List *callbacks;
|
||||
Evas_List *pending_actions;
|
||||
Evas_List *color_classes;
|
||||
Evas_List *text_classes;
|
||||
Eina_List *actions; /* currently running actions */
|
||||
Eina_List *callbacks;
|
||||
Eina_List *pending_actions;
|
||||
Eina_List *color_classes;
|
||||
Eina_List *text_classes;
|
||||
/* variable pool for Edje Embryo scripts */
|
||||
Edje_Var_Pool *var_pool;
|
||||
/* for faster lookups to avoid nth list walks */
|
||||
|
@ -693,7 +693,7 @@ struct _Edje_Real_Part
|
|||
{
|
||||
Edje *edje;
|
||||
Evas_Object *object;
|
||||
Evas_List *extra_objects;
|
||||
Eina_List *extra_objects;
|
||||
Evas_Object *swallowed_object;
|
||||
void *entry_data;
|
||||
Evas_Object *cursorbg_object;
|
||||
|
@ -862,7 +862,7 @@ struct _Edje_Var_String
|
|||
|
||||
struct _Edje_Var_List
|
||||
{
|
||||
Evas_List *v;
|
||||
Eina_List *v;
|
||||
};
|
||||
|
||||
struct _Edje_Var_Hash
|
||||
|
@ -892,8 +892,8 @@ struct _Edje_Var_Animator
|
|||
struct _Edje_Var_Pool
|
||||
{
|
||||
int id_count;
|
||||
Evas_List *timers;
|
||||
Evas_List *animators;
|
||||
Eina_List *timers;
|
||||
Eina_List *animators;
|
||||
int size;
|
||||
Edje_Var *vars;
|
||||
int walking_list;
|
||||
|
@ -962,11 +962,11 @@ struct _Edje_Patterns
|
|||
size_t finals[];
|
||||
};
|
||||
|
||||
Edje_Patterns *edje_match_collection_dir_init(Evas_List *lst);
|
||||
Edje_Patterns *edje_match_programs_signal_init(Evas_List *lst);
|
||||
Edje_Patterns *edje_match_programs_source_init(Evas_List *lst);
|
||||
Edje_Patterns *edje_match_callback_signal_init(Evas_List *lst);
|
||||
Edje_Patterns *edje_match_callback_source_init(Evas_List *lst);
|
||||
Edje_Patterns *edje_match_collection_dir_init(Eina_List *lst);
|
||||
Edje_Patterns *edje_match_programs_signal_init(Eina_List *lst);
|
||||
Edje_Patterns *edje_match_programs_source_init(Eina_List *lst);
|
||||
Edje_Patterns *edje_match_callback_signal_init(Eina_List *lst);
|
||||
Edje_Patterns *edje_match_callback_source_init(Eina_List *lst);
|
||||
|
||||
int edje_match_collection_dir_exec(const Edje_Patterns *ppat,
|
||||
const char *string);
|
||||
|
@ -974,14 +974,14 @@ int edje_match_programs_exec(const Edje_Patterns *ppat_signal,
|
|||
const Edje_Patterns *ppat_source,
|
||||
const char *signal,
|
||||
const char *source,
|
||||
Evas_List *programs,
|
||||
Eina_List *programs,
|
||||
int (*func)(Edje_Program *pr, void *data),
|
||||
void *data);
|
||||
int edje_match_callback_exec(const Edje_Patterns *ppat_signal,
|
||||
const Edje_Patterns *ppat_source,
|
||||
const char *signal,
|
||||
const char *source,
|
||||
Evas_List *callbacks,
|
||||
Eina_List *callbacks,
|
||||
Edje *ed);
|
||||
|
||||
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 Ecore_Animator *_edje_timer;
|
||||
extern Evas_List *_edje_animators;
|
||||
extern Evas_List *_edje_edjes;
|
||||
extern Eina_List *_edje_animators;
|
||||
extern Eina_List *_edje_edjes;
|
||||
|
||||
extern char *_edje_fontset_append;
|
||||
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_set_cursor_start(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);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,7 @@ static void _edje_emit_cb(Edje *ed, const char *sig, const char *src);
|
|||
|
||||
int _edje_anim_count = 0;
|
||||
Ecore_Animator *_edje_timer = NULL;
|
||||
Evas_List *_edje_animators = NULL;
|
||||
Eina_List *_edje_animators = NULL;
|
||||
|
||||
/************************** 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->func = func;
|
||||
escb->data = data;
|
||||
ed->callbacks = evas_list_append(ed->callbacks, escb);
|
||||
ed->callbacks = eina_list_append(ed->callbacks, escb);
|
||||
if (ed->walking_callbacks)
|
||||
{
|
||||
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 *ed;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Signal_Callback *escb;
|
||||
|
||||
if ((!emission) || (!source) || (!func)) return NULL;
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) 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) &&
|
||||
((!escb->signal && !emission[0]) ||
|
||||
(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);
|
||||
|
||||
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->source) eina_stringshare_del(escb->source);
|
||||
free(escb);
|
||||
|
@ -220,7 +218,8 @@ edje_object_play_set(Evas_Object *obj, int play)
|
|||
{
|
||||
Edje *ed;
|
||||
double t;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Running_Program *runp;
|
||||
int i;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
|
@ -231,14 +230,9 @@ edje_object_play_set(Evas_Object *obj, int play)
|
|||
if (!ed->paused) return;
|
||||
ed->paused = 0;
|
||||
t = ecore_time_get() - ed->paused_at;
|
||||
for (l = ed->actions; l; l = l->next)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
runp = l->data;
|
||||
EINA_LIST_FOREACH(ed->actions, l, runp)
|
||||
runp->start_time += t;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ed->paused) return;
|
||||
|
@ -284,7 +278,7 @@ EAPI void
|
|||
edje_object_animation_set(Evas_Object *obj, int on)
|
||||
{
|
||||
Edje *ed;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
int i;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
|
@ -295,20 +289,21 @@ edje_object_animation_set(Evas_Object *obj, int on)
|
|||
_edje_freeze(ed);
|
||||
if (!on)
|
||||
{
|
||||
Evas_List *newl = NULL;
|
||||
Eina_List *newl = NULL;
|
||||
const void *data;
|
||||
|
||||
for (l = ed->actions; l; l = l->next)
|
||||
newl = evas_list_append(newl, l->data);
|
||||
EINA_LIST_FOREACH(ed->actions, l, data)
|
||||
newl = eina_list_append(newl, data);
|
||||
while (newl)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
runp = newl->data;
|
||||
newl = evas_list_remove(newl, newl->data);
|
||||
runp = eina_list_data_get(newl);
|
||||
newl = eina_list_remove(newl, eina_list_data_get(newl));
|
||||
_edje_program_run_iterate(runp, runp->start_time + runp->program->tween.time);
|
||||
if (_edje_block_break(ed))
|
||||
{
|
||||
evas_list_free(newl);
|
||||
eina_list_free(newl);
|
||||
goto break_prog;
|
||||
}
|
||||
}
|
||||
|
@ -360,8 +355,10 @@ int
|
|||
_edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
||||
{
|
||||
double t, total;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje *ed;
|
||||
Edje_Program_Target *pt;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ed = runp->edje;
|
||||
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;
|
||||
t /= total;
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (l = runp->program->targets; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Program_Target *pt;
|
||||
Edje_Program_After *pa;
|
||||
|
||||
pt = l->data;
|
||||
EINA_LIST_FOREACH(runp->program->targets, l, pt)
|
||||
{
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
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)
|
||||
{
|
||||
_edje_anim_count--;
|
||||
ed->actions = evas_list_remove(ed->actions, runp);
|
||||
ed->actions = eina_list_remove(ed->actions, runp);
|
||||
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);
|
||||
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);
|
||||
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_After *pa = l->data;
|
||||
|
||||
if (pa->id >= 0)
|
||||
{
|
||||
|
@ -457,19 +447,18 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
|||
void
|
||||
_edje_program_end(Edje *ed, Edje_Running_Program *runp)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Program_Target *pt;
|
||||
const char *pname = NULL;
|
||||
int free_runp = 0;
|
||||
|
||||
if (ed->delete_me) return;
|
||||
_edje_ref(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_Program_Target *pt;
|
||||
|
||||
pt = l->data;
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
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)
|
||||
{
|
||||
_edje_anim_count--;
|
||||
ed->actions = evas_list_remove(ed->actions, runp);
|
||||
ed->actions = eina_list_remove(ed->actions, runp);
|
||||
free_runp = 1;
|
||||
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);
|
||||
|
@ -508,7 +497,11 @@ _edje_program_end(Edje *ed, Edje_Running_Program *runp)
|
|||
void
|
||||
_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 */
|
||||
static int recursions = 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->program = pr;
|
||||
ed->pending_actions = evas_list_append(ed->pending_actions, pp);
|
||||
ed->pending_actions = eina_list_append(ed->pending_actions, pp);
|
||||
return;
|
||||
}
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
if (_edje_block_break(ed))
|
||||
{
|
||||
ed->actions = evas_list_append(ed->actions, runp);
|
||||
ed->actions = eina_list_append(ed->actions, runp);
|
||||
goto break_prog;
|
||||
}
|
||||
if (!ed->actions)
|
||||
_edje_animators = evas_list_append(_edje_animators, ed);
|
||||
ed->actions = evas_list_append(ed->actions, runp);
|
||||
_edje_animators = eina_list_append(_edje_animators, ed);
|
||||
ed->actions = eina_list_append(ed->actions, runp);
|
||||
runp->start_time = ecore_time_get();
|
||||
runp->edje = ed;
|
||||
runp->program = pr;
|
||||
|
@ -593,12 +582,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
}
|
||||
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)
|
||||
{
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
// _edje_emit(ed, "program,start", pr->name);
|
||||
for (l = pr->targets; l; l = l->next)
|
||||
{
|
||||
Edje_Program_Target *pt;
|
||||
Evas_List *ll;
|
||||
|
||||
pt = l->data;
|
||||
for (ll = ed->actions; ll; ll = ll->next)
|
||||
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||
{
|
||||
Eina_List *ll;
|
||||
Edje_Running_Program *runp;
|
||||
Edje_Pending_Program *pp;
|
||||
|
||||
runp = ll->data;
|
||||
EINA_LIST_FOREACH(ed->actions, ll, runp)
|
||||
{
|
||||
if (pt->id == runp->program->id)
|
||||
{
|
||||
_edje_program_end(ed, runp);
|
||||
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)
|
||||
{
|
||||
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);
|
||||
free(pp);
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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
|
||||
{
|
||||
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)
|
||||
{
|
||||
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))) */
|
||||
))
|
||||
{
|
||||
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)
|
||||
{
|
||||
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
|
||||
{
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
Evas_List *matches;
|
||||
Eina_List *matches;
|
||||
int matched;
|
||||
#endif
|
||||
Edje *ed;
|
||||
|
@ -883,14 +840,14 @@ static int _edje_glob_callback(Edje_Program *pr, void *dt)
|
|||
if (_edje_block_break(data->ed))
|
||||
{
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
evas_list_free(data->matches);
|
||||
eina_list_free(data->matches);
|
||||
data->matches = NULL;
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
data->matches = evas_list_append(data->matches, pr);
|
||||
data->matches = eina_list_append(data->matches, pr);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -948,8 +905,9 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
|
|||
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
{
|
||||
Evas_List *matches;
|
||||
Evas_List *l;
|
||||
Eina_List *matches;
|
||||
Eina_List *l;
|
||||
Edje_Program *pr;
|
||||
|
||||
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)))
|
||||
{
|
||||
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);
|
||||
if (_edje_block_break(ed))
|
||||
{
|
||||
|
@ -1023,7 +978,7 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
|
|||
static void
|
||||
_edje_emit_cb(Edje *ed, const char *sig, const char *src)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
|
||||
if (ed->delete_me) return;
|
||||
_edje_ref(ed);
|
||||
|
@ -1054,20 +1009,20 @@ _edje_emit_cb(Edje *ed, const char *sig, const char *src)
|
|||
ed->walking_callbacks = 0;
|
||||
if ((ed->delete_callbacks) || (ed->just_added_callbacks))
|
||||
{
|
||||
Edje_Signal_Callback *escb;
|
||||
|
||||
ed->delete_callbacks = 0;
|
||||
ed->just_added_callbacks = 0;
|
||||
for (l = ed->callbacks; l;)
|
||||
EINA_LIST_FOREACH(ed->callbacks, l, escb)
|
||||
{
|
||||
Edje_Signal_Callback *escb;
|
||||
Evas_List *next_l;
|
||||
Eina_List *next_l;
|
||||
|
||||
escb = l->data;
|
||||
next_l = l->next;
|
||||
next_l = eina_list_next(l);
|
||||
if (escb->just_added)
|
||||
escb->just_added = 0;
|
||||
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->source) eina_stringshare_del(escb->source);
|
||||
free(escb);
|
||||
|
|
|
@ -16,7 +16,7 @@ static void _edje_smart_clip_unset(Evas_Object * obj);
|
|||
|
||||
static Evas_Smart *_edje_smart = NULL;
|
||||
|
||||
Evas_List *_edje_edjes = NULL;
|
||||
Eina_List *_edje_edjes = NULL;
|
||||
|
||||
/************************** API Routines **************************/
|
||||
|
||||
|
@ -64,19 +64,20 @@ _edje_smart_add(Evas_Object *obj)
|
|||
evas_object_smart_data_set(obj, ed);
|
||||
evas_object_geometry_get(obj, &(ed->x), &(ed->y), &(ed->w), &(ed->h));
|
||||
ed->obj = obj;
|
||||
_edje_edjes = evas_list_append(_edje_edjes, obj);
|
||||
_edje_edjes = eina_list_append(_edje_edjes, obj);
|
||||
_edje_entry_init(ed);
|
||||
/*
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
const void *data;
|
||||
|
||||
printf("--- EDJE DUMP [%i]\n", evas_list_count(_edje_edjes));
|
||||
for (l = _edje_edjes; l; l = l->next)
|
||||
printf("--- EDJE DUMP [%i]\n", eina_list_count(_edje_edjes));
|
||||
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 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);
|
||||
ed->delete_me = 1;
|
||||
_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);
|
||||
if (_edje_script_only(ed)) _edje_script_only_shutdown(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)
|
||||
{
|
||||
Evas_List *el;
|
||||
|
||||
for (el = ep->extra_objects; el; el = el->next)
|
||||
{
|
||||
Eina_List *el;
|
||||
Evas_Object *o;
|
||||
|
||||
EINA_LIST_FOREACH(ep->extra_objects, el, o)
|
||||
{
|
||||
Evas_Coord oox, ooy;
|
||||
|
||||
o = el->data;
|
||||
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));
|
||||
}
|
||||
|
|
|
@ -38,8 +38,9 @@ _edje_text_init(void)
|
|||
void
|
||||
_edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep)
|
||||
{
|
||||
Evas_List *tmp;
|
||||
Eina_List *tmp;
|
||||
Edje_Part *pt = ep->part;
|
||||
Edje_Part_Description *desc;
|
||||
|
||||
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);
|
||||
|
||||
/* If any other classes exist add them */
|
||||
for (tmp = pt->other_desc; tmp; tmp = tmp->next)
|
||||
{
|
||||
Edje_Part_Description *desc;
|
||||
|
||||
desc = tmp->data;
|
||||
EINA_LIST_FOREACH(pt->other_desc, tmp, desc)
|
||||
if ((desc) && (desc->text.text_class))
|
||||
_edje_text_class_member_add(ed, desc->text.text_class);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_edje_text_part_on_add_clippers(Edje *ed, Edje_Real_Part *ep)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
for (l = ep->extra_objects; l; l = l->next)
|
||||
{
|
||||
Eina_List *l;
|
||||
Evas_Object *o;
|
||||
|
||||
o = l->data;
|
||||
EINA_LIST_FOREACH(ep->extra_objects, l, o)
|
||||
{
|
||||
if (ep->part->clip_to_id >= 0)
|
||||
{
|
||||
ep->clip_to = ed->table_parts[ep->part->clip_to_id % ed->table_parts_size];
|
||||
|
@ -83,20 +77,16 @@ _edje_text_part_on_add_clippers(Edje *ed, Edje_Real_Part *ep)
|
|||
void
|
||||
_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))
|
||||
_edje_text_class_member_del(ed, pt->default_desc->text.text_class);
|
||||
|
||||
for (tmp = pt->other_desc; tmp; tmp = tmp->next)
|
||||
{
|
||||
Edje_Part_Description *desc;
|
||||
|
||||
desc = tmp->data;
|
||||
EINA_LIST_FOREACH(pt->other_desc, tmp, desc)
|
||||
if (desc->text.text_class)
|
||||
_edje_text_class_member_del(ed, desc->text.text_class);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_edje_text_real_part_on_del(Edje *ed, Edje_Real_Part *ep)
|
||||
|
@ -105,8 +95,8 @@ _edje_text_real_part_on_del(Edje *ed, Edje_Real_Part *ep)
|
|||
{
|
||||
Evas_Object *o;
|
||||
|
||||
o = ep->extra_objects->data;
|
||||
ep->extra_objects = evas_list_remove(ep->extra_objects, o);
|
||||
o = eina_list_data_get(ep->extra_objects);
|
||||
ep->extra_objects = eina_list_remove(ep->extra_objects, o);
|
||||
evas_object_del(o);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,13 +228,14 @@ _edje_format_reparse(Edje_File *edf, const char *str, Edje_Style_Tag **tag_ret)
|
|||
void
|
||||
_edje_textblock_style_all_update(Edje *ed)
|
||||
{
|
||||
Evas_List *l, *ll;
|
||||
Eina_List *l, *ll;
|
||||
Edje_Style *stl;
|
||||
|
||||
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_Text_Class *tc;
|
||||
char *buf = NULL;
|
||||
|
@ -243,17 +244,13 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
int found = 0;
|
||||
char *fontset = NULL, *fontsource = NULL;
|
||||
|
||||
stl = l->data;
|
||||
/* Make sure the style is already defined */
|
||||
if (!stl->style) break;
|
||||
|
||||
/* Make sure the style contains a text_class */
|
||||
for (ll = stl->tags; ll; ll = ll->next)
|
||||
{
|
||||
tag = ll->data;
|
||||
EINA_LIST_FOREACH(stl->tags, ll, tag)
|
||||
if (tag->text_class)
|
||||
found = 1;
|
||||
}
|
||||
|
||||
/* No text classes , goto next style */
|
||||
if (!found) continue;
|
||||
|
@ -264,9 +261,8 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
fontsource = _edje_str_escape(ed->file->path);
|
||||
|
||||
/* 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;
|
||||
|
||||
/* Add Tag Key */
|
||||
|
@ -335,21 +331,18 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
void
|
||||
_edje_textblock_styles_add(Edje *ed)
|
||||
{
|
||||
Evas_List *l, *ll;
|
||||
Eina_List *l, *ll;
|
||||
Edje_Style *stl;
|
||||
|
||||
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;
|
||||
|
||||
stl = l->data;
|
||||
|
||||
/* 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;
|
||||
_edje_text_class_member_add(ed, tag->text_class);
|
||||
}
|
||||
|
@ -359,21 +352,18 @@ _edje_textblock_styles_add(Edje *ed)
|
|||
void
|
||||
_edje_textblock_styles_del(Edje *ed)
|
||||
{
|
||||
Evas_List *l, *ll;
|
||||
Eina_List *l, *ll;
|
||||
Edje_Style *stl;
|
||||
|
||||
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;
|
||||
|
||||
stl = l->data;
|
||||
|
||||
/* 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;
|
||||
_edje_text_class_member_del(ed, tag->text_class);
|
||||
}
|
||||
|
@ -389,18 +379,17 @@ _edje_textblock_styles_del(Edje *ed)
|
|||
void
|
||||
_edje_textblock_style_parse_and_fix(Edje_File *edf)
|
||||
{
|
||||
Evas_List *l, *ll;
|
||||
|
||||
for (l = edf->styles; l; l = l->next)
|
||||
{
|
||||
Eina_List *l, *ll;
|
||||
Edje_Style *stl;
|
||||
|
||||
EINA_LIST_FOREACH(edf->styles, l, stl)
|
||||
{
|
||||
Edje_Style_Tag *tag;
|
||||
char *buf = NULL;
|
||||
int bufalloc = 0;
|
||||
int buflen = 0;
|
||||
char *fontset = NULL, *fontsource = NULL, *ts;
|
||||
|
||||
stl = l->data;
|
||||
if (stl->style) break;
|
||||
|
||||
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);
|
||||
|
||||
/* 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;
|
||||
|
||||
/* Add Tag Key */
|
||||
|
@ -479,13 +467,13 @@ _edje_textblock_style_cleanup(Edje_File *edf)
|
|||
Edje_Style *stl;
|
||||
|
||||
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)
|
||||
{
|
||||
Edje_Style_Tag *tag;
|
||||
|
||||
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 (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
|
||||
{
|
||||
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);
|
||||
|
@ -46,10 +46,11 @@ edje_freeze(void)
|
|||
#else
|
||||
// FIXME: could just have a global freeze instead of per object
|
||||
// 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)
|
||||
edje_object_freeze((Evas_Object *)(l->data));
|
||||
EINA_LIST_FOREACH(_edje_edjes, l, data)
|
||||
edje_object_freeze(data);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -83,29 +84,30 @@ _edje_thaw_edje(Edje *ed)
|
|||
EAPI void
|
||||
edje_thaw(void)
|
||||
{
|
||||
Evas_Object *data;
|
||||
#ifdef FASTFREEZE
|
||||
_edje_freeze_val--;
|
||||
printf("fr -- ->%i\n", _edje_freeze_val);
|
||||
if ((_edje_freeze_val <= 0) && (_edje_freeze_calc_count > 0))
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
|
||||
_edje_freeze_calc_count = 0;
|
||||
for (l = _edje_edjes; l; l = l->next)
|
||||
EINA_LIST_FOREACH(_edje_edjes, l, data)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
ed = _edje_fetch(l->data);
|
||||
ed = _edje_fetch(data);
|
||||
if (ed) _edje_thaw_edje(ed);
|
||||
}
|
||||
}
|
||||
#else
|
||||
// FIXME: could just have a global freeze instead of per object
|
||||
// comment as above.. why?
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
|
||||
for (l = _edje_edjes; l; l = l->next)
|
||||
edje_object_thaw((Evas_Object *)(l->data));
|
||||
EINA_LIST_FOREACH(_edje_edjes, l, data)
|
||||
edje_object_thaw(data);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -128,12 +130,13 @@ edje_fontset_append_get(void)
|
|||
EAPI void
|
||||
edje_scale_set(double scale)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Evas_Object *data;
|
||||
|
||||
if (_edje_scale == scale) return;
|
||||
_edje_scale = scale;
|
||||
for (l = _edje_edjes; l; l = l->next)
|
||||
edje_object_calc_force((Evas_Object *)(l->data));
|
||||
EINA_LIST_FOREACH(_edje_edjes, l, data)
|
||||
edje_object_calc_force(data);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
|
@ -169,20 +172,16 @@ EAPI const char *
|
|||
edje_object_data_get(const Evas_Object *obj, const char *key)
|
||||
{
|
||||
Edje *ed;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Data *di;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!key))
|
||||
return NULL;
|
||||
if (!ed->collection) return NULL;
|
||||
for (l = ed->collection->data; l; l = l->next)
|
||||
{
|
||||
Edje_Data *di;
|
||||
|
||||
di = l->data;
|
||||
EINA_LIST_FOREACH(ed->collection->data, l, di)
|
||||
if ((di->key) && (!strcmp(di->key, key)))
|
||||
return (const char *)di->value;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -265,7 +264,7 @@ edje_object_thaw(Evas_Object *obj)
|
|||
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)
|
||||
{
|
||||
Evas_List *members;
|
||||
Eina_List *members;
|
||||
Edje_Color_Class *cc;
|
||||
|
||||
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;
|
||||
|
||||
ed = members->data;
|
||||
ed = eina_list_data_get(members);
|
||||
ed->dirty = 1;
|
||||
_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 *cc;
|
||||
Evas_List *members;
|
||||
Eina_List *members;
|
||||
|
||||
if (!color_class) return;
|
||||
|
||||
|
@ -358,10 +357,10 @@ edje_color_class_del(const char *color_class)
|
|||
{
|
||||
Edje *ed;
|
||||
|
||||
ed = members->data;
|
||||
ed = eina_list_data_get(members);
|
||||
ed->dirty = 1;
|
||||
_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
|
||||
* must be free()'d by the caller.
|
||||
*/
|
||||
Evas_List *
|
||||
Eina_List *
|
||||
edje_color_class_list(void)
|
||||
{
|
||||
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;
|
||||
|
||||
fd = fdata;
|
||||
fd->list = evas_list_append(fd->list, strdup(key));
|
||||
fd->list = eina_list_append(fd->list, strdup(key));
|
||||
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 *ed;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Color_Class *cc;
|
||||
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 (a < 0) a = 0;
|
||||
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->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->b3 = b3;
|
||||
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;
|
||||
|
||||
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 *ed;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Color_Class *cc = NULL;
|
||||
int i;
|
||||
|
||||
if (!color_class) return;
|
||||
|
||||
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))
|
||||
{
|
||||
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);
|
||||
free(cc);
|
||||
return;
|
||||
|
@ -549,7 +546,7 @@ edje_object_color_class_del(Evas_Object *obj, const char *color_class)
|
|||
EAPI void
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
ed = members->data;
|
||||
ed = eina_list_data_get(members);
|
||||
ed->dirty = 1;
|
||||
_edje_textblock_style_all_update(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 *tc;
|
||||
Evas_List *members;
|
||||
Eina_List *members;
|
||||
|
||||
if (!text_class) return;
|
||||
|
||||
|
@ -638,11 +635,11 @@ edje_text_class_del(const char *text_class)
|
|||
{
|
||||
Edje *ed;
|
||||
|
||||
ed = members->data;
|
||||
ed = eina_list_data_get(members);
|
||||
ed->dirty = 1;
|
||||
_edje_textblock_style_all_update(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
|
||||
* the list must be free()'d by the caller.
|
||||
*/
|
||||
Evas_List *
|
||||
Eina_List *
|
||||
edje_text_class_list(void)
|
||||
{
|
||||
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;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -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 *ed;
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Text_Class *tc;
|
||||
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;
|
||||
|
||||
/* 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)))
|
||||
{
|
||||
/* 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 */
|
||||
ed->text_classes = evas_list_append(ed->text_classes, tc);
|
||||
ed->text_classes = eina_list_append(ed->text_classes, tc);
|
||||
ed->dirty = 1;
|
||||
_edje_textblock_style_all_update(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
|
||||
* @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 *ed;
|
||||
|
@ -1866,28 +1862,22 @@ _edje_real_part_get(Edje *ed, const char *part)
|
|||
Edje_Color_Class *
|
||||
_edje_color_class_find(Edje *ed, const char *color_class)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Color_Class *cc = NULL;
|
||||
|
||||
if ((!ed) || (!color_class)) return NULL;
|
||||
|
||||
/* first look through the object scope */
|
||||
for (l = ed->color_classes; l; l = l->next)
|
||||
{
|
||||
cc = l->data;
|
||||
EINA_LIST_FOREACH(ed->color_classes, l, cc)
|
||||
if ((cc->name) && (!strcmp(color_class, cc->name))) return cc;
|
||||
}
|
||||
|
||||
/* next look through the global scope */
|
||||
cc = evas_hash_find(_edje_color_class_hash, color_class);
|
||||
if (cc) return cc;
|
||||
|
||||
/* finally, look through the file scope */
|
||||
for (l = ed->file->color_classes; l; l = l->next)
|
||||
{
|
||||
cc = l->data;
|
||||
EINA_LIST_FOREACH(ed->file->color_classes, l, cc)
|
||||
if ((cc->name) && (!strcmp(color_class, cc->name))) return cc;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1895,7 +1885,7 @@ _edje_color_class_find(Edje *ed, const char *color_class)
|
|||
void
|
||||
_edje_color_class_member_add(Edje *ed, const char *color_class)
|
||||
{
|
||||
Evas_List *members;
|
||||
Eina_List *members;
|
||||
|
||||
if ((!ed) || (!color_class)) return;
|
||||
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);
|
||||
}
|
||||
|
||||
members = evas_list_prepend(members, ed);
|
||||
members = eina_list_prepend(members, ed);
|
||||
_edje_color_class_member_hash =
|
||||
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
|
||||
_edje_color_class_member_del(Edje *ed, const char *color_class)
|
||||
{
|
||||
Evas_List *members;
|
||||
Eina_List *members;
|
||||
|
||||
if ((!ed) || (!color_class)) return;
|
||||
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 =
|
||||
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)
|
||||
{
|
||||
_edje_color_class_member_hash =
|
||||
|
@ -1936,7 +1926,7 @@ _edje_color_class_member_del(Edje *ed, const char *color_class)
|
|||
static Evas_Bool
|
||||
member_list_free(const Evas_Hash *hash, const char *key, void *data, void *fdata)
|
||||
{
|
||||
evas_list_free(data);
|
||||
eina_list_free(data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1972,41 +1962,33 @@ _edje_color_class_hash_free(void)
|
|||
void
|
||||
_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))
|
||||
_edje_color_class_member_del(ed, ep->default_desc->color_class);
|
||||
|
||||
for (tmp = ep->other_desc; tmp; tmp = tmp->next)
|
||||
{
|
||||
Edje_Part_Description *desc;
|
||||
|
||||
desc = tmp->data;
|
||||
EINA_LIST_FOREACH(ep->other_desc, tmp, desc)
|
||||
if (desc->color_class)
|
||||
_edje_color_class_member_del(ed, desc->color_class);
|
||||
}
|
||||
}
|
||||
|
||||
Edje_Text_Class *
|
||||
_edje_text_class_find(Edje *ed, const char *text_class)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
if ((!ed) || (!text_class)) return NULL;
|
||||
for (l = ed->text_classes; l; l = l->next)
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
tc = l->data;
|
||||
if ((!ed) || (!text_class)) return NULL;
|
||||
EINA_LIST_FOREACH(ed->text_classes, l, tc)
|
||||
if ((tc->name) && (!strcmp(text_class, tc->name))) return tc;
|
||||
}
|
||||
return evas_hash_find(_edje_text_class_hash, text_class);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_text_class_member_add(Edje *ed, const char *text_class)
|
||||
{
|
||||
Evas_List *members;
|
||||
Eina_List *members;
|
||||
|
||||
if ((!ed) || (!text_class)) return;
|
||||
|
||||
|
@ -2021,7 +2003,7 @@ _edje_text_class_member_add(Edje *ed, const char *text_class)
|
|||
}
|
||||
|
||||
/* Update the member list */
|
||||
members = evas_list_prepend(members, ed);
|
||||
members = eina_list_prepend(members, ed);
|
||||
|
||||
/* Add the member list back */
|
||||
_edje_text_class_member_hash =
|
||||
|
@ -2031,7 +2013,7 @@ _edje_text_class_member_add(Edje *ed, const char *text_class)
|
|||
void
|
||||
_edje_text_class_member_del(Edje *ed, const char *text_class)
|
||||
{
|
||||
Evas_List *members;
|
||||
Eina_List *members;
|
||||
|
||||
if ((!ed) || (!text_class)) return;
|
||||
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 =
|
||||
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)
|
||||
{
|
||||
_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 Ecore_Animator *_edje_animator = NULL;
|
||||
static Evas_List *_edje_anim_list = NULL;
|
||||
static Eina_List *_edje_anim_list = NULL;
|
||||
|
||||
static int
|
||||
_edje_var_timer_cb(void *data)
|
||||
|
@ -24,7 +24,7 @@ _edje_var_timer_cb(void *data)
|
|||
embryo_program_vm_push(ed->collection->script);
|
||||
_edje_embryo_globals_init(ed);
|
||||
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;
|
||||
free(et);
|
||||
{
|
||||
|
@ -44,32 +44,34 @@ _edje_var_timer_cb(void *data)
|
|||
static int
|
||||
_edje_var_anim_cb(void *data)
|
||||
{
|
||||
Evas_List *l, *tl = NULL;
|
||||
Eina_List *l, *tl = NULL;
|
||||
double t;
|
||||
const void *tmp;
|
||||
|
||||
t = ecore_time_get();
|
||||
for (l = _edje_anim_list; l; l = l->next)
|
||||
tl = evas_list_append(tl, l->data);
|
||||
EINA_LIST_FOREACH(_edje_anim_list, l, tmp)
|
||||
tl = eina_list_append(tl, tmp);
|
||||
while (tl)
|
||||
{
|
||||
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_block(ed);
|
||||
_edje_freeze(ed);
|
||||
tl = evas_list_remove(tl, ed);
|
||||
tl = eina_list_remove(tl, ed);
|
||||
if (!ed->var_pool) continue;
|
||||
tl2 = NULL;
|
||||
for (l = ed->var_pool->animators; l; l = l->next)
|
||||
tl2 = evas_list_append(tl2, l->data);
|
||||
EINA_LIST_FOREACH(ed->var_pool->animators, l, tmp)
|
||||
tl2 = eina_list_append(tl2, tmp);
|
||||
ed->var_pool->walking_list++;
|
||||
while (tl2)
|
||||
{
|
||||
Edje_Var_Animator *ea;
|
||||
|
||||
ea = tl2->data;
|
||||
ea = eina_list_data_get(tl2);
|
||||
if ((ed->var_pool) && (!ea->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;
|
||||
}
|
||||
}
|
||||
tl2 = evas_list_remove(tl2, ea);
|
||||
tl2 = eina_list_remove(tl2, ea);
|
||||
if (ed->block_break)
|
||||
{
|
||||
evas_list_free(tl2);
|
||||
eina_list_free(tl2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
l = l->next;
|
||||
ed->var_pool->animators = evas_list_remove(ed->var_pool->animators, ea);
|
||||
l = eina_list_next(l);
|
||||
ed->var_pool->animators = eina_list_remove(ed->var_pool->animators, ea);
|
||||
free(ea);
|
||||
}
|
||||
else
|
||||
l = l->next;
|
||||
l = eina_list_next(l);
|
||||
}
|
||||
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_thaw(ed);
|
||||
_edje_unref(ed);
|
||||
|
@ -195,8 +194,8 @@ _edje_var_shutdown(Edje *ed)
|
|||
{
|
||||
while (ed->var_pool->vars[i].data.l.v)
|
||||
{
|
||||
_edje_var_free(ed->var_pool->vars[i].data.l.v->data);
|
||||
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);
|
||||
_edje_var_free(eina_list_data_get(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;
|
||||
|
||||
et = ed->var_pool->timers->data;
|
||||
et = eina_list_data_get(ed->var_pool->timers);
|
||||
ecore_timer_del(et->timer);
|
||||
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)
|
||||
{
|
||||
_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_animator)
|
||||
|
@ -227,9 +226,9 @@ _edje_var_shutdown(Edje *ed)
|
|||
{
|
||||
Edje_Var_Animator *ea;
|
||||
|
||||
ea = ed->var_pool->animators->data;
|
||||
ea = eina_list_data_get(ed->var_pool->animators);
|
||||
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);
|
||||
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;
|
||||
if ((id < 0) || (id >= ed->var_pool->size)) 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
|
||||
|
@ -543,7 +542,7 @@ _edje_var_list_var_prepend(Edje *ed, int id, Edje_Var *var)
|
|||
id -= EDJE_VAR_MAGIC_BASE;
|
||||
if ((id < 0) || (id >= ed->var_pool->size)) 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
|
||||
|
@ -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;
|
||||
if ((id < 0) || (id >= ed->var_pool->size)) 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
|
||||
|
@ -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;
|
||||
if ((id < 0) || (id >= ed->var_pool->size)) 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 *
|
||||
|
@ -576,7 +575,7 @@ _edje_var_list_nth(Edje *ed, int id, int n)
|
|||
id -= EDJE_VAR_MAGIC_BASE;
|
||||
if ((id < 0) || (id >= ed->var_pool->size)) 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
|
||||
|
@ -589,7 +588,7 @@ _edje_var_list_count_get(Edje *ed, int id)
|
|||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
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
|
||||
|
@ -603,13 +602,13 @@ _edje_var_list_remove_nth(Edje *ed, int id, int n)
|
|||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
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)
|
||||
{
|
||||
_edje_var_free(nth->data);
|
||||
ed->var_pool->vars[id].data.l.v = evas_list_remove_list(ed->var_pool->vars[id].data.l.v, nth);
|
||||
_edje_var_free(eina_list_data_get(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);
|
||||
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;
|
||||
}
|
||||
|
||||
static Edje_Var_Timer *
|
||||
_edje_var_timer_find(Edje *ed, int id)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Var_Timer *et;
|
||||
|
||||
if (!ed->var_pool) return NULL;
|
||||
|
||||
for (l = ed->var_pool->timers; l; l = l->next)
|
||||
{
|
||||
Edje_Var_Timer *et = l->data;
|
||||
|
||||
EINA_LIST_FOREACH(ed->var_pool->timers, l, et)
|
||||
if (et->id == id) return et;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -985,7 +981,7 @@ _edje_var_timer_del(Edje *ed, int id)
|
|||
et = _edje_var_timer_find(ed, id);
|
||||
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);
|
||||
free(et);
|
||||
}
|
||||
|
@ -1008,8 +1004,8 @@ _edje_var_anim_add(Edje *ed, double len, const char *fname, int val)
|
|||
ea->edje = ed;
|
||||
ea->func = fn;
|
||||
ea->val = val;
|
||||
_edje_anim_list = evas_list_append(_edje_anim_list, ed);
|
||||
ed->var_pool->animators = evas_list_prepend(ed->var_pool->animators, ea);
|
||||
_edje_anim_list = eina_list_append(_edje_anim_list, ed);
|
||||
ed->var_pool->animators = eina_list_prepend(ed->var_pool->animators, ea);
|
||||
if (!_edje_animator)
|
||||
_edje_animator = ecore_animator_add(_edje_var_anim_cb, NULL);
|
||||
return ea->id;
|
||||
|
@ -1018,16 +1014,13 @@ _edje_var_anim_add(Edje *ed, double len, const char *fname, int val)
|
|||
static Edje_Var_Animator *
|
||||
_edje_var_anim_find(Edje *ed, int id)
|
||||
{
|
||||
Evas_List *l;
|
||||
Eina_List *l;
|
||||
Edje_Var_Animator *ea;
|
||||
|
||||
if (!ed->var_pool) return NULL;
|
||||
|
||||
for (l = ed->var_pool->animators; l; l = l->next)
|
||||
{
|
||||
Edje_Var_Animator *ea = l->data;
|
||||
|
||||
EINA_LIST_FOREACH(ed->var_pool->animators, l, ea)
|
||||
if (ea->id == id) return ea;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1046,12 +1039,12 @@ _edje_var_anim_del(Edje *ed, int id)
|
|||
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);
|
||||
|
||||
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_animator)
|
||||
|
|
Loading…
Reference in New Issue