forked from enlightenment/efl
* edje: change memory layout that will become the new file format.
NOTE: I tried this change with all the apps and theme I had, but maybe i missed some bug. Please report any strange behaviour. SVN revision: 50641
This commit is contained in:
parent
3515de0a22
commit
e773bc9246
|
@ -103,8 +103,8 @@ struct _SrcFile_List
|
|||
/* global fn calls */
|
||||
void data_setup(void);
|
||||
void data_write(void);
|
||||
void data_queue_part_lookup(Edje_Part_Collection *pc, char *name, int *dest);
|
||||
void data_queue_program_lookup(Edje_Part_Collection *pc, char *name, int *dest);
|
||||
void data_queue_part_lookup(Old_Edje_Part_Collection *pc, char *name, int *dest);
|
||||
void data_queue_program_lookup(Old_Edje_Part_Collection *pc, char *name, int *dest);
|
||||
void data_queue_image_lookup(char *name, int *dest, Eina_Bool *set);
|
||||
void data_queue_part_slave_lookup(int *master, int *slave);
|
||||
void data_queue_image_slave_lookup(int *master, int *slave);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -52,14 +52,14 @@ struct _External_Lookup
|
|||
|
||||
struct _Part_Lookup
|
||||
{
|
||||
Edje_Part_Collection *pc;
|
||||
Old_Edje_Part_Collection *pc;
|
||||
char *name;
|
||||
int *dest;
|
||||
};
|
||||
|
||||
struct _Program_Lookup
|
||||
{
|
||||
Edje_Part_Collection *pc;
|
||||
Old_Edje_Part_Collection *pc;
|
||||
char *name;
|
||||
int *dest;
|
||||
};
|
||||
|
@ -96,7 +96,7 @@ struct _Code_Lookup
|
|||
Eina_Bool set;
|
||||
};
|
||||
|
||||
static void data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, void (*func)(Edje_Part_Collection *pc, char *name, char *ptr, int len));
|
||||
static void data_process_string(Old_Edje_Part_Collection *pc, const char *prefix, char *s, void (*func)(Old_Edje_Part_Collection *pc, char *name, char *ptr, int len));
|
||||
|
||||
Old_Edje_File *edje_file = NULL;
|
||||
Eina_List *edje_collections = NULL;
|
||||
|
@ -160,8 +160,8 @@ data_setup(void)
|
|||
}
|
||||
|
||||
static void
|
||||
check_image_part_desc (Edje_Part_Collection *pc, Edje_Part *ep,
|
||||
Edje_Part_Description *epd, Eet_File *ef)
|
||||
check_image_part_desc (Old_Edje_Part_Collection *pc, Old_Edje_Part *ep,
|
||||
Old_Edje_Part_Description *epd, Eet_File *ef)
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Part_Image_Id *iid;
|
||||
|
@ -182,7 +182,7 @@ check_image_part_desc (Edje_Part_Collection *pc, Edje_Part *ep,
|
|||
}
|
||||
|
||||
static void
|
||||
check_packed_items(Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
|
||||
check_packed_items(Old_Edje_Part_Collection *pc, Old_Edje_Part *ep, Eet_File *ef)
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Pack_Element *it;
|
||||
|
@ -201,11 +201,11 @@ check_packed_items(Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
|
|||
}
|
||||
|
||||
static void
|
||||
check_part (Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
|
||||
check_part (Old_Edje_Part_Collection *pc, Old_Edje_Part *ep, Eet_File *ef)
|
||||
{
|
||||
Edje_Part_Description *epd = ep->default_desc;
|
||||
Old_Edje_Part_Description *epd = ep->default_desc;
|
||||
Eina_List *l;
|
||||
Edje_Part_Description *data;
|
||||
Old_Edje_Part_Description *data;
|
||||
|
||||
/* FIXME: check image set and sort them. */
|
||||
if (!epd)
|
||||
|
@ -225,7 +225,7 @@ check_part (Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef)
|
|||
}
|
||||
|
||||
static void
|
||||
check_program (Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef)
|
||||
check_program (Old_Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef)
|
||||
{
|
||||
switch (ep->action)
|
||||
{
|
||||
|
@ -649,13 +649,13 @@ static void
|
|||
check_groups(Eet_File *ef)
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Part_Collection *pc;
|
||||
Old_Edje_Part_Collection *pc;
|
||||
|
||||
/* sanity checks for parts and programs */
|
||||
EINA_LIST_FOREACH(edje_collections, l, pc)
|
||||
{
|
||||
Eina_List *ll;
|
||||
Edje_Part *part;
|
||||
Old_Edje_Part *part;
|
||||
Edje_Program *prog;
|
||||
|
||||
EINA_LIST_FOREACH(pc->parts, ll, part)
|
||||
|
@ -669,7 +669,7 @@ static int
|
|||
data_write_groups(Eet_File *ef, int *collection_num)
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Part_Collection *pc;
|
||||
Old_Edje_Part_Collection *pc;
|
||||
int bytes = 0;
|
||||
int total_bytes = 0;
|
||||
|
||||
|
@ -1111,7 +1111,7 @@ data_queue_group_lookup(char *name)
|
|||
}
|
||||
|
||||
void
|
||||
data_queue_part_lookup(Edje_Part_Collection *pc, char *name, int *dest)
|
||||
data_queue_part_lookup(Old_Edje_Part_Collection *pc, char *name, int *dest)
|
||||
{
|
||||
Part_Lookup *pl;
|
||||
|
||||
|
@ -1123,7 +1123,7 @@ data_queue_part_lookup(Edje_Part_Collection *pc, char *name, int *dest)
|
|||
}
|
||||
|
||||
void
|
||||
data_queue_program_lookup(Edje_Part_Collection *pc, char *name, int *dest)
|
||||
data_queue_program_lookup(Old_Edje_Part_Collection *pc, char *name, int *dest)
|
||||
{
|
||||
Program_Lookup *pl;
|
||||
|
||||
|
@ -1187,7 +1187,7 @@ data_process_lookups(void)
|
|||
while (part_lookups)
|
||||
{
|
||||
Part_Lookup *pl;
|
||||
Edje_Part *ep;
|
||||
Old_Edje_Part *ep;
|
||||
|
||||
pl = eina_list_data_get(part_lookups);
|
||||
|
||||
|
@ -1329,7 +1329,7 @@ data_process_lookups(void)
|
|||
}
|
||||
|
||||
static void
|
||||
data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, void (*func)(Edje_Part_Collection *pc, char *name, char* ptr, int len))
|
||||
data_process_string(Old_Edje_Part_Collection *pc, const char *prefix, char *s, void (*func)(Old_Edje_Part_Collection *pc, char *name, char* ptr, int len))
|
||||
{
|
||||
char *p;
|
||||
char *key;
|
||||
|
@ -1440,7 +1440,7 @@ data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, void
|
|||
}
|
||||
|
||||
static void
|
||||
_data_queue_part_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len)
|
||||
_data_queue_part_lookup(Old_Edje_Part_Collection *pc, char *name, char *ptr, int len)
|
||||
{
|
||||
Code_Lookup *cl;
|
||||
cl = mem_alloc(SZ(Code_Lookup));
|
||||
|
@ -1452,7 +1452,7 @@ _data_queue_part_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len
|
|||
code_lookups = eina_list_append(code_lookups, cl);
|
||||
}
|
||||
static void
|
||||
_data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int len)
|
||||
_data_queue_program_lookup(Old_Edje_Part_Collection *pc, char *name, char *ptr, int len)
|
||||
{
|
||||
Code_Lookup *cl;
|
||||
|
||||
|
@ -1465,12 +1465,12 @@ _data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int
|
|||
code_lookups = eina_list_append(code_lookups, cl);
|
||||
}
|
||||
static void
|
||||
_data_queue_group_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr __UNUSED__, int len __UNUSED__)
|
||||
_data_queue_group_lookup(Old_Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr __UNUSED__, int len __UNUSED__)
|
||||
{
|
||||
data_queue_group_lookup(name);
|
||||
data_queue_group_lookup(name);
|
||||
}
|
||||
static void
|
||||
_data_queue_image_pc_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr, int len)
|
||||
_data_queue_image_pc_lookup(Old_Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr, int len)
|
||||
{
|
||||
Code_Lookup *cl;
|
||||
|
||||
|
@ -1491,7 +1491,7 @@ data_process_scripts(void)
|
|||
for (l = codes, l2 = edje_collections; (l) && (l2); l = eina_list_next(l), l2 = eina_list_next(l2))
|
||||
{
|
||||
Code *cd;
|
||||
Edje_Part_Collection *pc;
|
||||
Old_Edje_Part_Collection *pc;
|
||||
|
||||
cd = eina_list_data_get(l);
|
||||
pc = eina_list_data_get(l2);
|
||||
|
|
|
@ -70,7 +70,6 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
|
|||
void *data;
|
||||
|
||||
ce = eina_hash_find(edf->collection, coll);
|
||||
|
||||
if (!ce) return NULL;
|
||||
|
||||
if (ce->ref)
|
||||
|
@ -98,13 +97,20 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
|
|||
oedc = eet_data_read(edf->ef, _edje_edd_edje_part_collection, buf);
|
||||
if (!oedc) return NULL;
|
||||
|
||||
oedc->part = ce->entry;
|
||||
|
||||
edc = _edje_collection_convert(edf, oedc);
|
||||
oedc = NULL;
|
||||
|
||||
edc->references = 1;
|
||||
|
||||
snprintf(buf, sizeof(buf), "scripts/%i", id);
|
||||
data = eet_read(edf->ef, buf, &size);
|
||||
|
||||
if (data)
|
||||
{
|
||||
oedc->script = embryo_program_new(data, size);
|
||||
_edje_embryo_script_init(oedc);
|
||||
edc->script = embryo_program_new(data, size);
|
||||
_edje_embryo_script_init(edc);
|
||||
free(data);
|
||||
}
|
||||
|
||||
|
@ -114,12 +120,12 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
|
|||
if (data)
|
||||
{
|
||||
#ifdef LUA2
|
||||
_edje_lua2_script_load(oedc, data, size);
|
||||
#else
|
||||
_edje_lua2_script_load(edc, data, size);
|
||||
#else
|
||||
int err_code;
|
||||
|
||||
//printf("lua chunk size: %d\n", size);
|
||||
_edje_lua_new_reg(_edje_lua_state_get(), -1, oedc); // gets freed in 'edje_load::_edje_collectoin_free'
|
||||
_edje_lua_new_reg(_edje_lua_state_get(), -1, edc); // gets freed in 'edje_load::_edje_collectoin_free'
|
||||
|
||||
if ((err_code = luaL_loadbuffer(_edje_lua_state_get(), data, size, "edje_lua_script")))
|
||||
{
|
||||
|
@ -130,15 +136,10 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
|
|||
}
|
||||
if (lua_pcall(_edje_lua_state_get(), 0, 0, 0))
|
||||
ERR("lua call error: %s", lua_tostring(_edje_lua_state_get(), -1));
|
||||
#endif
|
||||
#endif
|
||||
free(data);
|
||||
}
|
||||
|
||||
oedc->part = ce->entry;
|
||||
oedc->references = 1;
|
||||
|
||||
edc = _edje_collection_convert(edf, oedc);
|
||||
|
||||
return edc;
|
||||
}
|
||||
|
||||
|
@ -300,17 +301,28 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
{
|
||||
if (!edc->checked)
|
||||
{
|
||||
EINA_LIST_FOREACH(edc->parts, l, ep)
|
||||
unsigned int j;
|
||||
|
||||
for (j = 0; j < edc->parts_count; ++j)
|
||||
{
|
||||
Edje_Part *ep2;
|
||||
|
||||
ep = edc->parts[j];
|
||||
|
||||
/* Register any color classes in this parts descriptions. */
|
||||
hist = NULL;
|
||||
hist = eina_list_append(hist, ep);
|
||||
ep2 = ep;
|
||||
while (ep2->dragable.confine_id >= 0)
|
||||
{
|
||||
ep2 = eina_list_nth(edc->parts, ep2->dragable.confine_id);
|
||||
if (ep2->dragable.confine_id >= (int) edc->parts_count)
|
||||
{
|
||||
ERR("confine_to above limit. invalidating it.");
|
||||
ep2->dragable.confine_id = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
ep2 = edc->parts[ep2->dragable.confine_id];
|
||||
if (eina_list_data_find(hist, ep2))
|
||||
{
|
||||
ERR("confine_to loops. invalidating loop.");
|
||||
|
@ -327,9 +339,15 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
{
|
||||
Edje_Part* prev;
|
||||
|
||||
if (ep2->dragable.event_id >= (int) edc->parts_count)
|
||||
{
|
||||
ERR("event_id above limit. invalidating it.");
|
||||
ep2->dragable.event_id = -1;
|
||||
break;
|
||||
}
|
||||
prev = ep2;
|
||||
|
||||
ep2 = eina_list_nth(edc->parts, ep2->dragable.event_id);
|
||||
ep2 = edc->parts[ep2->dragable.event_id];
|
||||
if (!ep2->dragable.x && !ep2->dragable.y)
|
||||
{
|
||||
prev->dragable.event_id = -1;
|
||||
|
@ -350,7 +368,14 @@ _edje_cache_file_coll_open(const char *file, const char *coll, int *error_ret, E
|
|||
ep2 = ep;
|
||||
while (ep2->clip_to_id >= 0)
|
||||
{
|
||||
ep2 = eina_list_nth(edc->parts, ep2->clip_to_id);
|
||||
if (ep2->clip_to_id >= (int) edc->parts_count)
|
||||
{
|
||||
ERR("clip_to_id above limit. invalidating it.");
|
||||
ep2->clip_to_id = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
ep2 = edc->parts[ep2->clip_to_id];
|
||||
if (eina_list_data_find(hist, ep2))
|
||||
{
|
||||
ERR("clip_to loops. invalidating loop.");
|
||||
|
@ -378,11 +403,15 @@ _edje_cache_coll_clean(Edje_File *edf)
|
|||
count = eina_list_count(edf->collection_cache);
|
||||
while ((edf->collection_cache) && (count > _edje_collection_cache_size))
|
||||
{
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
Edje_Part_Collection *edc;
|
||||
|
||||
edc = eina_list_data_get(eina_list_last(edf->collection_cache));
|
||||
edf->collection_cache = eina_list_remove_list(edf->collection_cache, eina_list_last(edf->collection_cache));
|
||||
_edje_collection_free(edf, edc);
|
||||
|
||||
ce = eina_hash_find(edf->collection, edc->part);
|
||||
_edje_collection_free(edf, edc, ce);
|
||||
|
||||
count = eina_list_count(edf->collection_cache);
|
||||
}
|
||||
}
|
||||
|
@ -392,11 +421,14 @@ _edje_cache_coll_flush(Edje_File *edf)
|
|||
{
|
||||
while (edf->collection_cache)
|
||||
{
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
Edje_Part_Collection *edc;
|
||||
|
||||
edc = eina_list_data_get(eina_list_last(edf->collection_cache));
|
||||
edf->collection_cache = eina_list_remove_list(edf->collection_cache, eina_list_last(edf->collection_cache));
|
||||
_edje_collection_free(edf, edc);
|
||||
|
||||
ce = eina_hash_find(edf->collection, edc->part);
|
||||
_edje_collection_free(edf, edc, ce);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,11 @@
|
|||
#define FLAG_Y 0x02
|
||||
#define FLAG_XY (FLAG_X | FLAG_Y)
|
||||
|
||||
static void _edje_part_recalc_single(Edje *ed, 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 *confine_to, Edje_Calc_Params *params, int flags);
|
||||
static void _edje_part_recalc_single(Edje *ed, Edje_Real_Part *ep,
|
||||
Edje_Part_Description_Common *desc, Edje_Part_Description_Common *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 *confine_to, Edje_Calc_Params *params, int flags);
|
||||
static void _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags);
|
||||
|
||||
void
|
||||
|
@ -63,15 +67,15 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos)
|
|||
#endif
|
||||
}
|
||||
|
||||
Edje_Part_Description *
|
||||
Edje_Part_Description_Common *
|
||||
_edje_part_description_find(Edje *ed __UNUSED__, Edje_Real_Part *rp, const char *name,
|
||||
double val)
|
||||
{
|
||||
Edje_Part *ep = rp->part;
|
||||
Edje_Part_Description *ret = NULL;
|
||||
Edje_Part_Description *d;
|
||||
Eina_List *l;
|
||||
Edje_Part_Description_Common *ret = NULL;
|
||||
Edje_Part_Description_Common *d;
|
||||
double min_dst = 99999.0;
|
||||
unsigned int i;
|
||||
|
||||
if (!strcmp(name, "default") && val == 0.0)
|
||||
return ep->default_desc;
|
||||
|
@ -82,15 +86,17 @@ _edje_part_description_find(Edje *ed __UNUSED__, Edje_Real_Part *rp, const char
|
|||
if (!strcmp(name, "default"))
|
||||
{
|
||||
ret = ep->default_desc;
|
||||
min_dst = ABS(ep->default_desc->common.state.value - val);
|
||||
min_dst = ABS(ep->default_desc->state.value - val);
|
||||
}
|
||||
EINA_LIST_FOREACH(ep->other_desc, l, d)
|
||||
for (i = 0; i < ep->other_count; ++i)
|
||||
{
|
||||
if (!strcmp(d->common.state.name, name))
|
||||
d = ep->other_desc[i];
|
||||
|
||||
if (!strcmp(d->state.name, name))
|
||||
{
|
||||
double dst;
|
||||
|
||||
dst = ABS(d->common.state.value - val);
|
||||
dst = ABS(d->state.value - val);
|
||||
if (dst < min_dst)
|
||||
{
|
||||
ret = d;
|
||||
|
@ -105,9 +111,11 @@ _edje_part_description_find(Edje *ed __UNUSED__, Edje_Real_Part *rp, const char
|
|||
void
|
||||
_edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, double v1, const char *d2, double v2)
|
||||
{
|
||||
Edje_Part_Description *epd1;
|
||||
Edje_Part_Description *epd2 = NULL;
|
||||
Edje_Part_Description *chosen_desc;
|
||||
Edje_Part_Description_Common *epd1;
|
||||
Edje_Part_Description_Common *epd2 = NULL;
|
||||
Edje_Part_Description_Common *chosen_desc;
|
||||
|
||||
Edje_Part_Description_Image *epdi;
|
||||
|
||||
if (!d1) d1 = "default";
|
||||
|
||||
|
@ -118,8 +126,10 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
|
|||
if (d2)
|
||||
epd2 = _edje_part_description_find(ed, ep, d2, v2);
|
||||
|
||||
epdi = (Edje_Part_Description_Image*) epd2;
|
||||
|
||||
/* There is an animation if both description are different or if description is an image with tweens */
|
||||
if (epd2 != NULL && (epd1 != epd2 || (ep->part->type == EDJE_PART_TYPE_IMAGE && epd2->image.tween_list)))
|
||||
if (epd2 != NULL && (epd1 != epd2 || (ep->part->type == EDJE_PART_TYPE_IMAGE && epdi->image.tween_list)))
|
||||
{
|
||||
if (!ep->param2)
|
||||
{
|
||||
|
@ -148,20 +158,24 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
|
|||
ep->param1.rel1_to_x = ep->param1.rel1_to_y = NULL;
|
||||
ep->param1.rel2_to_x = ep->param1.rel2_to_y = NULL;
|
||||
|
||||
if (ep->param1.description->common.rel1.id_x >= 0)
|
||||
ep->param1.rel1_to_x = ed->table_parts[ep->param1.description->common.rel1.id_x % ed->table_parts_size];
|
||||
if (ep->param1.description->common.rel1.id_y >= 0)
|
||||
ep->param1.rel1_to_y = ed->table_parts[ep->param1.description->common.rel1.id_y % ed->table_parts_size];
|
||||
if (ep->param1.description->common.rel2.id_x >= 0)
|
||||
ep->param1.rel2_to_x = ed->table_parts[ep->param1.description->common.rel2.id_x % ed->table_parts_size];
|
||||
if (ep->param1.description->common.rel2.id_y >= 0)
|
||||
ep->param1.rel2_to_y = ed->table_parts[ep->param1.description->common.rel2.id_y % ed->table_parts_size];
|
||||
if (ep->param1.description->rel1.id_x >= 0)
|
||||
ep->param1.rel1_to_x = ed->table_parts[ep->param1.description->rel1.id_x % ed->table_parts_size];
|
||||
if (ep->param1.description->rel1.id_y >= 0)
|
||||
ep->param1.rel1_to_y = ed->table_parts[ep->param1.description->rel1.id_y % ed->table_parts_size];
|
||||
if (ep->param1.description->rel2.id_x >= 0)
|
||||
ep->param1.rel2_to_x = ed->table_parts[ep->param1.description->rel2.id_x % ed->table_parts_size];
|
||||
if (ep->param1.description->rel2.id_y >= 0)
|
||||
ep->param1.rel2_to_y = ed->table_parts[ep->param1.description->rel2.id_y % ed->table_parts_size];
|
||||
|
||||
if (ep->part->type == EDJE_PART_TYPE_EXTERNAL)
|
||||
{
|
||||
Edje_Part_Description_External *external;
|
||||
|
||||
external = (Edje_Part_Description_External*) ep->param1.description;
|
||||
|
||||
if (ep->param1.external_params)
|
||||
_edje_external_parsed_params_free(ep->swallowed_object, ep->param1.external_params);
|
||||
ep->param1.external_params = _edje_external_params_parse(ep->swallowed_object, ep->param1.description->external_params);
|
||||
ep->param1.external_params = _edje_external_params_parse(ep->swallowed_object, external->external_params);
|
||||
}
|
||||
|
||||
if (ep->param2)
|
||||
|
@ -173,17 +187,25 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
|
|||
|
||||
if (ep->param2->description)
|
||||
{
|
||||
if (ep->param2->description->common.rel1.id_x >= 0)
|
||||
ep->param2->rel1_to_x = ed->table_parts[ep->param2->description->common.rel1.id_x % ed->table_parts_size];
|
||||
if (ep->param2->description->common.rel1.id_y >= 0)
|
||||
ep->param2->rel1_to_y = ed->table_parts[ep->param2->description->common.rel1.id_y % ed->table_parts_size];
|
||||
if (ep->param2->description->common.rel2.id_x >= 0)
|
||||
ep->param2->rel2_to_x = ed->table_parts[ep->param2->description->common.rel2.id_x % ed->table_parts_size];
|
||||
if (ep->param2->description->common.rel2.id_y >= 0)
|
||||
ep->param2->rel2_to_y = ed->table_parts[ep->param2->description->common.rel2.id_y % ed->table_parts_size];
|
||||
if (ep->param2->description->rel1.id_x >= 0)
|
||||
ep->param2->rel1_to_x = ed->table_parts[ep->param2->description->rel1.id_x % ed->table_parts_size];
|
||||
if (ep->param2->description->rel1.id_y >= 0)
|
||||
ep->param2->rel1_to_y = ed->table_parts[ep->param2->description->rel1.id_y % ed->table_parts_size];
|
||||
if (ep->param2->description->rel2.id_x >= 0)
|
||||
ep->param2->rel2_to_x = ed->table_parts[ep->param2->description->rel2.id_x % ed->table_parts_size];
|
||||
if (ep->param2->description->rel2.id_y >= 0)
|
||||
ep->param2->rel2_to_y = ed->table_parts[ep->param2->description->rel2.id_y % ed->table_parts_size];
|
||||
|
||||
if (ep->part->type == EDJE_PART_TYPE_EXTERNAL)
|
||||
ep->param2->external_params = _edje_external_params_parse(ep->swallowed_object, ep->param2->description->external_params);
|
||||
{
|
||||
Edje_Part_Description_External *external;
|
||||
|
||||
external = (Edje_Part_Description_External*) ep->param2->description;
|
||||
|
||||
if (ep->param2->external_params)
|
||||
_edje_external_parsed_params_free(ep->swallowed_object, ep->param2->external_params);
|
||||
ep->param2->external_params = _edje_external_params_parse(ep->swallowed_object, external->external_params);
|
||||
}
|
||||
}
|
||||
|
||||
if (ep->description_pos != 0.0)
|
||||
|
@ -644,7 +666,7 @@ static void
|
|||
_edje_part_recalc_single_textblock(FLOAT_T sc,
|
||||
Edje *ed,
|
||||
Edje_Real_Part *ep,
|
||||
Edje_Part_Description *chosen_desc,
|
||||
Edje_Part_Description_Text *chosen_desc,
|
||||
Edje_Calc_Params *params,
|
||||
int *minw, int *minh,
|
||||
int *maxw, int *maxh)
|
||||
|
@ -660,8 +682,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
|
|||
if (chosen_desc->text.id_source >= 0)
|
||||
{
|
||||
ep->text.source = ed->table_parts[chosen_desc->text.id_source % ed->table_parts_size];
|
||||
if (ep->text.source->chosen_description->text.style)
|
||||
style = ep->text.source->chosen_description->text.style;
|
||||
if (((Edje_Part_Description_Text *)ep->text.source->chosen_description)->text.style)
|
||||
style = ((Edje_Part_Description_Text *)ep->text.source->chosen_description)->text.style;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -673,7 +695,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
|
|||
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];
|
||||
text = ep->text.text_source->chosen_description->text.text;
|
||||
text = ((Edje_Part_Description_Text*)ep->text.text_source->chosen_description)->text.text;
|
||||
if (ep->text.text_source->text.text) text = ep->text.text_source->text.text;
|
||||
}
|
||||
else
|
||||
|
@ -767,8 +789,8 @@ static void
|
|||
_edje_part_recalc_single_text(FLOAT_T sc,
|
||||
Edje *ed,
|
||||
Edje_Real_Part *ep,
|
||||
Edje_Part_Description *desc,
|
||||
Edje_Part_Description *chosen_desc,
|
||||
Edje_Part_Description_Text *desc,
|
||||
Edje_Part_Description_Text *chosen_desc,
|
||||
Edje_Calc_Params *params,
|
||||
int *minw, int *minh,
|
||||
int *maxw, int *maxh)
|
||||
|
@ -797,12 +819,12 @@ _edje_part_recalc_single_text(FLOAT_T sc,
|
|||
ep->text.text_source = NULL;
|
||||
|
||||
if (ep->text.text_source)
|
||||
text = ep->text.text_source->chosen_description->text.text;
|
||||
text = ((Edje_Part_Description_Text*)ep->text.text_source->chosen_description)->text.text;
|
||||
else
|
||||
text = chosen_desc->text.text;
|
||||
|
||||
if (ep->text.source)
|
||||
font = _edje_text_class_font_get(ed, ep->text.source->chosen_description, &size, &sfont);
|
||||
font = _edje_text_class_font_get(ed, ((Edje_Part_Description_Text*)ep->text.source->chosen_description), &size, &sfont);
|
||||
else
|
||||
font = _edje_text_class_font_get(ed, chosen_desc, &size, &sfont);
|
||||
|
||||
|
@ -1227,8 +1249,8 @@ _edje_part_recalc_single_min_max(FLOAT_T sc,
|
|||
static void
|
||||
_edje_part_recalc_single(Edje *ed,
|
||||
Edje_Real_Part *ep,
|
||||
Edje_Part_Description *desc,
|
||||
Edje_Part_Description *chosen_desc,
|
||||
Edje_Part_Description_Common *desc,
|
||||
Edje_Part_Description_Common *chosen_desc,
|
||||
Edje_Real_Part *rel1_to_x,
|
||||
Edje_Real_Part *rel1_to_y,
|
||||
Edje_Real_Part *rel2_to_x,
|
||||
|
@ -1245,23 +1267,23 @@ _edje_part_recalc_single(Edje *ed,
|
|||
|
||||
sc = ed->scale;
|
||||
if (sc == 0.0) sc = _edje_scale;
|
||||
_edje_part_recalc_single_min_max(sc, ep, &desc->common, &minw, &minh, &maxw, &maxh, flags);
|
||||
_edje_part_recalc_single_min_max(sc, ep, desc, &minw, &minh, &maxw, &maxh, flags);
|
||||
|
||||
/* relative coords of top left & bottom right */
|
||||
_edje_part_recalc_single_rel(ed, ep, &desc->common, rel1_to_x, rel1_to_y, rel2_to_x, rel2_to_y, params, flags);
|
||||
_edje_part_recalc_single_rel(ed, ep, desc, rel1_to_x, rel1_to_y, rel2_to_x, rel2_to_y, params, flags);
|
||||
|
||||
/* aspect */
|
||||
if (((flags | ep->calculated) & FLAG_XY) == FLAG_XY)
|
||||
_edje_part_recalc_single_aspect(ep, &desc->common, params, &minw, &minh, &maxw, &maxh);
|
||||
_edje_part_recalc_single_aspect(ep, desc, params, &minw, &minh, &maxw, &maxh);
|
||||
|
||||
/* size step */
|
||||
_edje_part_recalc_single_step(&desc->common, params, flags);
|
||||
_edje_part_recalc_single_step(desc, params, flags);
|
||||
|
||||
/* if we have text that wants to make the min size the text size... */
|
||||
if (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK)
|
||||
_edje_part_recalc_single_textblock(sc, ed, ep, chosen_desc, params, &minw, &minh, &maxw, &maxh);
|
||||
_edje_part_recalc_single_textblock(sc, ed, ep, (Edje_Part_Description_Text*) chosen_desc, params, &minw, &minh, &maxw, &maxh);
|
||||
else if (ep->part->type == EDJE_PART_TYPE_TEXT)
|
||||
_edje_part_recalc_single_text(sc, ed, ep, desc, chosen_desc, params, &minw, &minh, &maxw, &maxh);
|
||||
_edje_part_recalc_single_text(sc, ed, ep, (Edje_Part_Description_Text*) desc, (Edje_Part_Description_Text*) chosen_desc, params, &minw, &minh, &maxw, &maxh);
|
||||
|
||||
/* remember what our size is BEFORE we go limit it */
|
||||
params->req.x = params->x;
|
||||
|
@ -1270,10 +1292,10 @@ _edje_part_recalc_single(Edje *ed,
|
|||
params->req.h = params->h;
|
||||
|
||||
/* adjust for min size */
|
||||
_edje_part_recalc_single_min(&desc->common, params, minw, minh, flags);
|
||||
_edje_part_recalc_single_min(desc, params, minw, minh, flags);
|
||||
|
||||
/* adjust for max size */
|
||||
_edje_part_recalc_single_max(&desc->common, params, maxw, maxh, flags);
|
||||
_edje_part_recalc_single_max(desc, params, maxw, maxh, flags);
|
||||
|
||||
/* take care of dragable part */
|
||||
if (ep->drag)
|
||||
|
@ -1281,82 +1303,90 @@ _edje_part_recalc_single(Edje *ed,
|
|||
|
||||
/* fill */
|
||||
if (ep->part->type == EDJE_PART_TYPE_IMAGE)
|
||||
_edje_part_recalc_single_fill(ep, &desc->image, params, flags);
|
||||
_edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Image *)desc)->image, params, flags);
|
||||
|
||||
/* colors */
|
||||
if ((desc->common.color_class) && (*desc->common.color_class))
|
||||
cc = _edje_color_class_find(ed, desc->common.color_class);
|
||||
if ((desc->color_class) && (*desc->color_class))
|
||||
cc = _edje_color_class_find(ed, desc->color_class);
|
||||
|
||||
if (cc)
|
||||
{
|
||||
params->color.r = (((int)cc->r + 1) * desc->common.color.r) >> 8;
|
||||
params->color.g = (((int)cc->g + 1) * desc->common.color.g) >> 8;
|
||||
params->color.b = (((int)cc->b + 1) * desc->common.color.b) >> 8;
|
||||
params->color.a = (((int)cc->a + 1) * desc->common.color.a) >> 8;
|
||||
params->color.r = (((int)cc->r + 1) * desc->color.r) >> 8;
|
||||
params->color.g = (((int)cc->g + 1) * desc->color.g) >> 8;
|
||||
params->color.b = (((int)cc->b + 1) * desc->color.b) >> 8;
|
||||
params->color.a = (((int)cc->a + 1) * desc->color.a) >> 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
params->color.r = desc->common.color.r;
|
||||
params->color.g = desc->common.color.g;
|
||||
params->color.b = desc->common.color.b;
|
||||
params->color.a = desc->common.color.a;
|
||||
params->color.r = desc->color.r;
|
||||
params->color.g = desc->color.g;
|
||||
params->color.b = desc->color.b;
|
||||
params->color.a = desc->color.a;
|
||||
}
|
||||
|
||||
/* visible */
|
||||
params->visible = desc->common.visible;
|
||||
params->visible = desc->visible;
|
||||
|
||||
switch (ep->part->type)
|
||||
{
|
||||
case EDJE_PART_TYPE_IMAGE:
|
||||
/* border */
|
||||
if (flags & FLAG_X)
|
||||
{
|
||||
params->type.common.spec.image.l = desc->image.border.l;
|
||||
params->type.common.spec.image.r = desc->image.border.r;
|
||||
}
|
||||
if (flags & FLAG_Y)
|
||||
{
|
||||
params->type.common.spec.image.t = desc->image.border.t;
|
||||
params->type.common.spec.image.b = desc->image.border.b;
|
||||
}
|
||||
break;
|
||||
{
|
||||
Edje_Part_Description_Image *img_desc = (Edje_Part_Description_Image*) desc;
|
||||
|
||||
/* border */
|
||||
if (flags & FLAG_X)
|
||||
{
|
||||
params->type.common.spec.image.l = img_desc->image.border.l;
|
||||
params->type.common.spec.image.r = img_desc->image.border.r;
|
||||
}
|
||||
if (flags & FLAG_Y)
|
||||
{
|
||||
params->type.common.spec.image.t = img_desc->image.border.t;
|
||||
params->type.common.spec.image.b = img_desc->image.border.b;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
case EDJE_PART_TYPE_TEXTBLOCK:
|
||||
/* text.align */
|
||||
if (flags & FLAG_X)
|
||||
{
|
||||
params->type.text.align.x = desc->text.align.x;
|
||||
}
|
||||
if (flags & FLAG_Y)
|
||||
{
|
||||
params->type.text.align.y = desc->text.align.y;
|
||||
}
|
||||
params->type.text.elipsis = desc->text.elipsis;
|
||||
{
|
||||
Edje_Part_Description_Text *text_desc = (Edje_Part_Description_Text*) chosen_desc;
|
||||
|
||||
/* text colors */
|
||||
if (cc)
|
||||
{
|
||||
params->type.text.color2.r = (((int)cc->r2 + 1) * desc->common.color2.r) >> 8;
|
||||
params->type.text.color2.g = (((int)cc->g2 + 1) * desc->common.color2.g) >> 8;
|
||||
params->type.text.color2.b = (((int)cc->b2 + 1) * desc->common.color2.b) >> 8;
|
||||
params->type.text.color2.a = (((int)cc->a2 + 1) * desc->common.color2.a) >> 8;
|
||||
params->type.text.color3.r = (((int)cc->r3 + 1) * desc->text.color3.r) >> 8;
|
||||
params->type.text.color3.g = (((int)cc->g3 + 1) * desc->text.color3.g) >> 8;
|
||||
params->type.text.color3.b = (((int)cc->b3 + 1) * desc->text.color3.b) >> 8;
|
||||
params->type.text.color3.a = (((int)cc->a3 + 1) * desc->text.color3.a) >> 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
params->type.text.color2.r = desc->common.color2.r;
|
||||
params->type.text.color2.g = desc->common.color2.g;
|
||||
params->type.text.color2.b = desc->common.color2.b;
|
||||
params->type.text.color2.a = desc->common.color2.a;
|
||||
params->type.text.color3.r = desc->text.color3.r;
|
||||
params->type.text.color3.g = desc->text.color3.g;
|
||||
params->type.text.color3.b = desc->text.color3.b;
|
||||
params->type.text.color3.a = desc->text.color3.a;
|
||||
}
|
||||
break;
|
||||
/* text.align */
|
||||
if (flags & FLAG_X)
|
||||
{
|
||||
params->type.text.align.x = text_desc->text.align.x;
|
||||
}
|
||||
if (flags & FLAG_Y)
|
||||
{
|
||||
params->type.text.align.y = text_desc->text.align.y;
|
||||
}
|
||||
params->type.text.elipsis = text_desc->text.elipsis;
|
||||
|
||||
/* text colors */
|
||||
if (cc)
|
||||
{
|
||||
params->type.text.color2.r = (((int)cc->r2 + 1) * text_desc->common.color2.r) >> 8;
|
||||
params->type.text.color2.g = (((int)cc->g2 + 1) * text_desc->common.color2.g) >> 8;
|
||||
params->type.text.color2.b = (((int)cc->b2 + 1) * text_desc->common.color2.b) >> 8;
|
||||
params->type.text.color2.a = (((int)cc->a2 + 1) * text_desc->common.color2.a) >> 8;
|
||||
params->type.text.color3.r = (((int)cc->r3 + 1) * text_desc->text.color3.r) >> 8;
|
||||
params->type.text.color3.g = (((int)cc->g3 + 1) * text_desc->text.color3.g) >> 8;
|
||||
params->type.text.color3.b = (((int)cc->b3 + 1) * text_desc->text.color3.b) >> 8;
|
||||
params->type.text.color3.a = (((int)cc->a3 + 1) * text_desc->text.color3.a) >> 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
params->type.text.color2.r = text_desc->common.color2.r;
|
||||
params->type.text.color2.g = text_desc->common.color2.g;
|
||||
params->type.text.color2.b = text_desc->common.color2.b;
|
||||
params->type.text.color2.a = text_desc->common.color2.a;
|
||||
params->type.text.color3.r = text_desc->text.color3.r;
|
||||
params->type.text.color3.g = text_desc->text.color3.g;
|
||||
params->type.text.color3.b = text_desc->text.color3.b;
|
||||
params->type.text.color3.a = text_desc->text.color3.a;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EDJE_PART_TYPE_RECTANGLE:
|
||||
case EDJE_PART_TYPE_BOX:
|
||||
case EDJE_PART_TYPE_TABLE:
|
||||
|
@ -1371,7 +1401,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_box_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description *chosen_desc)
|
||||
_edje_box_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Box *chosen_desc)
|
||||
{
|
||||
Evas_Object_Box_Layout layout;
|
||||
void (*free_data)(void *data);
|
||||
|
@ -1408,7 +1438,10 @@ _edje_box_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_table_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Params *p3 __UNUSED__, Edje_Part_Description *chosen_desc)
|
||||
_edje_table_recalc_apply(Edje *ed __UNUSED__,
|
||||
Edje_Real_Part *ep,
|
||||
Edje_Calc_Params *p3 __UNUSED__,
|
||||
Edje_Part_Description_Table *chosen_desc)
|
||||
{
|
||||
evas_object_table_homogeneous_set(ep->object, chosen_desc->table.homogeneous);
|
||||
evas_object_table_align_set(ep->object, TO_DOUBLE(chosen_desc->table.align.x), TO_DOUBLE(chosen_desc->table.align.y));
|
||||
|
@ -1421,7 +1454,7 @@ _edje_table_recalc_apply(Edje *ed __UNUSED__, Edje_Real_Part *ep, Edje_Calc_Para
|
|||
}
|
||||
|
||||
static int
|
||||
_edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps, Edje_Part_Description *st, Edje_Part_Image_Id *imid)
|
||||
_edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps, Edje_Part_Description_Image *st, Edje_Part_Image_Id *imid)
|
||||
{
|
||||
Edje_Image_Directory_Set_Entry *entry;
|
||||
Edje_Image_Directory_Set *set = NULL;
|
||||
|
@ -1485,7 +1518,7 @@ _edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps, Edje_Part
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description *chosen_desc, FLOAT_T pos)
|
||||
_edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edje_Part_Description_Image *chosen_desc, FLOAT_T pos)
|
||||
{
|
||||
int image_id;
|
||||
int image_count, image_num;
|
||||
|
@ -1510,7 +1543,9 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_SOLID);
|
||||
|
||||
image_id = _edje_image_find(ep->object, ed,
|
||||
&ep->param1.set, ep->param1.description, NULL);
|
||||
&ep->param1.set,
|
||||
(Edje_Part_Description_Image*) ep->param1.description,
|
||||
NULL);
|
||||
if (image_id < 0)
|
||||
{
|
||||
Edje_Image_Directory_Entry *ie;
|
||||
|
@ -1528,7 +1563,7 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
{
|
||||
image_count = 2;
|
||||
if (ep->param2)
|
||||
image_count += eina_list_count(ep->param2->description->image.tween_list);
|
||||
image_count += eina_list_count(((Edje_Part_Description_Image*) ep->param2->description)->image.tween_list);
|
||||
image_num = TO_INT(MUL(pos, SUB(FROM_INT(image_count),
|
||||
FROM_DOUBLE(0.5))));
|
||||
if (image_num > (image_count - 1))
|
||||
|
@ -1536,7 +1571,8 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
if (image_num == 0)
|
||||
{
|
||||
image_id = _edje_image_find(ep->object, ed,
|
||||
&ep->param1.set, ep->param1.description,
|
||||
&ep->param1.set,
|
||||
(Edje_Part_Description_Image*) ep->param1.description,
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
|
@ -1545,14 +1581,15 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
if (image_num == (image_count - 1))
|
||||
{
|
||||
image_id = _edje_image_find(ep->object, ed,
|
||||
&ep->param2->set, ep->param2->description,
|
||||
&ep->param2->set,
|
||||
(Edje_Part_Description_Image*) ep->param2->description,
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
Edje_Part_Image_Id *imid;
|
||||
|
||||
imid = eina_list_nth(ep->param2->description->image.tween_list,
|
||||
imid = eina_list_nth(((Edje_Part_Description_Image*) ep->param2->description)->image.tween_list,
|
||||
image_num - 1);
|
||||
image_id = _edje_image_find(ep->object, ed, NULL, NULL, imid);
|
||||
}
|
||||
|
@ -1562,8 +1599,8 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
ERR("¨Part \"%s\" has description, "
|
||||
"\"%s\" %3.3f with a missing image id!!!",
|
||||
ep->part->name,
|
||||
ep->param1.description->common.state.name,
|
||||
ep->param1.description->common.state.value);
|
||||
ep->param1.description->state.name,
|
||||
ep->param1.description->state.value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1618,14 +1655,17 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
Edje_Calc_Params lp1, lp2;
|
||||
#endif
|
||||
Edje_Calc_Params *p1, *pf;
|
||||
Edje_Part_Description *chosen_desc;
|
||||
Edje_Part_Description_Common *chosen_desc;
|
||||
Edje_Real_Part *confine_to = NULL;
|
||||
FLOAT_T pos = ZERO;
|
||||
Edje_Calc_Params lp3;
|
||||
|
||||
/* GRADIENT ARE GONE, WE MUST IGNORE IT FROM OLD FILE. */
|
||||
if (ep->part->type == EDJE_PART_TYPE_GRADIENT)
|
||||
return;
|
||||
{
|
||||
ERR("GRADIENT spotted during recalc ! That should never happen ! Send your edje file to devel ml.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((ep->calculated & FLAG_XY) == FLAG_XY)
|
||||
{
|
||||
|
@ -1932,8 +1972,12 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
switch (ep->part->type)
|
||||
{
|
||||
case EDJE_PART_TYPE_IMAGE:
|
||||
evas_object_image_scale_hint_set(ep->object,
|
||||
chosen_desc->image.scale_hint);
|
||||
{
|
||||
Edje_Part_Description_Image *img_desc = (Edje_Part_Description_Image*) chosen_desc;
|
||||
|
||||
evas_object_image_scale_hint_set(ep->object,
|
||||
img_desc->image.scale_hint);
|
||||
}
|
||||
case EDJE_PART_TYPE_RECTANGLE:
|
||||
case EDJE_PART_TYPE_TEXTBLOCK:
|
||||
case EDJE_PART_TYPE_BOX:
|
||||
|
@ -1972,16 +2016,16 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
switch (ep->part->type)
|
||||
{
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
_edje_text_recalc_apply(ed, ep, pf, chosen_desc);
|
||||
_edje_text_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc);
|
||||
break;
|
||||
case EDJE_PART_TYPE_IMAGE:
|
||||
_edje_image_recalc_apply(ed, ep, pf, chosen_desc, pos);
|
||||
_edje_image_recalc_apply(ed, ep, pf, (Edje_Part_Description_Image*) chosen_desc, pos);
|
||||
break;
|
||||
case EDJE_PART_TYPE_BOX:
|
||||
_edje_box_recalc_apply(ed, ep, pf, chosen_desc);
|
||||
_edje_box_recalc_apply(ed, ep, pf, (Edje_Part_Description_Box*) chosen_desc);
|
||||
break;
|
||||
case EDJE_PART_TYPE_TABLE:
|
||||
_edje_table_recalc_apply(ed, ep, pf, chosen_desc);
|
||||
_edje_table_recalc_apply(ed, ep, pf, (Edje_Part_Description_Table*) chosen_desc);
|
||||
break;
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
case EDJE_PART_TYPE_RECTANGLE:
|
||||
|
@ -2017,12 +2061,12 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
mo = ep->swallowed_object;
|
||||
}
|
||||
else mo = ep->object;
|
||||
if (chosen_desc->common.map.on)
|
||||
if (chosen_desc->map.on)
|
||||
{
|
||||
Evas_Map *map;
|
||||
Evas_Coord cx, cy, cz;
|
||||
double rx, ry, rz;
|
||||
Edje_Part_Description *desc1, *desc2;
|
||||
Edje_Part_Description_Common *desc1, *desc2;
|
||||
|
||||
desc1 = ep->param1.description;
|
||||
desc2 = NULL;
|
||||
|
@ -2051,12 +2095,12 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
|
||||
// if another center is specified - find it and caculate it
|
||||
if ((desc1) &&
|
||||
(desc1->common.map.rot.id_center >= 0) &&
|
||||
(desc1->common.map.rot.id_center != ep->part->id))
|
||||
(desc1->map.rot.id_center >= 0) &&
|
||||
(desc1->map.rot.id_center != ep->part->id))
|
||||
{
|
||||
Evas_Coord cx1, cy1, cz1, cx2, cy2, cz2;
|
||||
Edje_Real_Part *ep2 =
|
||||
ed->table_parts[desc1->common.map.rot.id_center %
|
||||
ed->table_parts[desc1->map.rot.id_center %
|
||||
ed->table_parts_size];
|
||||
// get center for desc1
|
||||
if (ep2)
|
||||
|
@ -2068,10 +2112,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
}
|
||||
// if we have a desc2 and are on a partiual position to it
|
||||
if ((pos != ZERO) && (desc2) &&
|
||||
(desc2->common.map.rot.id_center >= 0) &&
|
||||
(desc2->common.map.rot.id_center != ep->part->id))
|
||||
(desc2->map.rot.id_center >= 0) &&
|
||||
(desc2->map.rot.id_center != ep->part->id))
|
||||
{
|
||||
ep2 = ed->table_parts[desc2->common.map.rot.id_center %
|
||||
ep2 = ed->table_parts[desc2->map.rot.id_center %
|
||||
ed->table_parts_size];
|
||||
// get 2nd center & merge with pos with center 1
|
||||
if (ep2)
|
||||
|
@ -2093,32 +2137,32 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
// rotation - interpolate wit pos, if appropriate
|
||||
if ((pos != ZERO) && (desc2))
|
||||
{
|
||||
rx = TO_DOUBLE(ADD(desc1->common.map.rot.x,
|
||||
MUL(pos, SUB(desc2->common.map.rot.x,
|
||||
desc1->common.map.rot.x))));
|
||||
ry = TO_DOUBLE(ADD(desc1->common.map.rot.y,
|
||||
MUL(pos, SUB(desc2->common.map.rot.y,
|
||||
desc1->common.map.rot.y))));
|
||||
rz = TO_DOUBLE(ADD(desc1->common.map.rot.z,
|
||||
MUL(pos, SUB(desc2->common.map.rot.z,
|
||||
desc1->common.map.rot.z))));
|
||||
rx = TO_DOUBLE(ADD(desc1->map.rot.x,
|
||||
MUL(pos, SUB(desc2->map.rot.x,
|
||||
desc1->map.rot.x))));
|
||||
ry = TO_DOUBLE(ADD(desc1->map.rot.y,
|
||||
MUL(pos, SUB(desc2->map.rot.y,
|
||||
desc1->map.rot.y))));
|
||||
rz = TO_DOUBLE(ADD(desc1->map.rot.z,
|
||||
MUL(pos, SUB(desc2->map.rot.z,
|
||||
desc1->map.rot.z))));
|
||||
}
|
||||
else
|
||||
{
|
||||
// no 2 descriptions - just use rot
|
||||
rx = TO_DOUBLE(desc1->common.map.rot.x);
|
||||
ry = TO_DOUBLE(desc1->common.map.rot.y);
|
||||
rz = TO_DOUBLE(desc1->common.map.rot.z);
|
||||
rx = TO_DOUBLE(desc1->map.rot.x);
|
||||
ry = TO_DOUBLE(desc1->map.rot.y);
|
||||
rz = TO_DOUBLE(desc1->map.rot.z);
|
||||
}
|
||||
evas_map_util_3d_rotate(map, rx, ry, rz, cx, cy, cz);
|
||||
|
||||
// calculate light color & position etc. if there is one
|
||||
if (((desc1) &&
|
||||
(desc1->common.map.id_light >= 0) &&
|
||||
(desc1->common.map.id_light != ep->part->id)) ||
|
||||
(desc1->map.id_light >= 0) &&
|
||||
(desc1->map.id_light != ep->part->id)) ||
|
||||
((desc2) &&
|
||||
(desc2->common.map.id_light >= 0) &&
|
||||
(desc2->common.map.id_light != ep->part->id)))
|
||||
(desc2->map.id_light >= 0) &&
|
||||
(desc2->map.id_light != ep->part->id)))
|
||||
{
|
||||
Evas_Coord lx, ly, lz;
|
||||
int lr, lg, lb, lar, lag, lab;
|
||||
|
@ -2130,16 +2174,16 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
do1 = do2 = 0;
|
||||
|
||||
if ((desc1) &&
|
||||
(desc1->common.map.id_light >= 0) &&
|
||||
(desc1->common.map.id_light != ep->part->id))
|
||||
(desc1->map.id_light >= 0) &&
|
||||
(desc1->map.id_light != ep->part->id))
|
||||
{
|
||||
Edje_Real_Part *ep2 =
|
||||
ed->table_parts[desc1->common.map.id_light %
|
||||
ed->table_parts[desc1->map.id_light %
|
||||
ed->table_parts_size];
|
||||
// get light part
|
||||
if (ep2)
|
||||
{
|
||||
Edje_Part_Description *ep2desc1, *ep2desc2;
|
||||
Edje_Part_Description_Common *ep2desc1, *ep2desc2;
|
||||
FLOAT_T ep2pos;
|
||||
|
||||
do1 = 1;
|
||||
|
@ -2156,51 +2200,51 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
// if light is transitioning - interpolate it
|
||||
if ((ep2pos != ZERO) && (ep2desc2))
|
||||
{
|
||||
lz1 = ep2desc1->common.persp.zplane +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.persp.zplane -
|
||||
ep2desc1->common.persp.zplane));
|
||||
lr1 = ep2desc1->common.color.r +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color.r -
|
||||
ep2desc1->common.color.r));
|
||||
lg1 = ep2desc1->common.color.g +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
|
||||
ep2desc1->common.color.b));
|
||||
lb1 = ep2desc1->common.color.b +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
|
||||
ep2desc1->common.color.b));
|
||||
lar1 = ep2desc1->common.color2.r +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color2.r -
|
||||
ep2desc1->common.color2.r));
|
||||
lag1 = ep2desc1->common.color2.g +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
|
||||
ep2desc1->common.color2.b));
|
||||
lab1 = ep2desc1->common.color2.b +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
|
||||
ep2desc1->common.color2.b));
|
||||
lz1 = ep2desc1->persp.zplane +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->persp.zplane -
|
||||
ep2desc1->persp.zplane));
|
||||
lr1 = ep2desc1->color.r +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color.r -
|
||||
ep2desc1->color.r));
|
||||
lg1 = ep2desc1->color.g +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color.g -
|
||||
ep2desc1->color.b));
|
||||
lb1 = ep2desc1->color.b +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color.g -
|
||||
ep2desc1->color.b));
|
||||
lar1 = ep2desc1->color2.r +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color2.r -
|
||||
ep2desc1->color2.r));
|
||||
lag1 = ep2desc1->color2.g +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
|
||||
ep2desc1->color2.b));
|
||||
lab1 = ep2desc1->color2.b +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
|
||||
ep2desc1->color2.b));
|
||||
}
|
||||
else
|
||||
{
|
||||
lz1 = ep2desc1->common.persp.zplane;
|
||||
lr1 = ep2desc1->common.color.r;
|
||||
lg1 = ep2desc1->common.color.g;
|
||||
lb1 = ep2desc1->common.color.b;
|
||||
lar1 = ep2desc1->common.color2.r;
|
||||
lag1 = ep2desc1->common.color2.g;
|
||||
lab1 = ep2desc1->common.color2.b;
|
||||
lz1 = ep2desc1->persp.zplane;
|
||||
lr1 = ep2desc1->color.r;
|
||||
lg1 = ep2desc1->color.g;
|
||||
lb1 = ep2desc1->color.b;
|
||||
lar1 = ep2desc1->color2.r;
|
||||
lag1 = ep2desc1->color2.g;
|
||||
lab1 = ep2desc1->color2.b;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((desc2) &&
|
||||
(desc2->common.map.id_light >= 0) &&
|
||||
(desc2->common.map.id_light != ep->part->id))
|
||||
(desc2->map.id_light >= 0) &&
|
||||
(desc2->map.id_light != ep->part->id))
|
||||
{
|
||||
Edje_Real_Part *ep2 =
|
||||
ed->table_parts[desc2->common.map.id_light %
|
||||
ed->table_parts[desc2->map.id_light %
|
||||
ed->table_parts_size];
|
||||
// get light part
|
||||
if (ep2)
|
||||
{
|
||||
Edje_Part_Description *ep2desc1, *ep2desc2;
|
||||
Edje_Part_Description_Common *ep2desc1, *ep2desc2;
|
||||
FLOAT_T ep2pos;
|
||||
|
||||
do2 = 1;
|
||||
|
@ -2217,37 +2261,37 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
// if light is transitioning - interpolate it
|
||||
if ((ep2pos != ZERO) && (ep2desc2))
|
||||
{
|
||||
lz2 = ep2desc1->common.persp.zplane +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.persp.zplane -
|
||||
ep2desc1->common.persp.zplane));
|
||||
lr2 = ep2desc1->common.color.r +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color.r -
|
||||
ep2desc1->common.color.r));
|
||||
lg2 = ep2desc1->common.color.g +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
|
||||
ep2desc1->common.color.b));
|
||||
lb2 = ep2desc1->common.color.b +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
|
||||
ep2desc1->common.color.b));
|
||||
lar2 = ep2desc1->common.color2.r +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color2.r -
|
||||
ep2desc1->common.color2.r));
|
||||
lag2 = ep2desc1->common.color2.g +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
|
||||
ep2desc1->common.color2.b));
|
||||
lab2 = ep2desc1->common.color2.b +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
|
||||
ep2desc1->common.color2.b));
|
||||
lz2 = ep2desc1->persp.zplane +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->persp.zplane -
|
||||
ep2desc1->persp.zplane));
|
||||
lr2 = ep2desc1->color.r +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color.r -
|
||||
ep2desc1->color.r));
|
||||
lg2 = ep2desc1->color.g +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color.g -
|
||||
ep2desc1->color.b));
|
||||
lb2 = ep2desc1->color.b +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color.g -
|
||||
ep2desc1->color.b));
|
||||
lar2 = ep2desc1->color2.r +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color2.r -
|
||||
ep2desc1->color2.r));
|
||||
lag2 = ep2desc1->color2.g +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
|
||||
ep2desc1->color2.b));
|
||||
lab2 = ep2desc1->color2.b +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
|
||||
ep2desc1->color2.b));
|
||||
}
|
||||
else
|
||||
{
|
||||
lz2 = ep2desc1->common.persp.zplane;
|
||||
lr2 = ep2desc1->common.color.r;
|
||||
lg2 = ep2desc1->common.color.g;
|
||||
lb2 = ep2desc1->common.color.b;
|
||||
lar2 = ep2desc1->common.color2.r;
|
||||
lag2 = ep2desc1->common.color2.g;
|
||||
lab2 = ep2desc1->common.color2.b;
|
||||
lz2 = ep2desc1->persp.zplane;
|
||||
lr2 = ep2desc1->color.r;
|
||||
lg2 = ep2desc1->color.g;
|
||||
lb2 = ep2desc1->color.b;
|
||||
lar2 = ep2desc1->color2.r;
|
||||
lag2 = ep2desc1->color2.g;
|
||||
lab2 = ep2desc1->color2.b;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2282,7 +2326,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
}
|
||||
|
||||
// calculate perspective point
|
||||
if (chosen_desc->common.map.persp_on)
|
||||
if (chosen_desc->map.persp_on)
|
||||
{
|
||||
Evas_Coord px, py, zplane, foc;
|
||||
Evas_Coord px1, py1, zplane1, foc1;
|
||||
|
@ -2298,14 +2342,14 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
foc = 1000;
|
||||
|
||||
if ((desc1) &&
|
||||
(desc1->common.map.id_persp >= 0) &&
|
||||
(desc1->common.map.id_persp != ep->part->id))
|
||||
(desc1->map.id_persp >= 0) &&
|
||||
(desc1->map.id_persp != ep->part->id))
|
||||
{
|
||||
Edje_Real_Part *ep2 = ed->table_parts[desc1->common.map.id_persp %
|
||||
Edje_Real_Part *ep2 = ed->table_parts[desc1->map.id_persp %
|
||||
ed->table_parts_size];
|
||||
if (ep2)
|
||||
{
|
||||
Edje_Part_Description *ep2desc1, *ep2desc2;
|
||||
Edje_Part_Description_Common *ep2desc1, *ep2desc2;
|
||||
FLOAT_T ep2pos;
|
||||
|
||||
do1 = 1;
|
||||
|
@ -2320,30 +2364,30 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
py1 = ed->y + ep2->y + (ep2->h / 2);
|
||||
if ((ep2pos != ZERO) && (ep2desc2))
|
||||
{
|
||||
zplane1 = ep2desc1->common.persp.zplane +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.persp.zplane -
|
||||
ep2desc1->common.persp.zplane));
|
||||
foc1 = ep2desc1->common.persp.focal +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.persp.focal -
|
||||
ep2desc1->common.persp.focal));
|
||||
zplane1 = ep2desc1->persp.zplane +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->persp.zplane -
|
||||
ep2desc1->persp.zplane));
|
||||
foc1 = ep2desc1->persp.focal +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->persp.focal -
|
||||
ep2desc1->persp.focal));
|
||||
}
|
||||
else
|
||||
{
|
||||
zplane1 = ep2desc1->common.persp.zplane;
|
||||
foc1 = ep2desc1->common.persp.focal;
|
||||
zplane1 = ep2desc1->persp.zplane;
|
||||
foc1 = ep2desc1->persp.focal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((desc2) &&
|
||||
(desc2->common.map.id_persp >= 0) &&
|
||||
(desc2->common.map.id_persp != ep->part->id))
|
||||
(desc2->map.id_persp >= 0) &&
|
||||
(desc2->map.id_persp != ep->part->id))
|
||||
{
|
||||
Edje_Real_Part *ep2 = ed->table_parts[desc2->common.map.id_persp %
|
||||
Edje_Real_Part *ep2 = ed->table_parts[desc2->map.id_persp %
|
||||
ed->table_parts_size];
|
||||
if (ep2)
|
||||
{
|
||||
Edje_Part_Description *ep2desc1, *ep2desc2;
|
||||
Edje_Part_Description_Common *ep2desc1, *ep2desc2;
|
||||
FLOAT_T ep2pos;
|
||||
|
||||
do2 = 1;
|
||||
|
@ -2358,17 +2402,17 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
py2 = ed->y + ep2->y + (ep2->h / 2);
|
||||
if ((ep2pos != ZERO) && (ep2desc2))
|
||||
{
|
||||
zplane2 = ep2desc1->common.persp.zplane +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.persp.zplane -
|
||||
ep2desc1->common.persp.zplane));
|
||||
foc2 = ep2desc1->common.persp.focal +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->common.persp.focal -
|
||||
ep2desc1->common.persp.focal));
|
||||
zplane2 = ep2desc1->persp.zplane +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->persp.zplane -
|
||||
ep2desc1->persp.zplane));
|
||||
foc2 = ep2desc1->persp.focal +
|
||||
TO_INT(SCALE(ep2pos, ep2desc2->persp.focal -
|
||||
ep2desc1->persp.focal));
|
||||
}
|
||||
else
|
||||
{
|
||||
zplane2 = ep2desc1->common.persp.zplane;
|
||||
foc2 = ep2desc1->common.persp.focal;
|
||||
zplane2 = ep2desc1->persp.zplane;
|
||||
foc2 = ep2desc1->persp.focal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2412,7 +2456,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
}
|
||||
|
||||
// handle backface culling (object is facing away from view
|
||||
if (chosen_desc->common.map.backcull)
|
||||
if (chosen_desc->map.backcull)
|
||||
{
|
||||
if (pf->visible)
|
||||
{
|
||||
|
@ -2423,10 +2467,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags)
|
|||
}
|
||||
|
||||
// handle smooth
|
||||
if (chosen_desc->common.map.smooth) evas_map_smooth_set(map, 1);
|
||||
if (chosen_desc->map.smooth) evas_map_smooth_set(map, 1);
|
||||
else evas_map_smooth_set(map, 0);
|
||||
// handle alpha
|
||||
if (chosen_desc->common.map.alpha) evas_map_alpha_set(map, 1);
|
||||
if (chosen_desc->map.alpha) evas_map_alpha_set(map, 1);
|
||||
else evas_map_alpha_set(map, 0);
|
||||
|
||||
evas_object_map_set(mo, map);
|
||||
|
|
|
@ -53,7 +53,7 @@ _edje_collection_string_free(void *data)
|
|||
edf->path, edf->references,
|
||||
ce->ref->part, ce->ref->references);
|
||||
|
||||
_edje_collection_free(edf, ce->ref);
|
||||
_edje_collection_free(edf, ce->ref, ce);
|
||||
}
|
||||
|
||||
free(ce);
|
||||
|
@ -242,15 +242,13 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
|
|||
{
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
Edje_Part_Collection *edc;
|
||||
Edje_Part *part;
|
||||
Old_Edje_Part *part;
|
||||
Edje_Data *di;
|
||||
Eina_List *l;
|
||||
|
||||
edc = oedc;
|
||||
unsigned int k;
|
||||
|
||||
ce = eina_hash_find(file->collection, oedc->part);
|
||||
|
||||
ce->ref = edc;
|
||||
|
||||
/* Count each type part and their respective state */
|
||||
EINA_LIST_FOREACH(oedc->parts, l, part)
|
||||
{
|
||||
|
@ -281,7 +279,150 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
|
|||
|
||||
*count += eina_list_count(part->other_desc) + 1;
|
||||
}
|
||||
ce->count.part = eina_list_count(oedc->parts);
|
||||
|
||||
#define EMN(Tp, Sz, Ce) \
|
||||
Ce->mp.Tp = eina_mempool_add("one_big", #Tp, NULL, sizeof (Sz), Ce->count.Tp);
|
||||
|
||||
EMN(RECTANGLE, Edje_Part_Description_Common, ce);
|
||||
EMN(TEXT, Edje_Part_Description_Text, ce);
|
||||
EMN(IMAGE, Edje_Part_Description_Image, ce);
|
||||
EMN(SWALLOW, Edje_Part_Description_Common, ce);
|
||||
EMN(TEXTBLOCK, Edje_Part_Description_Text, ce);
|
||||
EMN(GROUP, Edje_Part_Description_Common, ce);
|
||||
EMN(BOX, Edje_Part_Description_Box, ce);
|
||||
EMN(TABLE, Edje_Part_Description_Table, ce);
|
||||
EMN(EXTERNAL, Edje_Part_Description_External, ce);
|
||||
EMN(part, Edje_Part, ce);
|
||||
|
||||
/* Change structure layout */
|
||||
edc = calloc(1, sizeof (Edje_Part_Collection));
|
||||
if (!edc) return NULL;
|
||||
ce->ref = edc;
|
||||
|
||||
edc->programs = oedc->programs;
|
||||
oedc->programs = NULL;
|
||||
|
||||
edc->data = eina_hash_string_small_new(NULL);
|
||||
EINA_LIST_FREE(oedc->data, di)
|
||||
{
|
||||
eina_hash_direct_add(edc->data, di->key, di->value);
|
||||
free(di);
|
||||
}
|
||||
|
||||
edc->parts_count = eina_list_count(oedc->parts);
|
||||
edc->parts = calloc(edc->parts_count, sizeof (Edje_Part *));
|
||||
k = 0;
|
||||
|
||||
EINA_LIST_FREE(oedc->parts, part)
|
||||
{
|
||||
Old_Edje_Part_Description *oepd;
|
||||
Edje_Pack_Element *elm;
|
||||
Edje_Part *replacement;
|
||||
unsigned int i;
|
||||
|
||||
replacement = eina_mempool_malloc(ce->mp.part, sizeof (Edje_Part));
|
||||
|
||||
replacement->name = part->name;
|
||||
replacement->default_desc = _edje_description_convert(part->type, ce, part->default_desc);
|
||||
|
||||
replacement->other_count = eina_list_count(part->other_desc);
|
||||
replacement->other_desc = calloc(replacement->other_count, sizeof (Edje_Part_Description_Common*));
|
||||
|
||||
i = 0;
|
||||
EINA_LIST_FREE(part->other_desc, oepd)
|
||||
replacement->other_desc[i++] = _edje_description_convert(part->type, ce, oepd);
|
||||
|
||||
replacement->source = part->source;
|
||||
replacement->source2 = part->source2;
|
||||
replacement->source3 = part->source3;
|
||||
replacement->source4 = part->source4;
|
||||
replacement->source5 = part->source5;
|
||||
replacement->source6 = part->source6;
|
||||
replacement->id = part->id;
|
||||
replacement->clip_to_id = part->clip_to_id;
|
||||
replacement->dragable = part->dragable;
|
||||
replacement->items_count = eina_list_count(part->items);
|
||||
replacement->items = calloc(replacement->items_count, sizeof (Edje_Pack_Element*));
|
||||
|
||||
i = 0;
|
||||
EINA_LIST_FREE(part->items, elm)
|
||||
replacement->items[i++] = elm;
|
||||
|
||||
replacement->type = part->type;
|
||||
replacement->effect = part->effect;
|
||||
replacement->mouse_events = part->mouse_events;
|
||||
replacement->repeat_events = part->repeat_events;
|
||||
replacement->ignore_flags = part->ignore_flags;
|
||||
replacement->scale = part->scale;
|
||||
replacement->precise_is_inside = part->precise_is_inside;
|
||||
replacement->use_alternate_font_metrics = part->use_alternate_font_metrics;
|
||||
replacement->pointer_mode = part->pointer_mode;
|
||||
replacement->entry_mode = part->entry_mode;
|
||||
replacement->select_mode = part->select_mode;
|
||||
replacement->multiline = part->multiline;
|
||||
replacement->api = part->api;
|
||||
|
||||
edc->parts[k++] = replacement;
|
||||
|
||||
free(part);
|
||||
}
|
||||
|
||||
edc->id = oedc->id;
|
||||
edc->alias = oedc->alias;
|
||||
edc->prop.min = oedc->prop.min;
|
||||
edc->prop.max = oedc->prop.max;
|
||||
edc->script = oedc->script;
|
||||
edc->part = oedc->part;
|
||||
edc->script_only = oedc->script_only;
|
||||
edc->lua_script_only = oedc->lua_script_only;
|
||||
edc->checked = oedc->checked;
|
||||
|
||||
free(oedc);
|
||||
|
||||
/* FIXME : change structure layout */
|
||||
return edc;
|
||||
}
|
||||
|
||||
Edje_Part_Description_Common*
|
||||
_edje_description_convert(int type,
|
||||
Edje_Part_Collection_Directory_Entry *ce,
|
||||
Old_Edje_Part_Description *oed)
|
||||
{
|
||||
Edje_Part_Description_Common *result = NULL;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case EDJE_PART_TYPE_RECTANGLE:
|
||||
result = eina_mempool_malloc(ce->mp.RECTANGLE, sizeof (Edje_Part_Description_Common));
|
||||
break;
|
||||
case EDJE_PART_TYPE_SWALLOW:
|
||||
result = eina_mempool_malloc(ce->mp.SWALLOW, sizeof (Edje_Part_Description_Common));
|
||||
break;
|
||||
case EDJE_PART_TYPE_GROUP:
|
||||
result = eina_mempool_malloc(ce->mp.GROUP, sizeof (Edje_Part_Description_Common));
|
||||
break;
|
||||
|
||||
#define ALLOC_POOL(Short, Type, Name) \
|
||||
case EDJE_PART_TYPE_##Short: \
|
||||
{ \
|
||||
Edje_Part_Description_##Type *Name; \
|
||||
\
|
||||
Name = eina_mempool_malloc(ce->mp.Short, sizeof (Edje_Part_Description_##Type)); \
|
||||
Name->Name = oed->Name; \
|
||||
result = &Name->common; \
|
||||
break; \
|
||||
}
|
||||
|
||||
ALLOC_POOL(IMAGE, Image, image);
|
||||
ALLOC_POOL(TEXT, Text, text);
|
||||
ALLOC_POOL(TEXTBLOCK, Text, text);
|
||||
ALLOC_POOL(BOX, Box, box);
|
||||
ALLOC_POOL(TABLE, Table, table);
|
||||
ALLOC_POOL(EXTERNAL, External, external_params);
|
||||
}
|
||||
|
||||
*result = oed->common;
|
||||
|
||||
free(oed);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,21 @@
|
|||
#ifndef EDJE_CONVERT_H__
|
||||
# define EDJE_CONVERT_H__
|
||||
|
||||
typedef struct _Edje_Part_Collection Old_Edje_Part_Collection;
|
||||
typedef struct _Old_Edje_Image_Directory Old_Edje_Image_Directory;
|
||||
typedef struct _Old_Edje_Font_Directory Old_Edje_Font_Directory;
|
||||
typedef struct _Old_Edje_External_Directory Old_Edje_External_Directory;
|
||||
typedef struct _Old_Edje_Part Old_Edje_Part;
|
||||
typedef struct _Old_Edje_Part_Collection Old_Edje_Part_Collection;
|
||||
typedef struct _Old_Edje_Part_Description Old_Edje_Part_Description;
|
||||
typedef struct _Edje_Data Edje_Data;
|
||||
|
||||
struct _Edje_Data
|
||||
{
|
||||
const char *key;
|
||||
char *value;
|
||||
};
|
||||
|
||||
/*----------*/
|
||||
|
||||
struct _Old_Edje_Font_Directory
|
||||
{
|
||||
|
@ -40,9 +51,80 @@ struct _Old_Edje_File
|
|||
int feature_ver;
|
||||
};
|
||||
|
||||
struct _Old_Edje_Part_Collection
|
||||
{
|
||||
Eina_List *programs; /* a list of Edje_Program */
|
||||
Eina_List *parts; /* a list of Edje_Part */
|
||||
Eina_List *data;
|
||||
|
||||
int id; /* the collection id */
|
||||
|
||||
Eina_Hash *alias; /* aliasing part*/
|
||||
|
||||
struct {
|
||||
Edje_Size min, max;
|
||||
} prop;
|
||||
|
||||
int references;
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
struct {
|
||||
Eina_Hash *no_matches;
|
||||
Eina_Hash *matches;
|
||||
} prog_cache;
|
||||
#endif
|
||||
|
||||
Embryo_Program *script; /* all the embryo script code for this group */
|
||||
const char *part;
|
||||
|
||||
unsigned char script_only;
|
||||
|
||||
unsigned char lua_script_only;
|
||||
|
||||
unsigned char checked : 1;
|
||||
};
|
||||
|
||||
struct _Old_Edje_Part
|
||||
{
|
||||
const char *name; /* the name if any of the part */
|
||||
Old_Edje_Part_Description *default_desc; /* the part descriptor for default */
|
||||
Eina_List *other_desc; /* other possible descriptors */
|
||||
const char *source, *source2, *source3, *source4, *source5, *source6;
|
||||
int id; /* its id number */
|
||||
int clip_to_id; /* the part id to clip this one to */
|
||||
Edje_Part_Dragable dragable;
|
||||
Eina_List *items; /* packed items for box and table */
|
||||
unsigned char type; /* what type (image, rect, text) */
|
||||
unsigned char effect; /* 0 = plain... */
|
||||
unsigned char mouse_events; /* it will affect/respond to mouse events */
|
||||
unsigned char repeat_events; /* it will repeat events to objects below */
|
||||
Evas_Event_Flags ignore_flags;
|
||||
unsigned char scale; /* should certain properties scale with edje scale factor? */
|
||||
unsigned char precise_is_inside;
|
||||
unsigned char use_alternate_font_metrics;
|
||||
unsigned char pointer_mode;
|
||||
unsigned char entry_mode;
|
||||
unsigned char select_mode;
|
||||
unsigned char multiline;
|
||||
Edje_Part_Api api;
|
||||
};
|
||||
|
||||
struct _Old_Edje_Part_Description
|
||||
{
|
||||
Edje_Part_Description_Common common;
|
||||
Edje_Part_Description_Spec_Image image;
|
||||
Edje_Part_Description_Spec_Text text;
|
||||
Edje_Part_Description_Spec_Box box;
|
||||
Edje_Part_Description_Spec_Table table;
|
||||
|
||||
Eina_List *external_params; /* parameters for external objects */
|
||||
};
|
||||
|
||||
Edje_File *_edje_file_convert(Eet_File *file, Old_Edje_File *oedf);
|
||||
Edje_Part_Collection *_edje_collection_convert(Edje_File *file,
|
||||
Old_Edje_Part_Collection *oedc);
|
||||
Edje_Part_Description_Common *_edje_description_convert(int type,
|
||||
Edje_Part_Collection_Directory_Entry *ce,
|
||||
Old_Edje_Part_Description *oed);
|
||||
const Edje_File *_edje_file_get(void);
|
||||
void _edje_file_set(const Edje_File *edf);
|
||||
|
||||
|
|
|
@ -244,116 +244,116 @@ _edje_edd_init(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_external_param, Edje_External_Param, "d", d, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_external_param, Edje_External_Param, "s", s, EET_T_STRING);
|
||||
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description);
|
||||
eet_eina_file_data_descriptor_class_set(&eddc, "Edje_Part_Description", sizeof (Old_Edje_Part_Description));
|
||||
_edje_edd_edje_part_description =
|
||||
eet_data_descriptor_file_new(&eddc);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "state.name", common.state.name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "state.value", common.state.value, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "visible", common.visible, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "align.x", common.align.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "align.y", common.align.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fixed.w", common.fixed.w, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fixed.h", common.fixed.h, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "min.w", common.min.w, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "min.h", common.min.h, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "max.w", common.max.w, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "max.h", common.max.h, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "step.x", common.step.x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "step.y", common.step.y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "aspect.min", common.aspect.min, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "aspect.max", common.aspect.max, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "aspect.prefer", common.aspect.prefer, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel1.relative_x", common.rel1.relative_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel1.relative_y", common.rel1.relative_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel1.offset_x", common.rel1.offset_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel1.offset_y", common.rel1.offset_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel1.id_x", common.rel1.id_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel1.id_y", common.rel1.id_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel2.relative_x", common.rel2.relative_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel2.relative_y", common.rel2.relative_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel2.offset_x", common.rel2.offset_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel2.offset_y", common.rel2.offset_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel2.id_x", common.rel2.id_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "rel2.id_y", common.rel2.id_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "image.id", image.id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "image.set", image.set, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_description, Edje_Part_Description, "image.tween_list", image.tween_list, _edje_edd_edje_part_image_id);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "state.name", common.state.name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "state.value", common.state.value, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "visible", common.visible, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "align.x", common.align.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "align.y", common.align.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fixed.w", common.fixed.w, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fixed.h", common.fixed.h, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "min.w", common.min.w, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "min.h", common.min.h, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "max.w", common.max.w, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "max.h", common.max.h, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "step.x", common.step.x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "step.y", common.step.y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "aspect.min", common.aspect.min, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "aspect.max", common.aspect.max, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "aspect.prefer", common.aspect.prefer, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel1.relative_x", common.rel1.relative_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel1.relative_y", common.rel1.relative_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel1.offset_x", common.rel1.offset_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel1.offset_y", common.rel1.offset_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel1.id_x", common.rel1.id_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel1.id_y", common.rel1.id_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel2.relative_x", common.rel2.relative_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel2.relative_y", common.rel2.relative_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel2.offset_x", common.rel2.offset_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel2.offset_y", common.rel2.offset_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel2.id_x", common.rel2.id_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "rel2.id_y", common.rel2.id_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "image.id", image.id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "image.set", image.set, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_description, Old_Edje_Part_Description, "image.tween_list", image.tween_list, _edje_edd_edje_part_image_id);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.l", image.border.l, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.r", image.border.r, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.t", image.border.t, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.b", image.border.b, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.no_fill", image.border.no_fill, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.scale", image.border.scale, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.smooth", image.fill.smooth, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_rel_x", image.fill.pos_rel_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_abs_x", image.fill.pos_abs_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.rel_x", image.fill.rel_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.abs_x", image.fill.abs_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_rel_y", image.fill.pos_rel_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_abs_y", image.fill.pos_abs_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.rel_y", image.fill.rel_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.abs_y", image.fill.abs_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.angle", image.fill.angle, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.spread", image.fill.spread, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.type", image.fill.type, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color_class", common.color_class, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.r", common.color.r, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.g", common.color.g, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.b", common.color.b, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.a", common.color.a, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.r", common.color2.r, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.g", common.color2.g, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.b", common.color2.b, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.a", common.color2.a, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.r", text.color3.r, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.g", text.color3.g, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.b", text.color3.b, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.a", text.color3.a, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.text", text.text, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.text_class", text.text_class, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.style", text.style, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.font", text.font, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.repch", text.repch, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.size", text.size, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.fit_x", text.fit_x, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.fit_y", text.fit_y, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.min_x", text.min_x, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.min_y", text.min_y, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.max_x", text.max_x, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.max_y", text.max_y, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.align.x", text.align.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.align.y", text.align.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.id_source", text.id_source, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.id_text_source", text.id_text_source, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.elipsis", text.elipsis, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "box.layout", box.layout, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "box.alt_layout", box.alt_layout, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "box.align.x", box.align.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "box.align.y", box.align.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "box.padding.x", box.padding.x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "box.padding.y", box.padding.y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "box.min.h", box.min.h, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "box.min.v", box.min.v, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "table.homogeneous", table.homogeneous, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "table.align.x", table.align.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "table.align.y", table.align.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "table.padding.x", table.padding.x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "table.padding.y", table.padding.y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.id_persp", common.map.id_persp, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.id_light", common.map.id_light, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.rot.id_center", common.map.rot.id_center, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.rot.x", common.map.rot.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.rot.y", common.map.rot.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.rot.z", common.map.rot.z, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.on", common.map.on, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.smooth", common.map.smooth, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.alpha", common.map.alpha, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.persp_on", common.map.persp_on, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "map.backcull", common.map.backcull, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "persp.zplane", common.persp.zplane, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "persp.focal", common.persp.focal, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_description, Edje_Part_Description, "external_params", external_params, _edje_edd_edje_external_param);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "border.l", image.border.l, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "border.r", image.border.r, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "border.t", image.border.t, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "border.b", image.border.b, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "border.no_fill", image.border.no_fill, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "border.scale", image.border.scale, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.smooth", image.fill.smooth, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.pos_rel_x", image.fill.pos_rel_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.pos_abs_x", image.fill.pos_abs_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.rel_x", image.fill.rel_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.abs_x", image.fill.abs_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.pos_rel_y", image.fill.pos_rel_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.pos_abs_y", image.fill.pos_abs_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.rel_y", image.fill.rel_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.abs_y", image.fill.abs_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.angle", image.fill.angle, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.spread", image.fill.spread, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "fill.type", image.fill.type, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color_class", common.color_class, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color.r", common.color.r, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color.g", common.color.g, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color.b", common.color.b, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color.a", common.color.a, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color2.r", common.color2.r, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color2.g", common.color2.g, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color2.b", common.color2.b, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color2.a", common.color2.a, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color3.r", text.color3.r, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color3.g", text.color3.g, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color3.b", text.color3.b, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "color3.a", text.color3.a, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.text", text.text, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.text_class", text.text_class, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.style", text.style, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.font", text.font, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.repch", text.repch, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.size", text.size, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.fit_x", text.fit_x, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.fit_y", text.fit_y, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.min_x", text.min_x, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.min_y", text.min_y, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.max_x", text.max_x, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.max_y", text.max_y, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.align.x", text.align.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.align.y", text.align.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.id_source", text.id_source, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.id_text_source", text.id_text_source, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "text.elipsis", text.elipsis, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "box.layout", box.layout, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "box.alt_layout", box.alt_layout, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "box.align.x", box.align.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "box.align.y", box.align.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "box.padding.x", box.padding.x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "box.padding.y", box.padding.y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "box.min.h", box.min.h, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "box.min.v", box.min.v, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "table.homogeneous", table.homogeneous, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "table.align.x", table.align.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "table.align.y", table.align.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "table.padding.x", table.padding.x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "table.padding.y", table.padding.y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.id_persp", common.map.id_persp, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.id_light", common.map.id_light, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.rot.id_center", common.map.rot.id_center, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.rot.x", common.map.rot.x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.rot.y", common.map.rot.y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.rot.z", common.map.rot.z, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.on", common.map.on, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.smooth", common.map.smooth, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.alpha", common.map.alpha, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.persp_on", common.map.persp_on, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "map.backcull", common.map.backcull, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "persp.zplane", common.persp.zplane, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Old_Edje_Part_Description, "persp.focal", common.persp.focal, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_description, Old_Edje_Part_Description, "external_params", external_params, _edje_edd_edje_external_param);
|
||||
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Pack_Element);
|
||||
_edje_edd_edje_pack_element =
|
||||
|
@ -384,60 +384,60 @@ _edje_edd_init(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_pack_element, Edje_Pack_Element, "colspan", colspan, EET_T_USHORT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_pack_element, Edje_Pack_Element, "rowspan", rowspan, EET_T_USHORT);
|
||||
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part);
|
||||
eet_eina_file_data_descriptor_class_set(&eddc, "Edje_Part", sizeof (Old_Edje_Part));
|
||||
_edje_edd_edje_part =
|
||||
eet_data_descriptor_file_new(&eddc);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "name", name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "id", id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "type", type, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "effect", effect, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "mouse_events", mouse_events, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "repeat_events", repeat_events, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "ignore_flags", ignore_flags, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "scale", scale, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "pointer_mode", pointer_mode, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "precise_is_inside", precise_is_inside, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "clip_to_id", clip_to_id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "use_alternate_font_metrics", use_alternate_font_metrics, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_part, Edje_Part, "default_desc", default_desc, _edje_edd_edje_part_description);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part, Edje_Part, "other_desc", other_desc, _edje_edd_edje_part_description);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.x", dragable.x, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.step_x", dragable.step_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.count_x", dragable.count_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.y", dragable.y, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.step_y", dragable.step_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.count_y", dragable.count_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.counfine_id", dragable.confine_id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "dragable.events_id", dragable.event_id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "entry_mode", entry_mode, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "select_mode", select_mode, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "multiline", multiline, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source", source, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source2", source2, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source3", source3, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source4", source4, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source5", source5, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "source6", source6, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part, Edje_Part, "items", items, _edje_edd_edje_pack_element);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "api.name", api.name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "api.description", api.description, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "name", name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "id", id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "type", type, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "effect", effect, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "mouse_events", mouse_events, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "repeat_events", repeat_events, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "ignore_flags", ignore_flags, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "scale", scale, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "pointer_mode", pointer_mode, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "precise_is_inside", precise_is_inside, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "clip_to_id", clip_to_id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "use_alternate_font_metrics", use_alternate_font_metrics, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_part, Old_Edje_Part, "default_desc", default_desc, _edje_edd_edje_part_description);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part, Old_Edje_Part, "other_desc", other_desc, _edje_edd_edje_part_description);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "dragable.x", dragable.x, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "dragable.step_x", dragable.step_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "dragable.count_x", dragable.count_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "dragable.y", dragable.y, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "dragable.step_y", dragable.step_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "dragable.count_y", dragable.count_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "dragable.counfine_id", dragable.confine_id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "dragable.events_id", dragable.event_id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "entry_mode", entry_mode, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "select_mode", select_mode, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "multiline", multiline, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "source", source, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "source2", source2, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "source3", source3, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "source4", source4, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "source5", source5, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "source6", source6, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part, Old_Edje_Part, "items", items, _edje_edd_edje_pack_element);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "api.name", api.name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Old_Edje_Part, "api.description", api.description, EET_T_STRING);
|
||||
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Collection);
|
||||
eet_eina_file_data_descriptor_class_set(&eddc, "Edje_Part_Collection", sizeof (Old_Edje_Part_Collection));
|
||||
_edje_edd_edje_part_collection =
|
||||
eet_data_descriptor_file_new(&eddc);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Edje_Part_Collection, "programs", programs, _edje_edd_edje_program);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Edje_Part_Collection, "parts", parts, _edje_edd_edje_part);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Edje_Part_Collection, "data", data, _edje_edd_edje_data);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.min.w", prop.min.w, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.min.h", prop.min.h, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.max.w", prop.max.w, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.max.h", prop.max.h, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "id", id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "script_only", script_only, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "lua_script_only", lua_script_only, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "programs", programs, _edje_edd_edje_program);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "parts", parts, _edje_edd_edje_part);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "data", data, _edje_edd_edje_data);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "prop.min.w", prop.min.w, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "prop.min.h", prop.min.h, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "prop.max.w", prop.max.w, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "prop.max.h", prop.max.h, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "id", id, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "script_only", script_only, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Old_Edje_Part_Collection, "lua_script_only", lua_script_only, EET_T_UCHAR);
|
||||
|
||||
{
|
||||
Edje_Part_Collection epc;
|
||||
Old_Edje_Part_Collection epc;
|
||||
|
||||
eet_data_descriptor_element_add(_edje_edd_edje_part_collection,
|
||||
"alias", EET_T_STRING, EET_G_HASH,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1893,10 +1893,13 @@ _edje_entry_real_part_init(Edje_Real_Part *rp)
|
|||
|
||||
if (rp->part->entry_mode == EDJE_ENTRY_EDIT_MODE_PASSWORD)
|
||||
{
|
||||
Edje_Part_Description_Text *txt;
|
||||
|
||||
txt = (Edje_Part_Description_Text *) rp->chosen_description;
|
||||
|
||||
en->select_allow = 0;
|
||||
if ((rp->chosen_description) &&
|
||||
(rp->chosen_description->text.repch))
|
||||
evas_object_textblock_replace_char_set(rp->object, rp->chosen_description->text.repch);
|
||||
if (txt && txt->text.repch)
|
||||
evas_object_textblock_replace_char_set(rp->object, txt->text.repch);
|
||||
else
|
||||
evas_object_textblock_replace_char_set(rp->object, "*");
|
||||
}
|
||||
|
|
|
@ -620,9 +620,10 @@ _edje_external_params_free(Eina_List *external_params, Eina_Bool free_strings)
|
|||
void
|
||||
_edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||
Edje_Calc_Params *params,
|
||||
Edje_Part_Description *chosen_desc)
|
||||
Edje_Part_Description_Common *chosen_desc)
|
||||
{
|
||||
Edje_External_Type *type;
|
||||
Edje_Part_Description_External *ext;
|
||||
void *params1, *params2 = NULL;
|
||||
if (!ep->swallowed_object) return;
|
||||
|
||||
|
@ -632,14 +633,20 @@ _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
if (!type->state_set) return;
|
||||
|
||||
ext = (Edje_Part_Description_External*) ep->param1.description;
|
||||
|
||||
params1 = ep->param1.external_params ?
|
||||
ep->param1.external_params :
|
||||
ep->param1.description->external_params;
|
||||
ext->external_params;
|
||||
|
||||
if (ep->param2 && ep->param2->description)
|
||||
params2 = ep->param2->external_params ?
|
||||
{
|
||||
ext = (Edje_Part_Description_External*) ep->param2->description;
|
||||
|
||||
params2 = ep->param2->external_params ?
|
||||
ep->param2->external_params :
|
||||
ep->param2->description->external_params;
|
||||
ext->external_params;
|
||||
}
|
||||
|
||||
type->state_set(type->data, ep->swallowed_object,
|
||||
params1, params2, ep->description_pos);
|
||||
|
|
|
@ -294,7 +294,7 @@ int
|
|||
_edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Eina_List *group_path)
|
||||
{
|
||||
Edje *ed;
|
||||
int n;
|
||||
unsigned int n;
|
||||
Eina_List *parts = NULL;
|
||||
Eina_List *old_swallows;
|
||||
int group_path_started = 0;
|
||||
|
@ -348,34 +348,41 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
}
|
||||
else
|
||||
{
|
||||
Eina_List *l;
|
||||
int i;
|
||||
int errors = 0;
|
||||
Edje_Part *ep;
|
||||
unsigned int j;
|
||||
|
||||
/* colorclass stuff */
|
||||
EINA_LIST_FOREACH(ed->collection->parts, l, ep)
|
||||
for (j = 0; j < ed->collection->parts_count; ++j)
|
||||
{
|
||||
Eina_List *hist = NULL;
|
||||
Edje_Part_Description *desc;
|
||||
Edje_Part *ep;
|
||||
unsigned int k;
|
||||
|
||||
ep = ed->collection->parts[j];
|
||||
|
||||
if (errors)
|
||||
break;
|
||||
/* Register any color classes in this parts descriptions. */
|
||||
if ((ep->default_desc) && (ep->default_desc->common.color_class))
|
||||
_edje_color_class_member_add(ed, ep->default_desc->common.color_class);
|
||||
if ((ep->default_desc) && (ep->default_desc->color_class))
|
||||
_edje_color_class_member_add(ed, ep->default_desc->color_class);
|
||||
|
||||
EINA_LIST_FOREACH(ep->other_desc, hist, desc)
|
||||
if (desc->common.color_class)
|
||||
_edje_color_class_member_add(ed, desc->common.color_class);
|
||||
for (k = 0; k < ep->other_count; k++)
|
||||
{
|
||||
Edje_Part_Description_Common *desc;
|
||||
|
||||
desc = ep->other_desc[k];
|
||||
|
||||
if (desc->color_class)
|
||||
_edje_color_class_member_add(ed, desc->color_class);
|
||||
}
|
||||
}
|
||||
/* build real parts */
|
||||
for (n = 0, l = ed->collection->parts; l; l = eina_list_next(l), n++)
|
||||
for (n = 0; n < ed->collection->parts_count; n++)
|
||||
{
|
||||
Edje_Part *ep;
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
ep = eina_list_data_get(l);
|
||||
ep = ed->collection->parts[n];
|
||||
rp = eina_mempool_malloc(_edje_real_part_mp, sizeof(Edje_Real_Part));
|
||||
if (!rp)
|
||||
{
|
||||
|
@ -477,6 +484,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
if (n > 0)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
Eina_List *l;
|
||||
|
||||
ed->table_parts = malloc(sizeof(Edje_Real_Part *) * n);
|
||||
ed->table_parts_size = n;
|
||||
/* FIXME: check malloc return */
|
||||
|
@ -490,14 +499,14 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
for (i = 0; i < ed->table_parts_size; i++)
|
||||
{
|
||||
rp = ed->table_parts[i];
|
||||
if (rp->param1.description->common.rel1.id_x >= 0)
|
||||
rp->param1.rel1_to_x = ed->table_parts[rp->param1.description->common.rel1.id_x % ed->table_parts_size];
|
||||
if (rp->param1.description->common.rel1.id_y >= 0)
|
||||
rp->param1.rel1_to_y = ed->table_parts[rp->param1.description->common.rel1.id_y % ed->table_parts_size];
|
||||
if (rp->param1.description->common.rel2.id_x >= 0)
|
||||
rp->param1.rel2_to_x = ed->table_parts[rp->param1.description->common.rel2.id_x % ed->table_parts_size];
|
||||
if (rp->param1.description->common.rel2.id_y >= 0)
|
||||
rp->param1.rel2_to_y = ed->table_parts[rp->param1.description->common.rel2.id_y % ed->table_parts_size];
|
||||
if (rp->param1.description->rel1.id_x >= 0)
|
||||
rp->param1.rel1_to_x = ed->table_parts[rp->param1.description->rel1.id_x % ed->table_parts_size];
|
||||
if (rp->param1.description->rel1.id_y >= 0)
|
||||
rp->param1.rel1_to_y = ed->table_parts[rp->param1.description->rel1.id_y % ed->table_parts_size];
|
||||
if (rp->param1.description->rel2.id_x >= 0)
|
||||
rp->param1.rel2_to_x = ed->table_parts[rp->param1.description->rel2.id_x % ed->table_parts_size];
|
||||
if (rp->param1.description->rel2.id_y >= 0)
|
||||
rp->param1.rel2_to_y = ed->table_parts[rp->param1.description->rel2.id_y % ed->table_parts_size];
|
||||
if (rp->part->clip_to_id >= 0)
|
||||
{
|
||||
rp->clip_to = ed->table_parts[rp->part->clip_to_id % ed->table_parts_size];
|
||||
|
@ -529,22 +538,31 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
rp->swallow_params.min.w = 0;
|
||||
rp->swallow_params.max.w = -1;
|
||||
rp->swallow_params.max.h = -1;
|
||||
|
||||
if (ed->file->feature_ver < 1)
|
||||
|
||||
if (rp->part->type == EDJE_PART_TYPE_TEXT
|
||||
|| rp->part->type == EDJE_PART_TYPE_TEXTBLOCK)
|
||||
{
|
||||
rp->param1.description->text.id_source = -1;
|
||||
rp->param1.description->text.id_text_source = -1;
|
||||
Edje_Part_Description_Text *text;
|
||||
|
||||
text = (Edje_Part_Description_Text *) rp->param1.description;
|
||||
|
||||
if (ed->file->feature_ver < 1)
|
||||
{
|
||||
text->text.id_source = -1;
|
||||
text->text.id_text_source = -1;
|
||||
}
|
||||
|
||||
if (text->text.id_source >= 0)
|
||||
rp->text.source = ed->table_parts[text->text.id_source % ed->table_parts_size];
|
||||
if (text->text.id_text_source >= 0)
|
||||
rp->text.text_source = ed->table_parts[text->text.id_text_source % ed->table_parts_size];
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
_edje_entry_real_part_init(rp);
|
||||
if (!ed->has_entries)
|
||||
ed->has_entries = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
if (rp->param1.description->text.id_source >= 0)
|
||||
rp->text.source = ed->table_parts[rp->param1.description->text.id_source % ed->table_parts_size];
|
||||
if (rp->param1.description->text.id_text_source >= 0)
|
||||
rp->text.text_source = ed->table_parts[rp->param1.description->text.id_text_source % ed->table_parts_size];
|
||||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
{
|
||||
_edje_entry_real_part_init(rp);
|
||||
if (!ed->has_entries)
|
||||
ed->has_entries = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -554,6 +572,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
if (n > 0)
|
||||
{
|
||||
Edje_Program *pr;
|
||||
Eina_List *l;
|
||||
|
||||
/* FIXME: keeping a table AND a list is just bad - nuke list */
|
||||
ed->table_programs = malloc(sizeof(Edje_Program *) * n);
|
||||
ed->table_programs_size = n;
|
||||
|
@ -601,7 +621,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
* XXX: and they're always set in this case, but GCC fails to
|
||||
* XXX: notice that, so let's shut it up
|
||||
*/
|
||||
Eina_List *curr_item = NULL;
|
||||
Edje_Pack_Element **curr_item = NULL;
|
||||
unsigned int item_count = 0;
|
||||
Edje_Pack_Element *pack_it = NULL;
|
||||
const char *source = NULL;
|
||||
|
||||
|
@ -617,18 +638,30 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
if (rp->part->items)
|
||||
{
|
||||
curr_item = rp->part->items;
|
||||
pack_it = curr_item->data;
|
||||
source = pack_it->source;
|
||||
item_count = rp->part->items_count;
|
||||
if (item_count > 0)
|
||||
{
|
||||
pack_it = *curr_item;
|
||||
source = pack_it->source;
|
||||
item_count--;
|
||||
curr_item++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
{
|
||||
Edje_Part_Description_External *external;
|
||||
Evas_Object *child_obj;
|
||||
child_obj = _edje_external_type_add(rp->part->source, evas_object_evas_get(ed->obj), ed->obj, rp->part->default_desc->external_params, rp->part->name);
|
||||
|
||||
external = (Edje_Part_Description_External *) rp->part->default_desc;
|
||||
child_obj = _edje_external_type_add(rp->part->source,
|
||||
evas_object_evas_get(ed->obj), ed->obj,
|
||||
external->external_params, rp->part->name);
|
||||
if (child_obj)
|
||||
{
|
||||
_edje_real_part_swallow(rp, child_obj);
|
||||
rp->param1.external_params = _edje_external_params_parse(child_obj, rp->param1.description->external_params);
|
||||
rp->param1.external_params = _edje_external_params_parse(child_obj,
|
||||
external->external_params);
|
||||
_edje_external_recalc_apply(ed, rp, NULL, rp->chosen_description);
|
||||
}
|
||||
}
|
||||
|
@ -719,12 +752,19 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
evas_object_data_set(child_obj, "\377 edje.table_item", pack_it);
|
||||
}
|
||||
rp->items = eina_list_append(rp->items, child_obj);
|
||||
if (!(curr_item = curr_item->next))
|
||||
source = NULL;
|
||||
|
||||
if (item_count > 0)
|
||||
{
|
||||
pack_it = *curr_item;
|
||||
source = pack_it->source;
|
||||
curr_item++;
|
||||
item_count--;
|
||||
}
|
||||
else
|
||||
{
|
||||
pack_it = curr_item->data;
|
||||
source = pack_it->source;
|
||||
source = NULL;
|
||||
curr_item = NULL;
|
||||
pack_it = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -772,12 +812,16 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
|||
if ((rp->part->type == EDJE_PART_TYPE_TEXTBLOCK) &&
|
||||
(rp->part->default_desc))
|
||||
{
|
||||
Edje_Part_Description_Text *text;
|
||||
Edje_Style *stl = NULL;
|
||||
const char *style;
|
||||
|
||||
style = rp->part->default_desc->text.style;
|
||||
|
||||
text = (Edje_Part_Description_Text *) rp->part->default_desc;
|
||||
style = text->text.style;
|
||||
if (style)
|
||||
{
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_FOREACH(ed->file->styles, l, stl)
|
||||
{
|
||||
if ((stl->name) && (!strcmp(stl->name, style))) break;
|
||||
|
@ -916,8 +960,11 @@ _edje_file_del(Edje *ed)
|
|||
_edje_lua_free_reg(ed->L, rp->custom->description); // created in edje_lua.c::_edje_lua_part_fn_custom_state
|
||||
}
|
||||
#endif
|
||||
_edje_collection_free_part_description_free(rp->custom->description,
|
||||
ed->file->free_strings);
|
||||
_edje_collection_free_part_description_clean(rp->part->type,
|
||||
rp->custom->description,
|
||||
ed->file->free_strings);
|
||||
free(rp->custom->description);
|
||||
rp->custom->description = NULL;
|
||||
}
|
||||
|
||||
/* Cleanup optional part. */
|
||||
|
@ -938,16 +985,18 @@ _edje_file_del(Edje *ed)
|
|||
}
|
||||
if ((ed->file) && (ed->collection))
|
||||
{
|
||||
Eina_List *l;
|
||||
Edje_Part *ep;
|
||||
unsigned int i;
|
||||
|
||||
_edje_textblock_styles_del(ed);
|
||||
EINA_LIST_FOREACH(ed->collection->parts, l, ep)
|
||||
for (i = 0; i < ed->collection->parts_count; ++i)
|
||||
{
|
||||
_edje_text_part_on_del(ed, ep);
|
||||
_edje_color_class_on_del(ed, ep);
|
||||
ep = ed->collection->parts[i];
|
||||
|
||||
_edje_text_part_on_del(ed, ep);
|
||||
_edje_color_class_on_del(ed, ep);
|
||||
}
|
||||
|
||||
|
||||
_edje_cache_coll_unref(ed->file, ed->collection);
|
||||
ed->collection = NULL;
|
||||
}
|
||||
|
@ -1009,6 +1058,9 @@ _edje_file_free(Edje_File *edf)
|
|||
eina_hash_free(Hash); \
|
||||
Hash = NULL;
|
||||
|
||||
/* Clean cache before cleaning memory pool */
|
||||
if (edf->collection_cache) _edje_cache_coll_flush(edf);
|
||||
|
||||
HASH_FREE(edf->fonts);
|
||||
HASH_FREE(edf->collection);
|
||||
HASH_FREE(edf->data);
|
||||
|
@ -1064,7 +1116,6 @@ _edje_file_free(Edje_File *edf)
|
|||
if (edf->collection_patterns) edje_match_patterns_free(edf->collection_patterns);
|
||||
if (edf->path) eina_stringshare_del(edf->path);
|
||||
if (edf->free_strings && edf->compiler) eina_stringshare_del(edf->compiler);
|
||||
if (edf->collection_cache) _edje_cache_coll_flush(edf);
|
||||
_edje_textblock_style_cleanup(edf);
|
||||
if (edf->ef) eet_close(edf->ef);
|
||||
free(edf);
|
||||
|
@ -1073,10 +1124,10 @@ _edje_file_free(Edje_File *edf)
|
|||
}
|
||||
|
||||
void
|
||||
_edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
||||
_edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec, Edje_Part_Collection_Directory_Entry *ce)
|
||||
{
|
||||
Edje_Program *pr;
|
||||
Edje_Part *ep;
|
||||
unsigned int i;
|
||||
|
||||
_edje_embryo_script_shutdown(ec);
|
||||
EINA_LIST_FREE(ec->programs, pr)
|
||||
|
@ -1100,34 +1151,26 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
free(pa);
|
||||
free(pr);
|
||||
}
|
||||
EINA_LIST_FREE(ec->parts, ep)
|
||||
for (i = 0; i < ec->parts_count; ++i)
|
||||
{
|
||||
Edje_Part_Description *desc;
|
||||
Edje_Part *ep;
|
||||
unsigned int j;
|
||||
|
||||
ep = ec->parts[i];
|
||||
|
||||
if (edf->free_strings && ep->name) eina_stringshare_del(ep->name);
|
||||
if (ep->default_desc)
|
||||
{
|
||||
_edje_collection_free_part_description_free(ep->default_desc, edf->free_strings);
|
||||
_edje_collection_free_part_description_clean(ep->type, ep->default_desc, edf->free_strings);
|
||||
ep->default_desc = NULL;
|
||||
}
|
||||
EINA_LIST_FREE(ep->other_desc, desc)
|
||||
_edje_collection_free_part_description_free(desc, edf->free_strings);
|
||||
free(ep);
|
||||
}
|
||||
if (ec->data)
|
||||
{
|
||||
Edje_Data *edt;
|
||||
for (j = 0; j < ep->other_count; ++j)
|
||||
_edje_collection_free_part_description_clean(ep->type, ep->other_desc[j], edf->free_strings);
|
||||
|
||||
EINA_LIST_FREE(ec->data, edt)
|
||||
{
|
||||
if (edf->free_strings)
|
||||
{
|
||||
if (edt->key) eina_stringshare_del(edt->key);
|
||||
if (edt->value) eina_stringshare_del(edt->value);
|
||||
}
|
||||
free(edt);
|
||||
}
|
||||
free(ep->other_desc);
|
||||
free(ep->items);
|
||||
}
|
||||
if (ec->data) eina_hash_free(ec->data);
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
if (ec->prog_cache.no_matches) eina_hash_free(ec->prog_cache.no_matches);
|
||||
if (ec->prog_cache.matches)
|
||||
|
@ -1139,30 +1182,93 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec)
|
|||
}
|
||||
#endif
|
||||
if (ec->script) embryo_program_free(ec->script);
|
||||
#ifdef LUA2
|
||||
#ifdef LUA2
|
||||
_edje_lua2_script_unload(ec);
|
||||
#endif
|
||||
|
||||
/* Destroy all part and description. */
|
||||
eina_mempool_del(ce->mp.RECTANGLE);
|
||||
eina_mempool_del(ce->mp.TEXT);
|
||||
eina_mempool_del(ce->mp.IMAGE);
|
||||
eina_mempool_del(ce->mp.SWALLOW);
|
||||
eina_mempool_del(ce->mp.TEXTBLOCK);
|
||||
eina_mempool_del(ce->mp.GROUP);
|
||||
eina_mempool_del(ce->mp.BOX);
|
||||
eina_mempool_del(ce->mp.TABLE);
|
||||
eina_mempool_del(ce->mp.EXTERNAL);
|
||||
eina_mempool_del(ce->mp.part);
|
||||
memset(&ce->mp, 0, sizeof (ce->mp));
|
||||
|
||||
free(ec);
|
||||
ce->ref = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_edje_collection_free_part_description_free(Edje_Part_Description *desc, Eina_Bool free_strings)
|
||||
_edje_collection_free_part_description_clean(int type, Edje_Part_Description_Common *desc, Eina_Bool free_strings)
|
||||
{
|
||||
Edje_Part_Image_Id *pi;
|
||||
|
||||
EINA_LIST_FREE(desc->image.tween_list, pi)
|
||||
free(pi);
|
||||
if (desc->external_params)
|
||||
_edje_external_params_free(desc->external_params, free_strings);
|
||||
if (free_strings)
|
||||
if (free_strings && desc->color_class) eina_stringshare_del(desc->color_class);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
if (desc->common.color_class) eina_stringshare_del(desc->common.color_class);
|
||||
if (desc->text.text) eina_stringshare_del(desc->text.text);
|
||||
if (desc->text.text_class) eina_stringshare_del(desc->text.text_class);
|
||||
if (desc->text.style) eina_stringshare_del(desc->text.style);
|
||||
if (desc->text.font) eina_stringshare_del(desc->text.font);
|
||||
case EDJE_PART_TYPE_IMAGE:
|
||||
{
|
||||
Edje_Part_Description_Image *img;
|
||||
|
||||
img = (Edje_Part_Description_Image *) desc;
|
||||
|
||||
EINA_LIST_FREE(img->image.tween_list, pi)
|
||||
free(pi);
|
||||
}
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
{
|
||||
Edje_Part_Description_External *external;
|
||||
|
||||
external = (Edje_Part_Description_External *) desc;
|
||||
|
||||
if (external->external_params)
|
||||
_edje_external_params_free(external->external_params, free_strings);
|
||||
}
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
case EDJE_PART_TYPE_TEXTBLOCK:
|
||||
if (free_strings)
|
||||
{
|
||||
Edje_Part_Description_Text *text;
|
||||
|
||||
text = (Edje_Part_Description_Text *) desc;
|
||||
|
||||
if (text->text.text) eina_stringshare_del(text->text.text);
|
||||
if (text->text.text_class) eina_stringshare_del(text->text.text_class);
|
||||
if (text->text.style) eina_stringshare_del(text->text.style);
|
||||
if (text->text.font) eina_stringshare_del(text->text.font);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_edje_collection_free_part_description_free(int type,
|
||||
Edje_Part_Description_Common *desc,
|
||||
Edje_Part_Collection_Directory_Entry *ce,
|
||||
Eina_Bool free_strings)
|
||||
{
|
||||
#define FREE_POOL(Type, Ce, Desc) \
|
||||
case EDJE_PART_TYPE_##Type: eina_mempool_free(Ce->mp.Type, Desc); break;
|
||||
|
||||
_edje_collection_free_part_description_clean(type, desc, free_strings);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
FREE_POOL(RECTANGLE, ce, desc);
|
||||
FREE_POOL(TEXT, ce, desc);
|
||||
FREE_POOL(IMAGE, ce, desc);
|
||||
FREE_POOL(SWALLOW, ce, desc);
|
||||
FREE_POOL(TEXTBLOCK, ce, desc);
|
||||
FREE_POOL(GROUP, ce, desc);
|
||||
FREE_POOL(BOX, ce, desc);
|
||||
FREE_POOL(TABLE, ce, desc);
|
||||
FREE_POOL(EXTERNAL, ce, desc);
|
||||
}
|
||||
free(desc);
|
||||
}
|
||||
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
|
|
|
@ -213,7 +213,6 @@ typedef struct _Edje_Aspect Edje_Aspect;
|
|||
typedef struct _Edje_File Edje_File;
|
||||
typedef struct _Edje_Style Edje_Style;
|
||||
typedef struct _Edje_Style_Tag Edje_Style_Tag;
|
||||
typedef struct _Edje_Data Edje_Data;
|
||||
typedef struct _Edje_External_Directory Edje_External_Directory;
|
||||
typedef struct _Edje_External_Directory_Entry Edje_External_Directory_Entry;
|
||||
typedef struct _Edje_Font_Directory_Entry Edje_Font_Directory_Entry;
|
||||
|
@ -229,8 +228,14 @@ typedef struct _Edje_Part_Collection_Directory_Entry Edje_Part_Collection_Direct
|
|||
typedef struct _Edje_Pack_Element Edje_Pack_Element;
|
||||
typedef struct _Edje_Part_Collection Edje_Part_Collection;
|
||||
typedef struct _Edje_Part Edje_Part;
|
||||
typedef struct _Edje_Part_Api Edje_Part_Api;
|
||||
typedef struct _Edje_Part_Dragable Edje_Part_Dragable;
|
||||
typedef struct _Edje_Part_Image_Id Edje_Part_Image_Id;
|
||||
typedef struct _Edje_Part_Description Edje_Part_Description;
|
||||
typedef struct _Edje_Part_Description_Image Edje_Part_Description_Image;
|
||||
typedef struct _Edje_Part_Description_Text Edje_Part_Description_Text;
|
||||
typedef struct _Edje_Part_Description_Box Edje_Part_Description_Box;
|
||||
typedef struct _Edje_Part_Description_Table Edje_Part_Description_Table;
|
||||
typedef struct _Edje_Part_Description_External Edje_Part_Description_External;
|
||||
typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common;
|
||||
typedef struct _Edje_Part_Description_Spec_Image Edje_Part_Description_Spec_Image;
|
||||
typedef struct _Edje_Part_Description_Spec_Text Edje_Part_Description_Spec_Text;
|
||||
|
@ -367,13 +372,6 @@ struct _Edje_Style_Tag
|
|||
|
||||
/*----------*/
|
||||
|
||||
struct _Edje_Data
|
||||
{
|
||||
const char *key;
|
||||
char *value;
|
||||
};
|
||||
|
||||
/*----------*/
|
||||
|
||||
struct _Edje_Font_Directory_Entry
|
||||
{
|
||||
|
@ -522,8 +520,23 @@ struct _Edje_Part_Collection_Directory_Entry
|
|||
int BOX;
|
||||
int TABLE;
|
||||
int EXTERNAL;
|
||||
int part;
|
||||
} count;
|
||||
|
||||
struct
|
||||
{
|
||||
Eina_Mempool *RECTANGLE;
|
||||
Eina_Mempool *TEXT;
|
||||
Eina_Mempool *IMAGE;
|
||||
Eina_Mempool *SWALLOW;
|
||||
Eina_Mempool *TEXTBLOCK;
|
||||
Eina_Mempool *GROUP;
|
||||
Eina_Mempool *BOX;
|
||||
Eina_Mempool *TABLE;
|
||||
Eina_Mempool *EXTERNAL;
|
||||
Eina_Mempool *part;
|
||||
} mp;
|
||||
|
||||
Edje_Part_Collection *ref;
|
||||
};
|
||||
|
||||
|
@ -553,19 +566,23 @@ struct _Edje_Pack_Element
|
|||
|
||||
struct _Edje_Part_Collection
|
||||
{
|
||||
Eina_List *programs; /* a list of Edje_Program */
|
||||
Eina_List *parts; /* a list of Edje_Part */
|
||||
Eina_List *data;
|
||||
Eina_List *programs; /* a list of Edje_Program *//* FIXME: use multiple array */
|
||||
|
||||
Edje_Part **parts; /* an array of Edje_Part */
|
||||
unsigned int parts_count;
|
||||
|
||||
Eina_Hash *data;
|
||||
|
||||
int id; /* the collection id */
|
||||
|
||||
Eina_Hash *alias; /* aliasing part*/
|
||||
Eina_Hash *alias; /* aliasing part */
|
||||
|
||||
struct {
|
||||
Edje_Size min, max;
|
||||
} prop;
|
||||
|
||||
int references;
|
||||
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
struct {
|
||||
Eina_Hash *no_matches;
|
||||
|
@ -583,30 +600,41 @@ struct _Edje_Part_Collection
|
|||
unsigned char checked : 1;
|
||||
};
|
||||
|
||||
struct _Edje_Part_Dragable
|
||||
{
|
||||
int step_x; /* drag jumps n pixels (0 = no limit) */
|
||||
int step_y; /* drag jumps n pixels (0 = no limit) */
|
||||
|
||||
int count_x; /* drag area divided by n (0 = no limit) */
|
||||
int count_y; /* drag area divided by n (0 = no limit) */
|
||||
|
||||
int confine_id; /* dragging within this bit, -1 = no */
|
||||
|
||||
/* davinchi */
|
||||
int event_id; /* If it is used as scrollbar */
|
||||
|
||||
signed char x; /* can u click & drag this bit in x dir */
|
||||
signed char y; /* can u click & drag this bit in y dir */
|
||||
};
|
||||
|
||||
struct _Edje_Part_Api
|
||||
{
|
||||
const char *name;
|
||||
const char *description;
|
||||
};
|
||||
|
||||
struct _Edje_Part
|
||||
{
|
||||
const char *name; /* the name if any of the part */
|
||||
Edje_Part_Description *default_desc; /* the part descriptor for default */
|
||||
Eina_List *other_desc; /* other possible descriptors */
|
||||
const char *source, *source2, *source3, *source4, *source5, *source6;
|
||||
const char *name; /* the name if any of the part */
|
||||
Edje_Part_Description_Common *default_desc; /* the part descriptor for default */
|
||||
Edje_Part_Description_Common **other_desc; /* other possible descriptors */
|
||||
unsigned int other_count;
|
||||
const char *source, *source2, *source3, *source4, *source5, *source6;
|
||||
int id; /* its id number */
|
||||
int clip_to_id; /* the part id to clip this one to */
|
||||
struct {
|
||||
int step_x; /* drag jumps n pixels (0 = no limit) */
|
||||
int step_y; /* drag jumps n pixels (0 = no limit) */
|
||||
|
||||
int count_x; /* drag area divided by n (0 = no limit) */
|
||||
int count_y; /* drag area divided by n (0 = no limit) */
|
||||
|
||||
int confine_id; /* dragging within this bit, -1 = no */
|
||||
|
||||
/* davinchi */
|
||||
int event_id; /* If it is used as scrollbar */
|
||||
|
||||
signed char x; /* can u click & drag this bit in x dir */
|
||||
signed char y; /* can u click & drag this bit in y dir */
|
||||
} dragable;
|
||||
Eina_List *items; /* packed items for box and table */
|
||||
Edje_Part_Dragable dragable;
|
||||
Edje_Pack_Element **items; /* packed items for box and table */
|
||||
unsigned int items_count;
|
||||
unsigned char type; /* what type (image, rect, text) */
|
||||
unsigned char effect; /* 0 = plain... */
|
||||
unsigned char mouse_events; /* it will affect/respond to mouse events */
|
||||
|
@ -619,10 +647,7 @@ struct _Edje_Part
|
|||
unsigned char entry_mode;
|
||||
unsigned char select_mode;
|
||||
unsigned char multiline;
|
||||
struct {
|
||||
const char *name;
|
||||
const char *description;
|
||||
} api;
|
||||
Edje_Part_Api api;
|
||||
};
|
||||
|
||||
struct _Edje_Part_Image_Id
|
||||
|
@ -757,14 +782,33 @@ struct _Edje_Part_Description_Spec_Table
|
|||
} padding;
|
||||
};
|
||||
|
||||
struct _Edje_Part_Description
|
||||
struct _Edje_Part_Description_Image
|
||||
{
|
||||
Edje_Part_Description_Common common;
|
||||
Edje_Part_Description_Spec_Image image;
|
||||
Edje_Part_Description_Spec_Text text;
|
||||
Edje_Part_Description_Spec_Box box;
|
||||
Edje_Part_Description_Spec_Table table;
|
||||
};
|
||||
|
||||
struct _Edje_Part_Description_Text
|
||||
{
|
||||
Edje_Part_Description_Common common;
|
||||
Edje_Part_Description_Spec_Text text;
|
||||
};
|
||||
|
||||
struct _Edje_Part_Description_Box
|
||||
{
|
||||
Edje_Part_Description_Common common;
|
||||
Edje_Part_Description_Spec_Box box;
|
||||
};
|
||||
|
||||
struct _Edje_Part_Description_Table
|
||||
{
|
||||
Edje_Part_Description_Common common;
|
||||
Edje_Part_Description_Spec_Table table;
|
||||
};
|
||||
|
||||
struct _Edje_Part_Description_External
|
||||
{
|
||||
Edje_Part_Description_Common common;
|
||||
Eina_List *external_params; /* parameters for external objects */
|
||||
};
|
||||
|
||||
|
@ -950,7 +994,7 @@ struct _Edje_Real_Part_Set
|
|||
|
||||
struct _Edje_Real_Part_State
|
||||
{
|
||||
Edje_Part_Description *description; // 4
|
||||
Edje_Part_Description_Common *description; // 4
|
||||
Edje_Real_Part *rel1_to_x; // 4
|
||||
Edje_Real_Part *rel1_to_y; // 4
|
||||
Edje_Real_Part *rel2_to_x; // 4
|
||||
|
@ -1024,7 +1068,7 @@ struct _Edje_Real_Part
|
|||
// text to front and have smaller struct for textblock
|
||||
|
||||
FLOAT_T description_pos; // 8
|
||||
Edje_Part_Description *chosen_description; // 4
|
||||
Edje_Part_Description_Common *chosen_description; // 4
|
||||
Edje_Real_Part_State param1; // 20
|
||||
// WITH EDJE_CALC_CACHE: 140
|
||||
Edje_Real_Part_State *param2, *custom; // 8
|
||||
|
@ -1296,7 +1340,9 @@ extern Eina_Mempool *_edje_real_part_mp;
|
|||
extern Eina_Mempool *_edje_real_part_state_mp;
|
||||
|
||||
void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos);
|
||||
Edje_Part_Description *_edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *name, double val);
|
||||
Edje_Part_Description_Common *_edje_part_description_find(Edje *ed,
|
||||
Edje_Real_Part *rp,
|
||||
const char *name, double val);
|
||||
void _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, double v1, const char *d2, double v2);
|
||||
void _edje_recalc(Edje *ed);
|
||||
void _edje_recalc_do(Edje *ed);
|
||||
|
@ -1320,8 +1366,16 @@ void _edje_file_add(Edje *ed);
|
|||
void _edje_file_del(Edje *ed);
|
||||
void _edje_file_free(Edje_File *edf);
|
||||
void _edje_file_cache_shutdown(void);
|
||||
void _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec);
|
||||
void _edje_collection_free_part_description_free(Edje_Part_Description *desc, Eina_Bool free_strings);
|
||||
void _edje_collection_free(Edje_File *edf,
|
||||
Edje_Part_Collection *ec,
|
||||
Edje_Part_Collection_Directory_Entry *ce);
|
||||
void _edje_collection_free_part_description_clean(int type,
|
||||
Edje_Part_Description_Common *desc,
|
||||
Eina_Bool free_strings);
|
||||
void _edje_collection_free_part_description_free(int type,
|
||||
Edje_Part_Description_Common *desc,
|
||||
Edje_Part_Collection_Directory_Entry *ce,
|
||||
Eina_Bool free_strings);
|
||||
|
||||
void _edje_object_smart_set(Edje_Smart_Api *sc);
|
||||
const Edje_Smart_Api * _edje_object_smart_class_get(void);
|
||||
|
@ -1346,9 +1400,14 @@ void _edje_callbacks_patterns_clean(Edje *ed);
|
|||
void _edje_text_init(void);
|
||||
void _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep);
|
||||
void _edje_text_part_on_del(Edje *ed, Edje_Part *ep);
|
||||
void _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *params, Edje_Part_Description *chosen_desc);
|
||||
void _edje_text_recalc_apply(Edje *ed,
|
||||
Edje_Real_Part *ep,
|
||||
Edje_Calc_Params *params,
|
||||
Edje_Part_Description_Text *chosen_desc);
|
||||
Evas_Font_Size _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc);
|
||||
const char * _edje_text_class_font_get(Edje *ed, Edje_Part_Description *chosen_desc, int *size, char **free_later);
|
||||
const char * _edje_text_class_font_get(Edje *ed,
|
||||
Edje_Part_Description_Text *chosen_desc,
|
||||
int *size, char **free_later);
|
||||
|
||||
|
||||
Edje_Real_Part *_edje_real_part_get(Edje *ed, const char *part);
|
||||
|
@ -1625,7 +1684,9 @@ void _edje_external_signal_emit(Evas_Object *obj, const char *emission, const ch
|
|||
Eina_Bool _edje_external_param_set(Evas_Object *obj, const Edje_External_Param *param) EINA_ARG_NONNULL(1, 2);
|
||||
Eina_Bool _edje_external_param_get(const Evas_Object *obj, Edje_External_Param *param) EINA_ARG_NONNULL(1, 2);
|
||||
void _edje_external_params_free(Eina_List *params, Eina_Bool free_strings);
|
||||
void _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *params, Edje_Part_Description *chosen_desc);
|
||||
void _edje_external_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||
Edje_Calc_Params *params,
|
||||
Edje_Part_Description_Common *chosen_desc);
|
||||
void *_edje_external_params_parse(Evas_Object *obj, const Eina_List *params);
|
||||
void _edje_external_parsed_params_free(Evas_Object *obj, void *params);
|
||||
|
||||
|
|
|
@ -644,8 +644,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
|
|||
if (rp->program)
|
||||
_edje_program_end(ed, rp->program);
|
||||
_edje_part_description_apply(ed, rp,
|
||||
rp->param1.description->common.state.name,
|
||||
rp->param1.description->common.state.value,
|
||||
rp->param1.description->state.name,
|
||||
rp->param1.description->state.value,
|
||||
pr->state,
|
||||
pr->value);
|
||||
_edje_part_pos_set(ed, rp, pr->tween.mode, ZERO);
|
||||
|
@ -1136,7 +1136,7 @@ static Eina_Bool _edje_glob_callback(Edje_Program *pr, void *dt)
|
|||
{
|
||||
rp = _edje_real_part_get(data->ed, pr->filter.part ? pr->filter.part : data->source);
|
||||
if (rp)
|
||||
exec = (rp->chosen_description->common.state.name == pr->filter.state);
|
||||
exec = (rp->chosen_description->state.name == pr->filter.state);
|
||||
}
|
||||
|
||||
if (exec)
|
||||
|
|
|
@ -40,34 +40,46 @@ _edje_text_init(void)
|
|||
void
|
||||
_edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep)
|
||||
{
|
||||
Eina_List *tmp;
|
||||
Edje_Part *pt = ep->part;
|
||||
Edje_Part_Description *desc;
|
||||
Edje_Part_Description_Text *desc;
|
||||
unsigned int i;
|
||||
|
||||
if (ep->part->type != EDJE_PART_TYPE_TEXT) return;
|
||||
|
||||
/* 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);
|
||||
desc = (Edje_Part_Description_Text *) pt->default_desc;
|
||||
if ((pt->default_desc) && (desc->text.text_class))
|
||||
_edje_text_class_member_add(ed, desc->text.text_class);
|
||||
|
||||
/* If any other classes exist add them */
|
||||
EINA_LIST_FOREACH(pt->other_desc, tmp, desc)
|
||||
if ((desc) && (desc->text.text_class))
|
||||
_edje_text_class_member_add(ed, desc->text.text_class);
|
||||
for (i = 0; i < pt->other_count; ++i)
|
||||
{
|
||||
desc = (Edje_Part_Description_Text *) pt->other_desc[i];
|
||||
if ((desc) && (desc->text.text_class))
|
||||
_edje_text_class_member_add(ed, desc->text.text_class);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_edje_text_part_on_del(Edje *ed, Edje_Part *pt)
|
||||
{
|
||||
Eina_List *tmp;
|
||||
Edje_Part_Description *desc;
|
||||
Edje_Part_Description_Text *desc;
|
||||
unsigned int i;
|
||||
|
||||
if ((pt->default_desc) && (pt->default_desc->text.text_class))
|
||||
_edje_text_class_member_del(ed, pt->default_desc->text.text_class);
|
||||
if (pt->type != EDJE_PART_TYPE_TEXT
|
||||
&& pt->type != EDJE_PART_TYPE_TEXTBLOCK)
|
||||
return ;
|
||||
|
||||
EINA_LIST_FOREACH(pt->other_desc, tmp, desc)
|
||||
if (desc->text.text_class)
|
||||
_edje_text_class_member_del(ed, desc->text.text_class);
|
||||
desc = (Edje_Part_Description_Text *) pt->default_desc;
|
||||
if ((pt->default_desc) && (desc->text.text_class))
|
||||
_edje_text_class_member_del(ed, desc->text.text_class);
|
||||
|
||||
for (i = 0; i < pt->other_count; ++i)
|
||||
{
|
||||
desc = (Edje_Part_Description_Text *) pt->other_desc[i];
|
||||
if (desc->text.text_class)
|
||||
_edje_text_class_member_del(ed, desc->text.text_class);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -267,7 +279,7 @@ _edje_text_font_get(const char *base, const char *new, char **free_later)
|
|||
}
|
||||
|
||||
const char *
|
||||
_edje_text_class_font_get(Edje *ed, Edje_Part_Description *chosen_desc, int *size, char **free_later)
|
||||
_edje_text_class_font_get(Edje *ed, Edje_Part_Description_Text *chosen_desc, int *size, char **free_later)
|
||||
{
|
||||
Edje_Text_Class *tc;
|
||||
const char *text_class_name, *font;
|
||||
|
@ -292,7 +304,7 @@ _edje_text_class_font_get(Edje *ed, Edje_Part_Description *chosen_desc, int *siz
|
|||
void
|
||||
_edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||
Edje_Calc_Params *params,
|
||||
Edje_Part_Description *chosen_desc)
|
||||
Edje_Part_Description_Text *chosen_desc)
|
||||
{
|
||||
const char *text;
|
||||
const char *font;
|
||||
|
@ -315,13 +327,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
|
||||
if (ep->text.text_source)
|
||||
{
|
||||
text = ep->text.text_source->chosen_description->text.text;
|
||||
text = ((Edje_Part_Description_Text *)ep->text.text_source->chosen_description)->text.text;
|
||||
if (ep->text.text_source->text.text) text = ep->text.text_source->text.text;
|
||||
}
|
||||
if (ep->text.source)
|
||||
{
|
||||
font = ep->text.source->chosen_description->text.font;
|
||||
size = ep->text.source->chosen_description->text.size;
|
||||
font = ((Edje_Part_Description_Text *)ep->text.source->chosen_description)->text.font;
|
||||
size = ((Edje_Part_Description_Text *)ep->text.source->chosen_description)->text.size;
|
||||
if (ep->text.source->text.font) font = ep->text.source->text.font;
|
||||
if (ep->text.source->text.size > 0) size = ep->text.source->text.size;
|
||||
}
|
||||
|
|
|
@ -295,17 +295,13 @@ EAPI const char *
|
|||
edje_object_data_get(const Evas_Object *obj, const char *key)
|
||||
{
|
||||
Edje *ed;
|
||||
Eina_List *l;
|
||||
Edje_Data *di;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if ((!ed) || (!key))
|
||||
return NULL;
|
||||
if (!ed->collection) return NULL;
|
||||
EINA_LIST_FOREACH(ed->collection->data, l, di)
|
||||
if ((di->key) && (!strcmp(di->key, key)))
|
||||
return (const char *)di->value;
|
||||
return NULL;
|
||||
if (!ed->collection->data) return NULL;
|
||||
return eina_hash_find(ed->collection->data, key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2855,7 +2851,7 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co
|
|||
didw = 0;
|
||||
if (ep->chosen_description)
|
||||
{
|
||||
if (!ep->chosen_description->common.fixed.w)
|
||||
if (!ep->chosen_description->fixed.w)
|
||||
{
|
||||
if (w > maxw)
|
||||
{
|
||||
|
@ -2869,10 +2865,10 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co
|
|||
/* FIXME: do something */
|
||||
}
|
||||
}
|
||||
if (!ep->chosen_description->common.fixed.h)
|
||||
if (!ep->chosen_description->fixed.h)
|
||||
{
|
||||
if (!((ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) &&
|
||||
(!ep->chosen_description->text.min_x) &&
|
||||
(!((Edje_Part_Description_Text *)ep->chosen_description)->text.min_x) &&
|
||||
(didw)))
|
||||
{
|
||||
if (h > maxh)
|
||||
|
@ -2959,18 +2955,18 @@ edje_object_part_state_get(const Evas_Object *obj, const char *part, double *val
|
|||
}
|
||||
if (rp->chosen_description)
|
||||
{
|
||||
if (val_ret) *val_ret = rp->chosen_description->common.state.value;
|
||||
if (rp->chosen_description->common.state.name)
|
||||
return rp->chosen_description->common.state.name;
|
||||
if (val_ret) *val_ret = rp->chosen_description->state.value;
|
||||
if (rp->chosen_description->state.name)
|
||||
return rp->chosen_description->state.name;
|
||||
return "default";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rp->param1.description)
|
||||
{
|
||||
if (val_ret) *val_ret = rp->param1.description->common.state.value;
|
||||
if (rp->param1.description->common.state.name)
|
||||
return rp->param1.description->common.state.name;
|
||||
if (val_ret) *val_ret = rp->param1.description->state.value;
|
||||
if (rp->param1.description->state.name)
|
||||
return rp->param1.description->state.name;
|
||||
return "default";
|
||||
}
|
||||
}
|
||||
|
@ -4454,15 +4450,14 @@ _edje_color_class_hash_free(void)
|
|||
void
|
||||
_edje_color_class_on_del(Edje *ed, Edje_Part *ep)
|
||||
{
|
||||
Eina_List *tmp;
|
||||
Edje_Part_Description *desc;
|
||||
unsigned int i;
|
||||
|
||||
if ((ep->default_desc) && (ep->default_desc->common.color_class))
|
||||
_edje_color_class_member_del(ed, ep->default_desc->common.color_class);
|
||||
if ((ep->default_desc) && (ep->default_desc->color_class))
|
||||
_edje_color_class_member_del(ed, ep->default_desc->color_class);
|
||||
|
||||
EINA_LIST_FOREACH(ep->other_desc, tmp, desc)
|
||||
if (desc->common.color_class)
|
||||
_edje_color_class_member_del(ed, desc->common.color_class);
|
||||
for (i = 0; i < ep->other_count; ++i)
|
||||
if (ep->other_desc[i]->color_class)
|
||||
_edje_color_class_member_del(ed, ep->other_desc[i]->color_class);
|
||||
}
|
||||
|
||||
Edje_Text_Class *
|
||||
|
|
Loading…
Reference in New Issue