forked from enlightenment/efl
parent
c63454baea
commit
974152be16
|
@ -19,11 +19,11 @@ _edje_file_coll_open(Edje_File *edf, Eet_File *ef, const char *coll)
|
|||
int id = -1, close_eet = 0, size = 0;
|
||||
char buf[256];
|
||||
void *data;
|
||||
|
||||
|
||||
for (l = edf->collection_dir->entries; l; l = l->next)
|
||||
{
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
|
||||
|
||||
ce = l->data;
|
||||
if ((ce->entry) && (!strcmp(ce->entry, coll)))
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ _edje_file_coll_open(Edje_File *edf, Eet_File *ef, const char *coll)
|
|||
}
|
||||
}
|
||||
if (id < 0) return NULL;
|
||||
|
||||
|
||||
if (!ef)
|
||||
{
|
||||
ef = eet_open(edf->path, EET_FILE_MODE_READ);
|
||||
|
@ -46,17 +46,17 @@ _edje_file_coll_open(Edje_File *edf, Eet_File *ef, const char *coll)
|
|||
if (close_eet) eet_close(ef);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
snprintf(buf, sizeof(buf), "scripts/%i", id);
|
||||
data = eet_read(ef, buf, &size);
|
||||
if (close_eet) eet_close(ef);
|
||||
|
||||
|
||||
if (data)
|
||||
{
|
||||
edc->script = embryo_program_new(data, size);
|
||||
free(data);
|
||||
}
|
||||
|
||||
|
||||
edc->part = evas_stringshare_add(coll);
|
||||
edc->references = 1;
|
||||
edf->collection_hash = evas_hash_add(edf->collection_hash, coll, edc);
|
||||
|
@ -107,7 +107,7 @@ _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Co
|
|||
*error_ret = EDJE_LOAD_ERROR_DOES_NOT_EXIST;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
ef = eet_open(file, EET_FILE_MODE_READ);
|
||||
if (!ef)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Co
|
|||
eet_close(ef);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
edf->path = evas_stringshare_add(file);
|
||||
edf->references = 1;
|
||||
|
||||
|
@ -148,7 +148,7 @@ _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Co
|
|||
free(di);
|
||||
}
|
||||
edf->data = NULL;
|
||||
|
||||
|
||||
if (coll)
|
||||
{
|
||||
edc = _edje_file_coll_open(edf, ef, coll);
|
||||
|
@ -160,7 +160,7 @@ _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Co
|
|||
}
|
||||
|
||||
edf->font_hash = NULL;
|
||||
|
||||
|
||||
_edje_font_hash(edf);
|
||||
|
||||
eet_close(ef);
|
||||
|
@ -202,7 +202,7 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
_edje_file_hash = evas_hash_add(_edje_file_hash, file, edf);
|
||||
return edf;
|
||||
}
|
||||
|
||||
|
||||
if (!coll) return edf;
|
||||
|
||||
edc = evas_hash_find(edf->collection_hash, coll);
|
||||
|
@ -237,7 +237,7 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
for (l = edc->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Part *ep, *ep2;
|
||||
|
||||
|
||||
/* Register any color classes in this parts descriptions. */
|
||||
ep = l->data;
|
||||
hist = NULL;
|
||||
|
@ -261,16 +261,16 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
while (ep2->dragable.events_id >= 0)
|
||||
{
|
||||
Edje_Part* prev;
|
||||
|
||||
|
||||
prev = ep2;
|
||||
|
||||
|
||||
ep2 = evas_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))
|
||||
{
|
||||
printf("EDJE ERROR: events_to loops. invalidating loop.\n");
|
||||
|
@ -300,7 +300,7 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
}
|
||||
}
|
||||
if (edc_ret) *edc_ret = edc;
|
||||
|
||||
|
||||
return edf;
|
||||
}
|
||||
|
||||
|
@ -308,12 +308,12 @@ void
|
|||
_edje_cache_coll_clean(Edje_File *edf)
|
||||
{
|
||||
int count;
|
||||
|
||||
|
||||
count = evas_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));
|
||||
_edje_collection_free(edf, edc);
|
||||
|
@ -327,7 +327,7 @@ _edje_cache_coll_flush(Edje_File *edf)
|
|||
while (edf->collection_cache)
|
||||
{
|
||||
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));
|
||||
_edje_collection_free(edf, edc);
|
||||
|
@ -348,12 +348,12 @@ static void
|
|||
_edje_cache_file_clean(void)
|
||||
{
|
||||
int count;
|
||||
|
||||
|
||||
count = evas_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));
|
||||
_edje_file_free(edf);
|
||||
|
@ -400,7 +400,7 @@ EAPI void
|
|||
edje_file_cache_flush(void)
|
||||
{
|
||||
int ps;
|
||||
|
||||
|
||||
ps = _edje_file_cache_size;
|
||||
_edje_file_cache_size = 0;
|
||||
_edje_cache_file_clean();
|
||||
|
@ -411,13 +411,13 @@ EAPI void
|
|||
edje_collection_cache_set(int count)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
|
||||
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;
|
||||
_edje_cache_coll_clean(edf);
|
||||
}
|
||||
|
@ -435,13 +435,13 @@ edje_collection_cache_flush(void)
|
|||
{
|
||||
int ps;
|
||||
Evas_List *l;
|
||||
|
||||
|
||||
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;
|
||||
_edje_cache_coll_flush(edf);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ void
|
|||
_edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, double pos)
|
||||
{
|
||||
double npos;
|
||||
|
||||
|
||||
pos = CLAMP(pos, 0.0, 1.0);
|
||||
|
||||
npos = 0.0;
|
||||
|
@ -42,7 +42,7 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, double pos)
|
|||
if (npos == ep->description_pos) return;
|
||||
|
||||
ep->description_pos = npos;
|
||||
|
||||
|
||||
ed->dirty = 1;
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ void
|
|||
_edje_recalc(Edje *ed)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
if (!ed->dirty) return;
|
||||
if (ed->freeze)
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ _edje_recalc(Edje *ed)
|
|||
for (i = 0; i < ed->table_parts_size; i++)
|
||||
{
|
||||
Edje_Real_Part *ep;
|
||||
|
||||
|
||||
ep = ed->table_parts[i];
|
||||
ep->calculated = FLAG_NONE;
|
||||
ep->calculating = FLAG_NONE;
|
||||
|
@ -156,7 +156,7 @@ _edje_recalc(Edje *ed)
|
|||
for (i = 0; i < ed->table_parts_size; i++)
|
||||
{
|
||||
Edje_Real_Part *ep;
|
||||
|
||||
|
||||
ep = ed->table_parts[i];
|
||||
if (ep->calculated != FLAG_XY)
|
||||
_edje_part_recalc(ed, ep, (~ep->calculated) & FLAG_XY);
|
||||
|
@ -174,25 +174,25 @@ _edje_part_dragable_calc(Edje *ed, Edje_Real_Part *ep, double *x, double *y)
|
|||
{
|
||||
double dx, dy, dw, dh;
|
||||
int ret = 0;
|
||||
|
||||
if ((ep->part->dragable.x != 0) &&
|
||||
|
||||
if ((ep->part->dragable.x != 0) &&
|
||||
(ep->part->dragable.y != 0 )) ret = 3;
|
||||
else if (ep->part->dragable.x != 0) ret = 1;
|
||||
else if (ep->part->dragable.y != 0) ret = 2;
|
||||
|
||||
|
||||
dx = ep->x - ep->confine_to->x;
|
||||
dw = ep->confine_to->w - ep->w;
|
||||
if (dw != 0.0) dx /= dw;
|
||||
else dx = 0.0;
|
||||
|
||||
|
||||
dy = ep->y - ep->confine_to->y;
|
||||
dh = ep->confine_to->h - ep->h;
|
||||
if (dh != 0) dy /= dh;
|
||||
else dy = 0.0;
|
||||
|
||||
|
||||
if (x) *x = dx;
|
||||
if (y) *y = dy;
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
|
@ -240,13 +240,13 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, double x, double y)
|
|||
|
||||
static void
|
||||
_edje_part_recalc_single(Edje *ed,
|
||||
Edje_Real_Part *ep,
|
||||
Edje_Part_Description *desc,
|
||||
Edje_Real_Part *ep,
|
||||
Edje_Part_Description *desc,
|
||||
Edje_Part_Description *chosen_desc,
|
||||
Edje_Real_Part *rel1_to_x,
|
||||
Edje_Real_Part *rel1_to_y,
|
||||
Edje_Real_Part *rel2_to_x,
|
||||
Edje_Real_Part *rel2_to_y,
|
||||
Edje_Real_Part *rel1_to_x,
|
||||
Edje_Real_Part *rel1_to_y,
|
||||
Edje_Real_Part *rel2_to_x,
|
||||
Edje_Real_Part *rel2_to_y,
|
||||
Edje_Real_Part *confine_to,
|
||||
Edje_Calc_Params *params,
|
||||
int flags)
|
||||
|
@ -254,7 +254,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
int minw = 0, minh = 0, maxw = 0, maxh = 0;
|
||||
|
||||
flags = FLAG_XY;
|
||||
|
||||
|
||||
// if (flags & FLAG_X)
|
||||
{
|
||||
minw = desc->min.w;
|
||||
|
@ -306,28 +306,28 @@ _edje_part_recalc_single(Edje *ed,
|
|||
(desc->rel2.relative_y * ed->h) -
|
||||
params->y + 1;
|
||||
}
|
||||
|
||||
|
||||
/* aspect */
|
||||
if ((params->h > 0) &&
|
||||
if ((params->h > 0) &&
|
||||
(((flags | ep->calculated) & FLAG_XY) == FLAG_XY))
|
||||
{
|
||||
int apref;
|
||||
double aspect, amax, amin;
|
||||
double new_w = 0, new_h = 0, want_x, want_y, want_w, want_h;
|
||||
|
||||
|
||||
want_x = params->x;
|
||||
want_w = new_w = params->w;
|
||||
|
||||
|
||||
want_y = params->y;
|
||||
want_h = new_h = params->h;
|
||||
|
||||
|
||||
aspect = (double)params->w / (double)params->h;
|
||||
apref = desc->aspect.prefer;
|
||||
amax = desc->aspect.max;
|
||||
amin = desc->aspect.min;
|
||||
if ((ep->swallow_params.aspect.w > 0) &&
|
||||
(ep->swallow_params.aspect.h > 0))
|
||||
amin = amax =
|
||||
amin = amax =
|
||||
(double)ep->swallow_params.aspect.w /
|
||||
(double)ep->swallow_params.aspect.h;
|
||||
if (ep->swallow_params.aspect.mode > EDJE_ASPECT_CONTROL_NONE)
|
||||
|
@ -413,11 +413,11 @@ _edje_part_recalc_single(Edje *ed,
|
|||
{
|
||||
if ((maxw >= 0) && (new_w > maxw)) new_w = maxw;
|
||||
if (new_w < minw) new_w = minw;
|
||||
|
||||
|
||||
if ((maxh >= 0) && (new_h > maxh)) new_h = maxh;
|
||||
if (new_h < minh) new_h = minh;
|
||||
}
|
||||
|
||||
|
||||
/* do real adjustment */
|
||||
if (apref == EDJE_ASPECT_PREFER_BOTH)
|
||||
{
|
||||
|
@ -483,7 +483,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
params->x = want_x + ((want_w - params->w) * desc->align.x);
|
||||
params->y = want_y + ((want_h - params->h) * desc->align.y);
|
||||
}
|
||||
|
||||
|
||||
/* size step */
|
||||
if (flags & FLAG_X)
|
||||
{
|
||||
|
@ -491,7 +491,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
{
|
||||
int steps;
|
||||
int new_w;
|
||||
|
||||
|
||||
steps = params->w / desc->step.x;
|
||||
new_w = desc->step.x * steps;
|
||||
if (params->w > new_w)
|
||||
|
@ -508,7 +508,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
{
|
||||
int steps;
|
||||
int new_h;
|
||||
|
||||
|
||||
steps = params->h / desc->step.y;
|
||||
new_h = desc->step.y * steps;
|
||||
if (params->h > new_h)
|
||||
|
@ -527,7 +527,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
const char *style = "";
|
||||
Edje_Style *stl = NULL;
|
||||
Evas_List *l;
|
||||
|
||||
|
||||
if (chosen_desc->text.id_source >= 0)
|
||||
{
|
||||
ep->text.source = ed->table_parts[chosen_desc->text.id_source % ed->table_parts_size];
|
||||
|
@ -538,7 +538,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
ep->text.source = NULL;
|
||||
style = chosen_desc->text.style;
|
||||
}
|
||||
|
||||
|
||||
if (chosen_desc->text.id_text_source >= 0)
|
||||
{
|
||||
ep->text.text_source = ed->table_parts[chosen_desc->text.id_text_source % ed->table_parts_size];
|
||||
|
@ -551,29 +551,29 @@ _edje_part_recalc_single(Edje *ed,
|
|||
text = chosen_desc->text.text;
|
||||
if (ep->text.text) text = ep->text.text;
|
||||
}
|
||||
|
||||
|
||||
for (l = ed->file->styles; l; l = l->next)
|
||||
{
|
||||
stl = l->data;
|
||||
if ((stl->name) && (!strcmp(stl->name, style))) break;
|
||||
stl = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (stl)
|
||||
{
|
||||
const char *ptxt;
|
||||
|
||||
|
||||
if (evas_object_textblock_style_get(ep->object) != stl->style)
|
||||
evas_object_textblock_style_set(ep->object, stl->style);
|
||||
ptxt = evas_object_textblock_text_markup_get(ep->object);
|
||||
if (((!ptxt) && (text)) ||
|
||||
if (((!ptxt) && (text)) ||
|
||||
((ptxt) && (text) && (strcmp(ptxt, text))) ||
|
||||
((ptxt) && (!text)))
|
||||
evas_object_textblock_text_markup_set(ep->object, text);
|
||||
if ((chosen_desc->text.min_x) || (chosen_desc->text.min_y))
|
||||
{
|
||||
int mw = 0, mh = 0;
|
||||
|
||||
|
||||
tw = th = 0;
|
||||
if (!chosen_desc->text.min_x)
|
||||
{
|
||||
|
@ -604,18 +604,18 @@ _edje_part_recalc_single(Edje *ed,
|
|||
Evas_Coord tw, th;
|
||||
int inlined_font = 0;
|
||||
|
||||
/* Update a object_text part */
|
||||
|
||||
/* Update a object_text part */
|
||||
|
||||
if (chosen_desc->text.id_source >= 0)
|
||||
ep->text.source = ed->table_parts[chosen_desc->text.id_source % ed->table_parts_size];
|
||||
else
|
||||
ep->text.source = NULL;
|
||||
|
||||
|
||||
if (chosen_desc->text.id_text_source >= 0)
|
||||
ep->text.text_source = ed->table_parts[chosen_desc->text.id_text_source % ed->table_parts_size];
|
||||
else
|
||||
ep->text.text_source = NULL;
|
||||
|
||||
|
||||
if (ep->text.text_source)
|
||||
text = ep->text.text_source->chosen_description->text.text;
|
||||
else
|
||||
|
@ -632,11 +632,11 @@ _edje_part_recalc_single(Edje *ed,
|
|||
}
|
||||
if (ep->text.source)
|
||||
{
|
||||
if ((ep->text.source->chosen_description->text.text_class) &&
|
||||
if ((ep->text.source->chosen_description->text.text_class) &&
|
||||
(*ep->text.source->chosen_description->text.text_class))
|
||||
{
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
|
||||
tc = _edje_text_class_find(ed, ep->text.source->chosen_description->text.text_class);
|
||||
if (tc)
|
||||
{
|
||||
|
@ -650,7 +650,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
if ((chosen_desc->text.text_class) && (*chosen_desc->text.text_class))
|
||||
{
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
|
||||
tc = _edje_text_class_find(ed, chosen_desc->text.text_class);
|
||||
if (tc)
|
||||
{
|
||||
|
@ -660,7 +660,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
}
|
||||
}
|
||||
if (!font) font = "";
|
||||
|
||||
|
||||
if (ep->text.text_source)
|
||||
{
|
||||
if (ep->text.text_source->text.text) text = ep->text.text_source->text.text;
|
||||
|
@ -680,7 +680,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
if (ep->text.size > 0) size = ep->text.size;
|
||||
}
|
||||
if (!text) text = "";
|
||||
|
||||
|
||||
/* check if the font is embedded in the .eet */
|
||||
if (ed->file->font_hash)
|
||||
{
|
||||
|
@ -700,7 +700,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
if ((_edje_fontset_append) && (font))
|
||||
{
|
||||
char *font2;
|
||||
|
||||
|
||||
font2 = malloc(strlen(font) + 1 + strlen(_edje_fontset_append) + 1);
|
||||
if (font2)
|
||||
{
|
||||
|
@ -731,12 +731,12 @@ _edje_part_recalc_single(Edje *ed,
|
|||
EVAS_TEXT_STYLE_FAR_SOFT_SHADOW,
|
||||
EVAS_TEXT_STYLE_GLOW
|
||||
};
|
||||
|
||||
|
||||
if (ep->part->effect < EDJE_TEXT_EFFECT_LAST)
|
||||
style = styles[ep->part->effect];
|
||||
else
|
||||
style = EVAS_TEXT_STYLE_PLAIN;
|
||||
|
||||
|
||||
evas_object_text_style_set(ep->object, style);
|
||||
evas_object_text_text_set(ep->object, text);
|
||||
evas_object_geometry_get(ep->object, NULL, NULL, &tw, &th);
|
||||
|
@ -782,7 +782,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
{
|
||||
if (params->w < minw)
|
||||
{
|
||||
params->x = params->x +
|
||||
params->x = params->x +
|
||||
((params->w - minw) * desc->align.x);
|
||||
params->w = minw;
|
||||
}
|
||||
|
@ -794,7 +794,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
{
|
||||
if (params->h < minh)
|
||||
{
|
||||
params->y = params->y +
|
||||
params->y = params->y +
|
||||
((params->h - minh) * desc->align.y);
|
||||
params->h = minh;
|
||||
}
|
||||
|
@ -807,7 +807,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
{
|
||||
if (params->w > maxw)
|
||||
{
|
||||
params->x = params->x +
|
||||
params->x = params->x +
|
||||
((params->w - maxw) * desc->align.x);
|
||||
params->w = maxw;
|
||||
}
|
||||
|
@ -819,7 +819,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
{
|
||||
if (params->h > maxh)
|
||||
{
|
||||
params->y = params->y +
|
||||
params->y = params->y +
|
||||
((params->h - maxh) * desc->align.y);
|
||||
params->h = maxh;
|
||||
}
|
||||
|
@ -831,7 +831,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
int offset;
|
||||
int step;
|
||||
double v;
|
||||
|
||||
|
||||
/* complex dragable params */
|
||||
if (flags & FLAG_X)
|
||||
{
|
||||
|
@ -845,7 +845,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
ep->drag.tmp.x;
|
||||
if (ep->part->dragable.step_x > 0)
|
||||
{
|
||||
params->x = confine_to->x +
|
||||
params->x = confine_to->x +
|
||||
((offset / ep->part->dragable.step_x) * ep->part->dragable.step_x);
|
||||
}
|
||||
else if (ep->part->dragable.count_x > 0)
|
||||
|
@ -853,7 +853,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
step = (confine_to->w - params->w) / ep->part->dragable.count_x;
|
||||
if (step < 1) step = 1;
|
||||
params->x = confine_to->x +
|
||||
((offset / step) * step);
|
||||
((offset / step) * step);
|
||||
}
|
||||
params->req_drag.x = params->x;
|
||||
params->req_drag.w = params->w;
|
||||
|
@ -870,7 +870,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
ep->drag.tmp.y;
|
||||
if (ep->part->dragable.step_y > 0)
|
||||
{
|
||||
params->y = confine_to->y +
|
||||
params->y = confine_to->y +
|
||||
((offset / ep->part->dragable.step_y) * ep->part->dragable.step_y);
|
||||
}
|
||||
else if (ep->part->dragable.count_y > 0)
|
||||
|
@ -878,7 +878,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
step = (confine_to->h - params->h) / ep->part->dragable.count_y;
|
||||
if (step < 1) step = 1;
|
||||
params->y = confine_to->y +
|
||||
((offset / step) * step);
|
||||
((offset / step) * step);
|
||||
}
|
||||
params->req_drag.y = params->y;
|
||||
params->req_drag.h = params->h;
|
||||
|
@ -964,7 +964,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
{
|
||||
m = (double)dx / (double)dy;
|
||||
angle = atan(m) * 180 / M_PI;
|
||||
if (dy < 0)
|
||||
if (dy < 0)
|
||||
angle = 180 - angle;
|
||||
else
|
||||
angle = 360 - angle;
|
||||
|
@ -982,7 +982,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
evas_object_image_size_get(ep->object, &fw, NULL);
|
||||
else
|
||||
fw = params->w;
|
||||
|
||||
|
||||
params->fill.x = desc->fill.pos_abs_x + (fw * desc->fill.pos_rel_x);
|
||||
params->fill.w = desc->fill.abs_x + (fw * desc->fill.rel_x);
|
||||
}
|
||||
|
@ -1018,7 +1018,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
if ((desc->color_class) && (*desc->color_class))
|
||||
{
|
||||
Edje_Color_Class *cc;
|
||||
|
||||
|
||||
cc = _edje_color_class_find(ed, desc->color_class);
|
||||
if (cc)
|
||||
{
|
||||
|
@ -1080,16 +1080,16 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
{
|
||||
#if 1
|
||||
const char *axes = "NONE", *faxes = "NONE";
|
||||
|
||||
if ((ep->calculating & FLAG_X) &&
|
||||
|
||||
if ((ep->calculating & FLAG_X) &&
|
||||
(ep->calculating & FLAG_Y))
|
||||
axes = "XY";
|
||||
else if ((ep->calculating & FLAG_X))
|
||||
axes = "X";
|
||||
else if ((ep->calculating & FLAG_Y))
|
||||
axes = "Y";
|
||||
|
||||
if ((flags & FLAG_X) &&
|
||||
|
||||
if ((flags & FLAG_X) &&
|
||||
(flags & FLAG_Y))
|
||||
faxes = "XY";
|
||||
else if ((flags & FLAG_X))
|
||||
|
@ -1100,9 +1100,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
" Already calculating %s [%02x] axes\n"
|
||||
" Need to calculate %s [%02x] axes\n",
|
||||
ep->part->name,
|
||||
axes, ep->calculating,
|
||||
axes, ep->calculating,
|
||||
faxes, flags);
|
||||
#endif
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if (flags & FLAG_X)
|
||||
|
@ -1122,7 +1122,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
if (ep->param2.rel2_to_y) _edje_part_recalc(ed, ep->param2.rel2_to_y, FLAG_Y);
|
||||
}
|
||||
if (ep->confine_to) _edje_part_recalc(ed, ep->confine_to, flags);
|
||||
|
||||
|
||||
/* actually calculate now */
|
||||
chosen_desc = ep->chosen_description;
|
||||
if (!chosen_desc)
|
||||
|
@ -1138,7 +1138,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
_edje_part_recalc_single(ed, ep, ep->param2.description, chosen_desc, ep->param2.rel1_to_x, ep->param2.rel1_to_y, ep->param2.rel2_to_x, ep->param2.rel2_to_y, ep->confine_to, &p2, flags);
|
||||
|
||||
pos = ep->description_pos;
|
||||
|
||||
|
||||
/* visible is special */
|
||||
if ((p1.visible) && (!p2.visible))
|
||||
p3.visible = (pos != 1.0);
|
||||
|
@ -1165,7 +1165,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
p3.req_drag.y = INTP(p1.req_drag.y, p2.req_drag.y, pos);
|
||||
p3.req_drag.w = INTP(p1.req_drag.w, p2.req_drag.w, pos);
|
||||
p3.req_drag.h = INTP(p1.req_drag.h, p2.req_drag.h, pos);
|
||||
|
||||
|
||||
p3.fill.x = INTP(p1.fill.x, p2.fill.x, pos);
|
||||
p3.fill.y = INTP(p1.fill.y, p2.fill.y, pos);
|
||||
p3.fill.w = INTP(p1.fill.w, p2.fill.w, pos);
|
||||
|
@ -1187,7 +1187,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
p3.color3.g = INTP(p1.color3.g, p2.color3.g, pos);
|
||||
p3.color3.b = INTP(p1.color3.b, p2.color3.b, pos);
|
||||
p3.color3.a = INTP(p1.color3.a, p2.color3.a, pos);
|
||||
|
||||
|
||||
p3.border.l = INTP(p1.border.l, p2.border.l, pos);
|
||||
p3.border.r = INTP(p1.border.r, p2.border.r, pos);
|
||||
p3.border.t = INTP(p1.border.t, p2.border.t, pos);
|
||||
|
@ -1197,14 +1197,14 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
p3.text.align.y = INTP(p1.text.align.y, p2.text.align.y, pos);
|
||||
p3.text.elipsis = INTP(p1.text.elipsis, p2.text.elipsis, pos);
|
||||
|
||||
p3.gradient.id = pos > 0.5 ? p2.gradient.id : p1.gradient.id;
|
||||
p3.gradient.type = pos > 0.5 ? p2.gradient.type : p1.gradient.type;
|
||||
p3.gradient.id = pos > 0.5 ? p2.gradient.id : p1.gradient.id;
|
||||
p3.gradient.type = pos > 0.5 ? p2.gradient.type : p1.gradient.type;
|
||||
}
|
||||
else
|
||||
{
|
||||
p3 = p1;
|
||||
}
|
||||
|
||||
|
||||
ep->req.x = p3.req.x;
|
||||
ep->req.y = p3.req.y;
|
||||
ep->req.w = p3.req.w;
|
||||
|
@ -1213,7 +1213,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
if (ep->drag.need_reset)
|
||||
{
|
||||
double dx, dy;
|
||||
|
||||
|
||||
dx = 0;
|
||||
dy = 0;
|
||||
_edje_part_dragable_calc(ed, ep, &dx, &dy);
|
||||
|
@ -1246,22 +1246,22 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
char buf[4096];
|
||||
int image_id;
|
||||
int image_count, image_num;
|
||||
|
||||
|
||||
evas_object_move(ep->object, ed->x + p3.x, ed->y + p3.y);
|
||||
evas_object_resize(ep->object, p3.w, p3.h);
|
||||
evas_object_image_fill_set(ep->object, p3.fill.x, p3.fill.y, p3.fill.w, p3.fill.h);
|
||||
evas_object_image_smooth_scale_set(ep->object, p3.smooth);
|
||||
|
||||
|
||||
evas_object_image_border_set(ep->object, p3.border.l, p3.border.r, p3.border.t, p3.border.b);
|
||||
evas_object_image_border_center_fill_set(ep->object, !(chosen_desc->border.no_fill));
|
||||
image_id = ep->param1.description->image.id;
|
||||
if (image_id < 0)
|
||||
{
|
||||
Edje_Image_Directory_Entry *ie;
|
||||
|
||||
|
||||
ie = evas_list_nth(ed->file->image_dir->entries, (-image_id) - 1);
|
||||
if ((ie) &&
|
||||
(ie->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) &&
|
||||
if ((ie) &&
|
||||
(ie->source_type == EDJE_IMAGE_SOURCE_TYPE_EXTERNAL) &&
|
||||
(ie->entry))
|
||||
{
|
||||
evas_object_image_file_set(ep->object, ie->entry, NULL);
|
||||
|
@ -1282,7 +1282,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
else
|
||||
{
|
||||
Edje_Part_Image_Id *imid;
|
||||
|
||||
|
||||
imid = evas_list_nth(ep->param2.description->image.tween_list, image_num - 1);
|
||||
if (imid) image_id = imid->id;
|
||||
}
|
||||
|
@ -1325,7 +1325,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
if (p3.visible) evas_object_show(ep->object);
|
||||
else evas_object_hide(ep->object);
|
||||
}
|
||||
else if ((ep->part->type == EDJE_PART_TYPE_SWALLOW) ||
|
||||
else if ((ep->part->type == EDJE_PART_TYPE_SWALLOW) ||
|
||||
(ep->part->type == EDJE_PART_TYPE_GROUP))
|
||||
{
|
||||
evas_object_move(ep->object, ed->x + p3.x, ed->y + p3.y);
|
||||
|
@ -1361,7 +1361,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
Evas_List *l;
|
||||
|
||||
se = evas_list_nth(ed->file->spectrum_dir->entries, p3.gradient.id);
|
||||
if (se)
|
||||
if (se)
|
||||
{
|
||||
evas_object_gradient_clear(ep->object);
|
||||
for (l = se->color_list; l; l = l->next)
|
||||
|
@ -1377,7 +1377,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ep->swallowed_object)
|
||||
{
|
||||
//// the below really is wrong - swallow color shouldnt affect swallowed object
|
||||
|
@ -1395,12 +1395,12 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
else evas_object_hide(ep->swallowed_object);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ep->x = p3.x;
|
||||
ep->y = p3.y;
|
||||
ep->w = p3.w;
|
||||
ep->h = p3.h;
|
||||
|
||||
|
||||
ep->calculated |= flags;
|
||||
ep->calculating = FLAG_NONE;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ _edje_mouse_in_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
Evas_Event_Mouse_In *ev;
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
|
||||
ev = event_info;
|
||||
ed = data;
|
||||
rp = evas_object_data_get(obj, "real_part");
|
||||
|
@ -27,7 +27,7 @@ _edje_mouse_out_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
Evas_Event_Mouse_Out *ev;
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
|
||||
ev = event_info;
|
||||
ed = data;
|
||||
rp = evas_object_data_get(obj, "real_part");
|
||||
|
@ -44,7 +44,7 @@ _edje_mouse_down_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
char buf[256];
|
||||
|
||||
|
||||
ev = event_info;
|
||||
ed = data;
|
||||
rp = evas_object_data_get(obj, "real_part");
|
||||
|
@ -63,7 +63,7 @@ _edje_mouse_down_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
{
|
||||
int x = 0, y = 0;
|
||||
Edje_Real_Part *events;
|
||||
|
||||
|
||||
events = rp->events_to;
|
||||
evas_object_geometry_get(rp->object, &x, &y, NULL, NULL);
|
||||
|
||||
|
@ -87,7 +87,7 @@ _edje_mouse_down_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
ed->dirty = 1;
|
||||
}
|
||||
_edje_recalc(ed);
|
||||
/*
|
||||
/*
|
||||
_edje_thaw(ed);
|
||||
_edje_unref(ed);
|
||||
_edje_ref(ed);
|
||||
|
@ -130,7 +130,7 @@ _edje_mouse_down_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
rp->still_in = 1;
|
||||
}
|
||||
// _edje_recalc(ed);
|
||||
_edje_thaw(ed);
|
||||
_edje_thaw(ed);
|
||||
_edje_unref(ed);
|
||||
return;
|
||||
e = NULL;
|
||||
|
@ -143,7 +143,7 @@ _edje_mouse_up_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
char buf[256];
|
||||
|
||||
|
||||
ev = event_info;
|
||||
ed = data;
|
||||
rp = evas_object_data_get(obj, "real_part");
|
||||
|
@ -195,7 +195,7 @@ _edje_mouse_move_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
Evas_Event_Mouse_Move *ev;
|
||||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
|
||||
ev = event_info;
|
||||
ed = data;
|
||||
rp = evas_object_data_get(obj, "real_part");
|
||||
|
@ -204,22 +204,22 @@ _edje_mouse_move_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
|
||||
_edje_ref(ed);
|
||||
_edje_emit(ed, "mouse,move", rp->part->name);
|
||||
|
||||
|
||||
if (rp->still_in)
|
||||
{
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
|
||||
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
||||
if ((ev->cur.canvas.x < x) || (ev->cur.canvas.y < y) ||
|
||||
if ((ev->cur.canvas.x < x) || (ev->cur.canvas.y < y) ||
|
||||
(ev->cur.canvas.x >= (x + w)) || (ev->cur.canvas.y >= (y + h)))
|
||||
rp->still_in = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
|
||||
evas_object_geometry_get(obj, &x, &y, &w, &h);
|
||||
if ((ev->cur.canvas.x >= x) && (ev->cur.canvas.y >= y) &&
|
||||
if ((ev->cur.canvas.x >= x) && (ev->cur.canvas.y >= y) &&
|
||||
(ev->cur.canvas.x < (x + w)) && (ev->cur.canvas.y < (y + h)))
|
||||
rp->still_in = 1;
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ _edje_mouse_move_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
{
|
||||
double dx, dy;
|
||||
int dir;
|
||||
|
||||
|
||||
dir = _edje_part_dragable_calc(ed, rp, &dx, &dy);
|
||||
if ((dx != rp->drag.val.x) || (dy != rp->drag.val.y))
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ _edje_mouse_move_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
}
|
||||
}
|
||||
_edje_unref(ed);
|
||||
_edje_thaw(ed);
|
||||
_edje_thaw(ed);
|
||||
return;
|
||||
e = NULL;
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ _edje_mouse_wheel_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
|
|||
Edje *ed;
|
||||
Edje_Real_Part *rp;
|
||||
char buf[256];
|
||||
|
||||
|
||||
ev = event_info;
|
||||
ed = data;
|
||||
rp = evas_object_data_get(obj, "real_part");
|
||||
|
@ -285,7 +285,7 @@ _edje_timer_cb(void *data)
|
|||
Evas_List *l;
|
||||
Evas_List *animl = NULL;
|
||||
Edje *ed;
|
||||
|
||||
|
||||
t = ecore_time_get();
|
||||
for (l = _edje_animators; l; l = l->next)
|
||||
{
|
||||
|
@ -296,7 +296,7 @@ _edje_timer_cb(void *data)
|
|||
while (animl)
|
||||
{
|
||||
Evas_List *newl = NULL;
|
||||
|
||||
|
||||
ed = animl->data;
|
||||
_edje_block(ed);
|
||||
_edje_freeze(ed);
|
||||
|
@ -309,7 +309,7 @@ _edje_timer_cb(void *data)
|
|||
while (newl)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
|
||||
runp = newl->data;
|
||||
newl = evas_list_remove(newl, newl->data);
|
||||
if (!runp->delete_me)
|
||||
|
@ -326,16 +326,16 @@ _edje_timer_cb(void *data)
|
|||
while (newl)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
|
||||
runp = newl->data;
|
||||
newl = evas_list_remove(newl, newl->data);
|
||||
if (runp->delete_me)
|
||||
{
|
||||
_edje_anim_count--;
|
||||
runp->edje->actions =
|
||||
_edje_anim_count--;
|
||||
runp->edje->actions =
|
||||
evas_list_remove(runp->edje->actions, runp);
|
||||
if (!runp->edje->actions)
|
||||
_edje_animators =
|
||||
_edje_animators =
|
||||
evas_list_remove(_edje_animators, runp->edje);
|
||||
free(runp);
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ int
|
|||
_edje_pending_timer_cb(void *data)
|
||||
{
|
||||
Edje_Pending_Program *pp;
|
||||
|
||||
|
||||
pp = data;
|
||||
pp->edje->pending_actions = evas_list_remove(pp->edje->pending_actions, pp);
|
||||
_edje_program_run(pp->edje, pp->program, 1, "", "");
|
||||
|
|
|
@ -9,32 +9,32 @@ _edje_container_relayout(Smart_Data *sd)
|
|||
{
|
||||
Evas_List *l;
|
||||
Evas_Coord x, y, w, h, sw;
|
||||
|
||||
|
||||
if (sd->freeze > 0) return;
|
||||
if (!sd->need_layout) return;
|
||||
|
||||
|
||||
if (sd->w < sd->min_w) sw = sd->min_w;
|
||||
else if (sd->w > sd->max_w) sw = sd->max_w;
|
||||
else sw = sd->w;
|
||||
|
||||
|
||||
y = 0;
|
||||
x = 0;
|
||||
w = 0;
|
||||
h = 0;
|
||||
|
||||
|
||||
for (l = sd->children; l; l = l->next)
|
||||
{
|
||||
Edje_Item *ei;
|
||||
|
||||
|
||||
ei = l->data;
|
||||
if (sd->homogenous) h = sd->min_row_h;
|
||||
|
||||
|
||||
ei->y = y;
|
||||
ei->h = h;
|
||||
// ei->w = w;
|
||||
// ei->h = h;
|
||||
}
|
||||
|
||||
|
||||
sd->need_layout = 0;
|
||||
}
|
||||
|
||||
|
@ -44,10 +44,10 @@ _edje_container_recalc(Smart_Data *sd)
|
|||
Evas_List *l;
|
||||
int any_max_h = 0, any_max_w = 0;
|
||||
int i;
|
||||
|
||||
|
||||
if (sd->freeze > 0) return;
|
||||
if (!sd->changed) return;
|
||||
|
||||
|
||||
sd->min_h = 0;
|
||||
sd->max_h = -1;
|
||||
sd->min_w = 0;
|
||||
|
@ -56,7 +56,7 @@ _edje_container_recalc(Smart_Data *sd)
|
|||
sd->max_row_h = -1;
|
||||
sd->contents_h = 0;
|
||||
sd->contents_w = 0;
|
||||
|
||||
|
||||
for (i = 0; i < sd->cols; i++)
|
||||
{
|
||||
sd->min_w += sd->colinfo[i].minw;
|
||||
|
@ -71,16 +71,16 @@ _edje_container_recalc(Smart_Data *sd)
|
|||
any_max_w = 1;
|
||||
}
|
||||
if (any_max_w) sd->max_w = -1;
|
||||
|
||||
|
||||
if (sd->w < sd->min_w)
|
||||
sd->contents_w = sd->min_w;
|
||||
else if ((sd->max_w >= 0) && (sd->w < sd->max_w))
|
||||
sd->w = sd->max_w;
|
||||
|
||||
|
||||
for (l = sd->children; l; l = l->next)
|
||||
{
|
||||
Edje_Item *ei;
|
||||
|
||||
|
||||
ei = l->data;
|
||||
if (ei->minh > sd->min_row_h)
|
||||
sd->min_row_h = ei->minh;
|
||||
|
@ -114,12 +114,12 @@ _edje_container_recalc(Smart_Data *sd)
|
|||
{
|
||||
sd->min_h = evas_list_count(sd->children) * sd->min_row_h;
|
||||
}
|
||||
|
||||
|
||||
sd->changed = 0;
|
||||
sd->change_child = 0;
|
||||
sd->change_child_list = 0;
|
||||
sd->change_cols = 0;
|
||||
|
||||
|
||||
sd->need_layout = 1;
|
||||
_edje_container_relayout(sd);
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ static void
|
|||
_edje_item_recalc(Edje_Item *ei)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
if (ei->freeze > 0) return;
|
||||
if (!ei->recalc) return;
|
||||
if (!ei->sd) return;
|
||||
|
@ -161,9 +161,9 @@ _edje_item_recalc(Edje_Item *ei)
|
|||
else
|
||||
((Smart_Data *)(ei->sd))->colinfo[i].maxw = ei->cells[i].maxw;
|
||||
}
|
||||
|
||||
|
||||
ei->recalc = 0;
|
||||
|
||||
|
||||
_edje_container_recalc(ei->sd);
|
||||
}
|
||||
|
||||
|
@ -174,12 +174,12 @@ Edje_Item *
|
|||
edje_item_add(Edje_Item_Class *cl, void *data)
|
||||
{
|
||||
Edje_Item *ei;
|
||||
|
||||
|
||||
ei = calloc(sizeof(Edje_Item), 1);
|
||||
|
||||
|
||||
ei->class = cl;
|
||||
ei->class_data = data;
|
||||
|
||||
|
||||
return ei;
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ void
|
|||
edje_item_del(Edje_Item *ei)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = ei->sd;
|
||||
if (ei->object) evas_object_del(ei->object);
|
||||
if (ei->overlay_object) evas_object_del(ei->overlay_object);
|
||||
|
@ -422,7 +422,7 @@ int
|
|||
edje_container_freeze(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return 0;
|
||||
sd->freeze++;
|
||||
|
@ -433,7 +433,7 @@ int
|
|||
edje_container_thaw(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return 0;
|
||||
sd->freeze--;
|
||||
|
@ -445,7 +445,7 @@ void
|
|||
edje_container_item_append(Evas_Object *obj, Edje_Item *ei)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
sd->children = evas_list_append(sd->children, ei);
|
||||
|
@ -459,7 +459,7 @@ void
|
|||
edje_container_item_prepend(Evas_Object *obj, Edje_Item *ei)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
sd->children = evas_list_prepend(sd->children, ei);
|
||||
|
@ -473,7 +473,7 @@ void
|
|||
edje_container_item_append_relative(Evas_Object *obj, Edje_Item *ei, Edje_Item *rel)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
sd->children = evas_list_append_relative(sd->children, ei, rel);
|
||||
|
@ -487,7 +487,7 @@ void
|
|||
edje_container_item_prepend_relative(Evas_Object *obj, Edje_Item *ei, Edje_Item *rel)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
sd->children = evas_list_prepend_relative(sd->children, ei, rel);
|
||||
|
@ -502,7 +502,7 @@ edje_container_item_insert(Evas_Object *obj, Edje_Item *ei, int n)
|
|||
{
|
||||
Smart_Data *sd;
|
||||
void *rel;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
rel = evas_list_nth(sd->children, n);
|
||||
|
@ -520,7 +520,7 @@ void
|
|||
edje_container_item_remove(Evas_Object *obj, Edje_Item *ei)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
sd->children = evas_list_remove(sd->children, ei);
|
||||
|
@ -534,7 +534,7 @@ void
|
|||
edje_container_columns_set(Evas_Object *obj, int cols)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
if (sd->cols == cols) return;
|
||||
|
@ -542,7 +542,7 @@ edje_container_columns_set(Evas_Object *obj, int cols)
|
|||
if (cols > sd->cols)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = sd->cols; i < cols; i++)
|
||||
{
|
||||
sd->colinfo[i].minw = 0;
|
||||
|
@ -559,7 +559,7 @@ int
|
|||
edje_container_columns_get(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return 0;
|
||||
return sd->cols;
|
||||
|
@ -569,13 +569,13 @@ void
|
|||
edje_container_min_size_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
if (sd->changed)
|
||||
{
|
||||
int freeze;
|
||||
|
||||
|
||||
freeze = sd->freeze;
|
||||
sd->freeze = 0;
|
||||
_edje_container_recalc(sd);
|
||||
|
@ -589,13 +589,13 @@ void
|
|||
edje_container_max_size_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
if (sd->changed)
|
||||
{
|
||||
int freeze;
|
||||
|
||||
|
||||
freeze = sd->freeze;
|
||||
sd->freeze = 0;
|
||||
_edje_container_recalc(sd);
|
||||
|
@ -609,7 +609,7 @@ void
|
|||
edje_containter_align_set(Evas_Object *obj, double halign, double valign)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
if ((sd->align_x == halign) && (sd->align_y == valign)) return;
|
||||
|
@ -623,7 +623,7 @@ void
|
|||
edje_container_align_get(Evas_Object *obj, double *halign, double *valign)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
if (halign) *halign = sd->align_x;
|
||||
|
@ -634,7 +634,7 @@ int
|
|||
edje_container_count_get(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return 0;
|
||||
return evas_list_count(sd->children);
|
||||
|
@ -644,7 +644,7 @@ Edje_Item *
|
|||
edje_container_item_first_get(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return NULL;
|
||||
if (!sd->children) return NULL;
|
||||
|
@ -655,7 +655,7 @@ Edje_Item *
|
|||
edje_container_item_last_get(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return NULL;
|
||||
if (!sd->children) return NULL;
|
||||
|
@ -666,7 +666,7 @@ Edje_Item *
|
|||
edje_container_item_nth_get(Evas_Object *obj, int n)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return NULL;
|
||||
return evas_list_nth(sd->children, n);
|
||||
|
@ -676,7 +676,7 @@ void
|
|||
edje_container_homogenous_size_set(Evas_Object *obj, int homog)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
if (((homog) && (sd->homogenous)) ||
|
||||
|
@ -691,7 +691,7 @@ int
|
|||
edje_container_homogenous_size_get(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return 0;
|
||||
return sd->homogenous;
|
||||
|
@ -701,7 +701,7 @@ void
|
|||
edje_container_scroll_set(Evas_Object *obj, double pos, double shift)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
if ((sd->scroll_y == pos) && (sd->scroll_x == shift)) return;
|
||||
|
@ -715,7 +715,7 @@ void
|
|||
edje_container_scroll_get(Evas_Object *obj, double *pos, double *shift)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
if (pos) *pos = sd->scroll_y;
|
||||
|
@ -772,7 +772,7 @@ static void
|
|||
_smart_add(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = calloc(1, sizeof(Smart_Data));
|
||||
if (!sd) return;
|
||||
// evas_object_smart_member_add(sd->obj, obj);
|
||||
|
@ -784,7 +784,7 @@ static void
|
|||
_smart_del(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
if (sd->colinfo) free(sd->colinfo);
|
||||
|
@ -796,7 +796,7 @@ static void
|
|||
_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_move(sd->obj, x, y);
|
||||
|
@ -806,17 +806,17 @@ static void
|
|||
_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_resize(sd->obj, w, h);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_smart_show(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_show(sd->obj);
|
||||
|
@ -826,7 +826,7 @@ static void
|
|||
_smart_hide(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_hide(sd->obj);
|
||||
|
@ -836,7 +836,7 @@ static void
|
|||
_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_color_set(sd->obj, r, g, b, a);
|
||||
|
@ -846,7 +846,7 @@ static void
|
|||
_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_clip_set(sd->obj, clip);
|
||||
|
@ -856,10 +856,10 @@ static void
|
|||
_smart_clip_unset(Evas_Object *obj)
|
||||
{
|
||||
Smart_Data *sd;
|
||||
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
// evas_object_clip_unset(sd->obj);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -41,20 +41,20 @@ struct _Smart_Data
|
|||
Evas_Coord contents_w, contents_h;
|
||||
Evas_Coord min_row_h, max_row_h;
|
||||
Evas_Coord min_w, max_w, min_h, max_h;
|
||||
|
||||
|
||||
Smart_Data_Colinfo *colinfo;
|
||||
|
||||
|
||||
int freeze;
|
||||
|
||||
|
||||
double scroll_x, scroll_y;
|
||||
double align_x, align_y;
|
||||
|
||||
|
||||
unsigned char changed : 1;
|
||||
unsigned char change_child : 1;
|
||||
unsigned char change_child_list : 1;
|
||||
unsigned char change_cols : 1;
|
||||
unsigned char change_scroll : 1;
|
||||
|
||||
|
||||
unsigned char need_layout : 1;
|
||||
|
||||
unsigned char homogenous : 1;
|
||||
|
@ -93,23 +93,23 @@ struct _Edje_Item
|
|||
{
|
||||
Edje_Item_Class *class;
|
||||
void *class_data;
|
||||
|
||||
|
||||
void *sd;
|
||||
|
||||
|
||||
void *data;
|
||||
|
||||
|
||||
Evas_Object *object;
|
||||
Evas_Object *overlay_object;
|
||||
int freeze;
|
||||
Evas_Coord y, h;
|
||||
|
||||
Evas_Coord minh, maxh;
|
||||
|
||||
|
||||
int cells_num;
|
||||
Edje_Item_Cell *cells;
|
||||
|
||||
|
||||
unsigned char accessible : 1;
|
||||
|
||||
|
||||
unsigned char recalc : 1;
|
||||
unsigned char selected : 1;
|
||||
unsigned char disabled : 1;
|
||||
|
@ -128,7 +128,7 @@ struct _Edje_Item_Cell
|
|||
|
||||
/*
|
||||
* COL 0 COL 1 COL 2
|
||||
*
|
||||
*
|
||||
* +-----------------------------+ +-------+ +----------------+
|
||||
* | pad_top | | | | |
|
||||
* | pad_left OBJECT pad_right | | OBJ | | OBJECT | ROW 0
|
||||
|
@ -142,11 +142,11 @@ struct _Edje_Item_Cell
|
|||
* | | | | | | ROW 1
|
||||
* | | | | | |
|
||||
* +-----------------------------+ +-------+ +----------------+
|
||||
*
|
||||
*
|
||||
* spacer object:
|
||||
* 1 Edje object goes in-between each row as a spacer object (opt)
|
||||
* 1 Edje object goes in-between each column as a spacer object (opt)
|
||||
*
|
||||
*
|
||||
* surround object:
|
||||
* 1 Edje object goes around each item - item swallowed into "item" part (opt)
|
||||
* if no "item" part then just underlay it
|
||||
|
@ -154,13 +154,13 @@ struct _Edje_Item_Cell
|
|||
* on unselect send "unselect" "" signal
|
||||
* on focus send "focus" "" signal
|
||||
* on unfocus send "unfocus" signal
|
||||
*
|
||||
*
|
||||
* if any list item/cell is an Edje object emit this to them too.
|
||||
*
|
||||
*
|
||||
* also call callbacks.
|
||||
* if a surround object emits such a signal itself then call callbacks too
|
||||
*
|
||||
*
|
||||
* only 1 or 0 items can be focused
|
||||
* disabled items cannot be focused or selected/deselected
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@ EAPI void
|
|||
edje_object_file_get(Evas_Object *obj, const char **file, const char **part)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed)
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ EAPI int
|
|||
edje_object_load_error_get(Evas_Object *obj)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return EDJE_LOAD_ERROR_NONE;
|
||||
return ed->load_error;
|
||||
|
@ -96,7 +96,7 @@ edje_object_load_error_get(Evas_Object *obj)
|
|||
*
|
||||
* Note: the list must be freed using edje_file_collection_list_free()
|
||||
* when you are done with it.
|
||||
*/
|
||||
*/
|
||||
EAPI Evas_List *
|
||||
edje_file_collection_list(const char *file)
|
||||
{
|
||||
|
@ -111,16 +111,16 @@ edje_file_collection_list(const char *file)
|
|||
if (edf->collection_dir)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
|
||||
for (l = edf->collection_dir->entries; l; l = l->next)
|
||||
{
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
|
||||
|
||||
ce = l->data;
|
||||
lst = evas_list_append(lst, evas_stringshare_add(ce->entry));
|
||||
}
|
||||
}
|
||||
_edje_cache_file_unref(edf);
|
||||
_edje_cache_file_unref(edf);
|
||||
}
|
||||
return lst;
|
||||
}
|
||||
|
@ -142,10 +142,10 @@ edje_file_collection_list_free(Evas_List *lst)
|
|||
|
||||
/** Determine whether a group matching glob exists in an edje file.
|
||||
* @param file The file path
|
||||
* @param glob A glob to match on
|
||||
* @param glob A glob to match on
|
||||
*
|
||||
* @return 1 if a match is found, 0 otherwise
|
||||
*/
|
||||
*/
|
||||
EAPI int
|
||||
edje_file_group_exists(const char *file, const char *glob)
|
||||
{
|
||||
|
@ -159,16 +159,16 @@ edje_file_group_exists(const char *file, const char *glob)
|
|||
if (edf->collection_dir)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
|
||||
for (l = edf->collection_dir->entries; l; l = l->next)
|
||||
{
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
|
||||
|
||||
ce = l->data;
|
||||
if (_edje_glob_match(ce->entry, glob)) return 1;
|
||||
}
|
||||
}
|
||||
_edje_cache_file_unref(edf);
|
||||
_edje_cache_file_unref(edf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ edje_file_group_exists(const char *file, const char *glob)
|
|||
* item: "key2" "value2";
|
||||
* }
|
||||
* collections { ... }
|
||||
*
|
||||
*
|
||||
* Then, edje_file_data_get("key1") will return "value1"
|
||||
*/
|
||||
EAPI char *
|
||||
|
@ -195,7 +195,7 @@ edje_file_data_get(const char *file, const char *key)
|
|||
Edje_File *edf;
|
||||
char *str = NULL;
|
||||
int error_ret = 0;
|
||||
|
||||
|
||||
if (key)
|
||||
{
|
||||
edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL);
|
||||
|
@ -217,7 +217,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
Evas_List *parts = NULL;
|
||||
Evas_List *old_swallows;
|
||||
int group_path_started = 0;
|
||||
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return 0;
|
||||
if (!file) file = "";
|
||||
|
@ -229,18 +229,18 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
old_swallows = _edje_swallows_collect(ed);
|
||||
|
||||
_edje_file_del(ed);
|
||||
|
||||
|
||||
if (ed->path) evas_stringshare_del(ed->path);
|
||||
if (ed->part) evas_stringshare_del(ed->part);
|
||||
ed->path = evas_stringshare_add(file);
|
||||
ed->part = evas_stringshare_add(part);
|
||||
|
||||
|
||||
ed->load_error = EDJE_LOAD_ERROR_NONE;
|
||||
_edje_file_add(ed);
|
||||
|
||||
|
||||
_edje_textblock_styles_add(ed);
|
||||
_edje_textblock_style_all_update(ed);
|
||||
|
||||
|
||||
if (ed->collection)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
@ -252,10 +252,10 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
{
|
||||
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))
|
||||
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)
|
||||
{
|
||||
|
@ -270,7 +270,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
{
|
||||
Edje_Part *ep;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
|
||||
ep = l->data;
|
||||
rp = calloc(1, sizeof(Edje_Real_Part));
|
||||
if (!rp)
|
||||
|
@ -381,11 +381,11 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
}
|
||||
if (rp->part->dragable.confine_id >= 0)
|
||||
rp->confine_to = ed->table_parts[rp->part->dragable.confine_id % ed->table_parts_size];
|
||||
|
||||
|
||||
/* replay events for dragable */
|
||||
if (rp->part->dragable.events_id >= 0)
|
||||
{
|
||||
rp->events_to =
|
||||
rp->events_to =
|
||||
ed->table_parts[rp->part->dragable.events_id % ed->table_parts_size];
|
||||
/* events_to may be used only with dragable */
|
||||
if (!rp->events_to->part->dragable.x &&
|
||||
|
@ -397,7 +397,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
rp->swallow_params.min.w = 0;
|
||||
rp->swallow_params.max.w = -1;
|
||||
rp->swallow_params.max.h = -1;
|
||||
|
||||
|
||||
if (ed->file->feature_ver < 1)
|
||||
{
|
||||
rp->param1.description->text.id_source = -1;
|
||||
|
@ -420,7 +420,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
for (l = ed->collection->programs; l; l = l->next)
|
||||
{
|
||||
Edje_Program *pr;
|
||||
|
||||
|
||||
pr = l->data;
|
||||
ed->table_programs[n] = pr;
|
||||
n++;
|
||||
|
@ -434,7 +434,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
for (i = 0; i < ed->table_parts_size; i++)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
|
||||
rp = ed->table_parts[i];
|
||||
evas_object_show(rp->object);
|
||||
if (_edje_block_break(ed)) break;
|
||||
|
@ -443,7 +443,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
_edje_dragable_pos_set(ed, rp, rp->drag.val.x, rp->drag.val.y);
|
||||
}
|
||||
ed->dirty = 1;
|
||||
if ((evas_object_clipees_get(ed->clipper)) &&
|
||||
if ((evas_object_clipees_get(ed->clipper)) &&
|
||||
(evas_object_visible_get(obj)))
|
||||
evas_object_show(ed->clipper);
|
||||
|
||||
|
@ -466,7 +466,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
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)
|
||||
for (l = group_path; l; l = l->next)
|
||||
{
|
||||
if (l->data == group_path_entry)
|
||||
{
|
||||
|
@ -544,7 +544,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
|
|||
evas_stringshare_del(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_edje_recalc(ed);
|
||||
_edje_thaw(ed);
|
||||
_edje_unblock(ed);
|
||||
|
@ -565,10 +565,10 @@ void
|
|||
_edje_file_add(Edje *ed)
|
||||
{
|
||||
if (_edje_edd_edje_file == NULL) return;
|
||||
ed->file = _edje_cache_file_coll_open(ed->path, ed->part,
|
||||
&(ed->load_error),
|
||||
ed->file = _edje_cache_file_coll_open(ed->path, ed->part,
|
||||
&(ed->load_error),
|
||||
&(ed->collection));
|
||||
|
||||
|
||||
if (!ed->collection)
|
||||
{
|
||||
if (ed->file)
|
||||
|
@ -609,11 +609,11 @@ _edje_file_del(Edje *ed)
|
|||
{
|
||||
Evas_List *l;
|
||||
|
||||
_edje_textblock_styles_del(ed);
|
||||
_edje_textblock_styles_del(ed);
|
||||
for (l = ed->collection->parts; l; l = l->next)
|
||||
{
|
||||
Edje_Part *ep;
|
||||
|
||||
|
||||
ep = l->data;
|
||||
_edje_text_part_on_del(ed, ep);
|
||||
_edje_color_class_on_del(ed, ep);
|
||||
|
@ -659,7 +659,7 @@ _edje_file_del(Edje *ed)
|
|||
if (rp->text.text) evas_stringshare_del(rp->text.text);
|
||||
if (rp->text.font) evas_stringshare_del(rp->text.font);
|
||||
if (rp->text.cache.in_str) evas_stringshare_del(rp->text.cache.in_str);
|
||||
if (rp->text.cache.out_str) evas_stringshare_del(rp->text.cache.out_str);
|
||||
if (rp->text.cache.out_str) evas_stringshare_del(rp->text.cache.out_str);
|
||||
|
||||
if (rp->custom.description)
|
||||
{
|
||||
|
@ -675,7 +675,7 @@ _edje_file_del(Edje *ed)
|
|||
while (ed->actions)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
|
||||
_edje_anim_count--;
|
||||
runp = ed->actions->data;
|
||||
ed->actions = evas_list_remove(ed->actions, runp);
|
||||
|
@ -688,7 +688,7 @@ _edje_file_del(Edje *ed)
|
|||
while (ed->pending_actions)
|
||||
{
|
||||
Edje_Pending_Program *pp;
|
||||
|
||||
|
||||
pp = ed->pending_actions->data;
|
||||
ed->pending_actions = evas_list_remove(ed->pending_actions, pp);
|
||||
ecore_timer_del(pp->timer);
|
||||
|
@ -724,7 +724,7 @@ _edje_file_free(Edje_File *edf)
|
|||
while (edf->font_dir->entries)
|
||||
{
|
||||
Edje_Font_Directory_Entry *fe;
|
||||
|
||||
|
||||
fe = edf->font_dir->entries->data;
|
||||
edf->font_dir->entries =
|
||||
evas_list_remove_list(edf->font_dir->entries, edf->font_dir->entries);
|
||||
|
@ -739,9 +739,9 @@ _edje_file_free(Edje_File *edf)
|
|||
while (edf->image_dir->entries)
|
||||
{
|
||||
Edje_Image_Directory_Entry *ie;
|
||||
|
||||
|
||||
ie = edf->image_dir->entries->data;
|
||||
edf->image_dir->entries =
|
||||
edf->image_dir->entries =
|
||||
evas_list_remove_list(edf->image_dir->entries, edf->image_dir->entries);
|
||||
if (ie->entry) evas_stringshare_del(ie->entry);
|
||||
free(ie);
|
||||
|
@ -753,9 +753,9 @@ _edje_file_free(Edje_File *edf)
|
|||
while (edf->collection_dir->entries)
|
||||
{
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
|
||||
|
||||
ce = edf->collection_dir->entries->data;
|
||||
edf->collection_dir->entries =
|
||||
edf->collection_dir->entries =
|
||||
evas_list_remove_list(edf->collection_dir->entries, edf->collection_dir->entries);
|
||||
if (ce->entry) evas_stringshare_del(ce->entry);
|
||||
free(ce);
|
||||
|
@ -769,7 +769,7 @@ _edje_file_free(Edje_File *edf)
|
|||
Edje_Spectrum_Directory_Entry *se;
|
||||
|
||||
se = edf->spectrum_dir->entries->data;
|
||||
edf->spectrum_dir->entries =
|
||||
edf->spectrum_dir->entries =
|
||||
evas_list_remove_list(edf->spectrum_dir->entries, edf->spectrum_dir->entries);
|
||||
while (se->color_list)
|
||||
{
|
||||
|
@ -808,7 +808,7 @@ _edje_file_free(Edje_File *edf)
|
|||
if (ecc->name) evas_stringshare_del(ecc->name);
|
||||
free(ecc);
|
||||
}
|
||||
|
||||
|
||||
/* FIXME: free collection_hash and collection_cache */
|
||||
if (edf->collection_hash)
|
||||
{
|
||||
|
@ -849,7 +849,7 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
while (pr->targets)
|
||||
{
|
||||
Edje_Program_Target *prt;
|
||||
|
||||
|
||||
prt = pr->targets->data;
|
||||
pr->targets = evas_list_remove_list(pr->targets, pr->targets);
|
||||
free(prt);
|
||||
|
@ -879,7 +879,7 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
while (ep->other_desc)
|
||||
{
|
||||
Edje_Part_Description *desc;
|
||||
|
||||
|
||||
desc = ep->other_desc->data;
|
||||
ep->other_desc = evas_list_remove(ep->other_desc, desc);
|
||||
_edje_collection_free_part_description_free(desc);
|
||||
|
@ -891,7 +891,7 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
while (ec->data)
|
||||
{
|
||||
Edje_Data *edt;
|
||||
|
||||
|
||||
edt = ec->data->data;
|
||||
ec->data = evas_list_remove(ec->data, edt);
|
||||
if (edt->key) evas_stringshare_del(edt->key);
|
||||
|
@ -904,12 +904,12 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
if (ec->prog_cache.no_matches) evas_hash_free(ec->prog_cache.no_matches);
|
||||
if (ec->prog_cache.matches)
|
||||
{
|
||||
evas_hash_foreach(ec->prog_cache.matches,
|
||||
_edje_collection_free_prog_cache_matches_free_cb,
|
||||
evas_hash_foreach(ec->prog_cache.matches,
|
||||
_edje_collection_free_prog_cache_matches_free_cb,
|
||||
NULL);
|
||||
evas_hash_free(ec->prog_cache.matches);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (ec->script) embryo_program_free(ec->script);
|
||||
free(ec);
|
||||
}
|
||||
|
@ -921,7 +921,7 @@ _edje_collection_free_part_description_free(Edje_Part_Description *desc)
|
|||
while (desc->image.tween_list)
|
||||
{
|
||||
Edje_Part_Image_Id *pi;
|
||||
|
||||
|
||||
pi = desc->image.tween_list->data;
|
||||
desc->image.tween_list = evas_list_remove(desc->image.tween_list, pi);
|
||||
free(pi);
|
||||
|
@ -941,7 +941,7 @@ _edje_file_collection_hash_foreach(Evas_Hash *hash, const char *key, void *data,
|
|||
{
|
||||
Edje_File *edf;
|
||||
Edje_Part_Collection *coll;
|
||||
|
||||
|
||||
edf = fdata;
|
||||
coll = data;
|
||||
printf("EEK: EDJE FILE: \"%s\" ref(%i) PART: \"%s\" ref(%i) \n",
|
||||
|
|
|
@ -48,7 +48,7 @@ edje_shutdown(void)
|
|||
_edje_text_class_members_free();
|
||||
_edje_text_class_hash_free();
|
||||
embryo_shutdown();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ Edje *
|
|||
_edje_add(Evas_Object *obj)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
||||
ed = calloc(1, sizeof(Edje));
|
||||
if (!ed) return NULL;
|
||||
ed->evas = evas_object_evas_get(obj);
|
||||
|
@ -95,7 +95,7 @@ _edje_del(Edje *ed)
|
|||
while (ed->actions)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
|
||||
runp = ed->actions->data;
|
||||
ed->actions = evas_list_remove(ed->actions, runp);
|
||||
free(runp);
|
||||
|
@ -103,7 +103,7 @@ _edje_del(Edje *ed)
|
|||
while (ed->pending_actions)
|
||||
{
|
||||
Edje_Pending_Program *pp;
|
||||
|
||||
|
||||
pp = ed->pending_actions->data;
|
||||
ed->pending_actions = evas_list_remove(ed->pending_actions, pp);
|
||||
free(pp);
|
||||
|
@ -111,7 +111,7 @@ _edje_del(Edje *ed)
|
|||
while (ed->callbacks)
|
||||
{
|
||||
Edje_Signal_Callback *escb;
|
||||
|
||||
|
||||
escb = ed->callbacks->data;
|
||||
ed->callbacks = evas_list_remove(ed->callbacks, escb);
|
||||
if (escb->signal) evas_stringshare_del(escb->signal);
|
||||
|
@ -121,7 +121,7 @@ _edje_del(Edje *ed)
|
|||
while (ed->color_classes)
|
||||
{
|
||||
Edje_Color_Class *cc;
|
||||
|
||||
|
||||
cc = ed->color_classes->data;
|
||||
ed->color_classes = evas_list_remove(ed->color_classes, cc);
|
||||
if (cc->name) evas_stringshare_del(cc->name);
|
||||
|
@ -130,7 +130,7 @@ _edje_del(Edje *ed)
|
|||
while (ed->text_classes)
|
||||
{
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
|
||||
tc = ed->text_classes->data;
|
||||
ed->text_classes = evas_list_remove(ed->text_classes, tc);
|
||||
if (tc->name) evas_stringshare_del(tc->name);
|
||||
|
|
|
@ -13,7 +13,7 @@ edje_object_message_send(Evas_Object *obj, Edje_Message_Type type, int id, void
|
|||
{
|
||||
Edje *ed;
|
||||
int i;
|
||||
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return;
|
||||
_edje_message_send(ed, EDJE_QUEUE_SCRIPT, type, id, msg);
|
||||
|
@ -30,7 +30,7 @@ EAPI void
|
|||
edje_object_message_handler_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return;
|
||||
_edje_message_cb_set(ed, func, data);
|
||||
|
@ -41,14 +41,14 @@ edje_object_message_signal_process(Evas_Object *obj)
|
|||
{
|
||||
Evas_List *l, *tmpq = NULL;
|
||||
Edje *ed;
|
||||
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return;
|
||||
|
||||
for (l = msgq; l; l = l->next)
|
||||
{
|
||||
Edje_Message *em;
|
||||
|
||||
|
||||
em = l->data;
|
||||
if (em->edje == ed)
|
||||
tmpq = evas_list_append(tmpq, em);
|
||||
|
@ -70,11 +70,11 @@ edje_object_message_signal_process(Evas_Object *obj)
|
|||
tmp_msgq = tmpq;
|
||||
tmpq = NULL;
|
||||
}
|
||||
|
||||
|
||||
while (tmp_msgq)
|
||||
{
|
||||
Edje_Message *em;
|
||||
|
||||
|
||||
em = tmp_msgq->data;
|
||||
tmp_msgq = evas_list_remove_list(tmp_msgq, tmp_msgq);
|
||||
em->edje->message.num--;
|
||||
|
@ -138,7 +138,7 @@ Edje_Message *
|
|||
_edje_message_new(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id)
|
||||
{
|
||||
Edje_Message *em;
|
||||
|
||||
|
||||
em = calloc(1, sizeof(Edje_Message));
|
||||
if (!em) return NULL;
|
||||
em->edje = ed;
|
||||
|
@ -155,13 +155,13 @@ _edje_message_free(Edje_Message *em)
|
|||
if (em->msg)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
switch (em->type)
|
||||
{
|
||||
case EDJE_MESSAGE_STRING:
|
||||
{
|
||||
Edje_Message_String *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_String *)em->msg;
|
||||
free(emsg->str);
|
||||
free(emsg);
|
||||
|
@ -170,7 +170,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_INT:
|
||||
{
|
||||
Edje_Message_Int *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_Int *)em->msg;
|
||||
free(emsg);
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_FLOAT:
|
||||
{
|
||||
Edje_Message_Float *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_Float *)em->msg;
|
||||
free(emsg);
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_INT_SET:
|
||||
{
|
||||
Edje_Message_Int_Set *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_Int_Set *)em->msg;
|
||||
free(emsg);
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_FLOAT_SET:
|
||||
{
|
||||
Edje_Message_Float_Set *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_Float_Set *)em->msg;
|
||||
free(emsg);
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_STRING_FLOAT:
|
||||
{
|
||||
Edje_Message_String_Float *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_String_Float *)em->msg;
|
||||
free(emsg->str);
|
||||
free(emsg);
|
||||
|
@ -211,7 +211,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_STRING_INT:
|
||||
{
|
||||
Edje_Message_String_Int *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_String_Int *)em->msg;
|
||||
free(emsg->str);
|
||||
free(emsg);
|
||||
|
@ -220,7 +220,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_STRING_FLOAT_SET:
|
||||
{
|
||||
Edje_Message_String_Float_Set *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_String_Float_Set *)em->msg;
|
||||
free(emsg->str);
|
||||
free(emsg);
|
||||
|
@ -229,7 +229,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_STRING_INT_SET:
|
||||
{
|
||||
Edje_Message_String_Int_Set *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_String_Int_Set *)em->msg;
|
||||
free(emsg->str);
|
||||
free(emsg);
|
||||
|
@ -238,7 +238,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_SIGNAL:
|
||||
{
|
||||
Edje_Message_Signal *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_Signal *)em->msg;
|
||||
if (emsg->sig) evas_stringshare_del(emsg->sig);
|
||||
if (emsg->src) evas_stringshare_del(emsg->src);
|
||||
|
@ -248,7 +248,7 @@ _edje_message_free(Edje_Message *em)
|
|||
case EDJE_MESSAGE_STRING_SET:
|
||||
{
|
||||
Edje_Message_String_Set *emsg;
|
||||
|
||||
|
||||
emsg = (Edje_Message_String_Set *)em->msg;
|
||||
for (i = 0; i < emsg->count; i++)
|
||||
free(emsg->str[i]);
|
||||
|
@ -286,7 +286,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_SIGNAL:
|
||||
{
|
||||
Edje_Message_Signal *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_Signal *)emsg;
|
||||
emsg3 = calloc(1, sizeof(Edje_Message_Signal));
|
||||
if (emsg2->sig) emsg3->sig = evas_stringshare_add(emsg2->sig);
|
||||
|
@ -297,7 +297,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_STRING:
|
||||
{
|
||||
Edje_Message_String *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_String *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_String));
|
||||
emsg3->str = strdup(emsg2->str);
|
||||
|
@ -307,7 +307,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_INT:
|
||||
{
|
||||
Edje_Message_Int *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_Int *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_Int));
|
||||
emsg3->val = emsg2->val;
|
||||
|
@ -317,7 +317,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_FLOAT:
|
||||
{
|
||||
Edje_Message_Float *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_Float *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_Float));
|
||||
emsg3->val = emsg2->val;
|
||||
|
@ -327,7 +327,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_STRING_SET:
|
||||
{
|
||||
Edje_Message_String_Set *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_String_Set *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_String_Set) + ((emsg2->count - 1) * sizeof(char *)));
|
||||
emsg3->count = emsg2->count;
|
||||
|
@ -339,7 +339,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_INT_SET:
|
||||
{
|
||||
Edje_Message_Int_Set *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_Int_Set *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_Int_Set) + ((emsg2->count - 1) * sizeof(int)));
|
||||
emsg3->count = emsg2->count;
|
||||
|
@ -351,7 +351,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_FLOAT_SET:
|
||||
{
|
||||
Edje_Message_Float_Set *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_Float_Set *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_Float_Set) + ((emsg2->count - 1) * sizeof(double)));
|
||||
emsg3->count = emsg2->count;
|
||||
|
@ -363,7 +363,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_STRING_INT:
|
||||
{
|
||||
Edje_Message_String_Int *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_String_Int *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_String_Int));
|
||||
emsg3->str = strdup(emsg2->str);
|
||||
|
@ -374,7 +374,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_STRING_FLOAT:
|
||||
{
|
||||
Edje_Message_String_Float *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_String_Float *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_String_Float));
|
||||
emsg3->str = strdup(emsg2->str);
|
||||
|
@ -385,7 +385,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_STRING_INT_SET:
|
||||
{
|
||||
Edje_Message_String_Int_Set *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_String_Int_Set *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_String_Int_Set) + ((emsg2->count - 1) * sizeof(int)));
|
||||
emsg3->str = strdup(emsg2->str);
|
||||
|
@ -398,7 +398,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
case EDJE_MESSAGE_STRING_FLOAT_SET:
|
||||
{
|
||||
Edje_Message_String_Float_Set *emsg2, *emsg3;
|
||||
|
||||
|
||||
emsg2 = (Edje_Message_String_Float_Set *)emsg;
|
||||
emsg3 = malloc(sizeof(Edje_Message_String_Float_Set) + ((emsg2->count - 1) * sizeof(double)));
|
||||
emsg3->str = strdup(emsg2->str);
|
||||
|
@ -411,7 +411,7 @@ _edje_message_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type, int id, v
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
em->msg = msg;
|
||||
msgq = evas_list_append(msgq, em);
|
||||
}
|
||||
|
@ -422,12 +422,12 @@ _edje_message_process(Edje_Message *em)
|
|||
Embryo_Function fn;
|
||||
void *pdata;
|
||||
int i;
|
||||
|
||||
|
||||
/* signals are only handled one way */
|
||||
if (em->type == EDJE_MESSAGE_SIGNAL)
|
||||
{
|
||||
_edje_emit_handle(em->edje,
|
||||
((Edje_Message_Signal *)em->msg)->sig,
|
||||
_edje_emit_handle(em->edje,
|
||||
((Edje_Message_Signal *)em->msg)->sig,
|
||||
((Edje_Message_Signal *)em->msg)->src);
|
||||
return;
|
||||
}
|
||||
|
@ -450,7 +450,7 @@ _edje_message_process(Edje_Message *em)
|
|||
embryo_parameter_cell_push(em->edje->collection->script,
|
||||
(Embryo_Cell)em->type);
|
||||
/* 2nd param is the integer of the event id - always there */
|
||||
embryo_parameter_cell_push(em->edje->collection->script,
|
||||
embryo_parameter_cell_push(em->edje->collection->script,
|
||||
(Embryo_Cell)em->id);
|
||||
/* the rest is varags of whatever is in the msg */
|
||||
switch (em->type)
|
||||
|
@ -458,13 +458,13 @@ _edje_message_process(Edje_Message *em)
|
|||
case EDJE_MESSAGE_NONE:
|
||||
break;
|
||||
case EDJE_MESSAGE_STRING:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String *)em->msg)->str);
|
||||
break;
|
||||
case EDJE_MESSAGE_INT:
|
||||
{
|
||||
Embryo_Cell v;
|
||||
|
||||
|
||||
v = (Embryo_Cell)((Edje_Message_Int *)em->msg)->val;
|
||||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ _edje_message_process(Edje_Message *em)
|
|||
{
|
||||
Embryo_Cell v;
|
||||
float fv;
|
||||
|
||||
|
||||
fv = ((Edje_Message_Float *)em->msg)->val;
|
||||
v = EMBRYO_FLOAT_TO_CELL(fv);
|
||||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
|
@ -481,14 +481,14 @@ _edje_message_process(Edje_Message *em)
|
|||
break;
|
||||
case EDJE_MESSAGE_STRING_SET:
|
||||
for (i = 0; i < ((Edje_Message_String_Set *)em->msg)->count; i++)
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Set *)em->msg)->str[i]);
|
||||
break;
|
||||
case EDJE_MESSAGE_INT_SET:
|
||||
for (i = 0; i < ((Edje_Message_Int_Set *)em->msg)->count; i++)
|
||||
{
|
||||
Embryo_Cell v;
|
||||
|
||||
|
||||
v = (Embryo_Cell)((Edje_Message_Int_Set *)em->msg)->val[i];
|
||||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
|
@ -498,53 +498,53 @@ _edje_message_process(Edje_Message *em)
|
|||
{
|
||||
Embryo_Cell v;
|
||||
float fv;
|
||||
|
||||
|
||||
fv = ((Edje_Message_Float_Set *)em->msg)->val[i];
|
||||
v = EMBRYO_FLOAT_TO_CELL(fv);
|
||||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
case EDJE_MESSAGE_STRING_INT:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Int *)em->msg)->str);
|
||||
{
|
||||
Embryo_Cell v;
|
||||
|
||||
|
||||
v = (Embryo_Cell)((Edje_Message_String_Int *)em->msg)->val;
|
||||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
case EDJE_MESSAGE_STRING_FLOAT:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Float *)em->msg)->str);
|
||||
{
|
||||
Embryo_Cell v;
|
||||
float fv;
|
||||
|
||||
|
||||
fv = ((Edje_Message_String_Float *)em->msg)->val;
|
||||
v = EMBRYO_FLOAT_TO_CELL(fv);
|
||||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
case EDJE_MESSAGE_STRING_INT_SET:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Int_Set *)em->msg)->str);
|
||||
for (i = 0; i < ((Edje_Message_String_Int_Set *)em->msg)->count; i++)
|
||||
{
|
||||
Embryo_Cell v;
|
||||
|
||||
|
||||
v = (Embryo_Cell)((Edje_Message_String_Int_Set *)em->msg)->val[i];
|
||||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
case EDJE_MESSAGE_STRING_FLOAT_SET:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Float_Set *)em->msg)->str);
|
||||
for (i = 0; i < ((Edje_Message_String_Float_Set *)em->msg)->count; i++)
|
||||
{
|
||||
Embryo_Cell v;
|
||||
float fv;
|
||||
|
||||
|
||||
fv = ((Edje_Message_String_Float_Set *)em->msg)->val[i];
|
||||
v = EMBRYO_FLOAT_TO_CELL(fv);
|
||||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
|
@ -567,7 +567,7 @@ void
|
|||
_edje_message_queue_process(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
if (msgq == NULL) return;
|
||||
|
||||
/* allow the message queue to feed itself up to 8 times before forcing */
|
||||
|
@ -593,7 +593,7 @@ _edje_message_queue_process(void)
|
|||
{
|
||||
Edje_Message *em;
|
||||
Edje *ed;
|
||||
|
||||
|
||||
em = tmp_msgq->data;
|
||||
ed = em->edje;
|
||||
tmp_msgq = evas_list_remove_list(tmp_msgq, tmp_msgq);
|
||||
|
@ -613,7 +613,7 @@ _edje_message_queue_process(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* if the message queue filled again set a timer to expire in 0.0 sec */
|
||||
/* to get the idle enterer to be run again */
|
||||
if (msgq)
|
||||
|
@ -626,7 +626,7 @@ _edje_message_queue_clear(void)
|
|||
while (msgq)
|
||||
{
|
||||
Edje_Message *em;
|
||||
|
||||
|
||||
em = msgq->data;
|
||||
msgq = evas_list_remove_list(msgq, msgq);
|
||||
em->edje->message.num--;
|
||||
|
@ -635,7 +635,7 @@ _edje_message_queue_clear(void)
|
|||
while (tmp_msgq)
|
||||
{
|
||||
Edje_Message *em;
|
||||
|
||||
|
||||
em = tmp_msgq->data;
|
||||
tmp_msgq = evas_list_remove_list(tmp_msgq, tmp_msgq);
|
||||
em->edje->message.num--;
|
||||
|
@ -654,7 +654,7 @@ _edje_message_del(Edje *ed)
|
|||
{
|
||||
Edje_Message *em;
|
||||
Evas_List *lp;
|
||||
|
||||
|
||||
em = l->data;
|
||||
lp = l;
|
||||
l = l->next;
|
||||
|
@ -671,7 +671,7 @@ _edje_message_del(Edje *ed)
|
|||
{
|
||||
Edje_Message *em;
|
||||
Evas_List *lp;
|
||||
|
||||
|
||||
em = l->data;
|
||||
lp = l;
|
||||
l = l->next;
|
||||
|
|
|
@ -77,7 +77,7 @@ edje_frametime_get(void)
|
|||
* edje_object_callback_add(obj, "mouse,down,*", "button.*", NULL);
|
||||
* @endcode
|
||||
*
|
||||
* Here, any mouse down events on an edje part whose name begins with
|
||||
* Here, any mouse down events on an edje part whose name begins with
|
||||
* "button." will trigger the callback. The actual signal and source name
|
||||
* will be passed in to the @a emission and @a source parameters of the
|
||||
* callback function. (e.g. "mouse,down,2" and "button.close").
|
||||
|
@ -87,7 +87,7 @@ edje_object_signal_callback_add(Evas_Object *obj, const char *emission, const ch
|
|||
{
|
||||
Edje *ed;
|
||||
Edje_Signal_Callback *escb;
|
||||
|
||||
|
||||
if ((!emission) || (!source) || (!func)) return;
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return;
|
||||
|
@ -116,7 +116,7 @@ edje_object_signal_callback_add(Evas_Object *obj, const char *emission, const ch
|
|||
*
|
||||
* Removes a callback from an object. The parameters @a emission, @a source
|
||||
* and @a func must match exactly those passed to a previous call to
|
||||
* edje_object_signal_callback_add(). The data pointer that was passed to
|
||||
* edje_object_signal_callback_add(). The data pointer that was passed to
|
||||
* this call will be returned.
|
||||
*/
|
||||
EAPI void *
|
||||
|
@ -124,7 +124,7 @@ edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const ch
|
|||
{
|
||||
Edje *ed;
|
||||
Evas_List *l;
|
||||
|
||||
|
||||
if ((!emission) || (!source) || (!func)) return NULL;
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return NULL;
|
||||
|
@ -132,16 +132,16 @@ edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const ch
|
|||
for (l = ed->callbacks; l; l = l->next)
|
||||
{
|
||||
Edje_Signal_Callback *escb;
|
||||
|
||||
|
||||
escb = l->data;
|
||||
if ((escb->func == func) &&
|
||||
if ((escb->func == func) &&
|
||||
((!escb->signal && !emission[0]) ||
|
||||
(escb->signal && !strcmp(escb->signal, emission))) &&
|
||||
((!escb->source && !source[0]) ||
|
||||
(escb->source && !strcmp(escb->source, source))))
|
||||
{
|
||||
void *data;
|
||||
|
||||
|
||||
data = escb->data;
|
||||
if (ed->walking_callbacks)
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const ch
|
|||
* @param source The signal source
|
||||
*
|
||||
* This sends a signal to the edje object.
|
||||
*
|
||||
*
|
||||
* An edje program can respond to a signal by specifying matching 'signal'
|
||||
* and 'source' fields.
|
||||
*
|
||||
|
@ -218,7 +218,7 @@ edje_object_play_set(Evas_Object *obj, int play)
|
|||
double t;
|
||||
Evas_List *l;
|
||||
int i;
|
||||
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return;
|
||||
if (ed->delete_me) return;
|
||||
|
@ -230,7 +230,7 @@ edje_object_play_set(Evas_Object *obj, int play)
|
|||
for (l = ed->actions; l; l = l->next)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
|
||||
runp = l->data;
|
||||
runp->start_time += t;
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ edje_object_play_set(Evas_Object *obj, int play)
|
|||
* @return 0 if Edje not connected, Edje delete_me, or Edje paused\n
|
||||
* 1 if Edje set to play
|
||||
*/
|
||||
EAPI int
|
||||
EAPI int
|
||||
edje_object_play_get(Evas_Object *obj)
|
||||
{
|
||||
Edje *ed;
|
||||
|
@ -282,9 +282,9 @@ edje_object_animation_set(Evas_Object *obj, int on)
|
|||
Edje *ed;
|
||||
Evas_List *l;
|
||||
int i;
|
||||
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return;
|
||||
if (!ed) return;
|
||||
if (ed->delete_me) return;
|
||||
_edje_block(ed);
|
||||
ed->no_anim = !on;
|
||||
|
@ -292,13 +292,13 @@ edje_object_animation_set(Evas_Object *obj, int on)
|
|||
if (!on)
|
||||
{
|
||||
Evas_List *newl = NULL;
|
||||
|
||||
|
||||
for (l = ed->actions; l; l = l->next)
|
||||
newl = evas_list_append(newl, l->data);
|
||||
while (newl)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
|
||||
runp = newl->data;
|
||||
newl = evas_list_remove(newl, newl->data);
|
||||
_edje_program_run_iterate(runp, runp->start_time + runp->program->tween.time);
|
||||
|
@ -342,7 +342,7 @@ EAPI int
|
|||
edje_object_animation_get(Evas_Object *obj)
|
||||
{
|
||||
Edje *ed;
|
||||
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return 0;
|
||||
if (ed->delete_me) return 0;
|
||||
|
@ -372,12 +372,12 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
|||
{
|
||||
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];
|
||||
if (rp) _edje_part_pos_set(ed, rp,
|
||||
if (rp) _edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, t);
|
||||
}
|
||||
}
|
||||
|
@ -387,19 +387,19 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
|||
{
|
||||
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];
|
||||
if (rp)
|
||||
{
|
||||
_edje_part_description_apply(ed, rp,
|
||||
runp->program->state,
|
||||
_edje_part_description_apply(ed, rp,
|
||||
runp->program->state,
|
||||
runp->program->value,
|
||||
NULL,
|
||||
0.0);
|
||||
_edje_part_pos_set(ed, rp,
|
||||
_edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, 0.0);
|
||||
rp->program = NULL;
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
|||
{
|
||||
Edje_Program *pr;
|
||||
Edje_Program_After *pa = l->data;
|
||||
|
||||
|
||||
if (pa->id >= 0)
|
||||
{
|
||||
pr = ed->table_programs[pa->id % ed->table_programs_size];
|
||||
|
@ -464,19 +464,19 @@ _edje_program_end(Edje *ed, Edje_Running_Program *runp)
|
|||
{
|
||||
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];
|
||||
if (rp)
|
||||
{
|
||||
_edje_part_description_apply(ed, rp,
|
||||
runp->program->state,
|
||||
_edje_part_description_apply(ed, rp,
|
||||
runp->program->state,
|
||||
runp->program->value,
|
||||
NULL,
|
||||
0.0);
|
||||
_edje_part_pos_set(ed, rp,
|
||||
_edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, 0.0);
|
||||
rp->program = NULL;
|
||||
}
|
||||
|
@ -497,10 +497,10 @@ _edje_program_end(Edje *ed, Edje_Running_Program *runp)
|
|||
}
|
||||
_edje_emit(ed, "program,stop", pname);
|
||||
_edje_thaw(ed);
|
||||
_edje_unref(ed);
|
||||
_edje_unref(ed);
|
||||
if (free_runp) free(runp);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const char *ssrc)
|
||||
{
|
||||
|
@ -514,11 +514,11 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
Edje_Pending_Program *pp;
|
||||
double r = 0.0;
|
||||
|
||||
|
||||
pp = calloc(1, sizeof(Edje_Pending_Program));
|
||||
if (!pp) return;
|
||||
if (pr->in.range > 0.0) r = ((double)rand() / RAND_MAX);
|
||||
pp->timer = ecore_timer_add(pr->in.from + (pr->in.range * r),
|
||||
pp->timer = ecore_timer_add(pr->in.from + (pr->in.range * r),
|
||||
_edje_pending_timer_cb, pp);
|
||||
if (!pp->timer)
|
||||
{
|
||||
|
@ -546,13 +546,13 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
if ((pr->tween.time > 0.0) && (!ed->no_anim))
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
|
||||
runp = calloc(1, sizeof(Edje_Running_Program));
|
||||
for (l = pr->targets; l; l = l->next)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Program_Target *pt;
|
||||
|
||||
|
||||
pt = l->data;
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
|
@ -561,10 +561,10 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
if (rp->program)
|
||||
_edje_program_end(ed, rp->program);
|
||||
_edje_part_description_apply(ed, rp,
|
||||
_edje_part_description_apply(ed, rp,
|
||||
rp->param1.description->state.name,
|
||||
rp->param1.description->state.value,
|
||||
pr->state,
|
||||
rp->param1.description->state.value,
|
||||
pr->state,
|
||||
pr->value);
|
||||
_edje_part_pos_set(ed, rp, pr->tween.mode, 0.0);
|
||||
rp->program = runp;
|
||||
|
@ -593,7 +593,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Program_Target *pt;
|
||||
|
||||
|
||||
pt = l->data;
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
|
@ -602,8 +602,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
if (rp->program)
|
||||
_edje_program_end(ed, rp->program);
|
||||
_edje_part_description_apply(ed, rp,
|
||||
pr->state,
|
||||
_edje_part_description_apply(ed, rp,
|
||||
pr->state,
|
||||
pr->value,
|
||||
NULL,
|
||||
0.0);
|
||||
|
@ -620,7 +620,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
Edje_Program *pr2;
|
||||
Edje_Program_After *pa = l->data;
|
||||
|
||||
|
||||
if (pa->id >= 0)
|
||||
{
|
||||
pr2 = ed->table_programs[pa->id % ed->table_programs_size];
|
||||
|
@ -638,12 +638,12 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
Edje_Program_Target *pt;
|
||||
Evas_List *ll;
|
||||
|
||||
|
||||
pt = l->data;
|
||||
for (ll = ed->actions; ll; ll = ll->next)
|
||||
{
|
||||
Edje_Running_Program *runp;
|
||||
|
||||
|
||||
runp = ll->data;
|
||||
if (pt->id == runp->program->id)
|
||||
{
|
||||
|
@ -654,7 +654,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
for (ll = ed->pending_actions; ll; ll = ll->next)
|
||||
{
|
||||
Edje_Pending_Program *pp;
|
||||
|
||||
|
||||
pp = ll->data;
|
||||
if (pt->id == pp->program->id)
|
||||
{
|
||||
|
@ -687,7 +687,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Program_Target *pt;
|
||||
|
||||
|
||||
pt = l->data;
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
|
@ -717,7 +717,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Program_Target *pt;
|
||||
|
||||
|
||||
pt = l->data;
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
|
@ -747,7 +747,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
Edje_Real_Part *rp;
|
||||
Edje_Program_Target *pt;
|
||||
|
||||
|
||||
pt = l->data;
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
|
@ -772,7 +772,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
else if (pr->action == EDJE_ACTION_TYPE_SCRIPT)
|
||||
{
|
||||
char fname[128];
|
||||
|
||||
|
||||
_edje_emit(ed, "program,start", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
snprintf(fname, sizeof(fname), "_p%i", pr->id);
|
||||
|
@ -786,7 +786,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
_edje_emit(ed, "program,start", pr->name);
|
||||
_edje_emit(ed, "program,stop", pr->name);
|
||||
}
|
||||
if (!((pr->action == EDJE_ACTION_TYPE_STATE_SET)
|
||||
if (!((pr->action == EDJE_ACTION_TYPE_STATE_SET)
|
||||
/* hmm this fucks somethgin up. must look into it later */
|
||||
/* && (pr->tween.time > 0.0) && (!ed->no_anim))) */
|
||||
))
|
||||
|
@ -795,7 +795,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, const char *ssig, const
|
|||
{
|
||||
Edje_Program *pr2;
|
||||
Edje_Program_After *pa = l->data;
|
||||
|
||||
|
||||
if (pa->id >= 0)
|
||||
{
|
||||
pr2 = ed->table_programs[pa->id % ed->table_programs_size];
|
||||
|
@ -816,7 +816,7 @@ void
|
|||
_edje_emit(Edje *ed, const char *sig, const char *src)
|
||||
{
|
||||
Edje_Message_Signal emsg;
|
||||
|
||||
|
||||
if (ed->delete_me) return;
|
||||
emsg.sig = sig;
|
||||
emsg.src = src;
|
||||
|
@ -842,9 +842,9 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
|
|||
#ifdef EDJE_PROGRAM_CACHE
|
||||
char *tmps;
|
||||
int l1, l2;
|
||||
#endif
|
||||
#endif
|
||||
int done;
|
||||
|
||||
|
||||
ec = ed->collection;
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
l1 = strlen(sig);
|
||||
|
@ -853,13 +853,13 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
|
|||
strcpy(tmps, sig);
|
||||
tmps[l1] = '\377';
|
||||
strcpy(&(tmps[l1 + 1]), src);
|
||||
#endif
|
||||
#endif
|
||||
done = 0;
|
||||
|
||||
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
{
|
||||
Evas_List *matches;
|
||||
|
||||
|
||||
if (evas_hash_find(ec->prog_cache.no_matches, tmps))
|
||||
{
|
||||
done = 1;
|
||||
|
@ -869,7 +869,7 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
|
|||
for (l = matches; l; l = l->next)
|
||||
{
|
||||
Edje_Program *pr;
|
||||
|
||||
|
||||
pr = l->data;
|
||||
_edje_program_run(ed, pr, 0, sig, src);
|
||||
if (_edje_block_break(ed))
|
||||
|
@ -887,42 +887,42 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
|
|||
int matched = 0;
|
||||
Evas_List *matches = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
for (l = ed->collection->programs; l; l = l->next)
|
||||
{
|
||||
Edje_Program *pr;
|
||||
|
||||
|
||||
pr = l->data;
|
||||
if ((_edje_glob_match(sig, pr->signal)) &&
|
||||
(_edje_glob_match(src, pr->source)))
|
||||
{
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
matched++;
|
||||
#endif
|
||||
#endif
|
||||
_edje_program_run(ed, pr, 0, sig, src);
|
||||
if (_edje_block_break(ed))
|
||||
{
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
evas_list_free(matches);
|
||||
#endif
|
||||
#endif
|
||||
goto break_prog;
|
||||
}
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
matches = evas_list_append(matches, pr);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
if (tmps)
|
||||
{
|
||||
if (matched == 0)
|
||||
ec->prog_cache.no_matches =
|
||||
ec->prog_cache.no_matches =
|
||||
evas_hash_add(ec->prog_cache.no_matches, tmps, ed);
|
||||
else
|
||||
ec->prog_cache.matches =
|
||||
evas_hash_add(ec->prog_cache.matches, tmps, matches);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
_edje_emit_cb(ed, sig, src);
|
||||
if (_edje_block_break(ed))
|
||||
|
@ -941,16 +941,16 @@ static void
|
|||
_edje_emit_cb(Edje *ed, const char *sig, const char *src)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
|
||||
if (ed->delete_me) return;
|
||||
_edje_ref(ed);
|
||||
_edje_freeze(ed);
|
||||
_edje_freeze(ed);
|
||||
_edje_block(ed);
|
||||
ed->walking_callbacks = 1;
|
||||
for (l = ed->callbacks; l; l = l->next)
|
||||
{
|
||||
Edje_Signal_Callback *escb;
|
||||
|
||||
|
||||
escb = l->data;
|
||||
if ((!escb->just_added) &&
|
||||
(!escb->delete_me) &&
|
||||
|
@ -968,8 +968,8 @@ _edje_emit_cb(Edje *ed, const char *sig, const char *src)
|
|||
{
|
||||
Edje_Signal_Callback *escb;
|
||||
Evas_List *next_l;
|
||||
|
||||
escb = l->data;
|
||||
|
||||
escb = l->data;
|
||||
next_l = l->next;
|
||||
if (escb->just_added)
|
||||
escb->just_added = 0;
|
||||
|
|
|
@ -40,8 +40,8 @@ edje_object_add(Evas *evas)
|
|||
_edje_smart_show,
|
||||
_edje_smart_hide,
|
||||
_edje_smart_color_set,
|
||||
_edje_smart_clip_set,
|
||||
_edje_smart_clip_unset,
|
||||
_edje_smart_clip_set,
|
||||
_edje_smart_clip_unset,
|
||||
NULL
|
||||
};
|
||||
_edje_smart = evas_smart_class_new(&sc);
|
||||
|
@ -60,10 +60,10 @@ _edje_smart_add(Evas_Object * obj)
|
|||
evas_object_smart_data_set(obj, ed);
|
||||
ed->obj = obj;
|
||||
_edje_edjes = evas_list_append(_edje_edjes, obj);
|
||||
/*
|
||||
/*
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
|
||||
printf("--- EDJE DUMP [%i]\n", evas_list_count(_edje_edjes));
|
||||
for (l = _edje_edjes; l; l = l->next)
|
||||
{
|
||||
|
@ -91,24 +91,24 @@ _edje_smart_del(Evas_Object * obj)
|
|||
_edje_unref(ed);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
_edje_smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
Edje *ed;
|
||||
int i;
|
||||
|
||||
|
||||
ed = evas_object_smart_data_get(obj);
|
||||
if (!ed) return;
|
||||
if ((ed->x == x) && (ed->y == y)) return;
|
||||
ed->x = x;
|
||||
ed->y = y;
|
||||
// evas_object_move(ed->clipper, ed->x, ed->y);
|
||||
|
||||
|
||||
for (i = 0; i < ed->table_parts_size; i++)
|
||||
{
|
||||
Edje_Real_Part *ep;
|
||||
Evas_Coord ox, oy;
|
||||
|
||||
|
||||
ep = ed->table_parts[i];
|
||||
evas_object_geometry_get(ep->object, &ox, &oy, NULL, NULL);
|
||||
evas_object_move(ep->object, ed->x + ep->x + ep->offset.x, ed->y + ep->y +ep->offset.y);
|
||||
|
@ -120,12 +120,12 @@ _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)
|
||||
{
|
||||
Evas_Object *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));
|
||||
|
@ -135,7 +135,7 @@ _edje_smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y)
|
|||
// _edje_emit(ed, "move", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
_edje_smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h)
|
||||
{
|
||||
Edje *ed;
|
||||
|
@ -151,7 +151,7 @@ _edje_smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h)
|
|||
_edje_emit(ed, "resize", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
_edje_smart_show(Evas_Object * obj)
|
||||
{
|
||||
Edje *ed;
|
||||
|
@ -164,7 +164,7 @@ _edje_smart_show(Evas_Object * obj)
|
|||
_edje_emit(ed, "show", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
_edje_smart_hide(Evas_Object * obj)
|
||||
{
|
||||
Edje *ed;
|
||||
|
@ -177,7 +177,7 @@ _edje_smart_hide(Evas_Object * obj)
|
|||
_edje_emit(ed, "hide", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
_edje_smart_color_set(Evas_Object * obj, int r, int g, int b, int a)
|
||||
{
|
||||
Edje *ed;
|
||||
|
@ -188,7 +188,7 @@ _edje_smart_color_set(Evas_Object * obj, int r, int g, int b, int a)
|
|||
// _edje_emit(ed, "color_set", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
_edje_smart_clip_set(Evas_Object * obj, Evas_Object * clip)
|
||||
{
|
||||
Edje *ed;
|
||||
|
@ -200,7 +200,7 @@ _edje_smart_clip_set(Evas_Object * obj, Evas_Object * clip)
|
|||
// _edje_emit(ed, "clip_set", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
_edje_smart_clip_unset(Evas_Object * obj)
|
||||
{
|
||||
Edje *ed;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "edje_private.h"
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
|
@ -51,14 +51,14 @@ _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep)
|
|||
/* if text class exists for this part, add the edje to the tc member list */
|
||||
if ((pt->default_desc) && (pt->default_desc->text.text_class))
|
||||
_edje_text_class_member_add(ed, pt->default_desc->text.text_class);
|
||||
|
||||
|
||||
/* If any other classes exist add them */
|
||||
for (tmp = pt->other_desc; tmp; tmp = tmp->next)
|
||||
{
|
||||
Edje_Part_Description *desc;
|
||||
|
||||
desc = tmp->data;
|
||||
if ((desc) && (desc->text.text_class))
|
||||
if ((desc) && (desc->text.text_class))
|
||||
_edje_text_class_member_add(ed, desc->text.text_class);
|
||||
}
|
||||
}
|
||||
|
@ -67,11 +67,11 @@ 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)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
|
||||
o = l->data;
|
||||
if (ep->part->clip_to_id >= 0)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ _edje_text_part_on_del(Edje *ed, Edje_Part *pt)
|
|||
|
||||
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;
|
||||
|
@ -109,7 +109,7 @@ _edje_text_real_part_on_del(Edje *ed, Edje_Real_Part *ep)
|
|||
while (ep->extra_objects)
|
||||
{
|
||||
Evas_Object *o;
|
||||
|
||||
|
||||
o = ep->extra_objects->data;
|
||||
ep->extra_objects = evas_list_remove(ep->extra_objects, o);
|
||||
evas_object_del(o);
|
||||
|
@ -284,7 +284,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
Evas_Coord tw, th;
|
||||
Evas_Coord sw, sh;
|
||||
int inlined_font = 0, free_text = 0;
|
||||
|
||||
|
||||
|
||||
text = chosen_desc->text.text;
|
||||
font = chosen_desc->text.font;
|
||||
|
@ -293,7 +293,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if ((chosen_desc->text.text_class) && (chosen_desc->text.text_class[0] != 0))
|
||||
{
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
|
||||
tc = _edje_text_class_find(ed, chosen_desc->text.text_class);
|
||||
if (tc)
|
||||
{
|
||||
|
@ -301,14 +301,14 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
size = _edje_text_size_calc(size, tc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ep->text.text) text = (char *) ep->text.text;
|
||||
if (ep->text.font) font = ep->text.font;
|
||||
if (ep->text.size > 0) size = ep->text.size;
|
||||
|
||||
if (!text) text = "";
|
||||
if (!font) font = "";
|
||||
|
||||
|
||||
/* check if the font is embedded in the .eet */
|
||||
if (ed->file->font_hash)
|
||||
{
|
||||
|
@ -334,7 +334,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
}
|
||||
{
|
||||
int l, r, t, b;
|
||||
|
||||
|
||||
evas_object_text_style_pad_get(ep->object, &l, &r, &t, &b);
|
||||
sw = params->w;
|
||||
sh = params->h;
|
||||
|
@ -353,9 +353,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
{
|
||||
text = (char *) ep->text.cache.out_str;
|
||||
size = ep->text.cache.out_size;
|
||||
|
||||
|
||||
if (!text) text = "";
|
||||
|
||||
|
||||
goto arrange_text;
|
||||
}
|
||||
if (ep->text.cache.in_str) evas_stringshare_del(ep->text.cache.in_str);
|
||||
|
@ -372,7 +372,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if (tw > sw)
|
||||
{
|
||||
int psize;
|
||||
|
||||
|
||||
psize = size;
|
||||
while ((tw > sw) && (size > 0) && (tw != 0))
|
||||
{
|
||||
|
@ -381,7 +381,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if ((psize - size) <= 0) size = psize - 1;
|
||||
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
|
||||
else evas_object_text_font_source_set(ep->object, NULL);
|
||||
|
||||
|
||||
evas_object_text_font_set(ep->object, font, size);
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
if ((size > 0) && (tw == 0)) break;
|
||||
|
@ -390,7 +390,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
else if (tw < sw)
|
||||
{
|
||||
int psize;
|
||||
|
||||
|
||||
psize = size;
|
||||
while ((tw < sw) && (size > 0) && (tw != 0))
|
||||
{
|
||||
|
@ -399,7 +399,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if ((psize - size) >= 0) size = psize + 1;
|
||||
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
|
||||
else evas_object_text_font_source_set(ep->object, NULL);
|
||||
|
||||
|
||||
evas_object_text_font_set(ep->object, font, size);
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
if ((size > 0) && (tw == 0)) break;
|
||||
|
@ -416,7 +416,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
|
||||
else evas_object_text_font_source_set(ep->object, NULL);
|
||||
|
||||
|
||||
evas_object_text_font_set(ep->object, font, size);
|
||||
evas_object_text_text_set(ep->object, text);
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
|
@ -427,7 +427,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if (!chosen_desc->text.fit_x && th < sh)
|
||||
{
|
||||
int dif;
|
||||
|
||||
|
||||
dif = (th - sh) / 4;
|
||||
if (dif < 1) dif = 1;
|
||||
while ((th < sh) && (sw > 0))
|
||||
|
@ -436,7 +436,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if (size <= 0) break;
|
||||
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
|
||||
else evas_object_text_font_source_set(ep->object, NULL);
|
||||
|
||||
|
||||
evas_object_text_font_set(ep->object, font, size);
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
if ((size > 0) && (th == 0)) break;
|
||||
|
@ -446,7 +446,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
else if (th > sh)
|
||||
{
|
||||
int dif;
|
||||
|
||||
|
||||
dif = (th - sh) / 4;
|
||||
if (dif < 1) dif = 1;
|
||||
while ((th > sh) && (sw >= 0))
|
||||
|
@ -455,7 +455,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
if (size <= 0) break;
|
||||
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
|
||||
else evas_object_text_font_source_set(ep->object, NULL);
|
||||
|
||||
|
||||
evas_object_text_font_set(ep->object, font, size);
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
if ((size > 0) && (th == 0)) break;
|
||||
|
@ -483,16 +483,16 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
ep->text.cache.fit_x = chosen_desc->text.fit_x;
|
||||
ep->text.cache.fit_y = chosen_desc->text.fit_y;
|
||||
arrange_text:
|
||||
|
||||
|
||||
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
|
||||
else evas_object_text_font_source_set(ep->object, NULL);
|
||||
|
||||
|
||||
evas_object_text_font_set(ep->object, font, size);
|
||||
evas_object_text_text_set(ep->object, text);
|
||||
part_get_geometry(ep, &tw, &th);
|
||||
ep->offset.x = ((sw - tw) * params->text.align.x);
|
||||
ep->offset.y = ((sh - th) * params->text.align.y);
|
||||
|
||||
|
||||
evas_object_move(ep->object,
|
||||
ed->x + params->x + ep->offset.x,
|
||||
ed->y + params->y + ep->offset.y);
|
||||
|
@ -503,7 +503,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
Evas_Text_Style_Type style;
|
||||
|
||||
style = EVAS_TEXT_STYLE_PLAIN;
|
||||
|
||||
|
||||
evas_object_color_set(ep->object,
|
||||
(params->color.r * params->color.a) / 255,
|
||||
(params->color.g * params->color.a) / 255,
|
||||
|
|
|
@ -12,15 +12,15 @@ _edje_font_is_embedded(Edje_File *edf, char *font)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Put a \ before and Space( ), \ or ' in a string.
|
||||
* A newly allocated string is returned.
|
||||
/* Put a \ before and Space( ), \ or ' in a string.
|
||||
* A newly allocated string is returned.
|
||||
*/
|
||||
static char *
|
||||
_edje_str_escape(const char *str)
|
||||
{
|
||||
char *s2, *d;
|
||||
const char *s;
|
||||
|
||||
|
||||
s2 = malloc((strlen(str) * 2) + 1);
|
||||
if (!s2) return NULL;
|
||||
for (s = str, d = s2; *s != 0; s++, d++)
|
||||
|
@ -35,13 +35,13 @@ _edje_str_escape(const char *str)
|
|||
*d = 0;
|
||||
return s2;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_edje_format_param_parse(char *item, char **key, char **val)
|
||||
{
|
||||
char *p;
|
||||
char *k, *v;
|
||||
|
||||
|
||||
p = strchr(item, '=');
|
||||
k = malloc(p - item + 1);
|
||||
strncpy(k, item, p - item);
|
||||
|
@ -58,7 +58,7 @@ _edje_format_parse(const char **s)
|
|||
char *item, *ds;
|
||||
const char *p;
|
||||
const char *ss;
|
||||
const char *s1 = NULL;
|
||||
const char *s1 = NULL;
|
||||
const char *s2 = NULL;
|
||||
|
||||
p = *s;
|
||||
|
@ -112,7 +112,7 @@ _edje_strbuf_append(char *s, const char *s2, int *len, int *alloc)
|
|||
{
|
||||
int l2;
|
||||
int tlen;
|
||||
|
||||
|
||||
if (!s2) return s;
|
||||
l2 = strlen(s2);
|
||||
tlen = *len + l2;
|
||||
|
@ -120,7 +120,7 @@ _edje_strbuf_append(char *s, const char *s2, int *len, int *alloc)
|
|||
{
|
||||
char *ts;
|
||||
int talloc;
|
||||
|
||||
|
||||
talloc = ((tlen + 31) >> 5) << 5;
|
||||
ts = realloc(s, talloc + 1);
|
||||
if (!ts) return s;
|
||||
|
@ -138,23 +138,23 @@ _edje_format_reparse(Edje_File *edf, const char *str, Edje_Style_Tag **tag_ret)
|
|||
char *s2;
|
||||
char *item;
|
||||
char *newstr = NULL;
|
||||
const char *s;
|
||||
const char *s;
|
||||
int newlen = 0, newalloc = 0;
|
||||
|
||||
|
||||
s = str;
|
||||
while ((item = _edje_format_parse(&s)))
|
||||
{
|
||||
if (_edje_format_is_param(item))
|
||||
{
|
||||
char *key = NULL, *val = NULL;
|
||||
|
||||
|
||||
_edje_format_param_parse(item, &key, &val);
|
||||
if (!strcmp(key, "font_source"))
|
||||
{
|
||||
/* dont allow font sources */
|
||||
}
|
||||
else if (!strcmp(key, "text_class"))
|
||||
{
|
||||
{
|
||||
if (tag_ret)
|
||||
(*tag_ret)->text_class = evas_stringshare_add(val);
|
||||
}
|
||||
|
@ -172,14 +172,14 @@ _edje_format_reparse(Edje_File *edf, const char *str, Edje_Style_Tag **tag_ret)
|
|||
char *tmpstr = NULL;
|
||||
int tmplen = 0;
|
||||
int tmpalloc = 0;
|
||||
|
||||
tmpstr = _edje_strbuf_append(tmpstr, "fonts/", &tmplen, &tmpalloc);
|
||||
tmpstr = _edje_strbuf_append(tmpstr, val, &tmplen, &tmpalloc);
|
||||
|
||||
tmpstr = _edje_strbuf_append(tmpstr, "fonts/", &tmplen, &tmpalloc);
|
||||
tmpstr = _edje_strbuf_append(tmpstr, val, &tmplen, &tmpalloc);
|
||||
(*tag_ret)->font = evas_stringshare_add(tmpstr);
|
||||
free(tmpstr);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
(*tag_ret)->font = evas_stringshare_add(val);
|
||||
}
|
||||
}
|
||||
|
@ -211,13 +211,13 @@ _edje_format_reparse(Edje_File *edf, const char *str, Edje_Style_Tag **tag_ret)
|
|||
*
|
||||
* @param ed The edje containing styles which need to be updated
|
||||
*/
|
||||
void
|
||||
void
|
||||
_edje_textblock_style_all_update(Edje *ed)
|
||||
{
|
||||
Evas_List *l, *ll;
|
||||
|
||||
|
||||
if (!ed->file) return;
|
||||
|
||||
|
||||
for (l = ed->file->styles; l; l = l->next)
|
||||
{
|
||||
Edje_Style *stl;
|
||||
|
@ -228,11 +228,11 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
int buflen = 0;
|
||||
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)
|
||||
{
|
||||
|
@ -244,7 +244,7 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
/* No text classes , goto next style */
|
||||
if (!found) continue;
|
||||
found = 0;
|
||||
|
||||
|
||||
if (_edje_fontset_append)
|
||||
fontset = _edje_str_escape(_edje_fontset_append);
|
||||
fontsource = _edje_str_escape(ed->file->path);
|
||||
|
@ -254,21 +254,21 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
{
|
||||
tag = ll->data;
|
||||
if (!tag->key) continue;
|
||||
|
||||
|
||||
/* Add Tag Key */
|
||||
buf = _edje_strbuf_append(buf, tag->key, &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, "='", &buflen, &bufalloc);
|
||||
|
||||
buf = _edje_strbuf_append(buf, tag->key, &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, "='", &buflen, &bufalloc);
|
||||
|
||||
/* Configure fonts from text class if it exists */
|
||||
if ((tc = _edje_text_class_find(ed, tag->text_class)))
|
||||
{
|
||||
/* Only update if not clearing, If clear leave it at zero */
|
||||
if (tc->font) found = 1;
|
||||
if (tc->font) found = 1;
|
||||
}
|
||||
|
||||
/* Add and Ha`ndle tag parsed data */
|
||||
|
||||
/* Add and Ha`ndle tag parsed data */
|
||||
buf = _edje_strbuf_append(buf, tag->value, &buflen, &bufalloc);
|
||||
|
||||
|
||||
if (!strcmp(tag->key, "DEFAULT"))
|
||||
{
|
||||
if (fontset)
|
||||
|
@ -280,16 +280,16 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
buf = _edje_strbuf_append(buf, " ", &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, "font_source=", &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, fontsource, &buflen, &bufalloc);
|
||||
}
|
||||
}
|
||||
if (tag->font_size != 0)
|
||||
{
|
||||
char font_size[32];
|
||||
|
||||
|
||||
if (found)
|
||||
snprintf(font_size, sizeof(font_size), "%f", (double) _edje_text_size_calc(tag->font_size, tc));
|
||||
else
|
||||
snprintf(font_size, sizeof(font_size), "%f", tag->font_size);
|
||||
|
||||
|
||||
buf = _edje_strbuf_append(buf, " ", &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, "font_size=", &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, font_size, &buflen, &bufalloc);
|
||||
|
@ -299,13 +299,13 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
{
|
||||
buf = _edje_strbuf_append(buf, " ", &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, "font=", &buflen, &bufalloc);
|
||||
if (found)
|
||||
if (found)
|
||||
buf = _edje_strbuf_append(buf, tc->font, &buflen, &bufalloc);
|
||||
else
|
||||
buf = _edje_strbuf_append(buf, tag->font, &buflen, &bufalloc);
|
||||
}
|
||||
found = 0;
|
||||
|
||||
|
||||
buf = _edje_strbuf_append(buf, "'", &buflen, &bufalloc);
|
||||
}
|
||||
if (fontset) free(fontset);
|
||||
|
@ -314,23 +314,23 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
/* Configure the style */
|
||||
evas_textblock_style_set(stl->style, buf);
|
||||
free(buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_edje_textblock_styles_add(Edje *ed)
|
||||
{
|
||||
Evas_List *l, *ll;
|
||||
|
||||
|
||||
if (!ed->file) return;
|
||||
|
||||
|
||||
for (l = ed->file->styles; l; l = l->next)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
@ -345,16 +345,16 @@ void
|
|||
_edje_textblock_styles_del(Edje *ed)
|
||||
{
|
||||
Evas_List *l, *ll;
|
||||
|
||||
|
||||
if (!ed->file) return;
|
||||
|
||||
|
||||
for (l = ed->file->styles; l; l = l->next)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
@ -366,8 +366,8 @@ _edje_textblock_styles_del(Edje *ed)
|
|||
}
|
||||
|
||||
/* When we get to here the edje file had been read into memory
|
||||
* the name of the style is established as well as the name and
|
||||
* data for the tags. This function will create the Evas_Style
|
||||
* the name of the style is established as well as the name and
|
||||
* data for the tags. This function will create the Evas_Style
|
||||
* object for each style. The style is composed of a base style
|
||||
* followed by a list of tags.
|
||||
*/
|
||||
|
@ -375,7 +375,7 @@ void
|
|||
_edje_textblock_style_parse_and_fix(Edje_File *edf)
|
||||
{
|
||||
Evas_List *l, *ll;
|
||||
|
||||
|
||||
for (l = edf->styles; l; l = l->next)
|
||||
{
|
||||
Edje_Style *stl;
|
||||
|
@ -384,13 +384,13 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
|
|||
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();
|
||||
evas_textblock_style_set(stl->style, buf);
|
||||
|
||||
|
||||
if (_edje_fontset_append)
|
||||
fontset = _edje_str_escape(_edje_fontset_append);
|
||||
fontsource = _edje_str_escape(edf->path);
|
||||
|
@ -400,13 +400,13 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
|
|||
{
|
||||
tag = ll->data;
|
||||
if (!tag->key) continue;
|
||||
|
||||
|
||||
/* Add Tag Key */
|
||||
buf = _edje_strbuf_append(buf, tag->key, &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, "='", &buflen, &bufalloc);
|
||||
|
||||
buf = _edje_strbuf_append(buf, tag->key, &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, "='", &buflen, &bufalloc);
|
||||
|
||||
ts = _edje_format_reparse(edf, tag->value, &(tag));
|
||||
|
||||
|
||||
/* Add and Handle tag parsed data */
|
||||
if (ts)
|
||||
{
|
||||
|
@ -415,7 +415,7 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
|
|||
buf = _edje_strbuf_append(buf, tag->value, &buflen, &bufalloc);
|
||||
free(ts);
|
||||
}
|
||||
|
||||
|
||||
if (!strcmp(tag->key, "DEFAULT"))
|
||||
{
|
||||
if (fontset)
|
||||
|
@ -431,12 +431,12 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
|
|||
if (tag->font_size > 0)
|
||||
{
|
||||
char font_size[32];
|
||||
|
||||
|
||||
snprintf(font_size, sizeof(font_size), "%f", tag->font_size);
|
||||
buf = _edje_strbuf_append(buf, " ", &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, "font_size=", &buflen, &bufalloc);
|
||||
buf = _edje_strbuf_append(buf, font_size, &buflen, &bufalloc);
|
||||
}
|
||||
}
|
||||
/* Add font name last to save evas from multiple loads */
|
||||
if (tag->font)
|
||||
{
|
||||
|
@ -461,13 +461,13 @@ _edje_textblock_style_cleanup(Edje_File *edf)
|
|||
while (edf->styles)
|
||||
{
|
||||
Edje_Style *stl;
|
||||
|
||||
|
||||
stl = edf->styles->data;
|
||||
edf->styles = evas_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);
|
||||
if (tag->key) evas_stringshare_del(tag->key);
|
||||
|
|
|
@ -108,7 +108,7 @@ edje_object_data_get(Evas_Object *obj, const char *key)
|
|||
for (l = ed->collection->data; l; l = l->next)
|
||||
{
|
||||
Edje_Data *di;
|
||||
|
||||
|
||||
di = l->data;
|
||||
if ((di->key) && (!strcmp(di->key, key)))
|
||||
return (const char *)di->value;
|
||||
|
@ -303,7 +303,7 @@ Evas_List *
|
|||
edje_color_class_list(void)
|
||||
{
|
||||
Edje_List_Foreach_Data fdata;
|
||||
|
||||
|
||||
memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
|
||||
evas_hash_foreach(_edje_color_class_member_hash, _edje_color_class_list_foreach, &fdata);
|
||||
|
||||
|
@ -580,7 +580,7 @@ Evas_List *
|
|||
edje_text_class_list(void)
|
||||
{
|
||||
Edje_List_Foreach_Data fdata;
|
||||
|
||||
|
||||
memset(&fdata, 0, sizeof(Edje_List_Foreach_Data));
|
||||
evas_hash_foreach(_edje_text_class_member_hash, _edje_text_class_list_foreach, &fdata);
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ edje_object_size_min_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
|
|||
while (ok)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
ok = 0;
|
||||
ed->dirty = 1;
|
||||
_edje_recalc(ed);
|
||||
|
@ -1179,7 +1179,7 @@ edje_object_size_min_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
|
|||
Edje_Real_Part *ep;
|
||||
int w, h;
|
||||
int didw;
|
||||
|
||||
|
||||
ep = ed->table_parts[i];
|
||||
w = ep->w - ep->req.w;
|
||||
h = ep->h - ep->req.h;
|
||||
|
@ -1716,7 +1716,7 @@ _edje_real_part_get(Edje *ed, const char *part)
|
|||
for (i = 0; i < ed->table_parts_size; i++)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
|
||||
rp = ed->table_parts[i];
|
||||
if ((rp->part->name) && (!strcmp(rp->part->name, part))) return rp;
|
||||
}
|
||||
|
@ -1855,7 +1855,7 @@ _edje_text_class_find(Edje *ed, const char *text_class)
|
|||
for (l = ed->text_classes; l; l = l->next)
|
||||
{
|
||||
Edje_Text_Class *tc;
|
||||
|
||||
|
||||
tc = l->data;
|
||||
if ((tc->name) && (!strcmp(text_class, tc->name))) return tc;
|
||||
}
|
||||
|
@ -2072,7 +2072,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow)
|
|||
if ((type) && (!strcmp(type, "edje")))
|
||||
{
|
||||
Evas_Coord w, h;
|
||||
|
||||
|
||||
edje_object_size_min_get(obj_swallow, &w, &h);
|
||||
rp->swallow_params.min.w = w;
|
||||
rp->swallow_params.min.h = h;
|
||||
|
@ -2085,7 +2085,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow)
|
|||
(!strcmp(type, "line"))))
|
||||
{
|
||||
Evas_Coord w, h;
|
||||
|
||||
|
||||
evas_object_geometry_get(obj_swallow, NULL, NULL, &w, &h);
|
||||
rp->swallow_params.min.w = w;
|
||||
rp->swallow_params.min.h = h;
|
||||
|
@ -2094,7 +2094,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow)
|
|||
}
|
||||
{
|
||||
int w1, h1, w2, h2, am, aw, ah;
|
||||
|
||||
|
||||
w1 = (int)evas_object_data_get(obj_swallow, "\377 edje.minw");
|
||||
h1 = (int)evas_object_data_get(obj_swallow, "\377 edje.minh");
|
||||
w2 = (int)evas_object_data_get(obj_swallow, "\377 edje.maxw");
|
||||
|
@ -2129,4 +2129,3 @@ _edje_real_part_swallow(Edje_Real_Part *rp, Evas_Object *obj_swallow)
|
|||
rp->edje->dirty = 1;
|
||||
_edje_recalc(rp->edje);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ _edje_var_timer_cb(void *data)
|
|||
Edje_Var_Timer *et;
|
||||
Edje *ed;
|
||||
Embryo_Function fn;
|
||||
|
||||
|
||||
et = data;
|
||||
if (!et) return 0;
|
||||
ed = et->edje;
|
||||
|
@ -30,14 +30,14 @@ _edje_var_timer_cb(void *data)
|
|||
free(et);
|
||||
{
|
||||
void *pdata;
|
||||
|
||||
|
||||
pdata = embryo_program_data_get(ed->collection->script);
|
||||
embryo_program_data_set(ed->collection->script, ed);
|
||||
embryo_program_data_set(ed->collection->script, ed);
|
||||
embryo_program_max_cycle_run_set(ed->collection->script, 5000000);
|
||||
embryo_program_run(ed->collection->script, fn);
|
||||
embryo_program_data_set(ed->collection->script, pdata);
|
||||
embryo_program_vm_pop(ed->collection->script);
|
||||
_edje_recalc(ed);
|
||||
_edje_recalc(ed);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ _edje_var_anim_cb(void *data)
|
|||
{
|
||||
Evas_List *l, *tl = NULL;
|
||||
double t;
|
||||
|
||||
|
||||
t = ecore_time_get();
|
||||
for (l = _edje_anim_list; l; l = l->next)
|
||||
tl = evas_list_append(tl, l->data);
|
||||
|
@ -55,7 +55,7 @@ _edje_var_anim_cb(void *data)
|
|||
{
|
||||
Edje *ed;
|
||||
Evas_List *tl2;
|
||||
|
||||
|
||||
ed = tl->data;
|
||||
_edje_ref(ed);
|
||||
_edje_block(ed);
|
||||
|
@ -69,7 +69,7 @@ _edje_var_anim_cb(void *data)
|
|||
while (tl2)
|
||||
{
|
||||
Edje_Var_Animator *ea;
|
||||
|
||||
|
||||
ea = tl2->data;
|
||||
if ((ed->var_pool) && (!ea->delete_me))
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ _edje_var_anim_cb(void *data)
|
|||
{
|
||||
Embryo_Function fn;
|
||||
float v;
|
||||
|
||||
|
||||
v = (t - ea->start) / ea->len;
|
||||
if (v > 1.0) v= 1.0;
|
||||
// _edje_embryo_script_reset(ed);
|
||||
|
@ -88,9 +88,9 @@ _edje_var_anim_cb(void *data)
|
|||
fn = ea->func;
|
||||
{
|
||||
void *pdata;
|
||||
|
||||
|
||||
pdata = embryo_program_data_get(ed->collection->script);
|
||||
embryo_program_data_set(ed->collection->script, ed);
|
||||
embryo_program_data_set(ed->collection->script, ed);
|
||||
embryo_program_max_cycle_run_set(ed->collection->script, 5000000);
|
||||
embryo_program_run(ed->collection->script, fn);
|
||||
embryo_program_data_set(ed->collection->script, pdata);
|
||||
|
@ -111,7 +111,7 @@ _edje_var_anim_cb(void *data)
|
|||
for (l = ed->var_pool->animators; l;)
|
||||
{
|
||||
Edje_Var_Animator *ea;
|
||||
|
||||
|
||||
ea = l->data;
|
||||
if (ea->delete_me)
|
||||
{
|
||||
|
@ -180,7 +180,7 @@ _edje_var_shutdown(Edje *ed)
|
|||
if (ed->var_pool->vars)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = 0; i < ed->var_pool->size; i++)
|
||||
{
|
||||
if (ed->var_pool->vars[i].type == EDJE_VAR_STRING)
|
||||
|
@ -205,7 +205,7 @@ _edje_var_shutdown(Edje *ed)
|
|||
while (ed->var_pool->timers)
|
||||
{
|
||||
Edje_Var_Timer *et;
|
||||
|
||||
|
||||
et = ed->var_pool->timers->data;
|
||||
ecore_timer_del(et->timer);
|
||||
free(et);
|
||||
|
@ -226,7 +226,7 @@ _edje_var_shutdown(Edje *ed)
|
|||
while (ed->var_pool->animators)
|
||||
{
|
||||
Edje_Var_Animator *ea;
|
||||
|
||||
|
||||
ea = ed->var_pool->animators->data;
|
||||
free(ea);
|
||||
ed->var_pool->animators = evas_list_remove(ed->var_pool->animators, ea);
|
||||
|
@ -239,7 +239,7 @@ int
|
|||
_edje_var_string_id_get(Edje *ed, const char *string)
|
||||
{
|
||||
Embryo_Cell cell, *cptr;
|
||||
|
||||
|
||||
if (!ed) return 0;
|
||||
if (!ed->collection) return 0;
|
||||
if (!ed->collection->script) return 0;
|
||||
|
@ -260,7 +260,7 @@ _edje_var_var_int_get(Edje *ed, Edje_Var *var)
|
|||
if (var->data.s.v)
|
||||
{
|
||||
double f;
|
||||
|
||||
|
||||
f = atof(var->data.s.v);
|
||||
free(var->data.s.v);
|
||||
var->data.s.v = NULL;
|
||||
|
@ -329,7 +329,7 @@ _edje_var_var_float_get(Edje *ed, Edje_Var *var)
|
|||
if (var->data.s.v)
|
||||
{
|
||||
double f;
|
||||
|
||||
|
||||
f = atof(var->data.s.v);
|
||||
free(var->data.s.v);
|
||||
var->data.s.v = NULL;
|
||||
|
@ -397,7 +397,7 @@ _edje_var_var_str_get(Edje *ed, Edje_Var *var)
|
|||
if (var->type == EDJE_VAR_INT)
|
||||
{
|
||||
char buf[64];
|
||||
|
||||
|
||||
snprintf(buf, sizeof(buf), "%i", var->data.i.v);
|
||||
var->data.s.v = strdup(buf);
|
||||
var->type = EDJE_VAR_STRING;
|
||||
|
@ -405,7 +405,7 @@ _edje_var_var_str_get(Edje *ed, Edje_Var *var)
|
|||
else if (var->type == EDJE_VAR_FLOAT)
|
||||
{
|
||||
char buf[64];
|
||||
|
||||
|
||||
snprintf(buf, sizeof(buf), "%f", var->data.f.v);
|
||||
var->data.s.v = strdup(buf);
|
||||
var->type = EDJE_VAR_STRING;
|
||||
|
@ -604,7 +604,7 @@ _edje_var_list_remove_nth(Edje *ed, int id, int n)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Evas_List *nth;
|
||||
|
||||
|
||||
nth = evas_list_nth_list(ed->var_pool->vars[id].data.l.v, n);
|
||||
if (nth)
|
||||
{
|
||||
|
@ -626,7 +626,7 @@ _edje_var_list_nth_int_get(Edje *ed, int id, int n)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return 0;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
var = _edje_var_list_nth(ed, id, n);
|
||||
if (!var) return 0;
|
||||
|
@ -646,7 +646,7 @@ _edje_var_list_nth_int_set(Edje *ed, int id, int n, int v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
var = _edje_var_list_nth(ed, id, n);
|
||||
if (!var) return;
|
||||
|
@ -666,7 +666,7 @@ _edje_var_list_int_append(Edje *ed, int id, int v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
var = _edje_var_new();
|
||||
if (!var) return;
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
|
@ -687,7 +687,7 @@ _edje_var_list_int_prepend(Edje *ed, int id, int v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
var = _edje_var_new();
|
||||
if (!var) return;
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
|
@ -708,7 +708,7 @@ _edje_var_list_int_insert(Edje *ed, int id, int n, int v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var, *var_rel;
|
||||
|
||||
|
||||
var = _edje_var_new();
|
||||
if (!var) return;
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
|
@ -733,7 +733,7 @@ _edje_var_list_nth_float_get(Edje *ed, int id, int n)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return 0;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
var = _edje_var_list_nth(ed, id, n);
|
||||
if (!var) return 0;
|
||||
|
@ -753,7 +753,7 @@ _edje_var_list_nth_float_set(Edje *ed, int id, int n, double v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
var = _edje_var_list_nth(ed, id, n);
|
||||
if (!var) return;
|
||||
|
@ -773,7 +773,7 @@ _edje_var_list_float_append(Edje *ed, int id, double v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
var = _edje_var_new();
|
||||
if (!var) return;
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
|
@ -794,7 +794,7 @@ _edje_var_list_float_prepend(Edje *ed, int id, double v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
var = _edje_var_new();
|
||||
if (!var) return;
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
|
@ -815,7 +815,7 @@ _edje_var_list_float_insert(Edje *ed, int id, int n, double v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var, *var_rel;
|
||||
|
||||
|
||||
var = _edje_var_new();
|
||||
if (!var) return;
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
|
@ -840,7 +840,7 @@ _edje_var_list_nth_str_get(Edje *ed, int id, int n)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return NULL;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
var = _edje_var_list_nth(ed, id, n);
|
||||
if (!var) return NULL;
|
||||
|
@ -860,7 +860,7 @@ _edje_var_list_nth_str_set(Edje *ed, int id, int n, const char *v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
var = _edje_var_list_nth(ed, id, n);
|
||||
if (!var) return;
|
||||
|
@ -880,7 +880,7 @@ _edje_var_list_str_append(Edje *ed, int id, const char *v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
var = _edje_var_new();
|
||||
if (!var) return;
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
|
@ -901,7 +901,7 @@ _edje_var_list_str_prepend(Edje *ed, int id, const char *v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
||||
var = _edje_var_new();
|
||||
if (!var) return;
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
|
@ -922,7 +922,7 @@ _edje_var_list_str_insert(Edje *ed, int id, int n, const char *v)
|
|||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
{
|
||||
Edje_Var *var, *var_rel;
|
||||
|
||||
|
||||
var = _edje_var_new();
|
||||
if (!var) return;
|
||||
id += EDJE_VAR_MAGIC_BASE;
|
||||
|
@ -940,7 +940,7 @@ _edje_var_timer_add(Edje *ed, double in, const char *fname, int val)
|
|||
{
|
||||
Edje_Var_Timer *et;
|
||||
Embryo_Function fn;
|
||||
|
||||
|
||||
if (!ed->var_pool) return 0;
|
||||
fn = embryo_program_function_find(ed->collection->script, (char *)fname);
|
||||
if (fn == EMBRYO_FUNCTION_NONE) return 0;
|
||||
|
@ -995,7 +995,7 @@ _edje_var_anim_add(Edje *ed, double len, const char *fname, int val)
|
|||
{
|
||||
Edje_Var_Animator *ea;
|
||||
Embryo_Function fn;
|
||||
|
||||
|
||||
if (!ed->var_pool) return 0;
|
||||
if (len <= 0.0) return 0;
|
||||
fn = embryo_program_function_find(ed->collection->script, (char *)fname);
|
||||
|
|
Loading…
Reference in New Issue