edje: reformat all C files
this has been unreadable for years due to the french tabber.
This commit is contained in:
parent
86e5a1a27c
commit
172a0ccf0c
|
@ -18,12 +18,12 @@ struct _Edje_Part_Box_Animation
|
|||
{
|
||||
Evas_Object_Box_Layout layout;
|
||||
void *data;
|
||||
void(*free_data)(void *data);
|
||||
void (*free_data)(void *data);
|
||||
Edje_Alignment align;
|
||||
Evas_Point padding;
|
||||
} start, end;
|
||||
Eina_List *objs;
|
||||
Eina_Bool recalculate:1;
|
||||
Eina_Bool recalculate : 1;
|
||||
Evas_Object *box;
|
||||
double progress;
|
||||
double start_progress;
|
||||
|
@ -31,7 +31,7 @@ struct _Edje_Part_Box_Animation
|
|||
};
|
||||
|
||||
static void
|
||||
_edje_box_layout_find_all(const char *name, const char *name_alt, Evas_Object_Box_Layout *cb, void **data, void (**free_data)(void *data))
|
||||
_edje_box_layout_find_all(const char *name, const char *name_alt, Evas_Object_Box_Layout *cb, void **data, void(**free_data) (void *data))
|
||||
{
|
||||
if (!_edje_box_layout_find(name, cb, data, free_data))
|
||||
{
|
||||
|
@ -253,3 +253,4 @@ _edje_box_layout_remove_child(Edje_Real_Part *rp, Evas_Object *child_obj)
|
|||
}
|
||||
rp->typedata.container->anim->recalculate = EINA_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ edje_cache_emp_free(Edje_Part_Collection_Directory_Entry *ce)
|
|||
ce->ref = NULL;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_edje_programs_patterns_init(Edje_Part_Collection *edc)
|
||||
{
|
||||
|
@ -85,7 +84,7 @@ _edje_programs_patterns_init(Edje_Part_Collection *edc)
|
|||
INF("Group '%s' programs:", edc->part);
|
||||
#define EDJE_DUMP_PROGRAM(Section) \
|
||||
for (i = 0; i < edc->programs.Section##_count; i++) \
|
||||
INF(#Section" for ('%s', '%s')", edc->programs.Section[i]->signal, edc->programs.Section[i]->source);
|
||||
INF(#Section " for ('%s', '%s')", edc->programs.Section[i]->signal, edc->programs.Section[i]->source);
|
||||
|
||||
EDJE_DUMP_PROGRAM(strcmp);
|
||||
EDJE_DUMP_PROGRAM(strncmp);
|
||||
|
@ -185,13 +184,13 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
|
|||
Edje_Part_Description_Text *text;
|
||||
unsigned int j;
|
||||
|
||||
text = (Edje_Part_Description_Text*) edc->parts[i]->default_desc;
|
||||
text = (Edje_Part_Description_Text *)edc->parts[i]->default_desc;
|
||||
text->text.align.x = TO_DOUBLE(0.0);
|
||||
text->text.align.y = TO_DOUBLE(0.0);
|
||||
|
||||
for (j = 0; j < edc->parts[i]->other.desc_count; ++j)
|
||||
{
|
||||
text = (Edje_Part_Description_Text*) edc->parts[i]->other.desc[j];
|
||||
text = (Edje_Part_Description_Text *)edc->parts[i]->other.desc[j];
|
||||
text->text.align.x = TO_DOUBLE(0.0);
|
||||
text->text.align.y = TO_DOUBLE(0.0);
|
||||
}
|
||||
|
@ -345,6 +344,7 @@ _edje_file_dangling(Edje_File *edf)
|
|||
_edje_file_hash = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Edje_File *
|
||||
|
@ -413,7 +413,7 @@ open:
|
|||
ep2 = ep;
|
||||
while (ep2->dragable.confine_id >= 0)
|
||||
{
|
||||
if (ep2->dragable.confine_id >= (int) edc->parts_count)
|
||||
if (ep2->dragable.confine_id >= (int)edc->parts_count)
|
||||
{
|
||||
ERR("confine_to above limit. invalidating it.");
|
||||
ep2->dragable.confine_id = -1;
|
||||
|
@ -435,9 +435,9 @@ open:
|
|||
ep2 = ep;
|
||||
while (ep2->dragable.event_id >= 0)
|
||||
{
|
||||
Edje_Part* prev;
|
||||
Edje_Part *prev;
|
||||
|
||||
if (ep2->dragable.event_id >= (int) edc->parts_count)
|
||||
if (ep2->dragable.event_id >= (int)edc->parts_count)
|
||||
{
|
||||
ERR("event_id above limit. invalidating it.");
|
||||
ep2->dragable.event_id = -1;
|
||||
|
@ -467,7 +467,7 @@ open:
|
|||
ep2 = ep;
|
||||
while (ep2->clip_to_id >= 0)
|
||||
{
|
||||
if (ep2->clip_to_id >= (int) edc->parts_count)
|
||||
if (ep2->clip_to_id >= (int)edc->parts_count)
|
||||
{
|
||||
ERR("clip_to_id above limit. invalidating it.");
|
||||
ep2->clip_to_id = -1;
|
||||
|
@ -499,7 +499,7 @@ void
|
|||
_edje_cache_coll_clean(Edje_File *edf)
|
||||
{
|
||||
while ((edf->collection_cache) &&
|
||||
(eina_list_count(edf->collection_cache) > (unsigned int) _edje_collection_cache_size))
|
||||
(eina_list_count(edf->collection_cache) > (unsigned int)_edje_collection_cache_size))
|
||||
{
|
||||
Edje_Part_Collection_Directory_Entry *ce;
|
||||
Edje_Part_Collection *edc;
|
||||
|
@ -609,15 +609,13 @@ _edje_file_cache_shutdown(void)
|
|||
edje_file_cache_flush();
|
||||
}
|
||||
|
||||
/*============================================================================*
|
||||
* Global *
|
||||
*============================================================================*/
|
||||
|
||||
/*============================================================================*
|
||||
* Global *
|
||||
*============================================================================*/
|
||||
|
||||
/*============================================================================*
|
||||
* API *
|
||||
*============================================================================*/
|
||||
|
||||
* API *
|
||||
*============================================================================*/
|
||||
|
||||
EAPI void
|
||||
edje_file_cache_set(int count)
|
||||
|
@ -627,14 +625,12 @@ edje_file_cache_set(int count)
|
|||
_edje_cache_file_clean();
|
||||
}
|
||||
|
||||
|
||||
EAPI int
|
||||
edje_file_cache_get(void)
|
||||
{
|
||||
return _edje_file_cache_size;
|
||||
}
|
||||
|
||||
|
||||
EAPI void
|
||||
edje_file_cache_flush(void)
|
||||
{
|
||||
|
@ -646,7 +642,6 @@ edje_file_cache_flush(void)
|
|||
_edje_file_cache_size = ps;
|
||||
}
|
||||
|
||||
|
||||
EAPI void
|
||||
edje_collection_cache_set(int count)
|
||||
{
|
||||
|
@ -660,14 +655,12 @@ edje_collection_cache_set(int count)
|
|||
/* FIXME: freach in file hash too! */
|
||||
}
|
||||
|
||||
|
||||
EAPI int
|
||||
edje_collection_cache_get(void)
|
||||
{
|
||||
return _edje_collection_cache_size;
|
||||
}
|
||||
|
||||
|
||||
EAPI void
|
||||
edje_collection_cache_flush(void)
|
||||
{
|
||||
|
@ -682,3 +675,4 @@ edje_collection_cache_flush(void)
|
|||
/* FIXME: freach in file hash too! */
|
||||
_edje_collection_cache_size = ps;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T
|
|||
COS(MUL(fp_pos,
|
||||
PI))));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_ACCELERATE:
|
||||
/* npos = 1.0 - sin((PI / 2.0) + (pos * PI / 2.0)); */
|
||||
npos = SUB(FROM_INT(1),
|
||||
|
@ -53,14 +54,17 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T
|
|||
MUL(fp_pos,
|
||||
DIV2(PI)))));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_DECELERATE:
|
||||
/* npos = sin(pos * PI / 2.0); */
|
||||
npos = SIN(MUL(fp_pos,
|
||||
DIV2(PI)));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_LINEAR:
|
||||
npos = fp_pos;
|
||||
break;
|
||||
|
||||
default:
|
||||
npos = fp_pos;
|
||||
break;
|
||||
|
@ -73,16 +77,19 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T
|
|||
ECORE_POS_MAP_SINUSOIDAL,
|
||||
0.0, 0.0));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_ACCELERATE:
|
||||
npos = FROM_DOUBLE(ecore_animator_pos_map(TO_DOUBLE(pos),
|
||||
ECORE_POS_MAP_ACCELERATE,
|
||||
0.0, 0.0));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_DECELERATE:
|
||||
npos = FROM_DOUBLE(ecore_animator_pos_map(TO_DOUBLE(pos),
|
||||
ECORE_POS_MAP_DECELERATE,
|
||||
0.0, 0.0));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_LINEAR:
|
||||
npos = fp_pos;
|
||||
/* npos = FROM_DOUBLE(ecore_animator_pos_map(TO_DOUBLE(pos),
|
||||
|
@ -90,36 +97,43 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T
|
|||
0.0, 0.0));
|
||||
*/
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_ACCELERATE_FACTOR:
|
||||
npos = FROM_DOUBLE(ecore_animator_pos_map(TO_DOUBLE(pos),
|
||||
ECORE_POS_MAP_ACCELERATE_FACTOR,
|
||||
TO_DOUBLE(v1), 0.0));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_DECELERATE_FACTOR:
|
||||
npos = FROM_DOUBLE(ecore_animator_pos_map(TO_DOUBLE(pos),
|
||||
ECORE_POS_MAP_DECELERATE_FACTOR,
|
||||
TO_DOUBLE(v1), 0.0));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR:
|
||||
npos = FROM_DOUBLE(ecore_animator_pos_map(TO_DOUBLE(pos),
|
||||
ECORE_POS_MAP_SINUSOIDAL_FACTOR,
|
||||
TO_DOUBLE(v1), 0.0));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_DIVISOR_INTERP:
|
||||
npos = FROM_DOUBLE(ecore_animator_pos_map(TO_DOUBLE(pos),
|
||||
ECORE_POS_MAP_DIVISOR_INTERP,
|
||||
TO_DOUBLE(v1), TO_DOUBLE(v2)));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_BOUNCE:
|
||||
npos = FROM_DOUBLE(ecore_animator_pos_map(TO_DOUBLE(pos),
|
||||
ECORE_POS_MAP_BOUNCE,
|
||||
TO_DOUBLE(v1), TO_DOUBLE(v2)));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_SPRING:
|
||||
npos = FROM_DOUBLE(ecore_animator_pos_map(TO_DOUBLE(pos),
|
||||
ECORE_POS_MAP_SPRING,
|
||||
TO_DOUBLE(v1), TO_DOUBLE(v2)));
|
||||
break;
|
||||
|
||||
case EDJE_TWEEN_MODE_CUBIC_BEZIER:
|
||||
v[0] = TO_DOUBLE(v1);
|
||||
v[1] = TO_DOUBLE(v2);
|
||||
|
@ -130,6 +144,7 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T
|
|||
ECORE_POS_MAP_CUBIC_BEZIER,
|
||||
4, v));
|
||||
break;
|
||||
|
||||
default:
|
||||
npos = fp_pos;
|
||||
break;
|
||||
|
@ -146,7 +161,6 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns part description
|
||||
*
|
||||
|
@ -163,7 +177,7 @@ _edje_part_make_rtl(Edje_Part_Description_Common *desc)
|
|||
double t;
|
||||
int i;
|
||||
|
||||
if(!desc)
|
||||
if (!desc)
|
||||
return;
|
||||
|
||||
/* This makes alignment right-oriented */
|
||||
|
@ -216,22 +230,22 @@ _edje_get_description_by_orientation(Edje *ed, Edje_Part_Description_Common *src
|
|||
size_t memsize = 0;
|
||||
|
||||
/* RTL flag is not set, return original description */
|
||||
if(!edje_object_mirrored_get(ed->obj))
|
||||
if (!edje_object_mirrored_get(ed->obj))
|
||||
return src;
|
||||
|
||||
if(*dst)
|
||||
if (*dst)
|
||||
return *dst; /* Was allocated before and we should use it */
|
||||
|
||||
#define EDIT_ALLOC_POOL_RTL(Short, Type, Name) \
|
||||
case EDJE_PART_TYPE_##Short: \
|
||||
{ \
|
||||
Edje_Part_Description_##Type *Name; \
|
||||
case EDJE_PART_TYPE_##Short: \
|
||||
{ \
|
||||
Edje_Part_Description_##Type * Name; \
|
||||
Name = eina_mempool_malloc(ce->mp_rtl.Short, \
|
||||
sizeof (Edje_Part_Description_##Type)); \
|
||||
desc_rtl = &Name->common; \
|
||||
memsize = sizeof(Edje_Part_Description_##Type); \
|
||||
break; \
|
||||
}
|
||||
}
|
||||
|
||||
ce = eina_hash_find(ed->file->collection, ed->group);
|
||||
|
||||
|
@ -243,18 +257,21 @@ _edje_get_description_by_orientation(Edje *ed, Edje_Part_Description_Common *src
|
|||
ce->count.RECTANGLE++;
|
||||
memsize = sizeof(Edje_Part_Description_Common);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_SWALLOW:
|
||||
desc_rtl = eina_mempool_malloc(ce->mp_rtl.SWALLOW,
|
||||
sizeof (Edje_Part_Description_Common));
|
||||
ce->count.SWALLOW++;
|
||||
memsize = sizeof(Edje_Part_Description_Common);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_GROUP:
|
||||
desc_rtl = eina_mempool_malloc(ce->mp_rtl.GROUP,
|
||||
sizeof (Edje_Part_Description_Common));
|
||||
ce->count.GROUP++;
|
||||
memsize = sizeof(Edje_Part_Description_Common);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_SPACER:
|
||||
desc_rtl = eina_mempool_malloc(ce->mp_rtl.SPACER,
|
||||
sizeof (Edje_Part_Description_Common));
|
||||
|
@ -291,8 +308,8 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, const char *state_name
|
|||
unsigned int i;
|
||||
|
||||
/* RTL flag is set, return RTL description */
|
||||
if(edje_object_mirrored_get(ed->obj))
|
||||
if(!ep->other.desc_rtl)
|
||||
if (edje_object_mirrored_get(ed->obj))
|
||||
if (!ep->other.desc_rtl)
|
||||
ep->other.desc_rtl = (Edje_Part_Description_Common **)
|
||||
calloc(ep->other.desc_count,
|
||||
sizeof (Edje_Part_Description_Common *));
|
||||
|
@ -433,7 +450,7 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_Set **set
|
|||
|
||||
image_id = _edje_image_find(ep->object, ed,
|
||||
&ep->param1.set,
|
||||
(Edje_Part_Description_Image*) ep->param1.description,
|
||||
(Edje_Part_Description_Image *)ep->param1.description,
|
||||
NULL);
|
||||
if (set) *set = ep->param1.set;
|
||||
if (image_id < 0)
|
||||
|
@ -453,7 +470,7 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_Set **set
|
|||
{
|
||||
image_count = 2;
|
||||
if (ep->param2)
|
||||
image_count += ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens_count;
|
||||
image_count += ((Edje_Part_Description_Image *)ep->param2->description)->image.tweens_count;
|
||||
image_num = TO_INT(MUL(pos, SUB(FROM_INT(image_count),
|
||||
FROM_DOUBLE(0.5))));
|
||||
if (image_num > (image_count - 1))
|
||||
|
@ -462,7 +479,7 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_Set **set
|
|||
{
|
||||
image_id = _edje_image_find(ep->object, ed,
|
||||
&ep->param1.set,
|
||||
(Edje_Part_Description_Image*) ep->param1.description,
|
||||
(Edje_Part_Description_Image *)ep->param1.description,
|
||||
NULL);
|
||||
if (set) *set = ep->param1.set;
|
||||
}
|
||||
|
@ -473,7 +490,7 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_Set **set
|
|||
{
|
||||
image_id = _edje_image_find(ep->object, ed,
|
||||
&ep->param2->set,
|
||||
(Edje_Part_Description_Image*) ep->param2->description,
|
||||
(Edje_Part_Description_Image *)ep->param2->description,
|
||||
NULL);
|
||||
if (set) *set = ep->param2->set;
|
||||
}
|
||||
|
@ -481,7 +498,7 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_Set **set
|
|||
{
|
||||
Edje_Part_Image_Id *imid;
|
||||
|
||||
imid = ((Edje_Part_Description_Image*) ep->param2->description)->image.tweens[image_num - 1];
|
||||
imid = ((Edje_Part_Description_Image *)ep->param2->description)->image.tweens[image_num - 1];
|
||||
image_id = _edje_image_find(ep->object, ed, NULL, NULL, imid);
|
||||
if (set) *set = NULL;
|
||||
}
|
||||
|
@ -514,21 +531,27 @@ _edje_real_part_image_set(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part_Set **set
|
|||
case EVAS_LOAD_ERROR_GENERIC:
|
||||
ERR("Error type: EVAS_LOAD_ERROR_GENERIC");
|
||||
break;
|
||||
|
||||
case EVAS_LOAD_ERROR_DOES_NOT_EXIST:
|
||||
ERR("Error type: EVAS_LOAD_ERROR_DOES_NOT_EXIST");
|
||||
break;
|
||||
|
||||
case EVAS_LOAD_ERROR_PERMISSION_DENIED:
|
||||
ERR("Error type: EVAS_LOAD_ERROR_PERMISSION_DENIED");
|
||||
break;
|
||||
|
||||
case EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED:
|
||||
ERR("Error type: EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED");
|
||||
break;
|
||||
|
||||
case EVAS_LOAD_ERROR_CORRUPT_FILE:
|
||||
ERR("Error type: EVAS_LOAD_ERROR_CORRUPT_FILE");
|
||||
break;
|
||||
|
||||
case EVAS_LOAD_ERROR_UNKNOWN_FORMAT:
|
||||
ERR("Error type: EVAS_LOAD_ERROR_UNKNOWN_FORMAT");
|
||||
break;
|
||||
|
||||
default:
|
||||
ERR("Error type: ???");
|
||||
break;
|
||||
|
@ -552,7 +575,7 @@ _edje_real_part_rel_to_apply(Edje *ed EINA_UNUSED,
|
|||
if ((ep->type != EDJE_RP_TYPE_SWALLOW) ||
|
||||
(!ep->typedata.swallow)) return;
|
||||
|
||||
external = (Edje_Part_Description_External*)state->description;
|
||||
external = (Edje_Part_Description_External *)state->description;
|
||||
|
||||
if (state->external_params)
|
||||
_edje_external_parsed_params_free(ep->typedata.swallow->swallowed_object, state->external_params);
|
||||
|
@ -579,7 +602,7 @@ _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, EINA_TRUE);
|
||||
|
||||
epdi = (Edje_Part_Description_Image*) epd2;
|
||||
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 && (epd1 != epd2 || (ep->part->type == EDJE_PART_TYPE_IMAGE && epdi->image.tweens_count)))
|
||||
{
|
||||
|
@ -615,9 +638,9 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
|
|||
if (ep->param2)
|
||||
{
|
||||
free(ep->param2->set);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &ep->param2->p.map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&ep->param2->p.map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &ep->param2->p.physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&ep->param2->p.physics);
|
||||
#endif
|
||||
}
|
||||
eina_mempool_free(_edje_real_part_state_mp, ep->param2);
|
||||
|
@ -775,12 +798,15 @@ _edje_recalc_do(Edje *ed)
|
|||
ed->collection->limits.parts[i].width = EDJE_PART_LIMIT_UNKNOWN;
|
||||
ed->collection->limits.parts[i].height = EDJE_PART_LIMIT_UNKNOWN;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
ed->collection->limits.parts[i].height = EDJE_PART_LIMIT_UNKNOWN;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ed->collection->limits.parts[i].width = EDJE_PART_LIMIT_UNKNOWN;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
break;
|
||||
}
|
||||
|
@ -850,9 +876,11 @@ _edje_part_dragable_calc(Edje *ed EINA_UNUSED, Edje_Real_Part *ep, FLOAT_T *x, F
|
|||
int ret = 0;
|
||||
|
||||
if ((ep->part->dragable.x != 0) &&
|
||||
(ep->part->dragable.y != 0 )) ret = 3;
|
||||
else if (ep->part->dragable.x != 0) ret = 1;
|
||||
else if (ep->part->dragable.y != 0) ret = 2;
|
||||
(ep->part->dragable.y != 0)) ret = 3;
|
||||
else if (ep->part->dragable.x != 0)
|
||||
ret = 1;
|
||||
else if (ep->part->dragable.y != 0)
|
||||
ret = 2;
|
||||
|
||||
dx = FROM_INT(ep->x - ep->drag->confine_to->x);
|
||||
dw = FROM_INT(ep->drag->confine_to->w - ep->w);
|
||||
|
@ -1026,15 +1054,19 @@ _edje_part_recalc_single_aspect(Edje *ed,
|
|||
case EDJE_ASPECT_CONTROL_NEITHER:
|
||||
apref = EDJE_ASPECT_PREFER_NONE;
|
||||
break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_HORIZONTAL:
|
||||
apref = EDJE_ASPECT_PREFER_HORIZONTAL;
|
||||
break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_VERTICAL:
|
||||
apref = EDJE_ASPECT_PREFER_VERTICAL;
|
||||
break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_BOTH:
|
||||
apref = EDJE_ASPECT_PREFER_BOTH;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1067,6 +1099,7 @@ _edje_part_recalc_single_aspect(Edje *ed,
|
|||
new_h = params->eval.h;
|
||||
}
|
||||
break;
|
||||
|
||||
/* prefer vertical size as determiner */
|
||||
case EDJE_ASPECT_PREFER_VERTICAL:
|
||||
/* keep both dimensions in check */
|
||||
|
@ -1077,6 +1110,7 @@ _edje_part_recalc_single_aspect(Edje *ed,
|
|||
if ((amin > ZERO) && (aspect < amin))
|
||||
new_w = MUL(amin, params->eval.h);
|
||||
break;
|
||||
|
||||
/* prefer horizontal size as determiner */
|
||||
case EDJE_ASPECT_PREFER_HORIZONTAL:
|
||||
/* keep both dimensions in check */
|
||||
|
@ -1087,6 +1121,7 @@ _edje_part_recalc_single_aspect(Edje *ed,
|
|||
if ((amin > ZERO) && (aspect < amin))
|
||||
new_h = DIV(params->eval.w, amin);
|
||||
break;
|
||||
|
||||
case EDJE_ASPECT_PREFER_SOURCE:
|
||||
case EDJE_ASPECT_PREFER_BOTH:
|
||||
/* keep both dimensions in check */
|
||||
|
@ -1103,6 +1138,7 @@ _edje_part_recalc_single_aspect(Edje *ed,
|
|||
new_h = DIV(params->eval.w, amin);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1240,9 +1276,9 @@ _edje_part_recalc_single_textblock_scale_range_adjust(Edje_Part_Description_Text
|
|||
size = chosen_desc->text.size * scale;
|
||||
|
||||
if ((size > max) && (max > 0))
|
||||
scale = max / (double) chosen_desc->text.size;
|
||||
scale = max / (double)chosen_desc->text.size;
|
||||
else if (size < min)
|
||||
scale = min / (double) chosen_desc->text.size;
|
||||
scale = min / (double)chosen_desc->text.size;
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
@ -1392,7 +1428,6 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
|
|||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (stl)
|
||||
|
@ -1523,7 +1558,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
|
|||
* -- Gustavo Barbieri at 20-Aug-2011
|
||||
*/
|
||||
{
|
||||
int mw, mh,size;
|
||||
int mw, mh, size;
|
||||
char *sfont = NULL;
|
||||
|
||||
_edje_text_class_font_get(ed, desc, &size, &sfont);
|
||||
|
@ -1557,6 +1592,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
|
|||
if (mh > *minh) *minh = mh;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
{
|
||||
char *sfont = NULL;
|
||||
|
@ -1769,6 +1805,7 @@ _edje_part_recalc_single_min(Edje_Part_Description_Common *desc,
|
|||
{
|
||||
case EDJE_ASPECT_PREFER_NONE:
|
||||
break;
|
||||
|
||||
case EDJE_ASPECT_PREFER_VERTICAL:
|
||||
tmp = DIV(SCALE(params->eval.w, minh), h);
|
||||
if (tmp >= FROM_INT(minw))
|
||||
|
@ -1776,6 +1813,7 @@ _edje_part_recalc_single_min(Edje_Part_Description_Common *desc,
|
|||
minw = TO_INT(tmp);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_ASPECT_PREFER_HORIZONTAL:
|
||||
tmp = DIV(SCALE(params->eval.h, minw), w);
|
||||
if (tmp >= FROM_INT(minh))
|
||||
|
@ -1783,6 +1821,7 @@ _edje_part_recalc_single_min(Edje_Part_Description_Common *desc,
|
|||
minh = TO_INT(tmp);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_ASPECT_PREFER_SOURCE:
|
||||
case EDJE_ASPECT_PREFER_BOTH:
|
||||
tmp = DIV(SCALE(params->eval.w, minh), h);
|
||||
|
@ -1836,6 +1875,7 @@ _edje_part_recalc_single_max(Edje_Part_Description_Common *desc,
|
|||
{
|
||||
case EDJE_ASPECT_PREFER_NONE:
|
||||
break;
|
||||
|
||||
case EDJE_ASPECT_PREFER_VERTICAL:
|
||||
tmp = DIV(SCALE(params->eval.w, maxh), h);
|
||||
if (tmp <= FROM_INT(maxw))
|
||||
|
@ -1843,6 +1883,7 @@ _edje_part_recalc_single_max(Edje_Part_Description_Common *desc,
|
|||
maxw = TO_INT(tmp);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_ASPECT_PREFER_HORIZONTAL:
|
||||
tmp = DIV(SCALE(params->eval.h, maxw), w);
|
||||
if (tmp <= FROM_INT(maxh))
|
||||
|
@ -1850,6 +1891,7 @@ _edje_part_recalc_single_max(Edje_Part_Description_Common *desc,
|
|||
maxh = TO_INT(tmp);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_ASPECT_PREFER_SOURCE:
|
||||
case EDJE_ASPECT_PREFER_BOTH:
|
||||
tmp = DIV(SCALE(params->eval.w, maxh), h);
|
||||
|
@ -1939,7 +1981,8 @@ _edje_part_recalc_single_drag(Edje_Real_Part *ep,
|
|||
v = SCALE(ep->drag->size.x, confine_to->w);
|
||||
|
||||
if ((minw > 0) && (TO_INT(v) < minw)) params->eval.w = FROM_INT(minw);
|
||||
else if ((maxw >= 0) && (TO_INT(v) > maxw)) params->eval.w = FROM_INT(maxw);
|
||||
else if ((maxw >= 0) && (TO_INT(v) > maxw))
|
||||
params->eval.w = FROM_INT(maxw);
|
||||
else params->eval.w = v;
|
||||
|
||||
offset = TO_INT(SCALE(ep->drag->x, (confine_to->w - TO_INT(params->eval.w))))
|
||||
|
@ -1960,7 +2003,8 @@ _edje_part_recalc_single_drag(Edje_Real_Part *ep,
|
|||
v = SCALE(ep->drag->size.y, confine_to->h);
|
||||
|
||||
if ((minh > 0) && (TO_INT(v) < minh)) params->eval.h = FROM_INT(minh);
|
||||
else if ((maxh >= 0) && (TO_INT(v) > maxh)) params->eval.h = FROM_INT(maxh);
|
||||
else if ((maxh >= 0) && (TO_INT(v) > maxh))
|
||||
params->eval.h = FROM_INT(maxh);
|
||||
else params->eval.h = v;
|
||||
|
||||
offset = TO_INT(SCALE(ep->drag->y, (confine_to->h - TO_INT(params->eval.h))))
|
||||
|
@ -2359,7 +2403,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
case EDJE_PART_TYPE_IMAGE:
|
||||
{
|
||||
Edje_Real_Part_Set *set;
|
||||
Edje_Part_Description_Image *img_desc = (Edje_Part_Description_Image*) desc;
|
||||
Edje_Part_Description_Image *img_desc = (Edje_Part_Description_Image *)desc;
|
||||
|
||||
_edje_real_part_image_set(ed, ep, &set, pos);
|
||||
|
||||
|
@ -2385,10 +2429,11 @@ _edje_part_recalc_single(Edje *ed,
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
case EDJE_PART_TYPE_TEXTBLOCK:
|
||||
{
|
||||
Edje_Part_Description_Text *text_desc = (Edje_Part_Description_Text*) desc;
|
||||
Edje_Part_Description_Text *text_desc = (Edje_Part_Description_Text *)desc;
|
||||
|
||||
/* text.align */
|
||||
params->type.text.align.x = text_desc->text.align.x;
|
||||
|
@ -2421,6 +2466,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_PART_TYPE_SPACER:
|
||||
case EDJE_PART_TYPE_RECTANGLE:
|
||||
case EDJE_PART_TYPE_BOX:
|
||||
|
@ -2429,18 +2475,20 @@ _edje_part_recalc_single(Edje *ed,
|
|||
case EDJE_PART_TYPE_GROUP:
|
||||
case EDJE_PART_TYPE_PROXY:
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_GRADIENT:
|
||||
/* FIXME: THIS ONE SHOULD NEVER BE TRIGGERED. */
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* 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, (Edje_Part_Description_Text*) 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, (Edje_Part_Description_Text*) desc, (Edje_Part_Description_Text*) 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);
|
||||
|
||||
if ((ep->part->type == EDJE_PART_TYPE_TABLE) &&
|
||||
(((((Edje_Part_Description_Table *)chosen_desc)->table.min.h) ||
|
||||
|
@ -2638,7 +2686,7 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
int part_id = -1;
|
||||
|
||||
if (ep->param2 && (pos >= FROM_DOUBLE(0.5)))
|
||||
part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id;
|
||||
part_id = ((Edje_Part_Description_Proxy *)ep->param2->description)->proxy.id;
|
||||
else
|
||||
part_id = chosen_desc->proxy.id;
|
||||
|
||||
|
@ -2667,9 +2715,11 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
case EDJE_PART_TYPE_PROXY:
|
||||
evas_object_image_source_set(ep->object, pp->object);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_GRADIENT:
|
||||
/* FIXME: THIS ONE SHOULD NEVER BE TRIGGERED. */
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_GROUP:
|
||||
case EDJE_PART_TYPE_SWALLOW:
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
|
@ -2679,6 +2729,7 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
evas_object_image_source_set(ep->object, pp->typedata.swallow->swallowed_object);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_SPACER:
|
||||
/* FIXME: detect that at compile time and prevent it */
|
||||
break;
|
||||
|
@ -2772,7 +2823,7 @@ _edje_real_part_state_get(Edje *ed, Edje_Real_Part *ep, int flags, int id, int *
|
|||
#ifdef EDJE_CALC_CACHE
|
||||
if (state) *state = result->state;
|
||||
#else
|
||||
(void) state;
|
||||
(void)state;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -2785,7 +2836,7 @@ _edje_physics_world_geometry_check(EPhysics_World *world)
|
|||
{
|
||||
Evas_Coord w, h, d;
|
||||
ephysics_world_render_geometry_get(world, NULL, NULL, NULL, &w, &h, &d);
|
||||
return (w && h && d);
|
||||
return w && h && d;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2879,48 +2930,61 @@ _edje_physics_body_add(Edje *ed, Edje_Real_Part *rp, EPhysics_World *world)
|
|||
case EDJE_PART_PHYSICS_BODY_RIGID_BOX:
|
||||
rp->body = ephysics_body_box_add(world);
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_RIGID_SPHERE:
|
||||
rp->body = ephysics_body_sphere_add(world);
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_RIGID_CYLINDER:
|
||||
rp->body = ephysics_body_cylinder_add(world);
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_SOFT_BOX:
|
||||
rp->body = ephysics_body_soft_box_add(world);
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_SOFT_SPHERE:
|
||||
rp->body = ephysics_body_soft_sphere_add(world, 0);
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_SOFT_CYLINDER:
|
||||
rp->body = ephysics_body_soft_cylinder_add(world);
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_CLOTH:
|
||||
rp->body = ephysics_body_cloth_add(world, 0, 0);
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_BOUNDARY_TOP:
|
||||
rp->body = ephysics_body_top_boundary_add(world);
|
||||
resize = EINA_FALSE;
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_BOUNDARY_BOTTOM:
|
||||
rp->body = ephysics_body_bottom_boundary_add(world);
|
||||
resize = EINA_FALSE;
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_BOUNDARY_RIGHT:
|
||||
rp->body = ephysics_body_right_boundary_add(world);
|
||||
resize = EINA_FALSE;
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_BOUNDARY_LEFT:
|
||||
rp->body = ephysics_body_left_boundary_add(world);
|
||||
resize = EINA_FALSE;
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_BOUNDARY_FRONT:
|
||||
rp->body = ephysics_body_front_boundary_add(world);
|
||||
resize = EINA_FALSE;
|
||||
break;
|
||||
|
||||
case EDJE_PART_PHYSICS_BODY_BOUNDARY_BACK:
|
||||
rp->body = ephysics_body_back_boundary_add(world);
|
||||
resize = EINA_FALSE;
|
||||
break;
|
||||
|
||||
default:
|
||||
ERR("Invalid body: %i", rp->part->physics_body);
|
||||
return;
|
||||
|
@ -2949,6 +3013,7 @@ _edje_physics_body_add(Edje *ed, Edje_Real_Part *rp, EPhysics_World *world)
|
|||
_edje_physics_body_update_cb, rp);
|
||||
ephysics_body_data_set(rp->body, ed);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define FINTP(_x1, _x2, _p) \
|
||||
|
@ -2970,9 +3035,9 @@ _map_colors_free(Edje_Calc_Params *pf)
|
|||
Edje_Map_Color **colors = pf->map->colors;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < (int) pf->map->colors_count; i++)
|
||||
for (i = 0; i < (int)pf->map->colors_count; i++)
|
||||
free(colors[i]);
|
||||
free (colors);
|
||||
free(colors);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -2987,7 +3052,7 @@ _map_colors_interp(Edje_Calc_Params *p1, Edje_Calc_Params *p2,
|
|||
{
|
||||
pmap->colors_count = (p1->map->colors_count > p2->map->colors_count ? p1->map->colors_count : p2->map->colors_count);
|
||||
|
||||
pmap->colors = (Edje_Map_Color **) malloc(sizeof(Edje_Map_Color *) * (int) pmap->colors_count);
|
||||
pmap->colors = (Edje_Map_Color **)malloc(sizeof(Edje_Map_Color *) * (int)pmap->colors_count);
|
||||
|
||||
for (i = 0; i < (int)p1->map->colors_count; i++)
|
||||
{
|
||||
|
@ -3071,9 +3136,9 @@ _edje_map_prop_set(Evas_Map *map, const Edje_Calc_Params *pf,
|
|||
|
||||
evas_object_image_size_get(mo, &iw, &ih);
|
||||
evas_map_point_image_uv_set(map, 0, 0.0, 0.0);
|
||||
evas_map_point_image_uv_set(map, 1, iw , 0.0);
|
||||
evas_map_point_image_uv_set(map, 2, iw , ih );
|
||||
evas_map_point_image_uv_set(map, 3, 0.0, ih );
|
||||
evas_map_point_image_uv_set(map, 1, iw, 0.0);
|
||||
evas_map_point_image_uv_set(map, 2, iw, ih);
|
||||
evas_map_point_image_uv_set(map, 3, 0.0, ih);
|
||||
}
|
||||
|
||||
//map color
|
||||
|
@ -3408,9 +3473,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
int part_id = -1;
|
||||
|
||||
if (ep->param2 && (pos >= FROM_DOUBLE(0.5)))
|
||||
part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id;
|
||||
part_id = ((Edje_Part_Description_Proxy *)ep->param2->description)->proxy.id;
|
||||
else
|
||||
part_id = ((Edje_Part_Description_Proxy*) chosen_desc)->proxy.id;
|
||||
part_id = ((Edje_Part_Description_Proxy *)chosen_desc)->proxy.id;
|
||||
|
||||
#ifdef EDJE_CALC_CACHE
|
||||
Edje_Real_Part *pp;
|
||||
|
@ -3508,7 +3573,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
#ifdef HAVE_EPHYSICS
|
||||
p1->physics = physics;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
p3 = &lp3;
|
||||
|
@ -3555,7 +3619,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
|
||||
pos2 = pos;
|
||||
if (pos2 < ZERO) pos2 = ZERO;
|
||||
else if (pos2 > FROM_INT(1)) pos2 = FROM_INT(1);
|
||||
else if (pos2 > FROM_INT(1))
|
||||
pos2 = FROM_INT(1);
|
||||
beginning_pos = (pos < FROM_DOUBLE(0.5));
|
||||
part_type = ep->part->type;
|
||||
|
||||
|
@ -3670,14 +3735,17 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
p3->type.common.spec.image.t = INTP(p1->type.common.spec.image.t, p2->type.common.spec.image.t, pos);
|
||||
p3->type.common.spec.image.b = INTP(p1->type.common.spec.image.b, p2->type.common.spec.image.b, pos);
|
||||
p3->type.common.spec.image.border_scale_by = FFP(p1->type.common.spec.image.border_scale_by, p2->type.common.spec.image.border_scale_by, pos);
|
||||
|
||||
case EDJE_PART_TYPE_PROXY:
|
||||
p3->type.common.fill.x = INTP(p1->type.common.fill.x, p2->type.common.fill.x, pos);
|
||||
p3->type.common.fill.y = INTP(p1->type.common.fill.y, p2->type.common.fill.y, pos);
|
||||
p3->type.common.fill.w = INTP(p1->type.common.fill.w, p2->type.common.fill.w, pos);
|
||||
p3->type.common.fill.h = INTP(p1->type.common.fill.h, p2->type.common.fill.h, pos);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
p3->type.text.size = INTP(p1->type.text.size, p2->type.text.size, pos);
|
||||
|
||||
/* no break as we share code with the TEXTBLOCK type here. Intended fall-through */
|
||||
case EDJE_PART_TYPE_TEXTBLOCK:
|
||||
p3->type.text.color2.r = INTP(p1->type.text.color2.r, p2->type.text.color2.r, pos2);
|
||||
|
@ -3764,9 +3832,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
}
|
||||
|
||||
#ifndef EDJE_CALC_CACHE
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &lp2.map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&lp2.map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &lp2.physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&lp2.physics);
|
||||
#endif
|
||||
#endif
|
||||
pf = p3;
|
||||
|
@ -3836,9 +3904,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
#ifdef HAVE_EPHYSICS
|
||||
state->physics = physics;
|
||||
#endif
|
||||
eina_cow_memcpy(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &state->map, pf->map);
|
||||
eina_cow_memcpy(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&state->map, pf->map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_memcpy(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &state->physics, pf->physics);
|
||||
eina_cow_memcpy(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&state->physics, pf->physics);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -3866,12 +3934,13 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
{
|
||||
case EDJE_PART_TYPE_IMAGE:
|
||||
{
|
||||
Edje_Part_Description_Image *img_desc = (Edje_Part_Description_Image*) chosen_desc;
|
||||
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);
|
||||
/* No break here as we share the rest of the code for all types. Intended fall-through*/
|
||||
}
|
||||
|
||||
case EDJE_PART_TYPE_PROXY:
|
||||
case EDJE_PART_TYPE_RECTANGLE:
|
||||
case EDJE_PART_TYPE_TEXTBLOCK:
|
||||
|
@ -3910,6 +3979,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
break;
|
||||
}
|
||||
evas_object_show(ep->object);
|
||||
|
||||
#endif
|
||||
/* move and resize are needed for all previous object => no break here. */
|
||||
case EDJE_PART_TYPE_SWALLOW:
|
||||
|
@ -3943,9 +4013,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
efl_gfx_size_set(pf->final.w, pf->final.h));
|
||||
#endif
|
||||
|
||||
if (ep->nested_smart)
|
||||
{ /* Move, Resize all nested parts */
|
||||
/* Not really needed but will improve the bounding box evaluation done by Evas */
|
||||
if (ep->nested_smart) /* Move, Resize all nested parts */
|
||||
{ /* Not really needed but will improve the bounding box evaluation done by Evas */
|
||||
eo_do(ep->nested_smart,
|
||||
efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
|
||||
efl_gfx_size_set(pf->final.w, pf->final.h));
|
||||
|
@ -3953,13 +4022,16 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
_edje_entry_real_part_configure(ed, ep);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
/* This is correctly handle in _edje_text_recalc_apply at the moment. */
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_GRADIENT:
|
||||
/* FIXME: definitivly remove this code when we switch to new format. */
|
||||
abort();
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_SPACER:
|
||||
/* We really should do nothing on SPACER part */
|
||||
break;
|
||||
|
@ -3969,33 +4041,41 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
switch (ep->part->type)
|
||||
{
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
_edje_text_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc, EINA_FALSE);
|
||||
_edje_text_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text *)chosen_desc, EINA_FALSE);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_PROXY:
|
||||
_edje_proxy_recalc_apply(ed, ep, pf, (Edje_Part_Description_Proxy*) chosen_desc, pos);
|
||||
_edje_proxy_recalc_apply(ed, ep, pf, (Edje_Part_Description_Proxy *)chosen_desc, pos);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_IMAGE:
|
||||
_edje_image_recalc_apply(ed, ep, pf, (Edje_Part_Description_Image*) 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, (Edje_Part_Description_Box*) 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, (Edje_Part_Description_Table*) chosen_desc);
|
||||
_edje_table_recalc_apply(ed, ep, pf, (Edje_Part_Description_Table *)chosen_desc);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_TEXTBLOCK:
|
||||
_edje_textblock_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc);
|
||||
_edje_textblock_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text *)chosen_desc);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
case EDJE_PART_TYPE_RECTANGLE:
|
||||
case EDJE_PART_TYPE_SWALLOW:
|
||||
case EDJE_PART_TYPE_GROUP:
|
||||
/* Nothing special to do for this type of object. */
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_GRADIENT:
|
||||
/* FIXME: definitivly remove this code when we switch to new format. */
|
||||
abort();
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_SPACER:
|
||||
/* We really should do nothing on SPACER part */
|
||||
break;
|
||||
|
@ -4044,8 +4124,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
}
|
||||
else
|
||||
{
|
||||
if (ep->nested_smart)
|
||||
{ /* Cancel map of smart obj holding nested parts */
|
||||
if (ep->nested_smart) /* Cancel map of smart obj holding nested parts */
|
||||
{
|
||||
eo_do(ep->nested_smart,
|
||||
evas_obj_map_enable_set(EINA_FALSE),
|
||||
evas_obj_map_set(NULL));
|
||||
|
@ -4079,7 +4159,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
ep->w = pf->final.w;
|
||||
ep->h = pf->final.h;
|
||||
#ifdef HAVE_EPHYSICS
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ep->calculated |= flags;
|
||||
|
@ -4087,10 +4168,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
|
||||
if (pf == &lp3)
|
||||
{
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &lp3.map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&lp3.map);
|
||||
lp3.map = NULL;
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &lp3.physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&lp3.physics);
|
||||
lp3.physics = NULL;
|
||||
#endif
|
||||
}
|
||||
|
@ -4102,9 +4183,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
|
|||
ep->invalidate = EINA_FALSE;
|
||||
}
|
||||
#else
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &lp1.map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&lp1.map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &lp1.physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&lp1.physics);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ _edje_focus_in_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc E
|
|||
return EO_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_edje_focus_out_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
|
@ -52,7 +51,6 @@ _edje_focus_out_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc
|
|||
return EO_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_edje_mouse_in_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
|
||||
{
|
||||
|
@ -71,7 +69,6 @@ _edje_mouse_in_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc E
|
|||
return EO_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_edje_mouse_out_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
|
||||
{
|
||||
|
@ -90,7 +87,6 @@ _edje_mouse_out_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc
|
|||
return EO_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_edje_mouse_down_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
|
||||
{
|
||||
|
@ -160,7 +156,6 @@ _edje_mouse_down_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc
|
|||
return EO_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_edje_mouse_up_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
|
||||
{
|
||||
|
@ -234,7 +229,6 @@ _edje_mouse_up_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc E
|
|||
return EO_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_edje_mouse_move_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
|
||||
{
|
||||
|
@ -260,7 +254,6 @@ _edje_mouse_move_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc
|
|||
|
||||
if (rp->still_in)
|
||||
{
|
||||
|
||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
|
||||
rp->still_in = EINA_FALSE;
|
||||
else
|
||||
|
@ -333,7 +326,6 @@ _edje_mouse_move_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc
|
|||
return EO_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_edje_mouse_wheel_signal_cb(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
|
||||
{
|
||||
|
@ -355,7 +347,6 @@ _edje_mouse_wheel_signal_cb(void *data, Eo *obj, const Eo_Event_Description *des
|
|||
return EO_CALLBACK_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
Eina_Bool
|
||||
_edje_timer_cb(void *data EINA_UNUSED)
|
||||
{
|
||||
|
@ -421,7 +412,7 @@ _edje_timer_cb(void *data EINA_UNUSED)
|
|||
}
|
||||
ed->walking_actions = EINA_FALSE;
|
||||
}
|
||||
break_prog:
|
||||
break_prog:
|
||||
_edje_unblock(ed);
|
||||
_edje_util_thaw(ed);
|
||||
_edje_unref(ed);
|
||||
|
@ -483,3 +474,4 @@ _edje_callbacks_focus_del(Evas_Object *obj, Edje *ed)
|
|||
eo_do(obj, eo_event_callback_array_del(edje_focus_callbacks(), ed));
|
||||
evas_object_data_del(obj, "real_part");
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@ _edje_container_relayout(Smart_Data *sd)
|
|||
if (!sd->need_layout) return;
|
||||
|
||||
if (sd->w < sd->min_w) sw = sd->min_w;
|
||||
else if (sd->w > sd->max_w) sw = sd->max_w;
|
||||
else if (sd->w > sd->max_w)
|
||||
sw = sd->max_w;
|
||||
else sw = sd->w;
|
||||
|
||||
y = 0;
|
||||
|
@ -162,19 +163,18 @@ _edje_item_recalc(Edje_Item *ei)
|
|||
_edje_container_recalc(ei->sd);
|
||||
}
|
||||
|
||||
|
||||
/*****************************/
|
||||
/**
|
||||
* @endcond
|
||||
*/
|
||||
|
||||
/*============================================================================*
|
||||
* Global *
|
||||
*============================================================================*/
|
||||
* Global *
|
||||
*============================================================================*/
|
||||
|
||||
/*============================================================================*
|
||||
* API *
|
||||
*============================================================================*/
|
||||
* API *
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @addtogroup Edje_container_Group Container
|
||||
|
@ -318,8 +318,6 @@ edje_item_overlay_object_set(Edje_Item *ei, Evas_Object *obj)
|
|||
evas_object_smart_member_add(((Smart_Data *)(ei->sd))->smart_obj, obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Evas_Object *
|
||||
edje_item_overlay_object_get(Edje_Item *ei)
|
||||
{
|
||||
|
@ -811,15 +809,15 @@ edje_container_scroll_get(Evas_Object *obj, double *pos, double *shift)
|
|||
}
|
||||
|
||||
static void _smart_init(void);
|
||||
static void _smart_add(Evas_Object * obj);
|
||||
static void _smart_del(Evas_Object * obj);
|
||||
static void _smart_move(Evas_Object * obj, Evas_Coord x, Evas_Coord y);
|
||||
static void _smart_resize(Evas_Object * obj, Evas_Coord w, Evas_Coord h);
|
||||
static void _smart_show(Evas_Object * obj);
|
||||
static void _smart_hide(Evas_Object * obj);
|
||||
static void _smart_color_set(Evas_Object * obj, int r, int g, int b, int a);
|
||||
static void _smart_clip_set(Evas_Object * obj, Evas_Object * clip);
|
||||
static void _smart_clip_unset(Evas_Object * obj);
|
||||
static void _smart_add(Evas_Object *obj);
|
||||
static void _smart_del(Evas_Object *obj);
|
||||
static void _smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
||||
static void _smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
|
||||
static void _smart_show(Evas_Object *obj);
|
||||
static void _smart_hide(Evas_Object *obj);
|
||||
static void _smart_color_set(Evas_Object *obj, int r, int g, int b, int a);
|
||||
static void _smart_clip_set(Evas_Object *obj, Evas_Object *clip);
|
||||
static void _smart_clip_unset(Evas_Object *obj);
|
||||
|
||||
static Evas_Smart *smart = NULL;
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ _edje_collection_string_free(void *data)
|
|||
{
|
||||
Edje_File *edf;
|
||||
|
||||
edf = (Edje_File*) _edje_file_get();
|
||||
edf = (Edje_File *)_edje_file_get();
|
||||
|
||||
if (!edf->warning)
|
||||
CRI("This program as probably called edje_shutdown() with "
|
||||
|
@ -163,7 +163,7 @@ _edje_file_convert(Eet_File *file, Old_Edje_File *oedf)
|
|||
{
|
||||
edf->fonts = eina_hash_string_small_new(_edje_font_string_free);
|
||||
edf->collection = eina_hash_string_small_new(_edje_collection_string_free);
|
||||
edf->data = eina_hash_string_small_new((Eina_Free_Cb) eina_stringshare_del);
|
||||
edf->data = eina_hash_string_small_new((Eina_Free_Cb)eina_stringshare_del);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ _edje_file_convert(Eet_File *file, Old_Edje_File *oedf)
|
|||
|
||||
return edf;
|
||||
|
||||
on_error:
|
||||
on_error:
|
||||
eina_hash_free(edf->fonts);
|
||||
eina_hash_free(edf->collection);
|
||||
eina_hash_free(edf->data);
|
||||
|
@ -243,7 +243,7 @@ _edje_collection_program_add(Edje_Program ***array,
|
|||
{
|
||||
Edje_Program **tmp;
|
||||
|
||||
tmp = realloc(*array, sizeof (Edje_Program*) * (*count + 1));
|
||||
tmp = realloc(*array, sizeof (Edje_Program *) * (*count + 1));
|
||||
if (!tmp) return;
|
||||
|
||||
tmp[(*count)++] = add;
|
||||
|
@ -269,11 +269,10 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
|
|||
int *count;
|
||||
int dummy = 0;
|
||||
|
||||
|
||||
switch (part->type)
|
||||
{
|
||||
#define CSP(Tp, Ce) \
|
||||
case EDJE_PART_TYPE_##Tp : \
|
||||
case EDJE_PART_TYPE_##Tp: \
|
||||
count = &Ce->count.Tp; \
|
||||
break;
|
||||
|
||||
|
@ -286,6 +285,7 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
|
|||
CSP(BOX, ce);
|
||||
CSP(TABLE, ce);
|
||||
CSP(EXTERNAL, ce);
|
||||
|
||||
default:
|
||||
count = &dummy;
|
||||
break;
|
||||
|
@ -365,7 +365,7 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
|
|||
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*));
|
||||
replacement->other_desc = calloc(replacement->other_count, sizeof (Edje_Part_Description_Common *));
|
||||
|
||||
i = 0;
|
||||
EINA_LIST_FREE(part->other_desc, oepd)
|
||||
|
@ -381,7 +381,7 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
|
|||
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*));
|
||||
replacement->items = calloc(replacement->items_count, sizeof (Edje_Pack_Element *));
|
||||
|
||||
i = 0;
|
||||
EINA_LIST_FREE(part->items, elm)
|
||||
|
@ -420,7 +420,7 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
|
|||
return edc;
|
||||
}
|
||||
|
||||
Edje_Part_Description_Common*
|
||||
Edje_Part_Description_Common *
|
||||
_edje_description_convert(int type,
|
||||
Edje_Part_Collection_Directory_Entry *ce,
|
||||
Old_Edje_Part_Description *oed)
|
||||
|
@ -433,10 +433,12 @@ _edje_description_convert(int type,
|
|||
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));
|
||||
|
@ -452,7 +454,7 @@ _edje_description_convert(int type,
|
|||
|
||||
img->image.tweens_count = eina_list_count(oed->image.tween_list);
|
||||
img->image.tweens = calloc(img->image.tweens_count,
|
||||
sizeof (Edje_Part_Image_Id*));
|
||||
sizeof (Edje_Part_Image_Id *));
|
||||
if (img->image.tweens_count > 0 && !img->image.tweens)
|
||||
{
|
||||
eina_mempool_free(ce->mp.IMAGE, img);
|
||||
|
@ -474,15 +476,15 @@ _edje_description_convert(int type,
|
|||
}
|
||||
|
||||
#define CONVERT_ALLOC_POOL(Short, Type, Name) \
|
||||
case EDJE_PART_TYPE_##Short: \
|
||||
{ \
|
||||
Edje_Part_Description_##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; \
|
||||
}
|
||||
}
|
||||
|
||||
CONVERT_ALLOC_POOL(TEXT, Text, text);
|
||||
CONVERT_ALLOC_POOL(TEXTBLOCK, Text, text);
|
||||
|
@ -496,3 +498,4 @@ _edje_description_convert(int type,
|
|||
free(oed);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "edje_private.h"
|
||||
|
||||
EAPI Eet_Data_Descriptor *_edje_edd_edje_file = NULL;
|
||||
EAPI Eet_Data_Descriptor *_edje_edd_edje_part_collection = NULL;
|
||||
EAPI Eet_Data_Descriptor * _edje_edd_edje_file = NULL;
|
||||
EAPI Eet_Data_Descriptor * _edje_edd_edje_part_collection = NULL;
|
||||
|
||||
Eet_Data_Descriptor *_edje_edd_edje_string = NULL;
|
||||
Eet_Data_Descriptor *_edje_edd_edje_style = NULL;
|
||||
|
@ -137,7 +137,8 @@ mem_free_part(void *data)
|
|||
(eed) = NULL; \
|
||||
}
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Edje_Part_Type type;
|
||||
const char *name;
|
||||
} variant_convertion[] = {
|
||||
|
@ -287,10 +288,10 @@ _edje_edd_shutdown(void)
|
|||
|
||||
#define EDJE_DEFINE_POINTER_TYPE(Type, Name) \
|
||||
{ \
|
||||
typedef struct _Edje_##Type##_Pointer Edje_##Type##_Pointer; \
|
||||
typedef struct _Edje_##Type##_Pointer Edje_##Type## _Pointer; \
|
||||
struct _Edje_##Type##_Pointer \
|
||||
{ \
|
||||
Edje_##Type *pointer; \
|
||||
Edje_##Type * pointer; \
|
||||
}; \
|
||||
\
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_##Type##_Pointer); \
|
||||
|
@ -451,7 +452,6 @@ _edje_edd_init(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_vec, Edje_3D_Vec, "y", y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_vec, Edje_3D_Vec, "z", z, EDJE_T_FLOAT);
|
||||
|
||||
|
||||
/* collection directory */
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Collection_Directory_Entry);
|
||||
_edje_edd_edje_part_collection_directory_entry =
|
||||
|
@ -507,7 +507,7 @@ _edje_edd_init(void)
|
|||
|
||||
/* the main file directory */
|
||||
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_File);
|
||||
eddc.func.hash_add = (void * (*)(void *, const char *, void *)) _edje_eina_hash_add_alloc;
|
||||
eddc.func.hash_add = (void * (*)(void *, const char *, void *))_edje_eina_hash_add_alloc;
|
||||
_edje_edd_edje_file = eet_data_descriptor_file_new(&eddc);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_file, Edje_File, "compiler", compiler, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_file, Edje_File, "version", version, EET_T_INT);
|
||||
|
@ -559,8 +559,8 @@ _edje_edd_init(void)
|
|||
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "sample_name", sample_name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "tone_name", tone_name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program ,"duration", duration, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program ,"speed", speed, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "duration", duration, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "speed", speed, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "vibration_name", vibration_name, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "vibration_repeat", vibration_repeat, EET_T_INT);
|
||||
|
||||
|
@ -1112,14 +1112,13 @@ _edje_edd_init(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "light", _edje_edd_edje_part_description_light);
|
||||
EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "camera", _edje_edd_edje_part_description_camera);
|
||||
|
||||
|
||||
#define EDJE_ADD_ARRAY_MAPPING(Variant, Type, Minus) \
|
||||
{ \
|
||||
Edje_Part_Description_List tmp; \
|
||||
\
|
||||
eet_data_descriptor_element_add(Variant, Type, \
|
||||
EET_T_UNKNOW, EET_G_VAR_ARRAY, \
|
||||
0, (char*)(&tmp.desc_count) - (char*)(&tmp), \
|
||||
0, (char *)(&tmp.desc_count) - (char *)(&tmp), \
|
||||
NULL, \
|
||||
_edje_edd_edje_part_description_##Minus##_pointer); \
|
||||
}
|
||||
|
@ -1293,3 +1292,4 @@ _edje_data_font_list_desc_make(Eet_Data_Descriptor **_font_list_edd,
|
|||
EET_DATA_DESCRIPTOR_ADD_LIST(*_font_list_edd, Edje_Font_List,
|
||||
"list", list, *_font_edd);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -142,6 +142,7 @@ _edje_entry_focus_out_cb(void *data, Evas_Object *o EINA_UNUSED, const char *emi
|
|||
ecore_imf_context_reset(en->imf_context);
|
||||
ecore_imf_context_focus_out(en->imf_context);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -242,7 +243,8 @@ _text_filter_markup_prepend_internal(Edje *ed, Entry *en, Evas_Textblock_Cursor
|
|||
_range_del_emit(ed, en->cursor, en->rp->object, en);
|
||||
if (info) info->merge = EINA_TRUE;
|
||||
}
|
||||
if (info) info->change.insert.pos =
|
||||
if (info)
|
||||
info->change.insert.pos =
|
||||
evas_textblock_cursor_pos_get(en->cursor);
|
||||
if (fmtpre) _text_filter_format_prepend(ed, en, en->cursor, fmtpre);
|
||||
evas_object_textblock_text_markup_prepend(c, text);
|
||||
|
@ -314,13 +316,14 @@ _text_filter_format_prepend(Edje *ed, Entry *en, Evas_Textblock_Cursor *c, const
|
|||
if (*s == '+')
|
||||
{
|
||||
s++;
|
||||
while (*s == ' ') s++;
|
||||
while (*s == ' ')
|
||||
s++;
|
||||
if (!*s)
|
||||
{
|
||||
free(text2);
|
||||
return;
|
||||
}
|
||||
markup_text = (char*) malloc(strlen(s) + 3);
|
||||
markup_text = (char *)malloc(strlen(s) + 3);
|
||||
if (markup_text)
|
||||
{
|
||||
*(markup_text) = '<';
|
||||
|
@ -332,13 +335,14 @@ _text_filter_format_prepend(Edje *ed, Entry *en, Evas_Textblock_Cursor *c, const
|
|||
else if (s[0] == '-')
|
||||
{
|
||||
s++;
|
||||
while (*s == ' ') s++;
|
||||
while (*s == ' ')
|
||||
s++;
|
||||
if (!*s)
|
||||
{
|
||||
free(text2);
|
||||
return;
|
||||
}
|
||||
markup_text = (char*) malloc(strlen(s) + 4);
|
||||
markup_text = (char *)malloc(strlen(s) + 4);
|
||||
if (markup_text)
|
||||
{
|
||||
*(markup_text) = '<';
|
||||
|
@ -350,7 +354,7 @@ _text_filter_format_prepend(Edje *ed, Entry *en, Evas_Textblock_Cursor *c, const
|
|||
}
|
||||
else
|
||||
{
|
||||
markup_text = (char*) malloc(strlen(s) + 4);
|
||||
markup_text = (char *)malloc(strlen(s) + 4);
|
||||
if (markup_text)
|
||||
{
|
||||
*(markup_text) = '<';
|
||||
|
@ -411,6 +415,7 @@ _curs_update_from_curs(Evas_Textblock_Cursor *c, Evas_Object *o EINA_UNUSED, Ent
|
|||
case EDJE_ENTRY_CURSOR_MODE_BEFORE:
|
||||
cur_type = EVAS_TEXTBLOCK_CURSOR_BEFORE;
|
||||
break;
|
||||
|
||||
case EDJE_ENTRY_CURSOR_MODE_UNDER:
|
||||
/* no break for a reason */
|
||||
default:
|
||||
|
@ -1224,7 +1229,7 @@ _anchors_get(Evas_Textblock_Cursor *c, Evas_Object *o, Entry *en)
|
|||
static void
|
||||
_free_entry_change_info(void *_info)
|
||||
{
|
||||
Edje_Entry_Change_Info *info = (Edje_Entry_Change_Info *) _info;
|
||||
Edje_Entry_Change_Info *info = (Edje_Entry_Change_Info *)_info;
|
||||
if (info->insert)
|
||||
{
|
||||
eina_stringshare_del(info->change.insert.content);
|
||||
|
@ -1318,7 +1323,7 @@ _edje_entry_hide_visible_password(Edje *ed, Edje_Real_Part *rp)
|
|||
if (!strcmp(text, "+ password=off"))
|
||||
{
|
||||
evas_textblock_node_format_remove_pair(rp->object,
|
||||
(Evas_Object_Textblock_Node_Format *) node);
|
||||
(Evas_Object_Textblock_Node_Format *)node);
|
||||
_edje_emit(ed, "entry,changed", rp->part->name);
|
||||
break;
|
||||
}
|
||||
|
@ -1357,7 +1362,8 @@ _compose_seq_reset(Entry *en)
|
|||
{
|
||||
char *str;
|
||||
|
||||
EINA_LIST_FREE(en->seq, str) eina_stringshare_del(str);
|
||||
EINA_LIST_FREE(en->seq, str)
|
||||
eina_stringshare_del(str);
|
||||
en->composing = EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -1998,7 +2004,7 @@ _edje_key_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
|
|||
return;
|
||||
}
|
||||
#else
|
||||
(void) event_info;
|
||||
(void)event_info;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2221,7 +2227,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
|
|||
}
|
||||
}
|
||||
}
|
||||
end:
|
||||
end:
|
||||
if (evas_textblock_cursor_compare(tc, en->cursor))
|
||||
{
|
||||
_edje_emit(en->ed, "cursor,changed", rp->part->name);
|
||||
|
@ -2257,7 +2263,6 @@ _edje_part_mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
|
|||
(rp->part->entry_mode < EDJE_ENTRY_EDIT_MODE_SELECTABLE))
|
||||
return;
|
||||
|
||||
|
||||
/* We don't check for ON_HOLD because we'd like to end selection anyway when
|
||||
* mouse is up, even if it's held. */
|
||||
|
||||
|
@ -2711,6 +2716,7 @@ _edje_entry_real_part_configure(Edje *ed, Edje_Real_Part *rp)
|
|||
case EDJE_ENTRY_CURSOR_MODE_BEFORE:
|
||||
cur_type = EVAS_TEXTBLOCK_CURSOR_BEFORE;
|
||||
break;
|
||||
|
||||
case EDJE_ENTRY_CURSOR_MODE_UNDER:
|
||||
/* no break for a reason */
|
||||
default:
|
||||
|
@ -3071,6 +3077,7 @@ _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *
|
|||
case EDJE_ENTRY_CURSOR_MODE_BEFORE:
|
||||
cur_type = EVAS_TEXTBLOCK_CURSOR_BEFORE;
|
||||
break;
|
||||
|
||||
case EDJE_ENTRY_CURSOR_MODE_UNDER:
|
||||
/* no break for a reason */
|
||||
default:
|
||||
|
@ -3263,7 +3270,7 @@ _edje_entry_input_hint_set(Edje_Real_Part *rp, Edje_Input_Hints input_hints)
|
|||
if (en->imf_context)
|
||||
ecore_imf_context_input_hint_set(en->imf_context, (Ecore_IMF_Input_Hints)input_hints);
|
||||
#else
|
||||
(void) input_hints;
|
||||
(void)input_hints;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -3516,7 +3523,8 @@ _edje_entry_input_panel_show_on_demand_get(Edje_Real_Part *rp)
|
|||
en = rp->typedata.text->entry_data;
|
||||
if (!en) return EINA_FALSE;
|
||||
#ifdef HAVE_ECORE_IMF
|
||||
if (en->imf_context) {
|
||||
if (en->imf_context)
|
||||
{
|
||||
Eina_Bool ret = ecore_imf_context_input_panel_show_on_demand_get(en->imf_context);
|
||||
return ret;
|
||||
}
|
||||
|
@ -3537,26 +3545,33 @@ _cursor_get(Edje_Real_Part *rp, Edje_Cursor cur)
|
|||
{
|
||||
case EDJE_CURSOR_MAIN:
|
||||
return en->cursor;
|
||||
|
||||
case EDJE_CURSOR_SELECTION_BEGIN:
|
||||
return en->sel_start;
|
||||
|
||||
case EDJE_CURSOR_SELECTION_END:
|
||||
return en->sel_end;
|
||||
|
||||
case EDJE_CURSOR_PREEDIT_START:
|
||||
if (!en->preedit_start)
|
||||
en->preedit_start = evas_object_textblock_cursor_new(rp->object);
|
||||
return en->preedit_start;
|
||||
|
||||
case EDJE_CURSOR_PREEDIT_END:
|
||||
if (!en->preedit_end)
|
||||
en->preedit_end = evas_object_textblock_cursor_new(rp->object);
|
||||
return en->preedit_end;
|
||||
|
||||
case EDJE_CURSOR_USER:
|
||||
if (!en->cursor_user)
|
||||
en->cursor_user = evas_object_textblock_cursor_new(rp->object);
|
||||
return en->cursor_user;
|
||||
|
||||
case EDJE_CURSOR_USER_EXTRA:
|
||||
if (!en->cursor_user_extra)
|
||||
en->cursor_user_extra = evas_object_textblock_cursor_new(rp->object);
|
||||
return en->cursor_user_extra;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3892,8 +3907,8 @@ _edje_entry_input_panel_layout_set(Edje_Real_Part *rp, Edje_Input_Panel_Layout l
|
|||
if (en->imf_context)
|
||||
ecore_imf_context_input_panel_layout_set(en->imf_context, (Ecore_IMF_Input_Panel_Layout)layout);
|
||||
#else
|
||||
(void) rp;
|
||||
(void) layout;
|
||||
(void)rp;
|
||||
(void)layout;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -3929,7 +3944,7 @@ _edje_entry_input_panel_layout_variation_set(Edje_Real_Part *rp, int variation)
|
|||
if (en->imf_context)
|
||||
ecore_imf_context_input_panel_layout_variation_set(en->imf_context, variation);
|
||||
#else
|
||||
(void) variation;
|
||||
(void)variation;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -3981,7 +3996,7 @@ _edje_entry_imf_cursor_location_set(Entry *en)
|
|||
ecore_imf_context_cursor_location_set(en->imf_context, cx, cy, cw, ch);
|
||||
ecore_imf_context_bidi_direction_set(en->imf_context, (Ecore_IMF_BiDi_Direction)dir);
|
||||
#else
|
||||
(void) en;
|
||||
(void)en;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -4007,7 +4022,7 @@ _edje_entry_imf_cursor_info_set(Entry *en)
|
|||
|
||||
_edje_entry_imf_cursor_location_set(en);
|
||||
#else
|
||||
(void) en;
|
||||
(void)en;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -4130,7 +4145,6 @@ _edje_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED,
|
|||
EINA_TRUE, EINA_TRUE);
|
||||
}
|
||||
|
||||
|
||||
_edje_entry_imf_cursor_info_set(en);
|
||||
_anchors_get(en->cursor, rp->object, en);
|
||||
if (info)
|
||||
|
@ -4154,8 +4168,10 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA
|
|||
int preedit_start_pos, preedit_end_pos;
|
||||
char *preedit_string;
|
||||
char *markup_txt = NULL;
|
||||
char *tagname[] = {NULL, "preedit", "preedit_sel", "preedit_sel",
|
||||
"preedit_sub1", "preedit_sub2", "preedit_sub3", "preedit_sub4"};
|
||||
char *tagname[] = {
|
||||
NULL, "preedit", "preedit_sel", "preedit_sel",
|
||||
"preedit_sub1", "preedit_sub2", "preedit_sub3", "preedit_sub4"
|
||||
};
|
||||
int i;
|
||||
size_t preedit_type_size = sizeof(tagname) / sizeof(tagname[0]);
|
||||
Eina_Bool preedit_end_state = EINA_FALSE;
|
||||
|
@ -4293,7 +4309,8 @@ _edje_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA
|
|||
/* delete attribute list */
|
||||
if (attrs)
|
||||
{
|
||||
EINA_LIST_FREE(attrs, attr) free(attr);
|
||||
EINA_LIST_FREE(attrs, attr)
|
||||
free(attr);
|
||||
}
|
||||
|
||||
free(preedit_string);
|
||||
|
@ -4406,6 +4423,7 @@ _edje_entry_imf_retrieve_selection_cb(void *data, Ecore_IMF_Context *ctx EINA_UN
|
|||
else
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
|
||||
|
|
|
@ -10,20 +10,25 @@ edje_external_param_type_str(Edje_External_Param_Type type)
|
|||
{
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
||||
return "INT";
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
||||
return "DOUBLE";
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_STRING:
|
||||
return "STRING";
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_BOOL:
|
||||
return "BOOL";
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_CHOICE:
|
||||
return "CHOICE";
|
||||
|
||||
default:
|
||||
return "(unknown)";
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN Evas_Object*
|
||||
EOLIAN Evas_Object *
|
||||
_edje_object_part_external_object_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -91,7 +96,7 @@ _edje_object_part_external_param_get(Eo *obj, Edje *ed, const char *part, Edje_E
|
|||
return _edje_external_param_get(obj, rp, param);
|
||||
}
|
||||
|
||||
EOLIAN Evas_Object*
|
||||
EOLIAN Evas_Object *
|
||||
_edje_object_part_external_content_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, const char *content)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -142,7 +147,7 @@ _edje_object_part_external_param_type_get(Eo *obj, Edje *ed, const char *part, c
|
|||
return EDJE_EXTERNAL_PARAM_TYPE_MAX;
|
||||
}
|
||||
for (info = type->parameters_info; info->name; info++)
|
||||
if (strcmp(info->name, param) == 0) return info->type;;
|
||||
if (strcmp(info->name, param) == 0) return info->type; ;
|
||||
|
||||
ERR("no parameter '%s' external type '%s'", param, type->module_name);
|
||||
|
||||
|
@ -417,7 +422,7 @@ _edje_external_param_set(Evas_Object *obj, Edje_Real_Part *rp, const Edje_Extern
|
|||
(rp->part->type == EDJE_PART_TYPE_TEXTBLOCK))
|
||||
{
|
||||
if ((param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) &&
|
||||
(!strcmp (param->name, "text")) && (obj))
|
||||
(!strcmp(param->name, "text")) && (obj))
|
||||
{
|
||||
return edje_object_part_text_set(obj, rp->part->name, param->s);
|
||||
}
|
||||
|
@ -469,7 +474,7 @@ _edje_external_param_get(const Evas_Object *obj, Edje_Real_Part *rp, Edje_Extern
|
|||
return type->param_get(type->data, swallowed_object, param);
|
||||
}
|
||||
|
||||
Evas_Object*
|
||||
Evas_Object *
|
||||
_edje_external_content_get(const Evas_Object *obj, const char *content)
|
||||
{
|
||||
Edje_External_Type *type = evas_object_data_get(obj, "Edje_External_Type");
|
||||
|
@ -519,14 +524,14 @@ _edje_external_recalc_apply(Edje *ed EINA_UNUSED, Edje_Real_Part *ep,
|
|||
|
||||
if ((!type) || (!type->state_set)) return;
|
||||
|
||||
ext = (Edje_Part_Description_External*) ep->param1.description;
|
||||
ext = (Edje_Part_Description_External *)ep->param1.description;
|
||||
|
||||
params1 = ep->param1.external_params ?
|
||||
ep->param1.external_params : ext->external_params;
|
||||
|
||||
if (ep->param2 && ep->param2->description)
|
||||
{
|
||||
ext = (Edje_Part_Description_External*) ep->param2->description;
|
||||
ext = (Edje_Part_Description_External *)ep->param2->description;
|
||||
|
||||
params2 = ep->param2->external_params ?
|
||||
ep->param2->external_params : ext->external_params;
|
||||
|
@ -563,3 +568,4 @@ _edje_external_parsed_params_free(Evas_Object *obj, void *params)
|
|||
|
||||
type->params_free(params);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,12 @@ struct _Edje_Drag_Items
|
|||
{
|
||||
const char *part;
|
||||
FLOAT_T x, y, w, h;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
FLOAT_T x, y;
|
||||
} step;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
FLOAT_T x, y;
|
||||
} page;
|
||||
};
|
||||
|
@ -29,8 +31,8 @@ void _edje_file_add(Edje *ed, const Eina_File *f);
|
|||
/* START - Nested part support */
|
||||
#define _edje_smart_nested_type "Evas_Smart_Nested"
|
||||
typedef struct _Edje_Nested_Support Edje_Nested_Support;
|
||||
struct _Edje_Nested_Support
|
||||
{ /* We builed nested-parts list using this struct */
|
||||
struct _Edje_Nested_Support /* We builed nested-parts list using this struct */
|
||||
{
|
||||
Evas_Object *o; /* Smart object containing nested children */
|
||||
unsigned char nested_children_count; /* Number of nested children */
|
||||
};
|
||||
|
@ -136,7 +138,6 @@ edje_smart_nested_add(Evas *evas)
|
|||
|
||||
/* END - Nested part support */
|
||||
|
||||
|
||||
#ifdef EDJE_PROGRAM_CACHE
|
||||
static Eina_Bool _edje_collection_free_prog_cache_matches_free_cb(const Eina_Hash *hash, const void *key, void *data, void *fdata);
|
||||
#endif
|
||||
|
@ -169,24 +170,34 @@ edje_load_error_str(Edje_Load_Error error)
|
|||
{
|
||||
case EDJE_LOAD_ERROR_NONE:
|
||||
return "No Error";
|
||||
|
||||
case EDJE_LOAD_ERROR_GENERIC:
|
||||
return "Generic Error";
|
||||
|
||||
case EDJE_LOAD_ERROR_DOES_NOT_EXIST:
|
||||
return "File Does Not Exist";
|
||||
|
||||
case EDJE_LOAD_ERROR_PERMISSION_DENIED:
|
||||
return "Permission Denied";
|
||||
|
||||
case EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED:
|
||||
return "Resource Allocation Failed";
|
||||
|
||||
case EDJE_LOAD_ERROR_CORRUPT_FILE:
|
||||
return "Corrupt File";
|
||||
|
||||
case EDJE_LOAD_ERROR_UNKNOWN_FORMAT:
|
||||
return "Unknown Format";
|
||||
|
||||
case EDJE_LOAD_ERROR_INCOMPATIBLE_FILE:
|
||||
return "Incompatible File";
|
||||
|
||||
case EDJE_LOAD_ERROR_UNKNOWN_COLLECTION:
|
||||
return "Unknown Collection";
|
||||
|
||||
case EDJE_LOAD_ERROR_RECURSIVE_REFERENCE:
|
||||
return "Recursive Reference";
|
||||
|
||||
default:
|
||||
return "Unknown Error";
|
||||
}
|
||||
|
@ -322,10 +333,10 @@ struct _Edje_File_Iterator
|
|||
static Eina_Bool
|
||||
_edje_file_iterator_next(Eina_Iterator *it, void **data)
|
||||
{
|
||||
Edje_File_Iterator *et = (void*) it;
|
||||
Edje_File_Iterator *et = (void *)it;
|
||||
Edje_File *edf = NULL;
|
||||
|
||||
if (!eina_iterator_next(et->it, (void**) &edf))
|
||||
if (!eina_iterator_next(et->it, (void **)&edf))
|
||||
return EINA_FALSE;
|
||||
|
||||
*data = edf->f;
|
||||
|
@ -341,7 +352,7 @@ _edje_file_iterator_container(Eina_Iterator *it EINA_UNUSED)
|
|||
static void
|
||||
_edje_file_iterator_free(Eina_Iterator *it)
|
||||
{
|
||||
Edje_File_Iterator *et = (void*) it;
|
||||
Edje_File_Iterator *et = (void *)it;
|
||||
|
||||
EINA_MAGIC_SET(&et->iterator, 0);
|
||||
eina_iterator_free(et->it);
|
||||
|
@ -398,7 +409,7 @@ edje_mmap_data_get(const Eina_File *f, const char *key)
|
|||
edf = _edje_cache_file_coll_open(f, NULL, &error_ret, NULL, NULL);
|
||||
if (edf)
|
||||
{
|
||||
str = (char*) edje_string_get(eina_hash_find(edf->data, key));
|
||||
str = (char *)edje_string_get(eina_hash_find(edf->data, key));
|
||||
|
||||
if (str) str = strdup(str);
|
||||
|
||||
|
@ -450,6 +461,7 @@ _edje_physics_world_update_cb(void *data, EPhysics_World *world EINA_UNUSED, voi
|
|||
Edje *edje = data;
|
||||
_edje_recalc_do(edje);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int
|
||||
|
@ -590,8 +602,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
|
||||
ep = ed->collection->parts[n];
|
||||
|
||||
if (ep->nested_children_count)
|
||||
{ /* Add object to nested parts list */
|
||||
if (ep->nested_children_count) /* Add object to nested parts list */
|
||||
{
|
||||
st_nested = malloc(sizeof(*st_nested));
|
||||
nested_smart = st_nested->o = edje_smart_nested_add(tev);
|
||||
|
||||
|
@ -641,6 +653,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
rp->typedata.text = calloc(1, sizeof(Edje_Real_Part_Text));
|
||||
if (!rp->typedata.text) memerr = EINA_TRUE;
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_GROUP:
|
||||
case EDJE_PART_TYPE_SWALLOW:
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
|
@ -648,12 +661,14 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
rp->typedata.swallow = calloc(1, sizeof(Edje_Real_Part_Swallow));
|
||||
if (!rp->typedata.swallow) memerr = EINA_TRUE;
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_BOX:
|
||||
case EDJE_PART_TYPE_TABLE:
|
||||
rp->type = EDJE_RP_TYPE_CONTAINER;
|
||||
rp->typedata.container = calloc(1, sizeof(Edje_Real_Part_Container));
|
||||
if (!rp->typedata.container) memerr = EINA_TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -683,17 +698,21 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
case EDJE_PART_TYPE_RECTANGLE:
|
||||
rp->object = evas_object_rectangle_add(ed->base->evas);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_PROXY:
|
||||
case EDJE_PART_TYPE_IMAGE:
|
||||
rp->object = evas_object_image_add(ed->base->evas);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
_edje_text_part_on_add(ed, rp);
|
||||
rp->object = evas_object_text_add(ed->base->evas);
|
||||
evas_object_text_font_source_set(rp->object, ed->path);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_GROUP:
|
||||
sources = eina_list_append(sources, rp);
|
||||
|
||||
// fallthrough intentional
|
||||
case EDJE_PART_TYPE_SWALLOW:
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
|
@ -705,27 +724,33 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
evas_object_pointer_mode_set(rp->object, EVAS_OBJECT_POINTER_MODE_NOGRAB);
|
||||
_edje_callbacks_focus_add(rp->object, ed, rp);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_TEXTBLOCK:
|
||||
_edje_textblock_styles_add(ed, rp);
|
||||
textblocks = eina_list_append(textblocks, rp);
|
||||
rp->object = evas_object_textblock_add(ed->base->evas);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_BOX:
|
||||
sources = eina_list_append(sources, rp);
|
||||
rp->object = evas_object_box_add(ed->base->evas);
|
||||
rp->typedata.container->anim = _edje_box_layout_anim_new(rp->object);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_TABLE:
|
||||
sources = eina_list_append(sources, rp);
|
||||
rp->object = evas_object_table_add(ed->base->evas);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_GRADIENT:
|
||||
ERR("SPANK ! SPANK ! SPANK ! YOU ARE USING GRADIENT IN PART %s FROM GROUP %s INSIDE FILE %s !! THEY ARE NOW REMOVED !",
|
||||
ep->name, group, eina_file_filename_get(file));
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_SPACER:
|
||||
rp->object = NULL;
|
||||
break;
|
||||
|
||||
default:
|
||||
ERR("wrong part type %i!", ep->type);
|
||||
break;
|
||||
|
@ -733,15 +758,15 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
|
||||
if (rp->object)
|
||||
{
|
||||
if (nested_smart)
|
||||
{ /* Update this pointer to father object only
|
||||
if (nested_smart) /* Update this pointer to father object only
|
||||
this will make smart object size == father sz */
|
||||
{
|
||||
rp->nested_smart = nested_smart;
|
||||
nested_smart = NULL;
|
||||
}
|
||||
|
||||
if (st_nested && st_nested->nested_children_count)
|
||||
{ /* Add this to list of children */
|
||||
if (st_nested && st_nested->nested_children_count) /* Add this to list of children */
|
||||
{
|
||||
evas_object_smart_member_add(rp->object,
|
||||
st_nested->o);
|
||||
|
||||
|
@ -758,7 +783,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
|
||||
/* Check for parent in stack */
|
||||
idx = eina_array_count(nested) - 1;
|
||||
st_nested = (idx >= 0) ? eina_array_data_get(nested,idx) : NULL;
|
||||
st_nested = (idx >= 0) ? eina_array_data_get(nested, idx) : NULL;
|
||||
|
||||
if (st_nested)
|
||||
{
|
||||
|
@ -861,7 +886,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
{
|
||||
Edje_Part_Description_Text *text;
|
||||
|
||||
text = (Edje_Part_Description_Text *) rp->param1.description;
|
||||
text = (Edje_Part_Description_Text *)rp->param1.description;
|
||||
|
||||
if (ed->file->feature_ver < 1)
|
||||
{
|
||||
|
@ -918,7 +943,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
Edje_Part_Description_External *external;
|
||||
Evas_Object *child_obj;
|
||||
|
||||
external = (Edje_Part_Description_External *) rp->part->default_desc;
|
||||
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);
|
||||
|
@ -948,6 +973,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
case EDJE_PART_TYPE_GROUP:
|
||||
source = rp->part->source;
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_BOX:
|
||||
case EDJE_PART_TYPE_TABLE:
|
||||
if (rp->part->items)
|
||||
|
@ -963,6 +989,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
/* This list should only be filled by group, box or table, nothing else. */
|
||||
abort();
|
||||
|
@ -1137,36 +1164,43 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
edje_object_part_swallow(obj, eud->part, eud->u.swallow.child);
|
||||
child = eud->u.swallow.child;
|
||||
break;
|
||||
|
||||
case EDJE_USER_BOX_PACK:
|
||||
boxes = eina_list_append(boxes, eud);
|
||||
eud = NULL;
|
||||
break;
|
||||
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
edje_object_part_table_pack(obj, eud->part, eud->u.table.child,
|
||||
eud->u.table.col, eud->u.table.row,
|
||||
eud->u.table.colspan, eud->u.table.rowspan);
|
||||
child = eud->u.table.child;
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_STEP:
|
||||
edje_object_part_drag_step_set(obj, eud->part,
|
||||
eud->u.drag_position.x,
|
||||
eud->u.drag_position.y);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_PAGE:
|
||||
edje_object_part_drag_page_set(obj, eud->part,
|
||||
eud->u.drag_position.x,
|
||||
eud->u.drag_position.y);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_VALUE:
|
||||
edje_object_part_drag_value_set(obj, eud->part,
|
||||
eud->u.drag_position.x,
|
||||
eud->u.drag_position.y);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_SIZE:
|
||||
edje_object_part_drag_size_set(obj, eud->part,
|
||||
eud->u.drag_size.w,
|
||||
eud->u.drag_size.h);
|
||||
break;
|
||||
|
||||
case EDJE_USER_STRING:
|
||||
edje_object_part_text_set(obj, eud->part, eud->u.string.text);
|
||||
eina_stringshare_del(eud->u.string.text);
|
||||
|
@ -1206,7 +1240,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
Edje_Style *stl = NULL;
|
||||
const char *style;
|
||||
|
||||
text = (Edje_Part_Description_Text *) rp->part->default_desc;
|
||||
text = (Edje_Part_Description_Text *)rp->part->default_desc;
|
||||
style = edje_string_get(&text->text.style);
|
||||
if (style)
|
||||
{
|
||||
|
@ -1315,6 +1349,7 @@ _edje_object_collect(Edje *ed)
|
|||
case EDJE_USER_STRING:
|
||||
eud->u.string.text = eina_stringshare_ref(eud->u.string.text);
|
||||
break;
|
||||
|
||||
case EDJE_USER_BOX_PACK:
|
||||
if (eud->u.box.index == -1)
|
||||
{
|
||||
|
@ -1349,6 +1384,7 @@ _edje_object_collect(Edje *ed)
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -1361,9 +1397,11 @@ _edje_object_collect(Edje *ed)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_USER_SWALLOW:
|
||||
edje_object_part_unswallow(NULL, eud->u.swallow.child);
|
||||
break;
|
||||
|
||||
case EDJE_USER_DRAG_STEP:
|
||||
case EDJE_USER_DRAG_PAGE:
|
||||
case EDJE_USER_DRAG_VALUE:
|
||||
|
@ -1471,9 +1509,11 @@ _edje_file_del(Edje *ed)
|
|||
_edje_external_parsed_params_free(rp->typedata.swallow->swallowed_object, rp->param1.external_params);
|
||||
if (rp->param2)
|
||||
_edje_external_parsed_params_free(rp->typedata.swallow->swallowed_object, rp->param2->external_params);
|
||||
|
||||
// fallthrough intentional
|
||||
case EDJE_PART_TYPE_GROUP:
|
||||
evas_object_del(rp->typedata.swallow->swallowed_object);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1507,9 +1547,9 @@ _edje_file_del(Edje *ed)
|
|||
if (rp->param2)
|
||||
{
|
||||
free(rp->param2->set);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &rp->param2->p.map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->param2->p.map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &rp->param2->p.physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->param2->p.physics);
|
||||
#endif
|
||||
}
|
||||
eina_mempool_free(_edje_real_part_state_mp, rp->param2);
|
||||
|
@ -1517,26 +1557,26 @@ _edje_file_del(Edje *ed)
|
|||
if (rp->custom)
|
||||
{
|
||||
free(rp->custom->set);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &rp->custom->p.map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->custom->p.map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &rp->custom->p.physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->custom->p.physics);
|
||||
#endif
|
||||
}
|
||||
eina_mempool_free(_edje_real_part_state_mp, rp->custom);
|
||||
|
||||
if (rp->current)
|
||||
{
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &rp->current->map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &rp->current->physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics);
|
||||
#endif
|
||||
free(rp->current);
|
||||
rp->current = NULL;
|
||||
}
|
||||
_edje_unref(ed);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &rp->param1.p.map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->param1.p.map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &rp->param1.p.physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->param1.p.physics);
|
||||
#endif
|
||||
eina_mempool_free(_edje_real_part_mp, rp);
|
||||
}
|
||||
|
@ -1586,7 +1626,8 @@ _edje_file_del(Edje *ed)
|
|||
}
|
||||
|
||||
if (ed->L) _edje_lua2_script_shutdown(ed);
|
||||
while (ed->subobjs) _edje_subobj_unregister(ed, ed->subobjs->data);
|
||||
while (ed->subobjs)
|
||||
_edje_subobj_unregister(ed, ed->subobjs->data);
|
||||
if (ed->table_parts) free(ed->table_parts);
|
||||
ed->table_parts = NULL;
|
||||
ed->table_parts_size = 0;
|
||||
|
@ -1631,7 +1672,6 @@ _edje_file_free(Edje_File *edf)
|
|||
|
||||
EINA_LIST_FREE(edf->image_dir->sets[i].entries, se)
|
||||
free(se);
|
||||
|
||||
}
|
||||
|
||||
free(edf->image_dir->entries);
|
||||
|
@ -1773,7 +1813,7 @@ _edje_collection_free(Edje_File *edf, Edje_Part_Collection *ec, Edje_Part_Collec
|
|||
|
||||
free(ep->other.desc);
|
||||
/* Alloc for RTL objects in edje_calc.c:_edje_part_description_find() */
|
||||
if(ep->other.desc_rtl)
|
||||
if (ep->other.desc_rtl)
|
||||
free(ep->other.desc_rtl);
|
||||
|
||||
for (j = 0; j < ep->items_count; ++j)
|
||||
|
@ -1845,30 +1885,32 @@ _edje_collection_free_part_description_clean(int type, Edje_Part_Description_Com
|
|||
{
|
||||
Edje_Part_Description_Image *img;
|
||||
|
||||
img = (Edje_Part_Description_Image *) desc;
|
||||
img = (Edje_Part_Description_Image *)desc;
|
||||
|
||||
for (i = 0; i < img->image.tweens_count; ++i)
|
||||
free(img->image.tweens[i]);
|
||||
free(img->image.tweens);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
{
|
||||
Edje_Part_Description_External *external;
|
||||
|
||||
external = (Edje_Part_Description_External *) desc;
|
||||
external = (Edje_Part_Description_External *)desc;
|
||||
|
||||
if (external->external_params)
|
||||
_edje_external_params_free(external->external_params, free_strings);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
case EDJE_PART_TYPE_TEXTBLOCK:
|
||||
if (free_strings)
|
||||
{
|
||||
Edje_Part_Description_Text *text;
|
||||
|
||||
text = (Edje_Part_Description_Text *) desc;
|
||||
text = (Edje_Part_Description_Text *)desc;
|
||||
|
||||
eina_stringshare_del(text->text.text.str);
|
||||
eina_stringshare_del(text->text.domain);
|
||||
|
@ -1888,7 +1930,7 @@ _edje_collection_free_part_description_free(int type,
|
|||
Eina_Bool free_strings)
|
||||
{
|
||||
#define FREE_POOL(Type, Ce, Desc) \
|
||||
case EDJE_PART_TYPE_##Type: eina_mempool_free(Ce->mp.Type, Desc); \
|
||||
case EDJE_PART_TYPE_##Type: eina_mempool_free(Ce->mp.Type, Desc); \
|
||||
ce->count.Type--; \
|
||||
break;
|
||||
|
||||
|
@ -1919,6 +1961,7 @@ _edje_collection_free_prog_cache_matches_free_cb(const Eina_Hash *hash EINA_UNUS
|
|||
hash = NULL;
|
||||
fdata = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -1955,9 +1998,13 @@ _edje_object_pack_item_hints_set(Evas_Object *obj, Edje_Pack_Element *it)
|
|||
switch (it->aspect.mode)
|
||||
{
|
||||
case EDJE_ASPECT_CONTROL_NONE: mode = EVAS_ASPECT_CONTROL_NONE; break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_NEITHER: mode = EVAS_ASPECT_CONTROL_NEITHER; break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_HORIZONTAL: mode = EVAS_ASPECT_CONTROL_HORIZONTAL; break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_VERTICAL: mode = EVAS_ASPECT_CONTROL_VERTICAL; break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_BOTH: mode = EVAS_ASPECT_CONTROL_BOTH; break;
|
||||
}
|
||||
evas_object_size_hint_aspect_set(obj, mode, it->aspect.w, it->aspect.h);
|
||||
|
@ -2082,7 +2129,7 @@ _cb_signal_repeat(void *data, Evas_Object *obj, const char *sig, const char *sou
|
|||
|
||||
/* Add back the end of the source */
|
||||
origin = strlen(new_src);
|
||||
length ++; /* Remove the trailing ':' from the count */
|
||||
length++; /* Remove the trailing ':' from the count */
|
||||
if (origin > length)
|
||||
{
|
||||
char *tmp;
|
||||
|
@ -2106,3 +2153,4 @@ _cb_signal_repeat(void *data, Evas_Object *obj, const char *sig, const char *sou
|
|||
_edje_util_message_send(ed_parent, EDJE_QUEUE_SCRIPT,
|
||||
EDJE_MESSAGE_SIGNAL, 0, &emsg);
|
||||
}
|
||||
|
||||
|
|
|
@ -135,15 +135,19 @@ __edje_lua_error(const char *file, const char *fnc, int line, lua_State *L, int
|
|||
case LUA_ERRRUN:
|
||||
err_type = "runtime";
|
||||
break;
|
||||
|
||||
case LUA_ERRSYNTAX:
|
||||
err_type = "syntax";
|
||||
break;
|
||||
|
||||
case LUA_ERRMEM:
|
||||
err_type = "memory allocation";
|
||||
break;
|
||||
|
||||
case LUA_ERRERR:
|
||||
err_type = "error handler";
|
||||
break;
|
||||
|
||||
default:
|
||||
err_type = "unknown";
|
||||
break;
|
||||
|
@ -212,7 +216,7 @@ _edje_lua_free_thread(Edje *ed, lua_State *L)
|
|||
* only for debug, returns number of objects in registry
|
||||
*/
|
||||
static int
|
||||
_edje_lua_reg_count (lua_State *L)
|
||||
_edje_lua_reg_count(lua_State *L)
|
||||
{
|
||||
int count = 0;
|
||||
lua_pushvalue(L, LUA_REGISTRYINDEX);
|
||||
|
@ -309,7 +313,7 @@ _edje_lua_new_const(lua_State *L, const char *id, int val)
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_new_metatable(lua_State *L, const Edje_Lua_Reg ** class)
|
||||
_edje_lua_new_metatable(lua_State *L, const Edje_Lua_Reg **class)
|
||||
{
|
||||
lua_newtable(L);
|
||||
lua_pushlightuserdata(L, class);
|
||||
|
@ -321,14 +325,14 @@ _edje_lua_new_metatable(lua_State *L, const Edje_Lua_Reg ** class)
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_get_metatable(lua_State *L, const Edje_Lua_Reg ** class)
|
||||
_edje_lua_get_metatable(lua_State *L, const Edje_Lua_Reg **class)
|
||||
{
|
||||
lua_pushlightuserdata(L, class);
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
}
|
||||
|
||||
static void
|
||||
_edje_lua_free_metatable(lua_State *L, const Edje_Lua_Reg ** class)
|
||||
_edje_lua_free_metatable(lua_State *L, const Edje_Lua_Reg **class)
|
||||
{
|
||||
lua_pushlightuserdata(L, class);
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
|
@ -341,7 +345,7 @@ _edje_lua_free_metatable(lua_State *L, const Edje_Lua_Reg ** class)
|
|||
}
|
||||
|
||||
static void *
|
||||
_edje_lua_checkudata(lua_State *L, int pos, const Edje_Lua_Reg * module)
|
||||
_edje_lua_checkudata(lua_State *L, int pos, const Edje_Lua_Reg *module)
|
||||
{
|
||||
luaL_checktype(L, pos, LUA_TUSERDATA);
|
||||
lua_getmetatable(L, pos);
|
||||
|
@ -362,7 +366,7 @@ _edje_lua_checkudata(lua_State *L, int pos, const Edje_Lua_Reg * module)
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_new_class(lua_State *L, const Edje_Lua_Reg ** class)
|
||||
_edje_lua_new_class(lua_State *L, const Edje_Lua_Reg **class)
|
||||
{
|
||||
int n = 0;
|
||||
_edje_lua_new_metatable(L, class);
|
||||
|
@ -376,15 +380,15 @@ _edje_lua_new_class(lua_State *L, const Edje_Lua_Reg ** class)
|
|||
{
|
||||
lua_newtable(L);
|
||||
luaL_register(L, NULL, class[n]->set);
|
||||
lua_rawseti (L, -2, EDJE_LUA_SET);
|
||||
lua_rawseti(L, -2, EDJE_LUA_SET);
|
||||
|
||||
lua_newtable(L);
|
||||
luaL_register(L, NULL, class[n]->get);
|
||||
lua_rawseti (L, -2, EDJE_LUA_GET);
|
||||
lua_rawseti(L, -2, EDJE_LUA_GET);
|
||||
|
||||
lua_newtable(L);
|
||||
luaL_register(L, NULL, class[n]->fn);
|
||||
lua_rawseti (L, -2, EDJE_LUA_FN);
|
||||
lua_rawseti(L, -2, EDJE_LUA_FN);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -405,7 +409,7 @@ _edje_lua_new_class(lua_State *L, const Edje_Lua_Reg ** class)
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_set_class(lua_State *L, int index, const Edje_Lua_Reg ** class)
|
||||
_edje_lua_set_class(lua_State *L, int index, const Edje_Lua_Reg **class)
|
||||
{
|
||||
lua_newtable(L);
|
||||
if (index < 0)
|
||||
|
@ -687,7 +691,6 @@ const luaL_Reg lClass_fn[] = {
|
|||
{NULL, NULL} // sentinel
|
||||
};
|
||||
|
||||
|
||||
const luaL_Reg lTimer_get[];
|
||||
|
||||
const luaL_Reg lTimer_set[];
|
||||
|
@ -1234,7 +1237,7 @@ const Edje_Lua_Reg mObject = {
|
|||
};
|
||||
|
||||
static void
|
||||
_edje_lua_object_del_cb(void *data, EINA_UNUSED Evas * e, Evas_Object * obj, EINA_UNUSED void *event_info)
|
||||
_edje_lua_object_del_cb(void *data, EINA_UNUSED Evas *e, Evas_Object *obj, EINA_UNUSED void *event_info)
|
||||
{
|
||||
//printf("_edje_lua_object_delete_cb\n");
|
||||
lua_State *L = data;
|
||||
|
@ -1593,7 +1596,7 @@ static int
|
|||
_edje_lua_object_get_clipees(lua_State *L)
|
||||
{
|
||||
Edje_Lua_Evas_Object *obj = _edje_lua_checkudata(L, 1, &mObject);
|
||||
Eina_List *clipees = (Eina_List *) evas_object_clipees_get(obj->eo);
|
||||
Eina_List *clipees = (Eina_List *)evas_object_clipees_get(obj->eo);
|
||||
Eina_List *l;
|
||||
Evas_Object *clip;
|
||||
int i = 1;
|
||||
|
@ -1925,7 +1928,7 @@ _edje_lua_object_set_precise_is_inside(lua_State *L)
|
|||
}
|
||||
|
||||
#define OBJECT_CB_MACRO(KEY) \
|
||||
lua_State *L = data; \
|
||||
lua_State * L = data; \
|
||||
_edje_lua_get_reg(L, obj); \
|
||||
lua_getfield(L, -1, KEY); \
|
||||
if (lua_type(L, -1) != LUA_TFUNCTION) \
|
||||
|
@ -1936,11 +1939,11 @@ _edje_lua_object_set_precise_is_inside(lua_State *L)
|
|||
lua_insert(L, -2);
|
||||
|
||||
static void
|
||||
_edje_lua_object_cb_mouse_in(void *data, EINA_UNUSED Evas * e, Evas_Object * obj,
|
||||
_edje_lua_object_cb_mouse_in(void *data, EINA_UNUSED Evas *e, Evas_Object *obj,
|
||||
void *event_info)
|
||||
{
|
||||
OBJECT_CB_MACRO("mouse_in");
|
||||
Evas_Event_Mouse_In * ev = event_info;
|
||||
Evas_Event_Mouse_In *ev = event_info;
|
||||
int err_code;
|
||||
|
||||
lua_pushnumber(L, ev->output.x);
|
||||
|
@ -1953,11 +1956,11 @@ _edje_lua_object_cb_mouse_in(void *data, EINA_UNUSED Evas * e, Evas_Object * obj
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_object_cb_mouse_out(void *data, EINA_UNUSED Evas * e, Evas_Object * obj,
|
||||
_edje_lua_object_cb_mouse_out(void *data, EINA_UNUSED Evas *e, Evas_Object *obj,
|
||||
void *event_info)
|
||||
{
|
||||
OBJECT_CB_MACRO("mouse_out");
|
||||
Evas_Event_Mouse_In * ev = event_info;
|
||||
Evas_Event_Mouse_In *ev = event_info;
|
||||
int err_code;
|
||||
|
||||
lua_pushnumber(L, ev->output.x);
|
||||
|
@ -1970,11 +1973,11 @@ _edje_lua_object_cb_mouse_out(void *data, EINA_UNUSED Evas * e, Evas_Object * ob
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_object_cb_mouse_down(void *data, EINA_UNUSED Evas * e, Evas_Object * obj,
|
||||
_edje_lua_object_cb_mouse_down(void *data, EINA_UNUSED Evas *e, Evas_Object *obj,
|
||||
void *event_info)
|
||||
{
|
||||
OBJECT_CB_MACRO("mouse_down");
|
||||
Evas_Event_Mouse_Down * ev = event_info;
|
||||
Evas_Event_Mouse_Down *ev = event_info;
|
||||
int err_code;
|
||||
|
||||
lua_pushnumber(L, ev->button);
|
||||
|
@ -1988,11 +1991,11 @@ _edje_lua_object_cb_mouse_down(void *data, EINA_UNUSED Evas * e, Evas_Object * o
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_object_cb_mouse_up(void *data, EINA_UNUSED Evas * e, Evas_Object * obj,
|
||||
_edje_lua_object_cb_mouse_up(void *data, EINA_UNUSED Evas *e, Evas_Object *obj,
|
||||
void *event_info)
|
||||
{
|
||||
OBJECT_CB_MACRO("mouse_up");
|
||||
Evas_Event_Mouse_Up * ev = event_info;
|
||||
Evas_Event_Mouse_Up *ev = event_info;
|
||||
int err_code;
|
||||
|
||||
lua_pushnumber(L, ev->button);
|
||||
|
@ -2006,11 +2009,11 @@ _edje_lua_object_cb_mouse_up(void *data, EINA_UNUSED Evas * e, Evas_Object * obj
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_object_cb_mouse_move(void *data, EINA_UNUSED Evas * e, Evas_Object * obj,
|
||||
_edje_lua_object_cb_mouse_move(void *data, EINA_UNUSED Evas *e, Evas_Object *obj,
|
||||
void *event_info)
|
||||
{
|
||||
OBJECT_CB_MACRO("mouse_move");
|
||||
Evas_Event_Mouse_Move * ev = event_info;
|
||||
Evas_Event_Mouse_Move *ev = event_info;
|
||||
int err_code;
|
||||
|
||||
lua_pushnumber(L, ev->buttons);
|
||||
|
@ -2024,11 +2027,11 @@ _edje_lua_object_cb_mouse_move(void *data, EINA_UNUSED Evas * e, Evas_Object * o
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_object_cb_mouse_wheel(void *data, EINA_UNUSED Evas * e, Evas_Object * obj,
|
||||
_edje_lua_object_cb_mouse_wheel(void *data, EINA_UNUSED Evas *e, Evas_Object *obj,
|
||||
void *event_info)
|
||||
{
|
||||
OBJECT_CB_MACRO("mouse_wheel");
|
||||
Evas_Event_Mouse_Wheel * ev = event_info;
|
||||
Evas_Event_Mouse_Wheel *ev = event_info;
|
||||
int err_code;
|
||||
|
||||
lua_pushnumber(L, ev->z);
|
||||
|
@ -2131,7 +2134,7 @@ _edje_lua_image_get_size(lua_State *L)
|
|||
lua_pushnumber(L, h);
|
||||
lua_rawseti(L, -2, 2);
|
||||
return 1;
|
||||
};
|
||||
}
|
||||
|
||||
const luaL_Reg lImage_get[] = {
|
||||
{"size", _edje_lua_image_get_size},
|
||||
|
@ -2362,7 +2365,7 @@ static int
|
|||
_edje_lua_table_get_children(lua_State *L)
|
||||
{
|
||||
Edje_Lua_Evas_Object *obj = _edje_lua_checkudata(L, 1, &mTable);
|
||||
Eina_List *children = (Eina_List *) evas_object_table_children_get(obj->eo);
|
||||
Eina_List *children = (Eina_List *)evas_object_table_children_get(obj->eo);
|
||||
Eina_List *l;
|
||||
Evas_Object *child;
|
||||
int i = 1;
|
||||
|
@ -3034,7 +3037,6 @@ _edje_lua_description_set_aspect(lua_State *L)
|
|||
obj->rp->custom->description->aspect.min = FROM_DOUBLE(luaL_checknumber(L, -2));
|
||||
obj->rp->custom->description->aspect.max = FROM_DOUBLE(luaL_checknumber(L, -1));
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -3045,7 +3047,6 @@ _edje_lua_description_set_aspect_pref(lua_State *L)
|
|||
if (!obj->rp->custom) return 0;
|
||||
obj->rp->custom->description->aspect.prefer = luaL_checknumber(L, 2);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -3475,7 +3476,7 @@ const Edje_Lua_Reg mPart = {
|
|||
};
|
||||
|
||||
static void
|
||||
_edje_lua_edje_part_del_cb(void *data, EINA_UNUSED Evas * e, Evas_Object * obj,
|
||||
_edje_lua_edje_part_del_cb(void *data, EINA_UNUSED Evas *e, Evas_Object *obj,
|
||||
EINA_UNUSED void *event_info)
|
||||
{
|
||||
//printf("_edje_lua_object_delete_cb\n");
|
||||
|
@ -3551,7 +3552,7 @@ _edje_lua_part_get_states_list(lua_State *L)
|
|||
}
|
||||
edje_edit_string_list_free(slist);
|
||||
return 1;
|
||||
};
|
||||
}
|
||||
|
||||
static int
|
||||
_edje_lua_part_get_state(lua_State *L)
|
||||
|
@ -3566,7 +3567,7 @@ _edje_lua_part_get_state(lua_State *L)
|
|||
lua_pushnumber(L, val);
|
||||
lua_rawseti(L, -2, 2);
|
||||
return 1;
|
||||
};
|
||||
}
|
||||
|
||||
static int
|
||||
_edje_lua_part_get_text(lua_State *L)
|
||||
|
@ -3574,7 +3575,7 @@ _edje_lua_part_get_text(lua_State *L)
|
|||
Edje_Lua_Edje_Part_Object *obj = _edje_lua_checkudata(L, 1, &mPart);
|
||||
lua_pushstring(L, edje_object_part_text_get(obj->ed->obj, obj->key));
|
||||
return 1;
|
||||
};
|
||||
}
|
||||
|
||||
static int
|
||||
_edje_lua_part_get_text_selection(lua_State *L)
|
||||
|
@ -3583,7 +3584,7 @@ _edje_lua_part_get_text_selection(lua_State *L)
|
|||
lua_pushstring(L,
|
||||
edje_object_part_text_selection_get(obj->ed->obj, obj->key));
|
||||
return 1;
|
||||
};
|
||||
}
|
||||
|
||||
static int
|
||||
_edje_lua_part_get_drag_dir(lua_State *L)
|
||||
|
@ -4135,7 +4136,7 @@ _edje_lua_group_mt_index(lua_State *L)
|
|||
if (rp)
|
||||
{
|
||||
// check if lua userdata exists
|
||||
Evas_Object *part = (Evas_Object *) edje_object_part_object_get(obj->eo, key);
|
||||
Evas_Object *part = (Evas_Object *)edje_object_part_object_get(obj->eo, key);
|
||||
_edje_lua_get_reg(L, part);
|
||||
if (lua_isnil(L, -1))
|
||||
{
|
||||
|
@ -4360,7 +4361,7 @@ _edje_lua_group_set_animation(lua_State *L)
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_group_text_change_cb(void* data, Evas_Object *obj, const char* part)
|
||||
_edje_lua_group_text_change_cb(void *data, Evas_Object *obj, const char *part)
|
||||
{
|
||||
Edje_Lua_Ref *ref = data;
|
||||
lua_State *L = ref->L;
|
||||
|
@ -4388,6 +4389,7 @@ _edje_lua_group_set_frametime(lua_State *L)
|
|||
edje_frametime_set(luaL_checknumber(L, 2));
|
||||
return 0;
|
||||
}
|
||||
|
||||
const luaL_Reg lGroup_set[] = {
|
||||
{"group", _edje_lua_group_set_group},
|
||||
{"size_min", _edje_lua_group_set_size_min},
|
||||
|
@ -4482,7 +4484,7 @@ static int
|
|||
_edje_lua_group_fn_transform(lua_State *L)
|
||||
{
|
||||
Edje_Lua_Transform *tar = lua_newuserdata(L, sizeof(Edje_Lua_Transform));
|
||||
evas_transform_identity_set (&(tar->et));
|
||||
evas_transform_identity_set(&(tar->et));
|
||||
_edje_lua_set_class(L, -1, cTransform);
|
||||
tar->L = L;
|
||||
return 1;
|
||||
|
@ -4498,7 +4500,7 @@ _edje_lua_group_fn_signal_emit(lua_State *L)
|
|||
}
|
||||
|
||||
static Edje_Program *
|
||||
_edje_lua_program_get_byname(Evas_Object * obj, const char *prog_name)
|
||||
_edje_lua_program_get_byname(Evas_Object *obj, const char *prog_name)
|
||||
{
|
||||
Edje_Program *epr;
|
||||
int i;
|
||||
|
@ -4557,8 +4559,10 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
{
|
||||
case EDJE_MESSAGE_NONE:
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_SIGNAL:
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING:
|
||||
{
|
||||
Edje_Message_String *msg_string =
|
||||
|
@ -4567,6 +4571,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_string;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_INT:
|
||||
{
|
||||
Edje_Message_Int *msg_int = malloc(sizeof(Edje_Message_Int));
|
||||
|
@ -4575,6 +4580,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_int;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_FLOAT:
|
||||
{
|
||||
Edje_Message_Float *msg_float = malloc(sizeof(Edje_Message_Float));
|
||||
|
@ -4583,6 +4589,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_float;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_SET:
|
||||
{
|
||||
if (lua_type(L, 4) != LUA_TTABLE)
|
||||
|
@ -4601,6 +4608,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_string_set;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_INT_SET:
|
||||
{
|
||||
if (lua_type(L, 4) != LUA_TTABLE)
|
||||
|
@ -4618,6 +4626,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_int_set;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_FLOAT_SET:
|
||||
{
|
||||
if (lua_type(L, 4) != LUA_TTABLE)
|
||||
|
@ -4636,6 +4645,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_float_set;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_INT:
|
||||
{
|
||||
Edje_Message_String_Int *msg_string_int =
|
||||
|
@ -4645,6 +4655,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_string_int;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_FLOAT:
|
||||
{
|
||||
Edje_Message_String_Float *msg_string_float =
|
||||
|
@ -4654,6 +4665,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_string_float;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_INT_SET:
|
||||
{
|
||||
if (lua_type(L, 5) != LUA_TTABLE)
|
||||
|
@ -4673,6 +4685,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_string_int_set;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_FLOAT_SET:
|
||||
{
|
||||
if (lua_type(L, 5) != LUA_TTABLE)
|
||||
|
@ -4692,6 +4705,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
msg = msg_string_float_set;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -4706,7 +4720,7 @@ _edje_lua_group_fn_message_send(lua_State *L)
|
|||
}
|
||||
|
||||
static void
|
||||
_edje_lua_group_signal_callback(void *data, Evas_Object * edj,
|
||||
_edje_lua_group_signal_callback(void *data, Evas_Object *edj,
|
||||
const char *signal, const char *source)
|
||||
{
|
||||
Edje_Lua_Ref *cb = data;
|
||||
|
@ -4817,30 +4831,30 @@ const Edje_Lua_Reg *cScript[] = {
|
|||
*/
|
||||
#define _EDJE_LUA_SCRIPT_FN_ADD(DEF, CLASS, FUNC) \
|
||||
static int \
|
||||
DEF (lua_State *L) \
|
||||
DEF(lua_State * L) \
|
||||
{ \
|
||||
int set = lua_gettop (L) == 2; \
|
||||
Edje_Lua_Evas_Object *obj = _edje_lua_checkudata (L, 1, &mScript); \
|
||||
Edje_Lua_Evas_Object *tar = lua_newuserdata (L, sizeof (Edje_Lua_Evas_Object)); \
|
||||
_edje_lua_set_class (L, -1, CLASS); \
|
||||
tar->eo = FUNC (obj->ed->evas); \
|
||||
int set = lua_gettop(L) == 2; \
|
||||
Edje_Lua_Evas_Object *obj = _edje_lua_checkudata(L, 1, &mScript); \
|
||||
Edje_Lua_Evas_Object *tar = lua_newuserdata(L, sizeof (Edje_Lua_Evas_Object)); \
|
||||
_edje_lua_set_class(L, -1, CLASS); \
|
||||
tar->eo = FUNC(obj->ed->evas); \
|
||||
tar->ed = obj->ed; \
|
||||
tar->L = L; \
|
||||
tar->cb = NULL; \
|
||||
evas_object_move (tar->eo, obj->ed->x, obj->ed->y); \
|
||||
_edje_lua_new_reg (L, -1, tar); /* freed in _edje_lua_object_del_cb */ \
|
||||
_edje_lua_new_reg (L, -1, tar->eo); /* freed in _edje_lua_object_del_cb */ \
|
||||
evas_object_smart_member_add (tar->eo, obj->eo); \
|
||||
evas_object_clip_set (tar->eo, obj->ed->clipper); \
|
||||
evas_object_event_callback_add (tar->eo, EVAS_CALLBACK_DEL, _edje_lua_object_del_cb, L); \
|
||||
evas_object_move(tar->eo, obj->ed->x, obj->ed->y); \
|
||||
_edje_lua_new_reg(L, -1, tar); /* freed in _edje_lua_object_del_cb */ \
|
||||
_edje_lua_new_reg(L, -1, tar->eo); /* freed in _edje_lua_object_del_cb */ \
|
||||
evas_object_smart_member_add(tar->eo, obj->eo); \
|
||||
evas_object_clip_set(tar->eo, obj->ed->clipper); \
|
||||
evas_object_event_callback_add(tar->eo, EVAS_CALLBACK_DEL, _edje_lua_object_del_cb, L); \
|
||||
if (set) \
|
||||
{ \
|
||||
int err_code; \
|
||||
lua_getfield (L, -1, "set"); \
|
||||
lua_pushvalue (L, -2); \
|
||||
lua_pushvalue (L, 2); \
|
||||
if ((err_code = lua_pcall (L, 2, 0, 0))) \
|
||||
_edje_lua_error (L, err_code); \
|
||||
lua_getfield(L, -1, "set"); \
|
||||
lua_pushvalue(L, -2); \
|
||||
lua_pushvalue(L, 2); \
|
||||
if ((err_code = lua_pcall(L, 2, 0, 0))) \
|
||||
_edje_lua_error(L, err_code); \
|
||||
} \
|
||||
return 1; \
|
||||
}
|
||||
|
@ -4884,7 +4898,7 @@ const luaL_Reg lScript_set[] = {
|
|||
* creates and exports a lua_script_only object
|
||||
*/
|
||||
void
|
||||
_edje_lua_script_fn_new(Edje * ed)
|
||||
_edje_lua_script_fn_new(Edje *ed)
|
||||
{
|
||||
lua_State *L = ed->L;
|
||||
Edje_Lua_Evas_Object *tar = lua_newuserdata(L, sizeof(Edje_Lua_Evas_Object));
|
||||
|
@ -4904,7 +4918,7 @@ _edje_lua_script_fn_new(Edje * ed)
|
|||
* creates and exports an Edje group with associated Lua scripts in the parts and programs sections
|
||||
*/
|
||||
void
|
||||
_edje_lua_group_fn_new(Edje * ed)
|
||||
_edje_lua_group_fn_new(Edje *ed)
|
||||
{
|
||||
lua_State *L = ed->L;
|
||||
Edje_Lua_Evas_Object *tar = lua_newuserdata(L, sizeof(Edje_Lua_Evas_Object));
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -23,35 +23,35 @@ _edje_lua_script_only_shutdown(Edje *ed)
|
|||
}
|
||||
|
||||
void
|
||||
_edje_lua_script_only_show(Edje * ed)
|
||||
_edje_lua_script_only_show(Edje *ed)
|
||||
{
|
||||
if (ed->collection && ed->L)
|
||||
_edje_lua2_script_func_show(ed);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_lua_script_only_hide(Edje * ed)
|
||||
_edje_lua_script_only_hide(Edje *ed)
|
||||
{
|
||||
if (ed->collection && ed->L)
|
||||
_edje_lua2_script_func_hide(ed);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_lua_script_only_move(Edje * ed)
|
||||
_edje_lua_script_only_move(Edje *ed)
|
||||
{
|
||||
if (ed->collection && ed->L)
|
||||
_edje_lua2_script_func_move(ed);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_lua_script_only_resize(Edje * ed)
|
||||
_edje_lua_script_only_resize(Edje *ed)
|
||||
{
|
||||
if (ed->collection && ed->L)
|
||||
_edje_lua2_script_func_resize(ed);
|
||||
}
|
||||
|
||||
void
|
||||
_edje_lua_script_only_message(Edje * ed, Edje_Message * em)
|
||||
_edje_lua_script_only_message(Edje *ed, Edje_Message *em)
|
||||
{
|
||||
if (ed->collection && ed->L)
|
||||
_edje_lua2_script_func_message(ed, em);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "edje_private.h"
|
||||
|
||||
static Edje_Version _version = { VMAJ, VMIN, VMIC, VREV };
|
||||
EAPI Edje_Version *edje_version = &_version;
|
||||
EAPI Edje_Version * edje_version = &_version;
|
||||
|
||||
static int _edje_init_count = 0;
|
||||
static Eina_Bool _need_imf = EINA_FALSE;
|
||||
|
@ -22,8 +22,8 @@ static const Edje_Calc_Params_Physics default_calc_physics = {
|
|||
};
|
||||
|
||||
/*============================================================================*
|
||||
* API *
|
||||
*============================================================================*/
|
||||
* API *
|
||||
*============================================================================*/
|
||||
EAPI int
|
||||
edje_init(void)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ edje_init(void)
|
|||
}
|
||||
|
||||
_edje_calc_params_map_cow = eina_cow_add("Edje Calc Params Map", sizeof (Edje_Calc_Params_Map), 8, &default_calc_map, EINA_TRUE);
|
||||
_edje_calc_params_physics_cow= eina_cow_add("Edje Calc Params Physics", sizeof (Edje_Calc_Params_Physics), 8, &default_calc_physics, EINA_TRUE);
|
||||
_edje_calc_params_physics_cow = eina_cow_add("Edje Calc Params Physics", sizeof (Edje_Calc_Params_Physics), 8, &default_calc_physics, EINA_TRUE);
|
||||
|
||||
_edje_language = eina_stringshare_add(getenv("LANGUAGE"));
|
||||
|
||||
|
@ -120,7 +120,7 @@ edje_init(void)
|
|||
|
||||
return _edje_init_count;
|
||||
|
||||
shutdown_all:
|
||||
shutdown_all:
|
||||
eina_mempool_del(_edje_real_part_state_mp);
|
||||
eina_mempool_del(_edje_real_part_mp);
|
||||
_edje_real_part_state_mp = NULL;
|
||||
|
@ -133,18 +133,18 @@ edje_init(void)
|
|||
_edje_text_class_hash_free();
|
||||
_edje_edd_shutdown();
|
||||
efreet_shutdown();
|
||||
shutdown_evas:
|
||||
shutdown_evas:
|
||||
evas_shutdown();
|
||||
shutdown_eet:
|
||||
shutdown_eet:
|
||||
eet_shutdown();
|
||||
shutdown_embryo:
|
||||
shutdown_embryo:
|
||||
embryo_shutdown();
|
||||
shutdown_ecore:
|
||||
shutdown_ecore:
|
||||
ecore_shutdown();
|
||||
unregister_log_domain:
|
||||
unregister_log_domain:
|
||||
eina_log_domain_unregister(_edje_default_log_dom);
|
||||
_edje_default_log_dom = -1;
|
||||
shutdown_eina:
|
||||
shutdown_eina:
|
||||
eina_shutdown();
|
||||
return --_edje_init_count;
|
||||
}
|
||||
|
@ -324,3 +324,4 @@ _edje_need_imf(void)
|
|||
ecore_imf_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -20,14 +20,14 @@ static void
|
|||
_edje_match_states_free(Edje_States *states,
|
||||
unsigned int states_size)
|
||||
{
|
||||
(void) states_size;
|
||||
(void)states_size;
|
||||
free(states);
|
||||
}
|
||||
|
||||
#define ALIGN(Size) \
|
||||
{ \
|
||||
Size--; \
|
||||
Size |= sizeof (void*) - 1; \
|
||||
Size |= sizeof (void *) - 1; \
|
||||
Size++; \
|
||||
};
|
||||
|
||||
|
@ -69,13 +69,13 @@ _edje_match_states_alloc(Edje_Patterns *ppat, int n)
|
|||
ppat->states = l;
|
||||
ppat->states->size = 0;
|
||||
|
||||
states = (unsigned char *) (l + n);
|
||||
states = (unsigned char *)(l + n);
|
||||
has = states + states_size;
|
||||
|
||||
for (i = 0; i < n; ++i)
|
||||
{
|
||||
l[i].states = (Edje_State *) states;
|
||||
l[i].has = (Eina_Bool *) has;
|
||||
l[i].states = (Edje_State *)states;
|
||||
l[i].has = (Eina_Bool *)has;
|
||||
l[i].size = 0;
|
||||
|
||||
memset(l[i].has, 0, has_size);
|
||||
|
@ -132,7 +132,7 @@ _edje_match_patterns_exec_class_token(enum status *status,
|
|||
const char *cl_tok,
|
||||
char c)
|
||||
{
|
||||
if (! *cl_tok)
|
||||
if (!*cl_tok)
|
||||
{
|
||||
*status = patterns_syntax_error;
|
||||
return 0;
|
||||
|
@ -189,7 +189,7 @@ _edje_match_patterns_exec_class(const char *cl,
|
|||
}
|
||||
while (cl[pos] && cl[pos] != ']');
|
||||
|
||||
if (status == patterns_syntax_error || ! cl[pos])
|
||||
if (status == patterns_syntax_error || !cl[pos])
|
||||
return EDJE_MATCH_SYNTAX_ERROR;
|
||||
|
||||
if (status == patterns_found)
|
||||
|
@ -248,7 +248,7 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
|||
/* Exported function. */
|
||||
|
||||
#define EDJE_MATCH_INIT_LIST(Func, Type, Source, Show) \
|
||||
Edje_Patterns* \
|
||||
Edje_Patterns * \
|
||||
Func(const Eina_List *lst) \
|
||||
{ \
|
||||
Edje_Patterns *r; \
|
||||
|
@ -267,7 +267,7 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
|||
r->delete_me = EINA_FALSE; \
|
||||
r->patterns_size = eina_list_count(lst); \
|
||||
r->max_length = 0; \
|
||||
r->patterns = (const char **) r->finals + r->patterns_size + 1; \
|
||||
r->patterns = (const char **)r->finals + r->patterns_size + 1; \
|
||||
\
|
||||
for (i = 0; lst; ++i) \
|
||||
{ \
|
||||
|
@ -315,7 +315,7 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
|||
}
|
||||
|
||||
#define EDJE_MATCH_INIT_ARRAY(Func, Type, Source, Show) \
|
||||
Edje_Patterns* \
|
||||
Edje_Patterns * \
|
||||
Func(Type * const *lst, unsigned int count) \
|
||||
{ \
|
||||
Edje_Patterns *r; \
|
||||
|
@ -334,7 +334,7 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
|||
r->delete_me = EINA_FALSE; \
|
||||
r->patterns_size = count; \
|
||||
r->max_length = 0; \
|
||||
r->patterns = (const char **) r->finals + r->patterns_size + 1; \
|
||||
r->patterns = (const char **)r->finals + r->patterns_size + 1; \
|
||||
\
|
||||
for (i = 0; i < count; ++i) \
|
||||
{ \
|
||||
|
@ -378,8 +378,8 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
|||
}
|
||||
|
||||
#define EDJE_MATCH_INIT_INARRAY(Func, Source, Show) \
|
||||
Edje_Patterns* \
|
||||
Func(const Eina_Inarray *array, const Edje_Signal_Callback_Match *matches) \
|
||||
Edje_Patterns * \
|
||||
Func(const Eina_Inarray * array, const Edje_Signal_Callback_Match * matches) \
|
||||
{ \
|
||||
Edje_Patterns *r; \
|
||||
int *it; \
|
||||
|
@ -398,7 +398,7 @@ _edje_match_patterns_exec_init_states(Edje_States *states,
|
|||
r->delete_me = EINA_FALSE; \
|
||||
r->patterns_size = eina_inarray_count(array); \
|
||||
r->max_length = 0; \
|
||||
r->patterns = (const char **) r->finals + r->patterns_size + 1; \
|
||||
r->patterns = (const char **)r->finals + r->patterns_size + 1; \
|
||||
\
|
||||
EINA_INARRAY_FOREACH(array, it) \
|
||||
{ \
|
||||
|
@ -553,7 +553,7 @@ edje_match_callback_exec_check_finals(const Edje_Signals_Sources_Patterns *ssp,
|
|||
|
||||
if (ed->callbacks->flags[idx].delete_me) continue;
|
||||
|
||||
cb->func((void*) ed->callbacks->custom_data[idx], ed->obj, sig, source);
|
||||
cb->func((void *)ed->callbacks->custom_data[idx], ed->obj, sig, source);
|
||||
if (_edje_block_break(ed))
|
||||
{
|
||||
r = 0;
|
||||
|
@ -571,8 +571,7 @@ edje_match_callback_exec_check_finals(const Edje_Signals_Sources_Patterns *ssp,
|
|||
return r;
|
||||
}
|
||||
|
||||
|
||||
static Edje_States*
|
||||
static Edje_States *
|
||||
_edje_match_fn(const Edje_Patterns *ppat,
|
||||
const char *string,
|
||||
Edje_States *states)
|
||||
|
@ -775,9 +774,8 @@ _edje_signal_source_key_cmp(const Edje_Signal_Source_Char *node,
|
|||
return strcmp(node->source, source);
|
||||
}
|
||||
|
||||
|
||||
Eina_List *
|
||||
edje_match_program_hash_build(Edje_Program * const *programs,
|
||||
edje_match_program_hash_build(Edje_Program *const *programs,
|
||||
unsigned int count,
|
||||
Eina_Rbtree **tree)
|
||||
{
|
||||
|
@ -792,7 +790,7 @@ edje_match_program_hash_build(Edje_Program * const *programs,
|
|||
{
|
||||
Edje_Signal_Source_Char *item;
|
||||
|
||||
item = (Edje_Signal_Source_Char*) eina_rbtree_inline_lookup(new, programs[i]->signal, 0,
|
||||
item = (Edje_Signal_Source_Char *)eina_rbtree_inline_lookup(new, programs[i]->signal, 0,
|
||||
EINA_RBTREE_CMP_KEY_CB(_edje_signal_source_key_cmp), programs[i]->source);
|
||||
if (!item)
|
||||
{
|
||||
|
@ -801,7 +799,7 @@ edje_match_program_hash_build(Edje_Program * const *programs,
|
|||
|
||||
item->signal = programs[i]->signal;
|
||||
item->source = programs[i]->source;
|
||||
eina_inarray_step_set(&item->list, sizeof (Eina_Inarray), sizeof (void*), 8);
|
||||
eina_inarray_step_set(&item->list, sizeof (Eina_Inarray), sizeof (void *), 8);
|
||||
|
||||
new = eina_rbtree_inline_insert(new, EINA_RBTREE_GET(item),
|
||||
EINA_RBTREE_CMP_NODE_CB(_edje_signal_source_node_cmp), NULL);
|
||||
|
@ -835,7 +833,7 @@ edje_match_callback_hash_build(const Edje_Signal_Callback_Match *callbacks,
|
|||
{
|
||||
Edje_Signal_Source_Char *item;
|
||||
|
||||
item = (Edje_Signal_Source_Char*) eina_rbtree_inline_lookup(new, callbacks->signal, 0,
|
||||
item = (Edje_Signal_Source_Char *)eina_rbtree_inline_lookup(new, callbacks->signal, 0,
|
||||
EINA_RBTREE_CMP_KEY_CB(_edje_signal_source_key_cmp), callbacks->source);
|
||||
if (!item)
|
||||
{
|
||||
|
@ -868,7 +866,7 @@ edje_match_signal_source_hash_get(const char *sig,
|
|||
{
|
||||
Edje_Signal_Source_Char *lookup;
|
||||
|
||||
lookup = (Edje_Signal_Source_Char*) eina_rbtree_inline_lookup(tree, sig, 0,
|
||||
lookup = (Edje_Signal_Source_Char *)eina_rbtree_inline_lookup(tree, sig, 0,
|
||||
EINA_RBTREE_CMP_KEY_CB(_edje_signal_source_key_cmp), source);
|
||||
|
||||
if (lookup) return &lookup->list;
|
||||
|
@ -881,3 +879,4 @@ edje_match_signal_source_free(Edje_Signal_Source_Char *key, EINA_UNUSED void *da
|
|||
eina_inarray_flush(&key->list);
|
||||
free(key);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ static int tmp_msgq_processing = 0;
|
|||
static int tmp_msgq_restart = 0;
|
||||
|
||||
/*============================================================================*
|
||||
* API *
|
||||
*============================================================================*/
|
||||
* API *
|
||||
*============================================================================*/
|
||||
|
||||
static void
|
||||
_edje_object_message_popornot_send(Evas_Object *obj, Edje_Message_Type type, int id, void *msg, Eina_Bool prop)
|
||||
|
@ -135,7 +135,6 @@ edje_message_signal_process(void)
|
|||
_edje_message_queue_process();
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_edje_dummy_timer(void *data EINA_UNUSED)
|
||||
{
|
||||
|
@ -189,7 +188,7 @@ _edje_message_shutdown(void)
|
|||
}
|
||||
|
||||
void
|
||||
_edje_message_cb_set(Edje *ed, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data)
|
||||
_edje_message_cb_set(Edje *ed, void (*func)(void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data)
|
||||
{
|
||||
Eina_List *l;
|
||||
Evas_Object *o;
|
||||
|
@ -237,6 +236,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_INT:
|
||||
{
|
||||
Edje_Message_Int *emsg;
|
||||
|
@ -245,6 +245,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_FLOAT:
|
||||
{
|
||||
Edje_Message_Float *emsg;
|
||||
|
@ -253,6 +254,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_INT_SET:
|
||||
{
|
||||
Edje_Message_Int_Set *emsg;
|
||||
|
@ -261,6 +263,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_FLOAT_SET:
|
||||
{
|
||||
Edje_Message_Float_Set *emsg;
|
||||
|
@ -269,6 +272,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_FLOAT:
|
||||
{
|
||||
Edje_Message_String_Float *emsg;
|
||||
|
@ -278,6 +282,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_INT:
|
||||
{
|
||||
Edje_Message_String_Int *emsg;
|
||||
|
@ -287,6 +292,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_FLOAT_SET:
|
||||
{
|
||||
Edje_Message_String_Float_Set *emsg;
|
||||
|
@ -296,6 +302,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_INT_SET:
|
||||
{
|
||||
Edje_Message_String_Int_Set *emsg;
|
||||
|
@ -305,6 +312,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_SIGNAL:
|
||||
{
|
||||
Edje_Message_Signal *emsg;
|
||||
|
@ -323,6 +331,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_SET:
|
||||
{
|
||||
Edje_Message_String_Set *emsg;
|
||||
|
@ -333,6 +342,7 @@ _edje_message_free(Edje_Message *em)
|
|||
free(emsg);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_NONE:
|
||||
default:
|
||||
break;
|
||||
|
@ -378,6 +388,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
{
|
||||
case EDJE_MESSAGE_NONE:
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_SIGNAL:
|
||||
{
|
||||
Edje_Message_Signal *emsg2, *emsg3;
|
||||
|
@ -394,6 +405,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING:
|
||||
{
|
||||
Edje_Message_String *emsg2, *emsg3;
|
||||
|
@ -405,6 +417,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_INT:
|
||||
{
|
||||
Edje_Message_Int *emsg2, *emsg3;
|
||||
|
@ -415,6 +428,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_FLOAT:
|
||||
{
|
||||
Edje_Message_Float *emsg2, *emsg3;
|
||||
|
@ -425,6 +439,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_SET:
|
||||
{
|
||||
Edje_Message_String_Set *emsg2, *emsg3;
|
||||
|
@ -437,6 +452,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_INT_SET:
|
||||
{
|
||||
Edje_Message_Int_Set *emsg2, *emsg3;
|
||||
|
@ -449,6 +465,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_FLOAT_SET:
|
||||
{
|
||||
Edje_Message_Float_Set *emsg2, *emsg3;
|
||||
|
@ -461,6 +478,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_INT:
|
||||
{
|
||||
Edje_Message_String_Int *emsg2, *emsg3;
|
||||
|
@ -472,6 +490,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_FLOAT:
|
||||
{
|
||||
Edje_Message_String_Float *emsg2, *emsg3;
|
||||
|
@ -483,6 +502,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_INT_SET:
|
||||
{
|
||||
Edje_Message_String_Int_Set *emsg2, *emsg3;
|
||||
|
@ -496,6 +516,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_FLOAT_SET:
|
||||
{
|
||||
Edje_Message_String_Float_Set *emsg2, *emsg3;
|
||||
|
@ -509,6 +530,7 @@ _edje_message_propornot_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
|
|||
msg = (unsigned char *)emsg3;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -540,10 +562,12 @@ _edje_message_parameters_push(Edje_Message *em)
|
|||
{
|
||||
case EDJE_MESSAGE_NONE:
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String *)em->msg)->str);
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_INT:
|
||||
{
|
||||
Embryo_Cell v;
|
||||
|
@ -552,6 +576,7 @@ _edje_message_parameters_push(Edje_Message *em)
|
|||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_FLOAT:
|
||||
{
|
||||
Embryo_Cell v;
|
||||
|
@ -562,11 +587,13 @@ _edje_message_parameters_push(Edje_Message *em)
|
|||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_SET:
|
||||
for (i = 0; i < ((Edje_Message_String_Set *)em->msg)->count; i++)
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Set *)em->msg)->str[i]);
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_INT_SET:
|
||||
for (i = 0; i < ((Edje_Message_Int_Set *)em->msg)->count; i++)
|
||||
{
|
||||
|
@ -576,6 +603,7 @@ _edje_message_parameters_push(Edje_Message *em)
|
|||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_FLOAT_SET:
|
||||
for (i = 0; i < ((Edje_Message_Float_Set *)em->msg)->count; i++)
|
||||
{
|
||||
|
@ -587,6 +615,7 @@ _edje_message_parameters_push(Edje_Message *em)
|
|||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_INT:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Int *)em->msg)->str);
|
||||
|
@ -597,6 +626,7 @@ _edje_message_parameters_push(Edje_Message *em)
|
|||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_FLOAT:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Float *)em->msg)->str);
|
||||
|
@ -609,6 +639,7 @@ _edje_message_parameters_push(Edje_Message *em)
|
|||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_INT_SET:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Int_Set *)em->msg)->str);
|
||||
|
@ -620,6 +651,7 @@ _edje_message_parameters_push(Edje_Message *em)
|
|||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_MESSAGE_STRING_FLOAT_SET:
|
||||
embryo_parameter_string_push(em->edje->collection->script,
|
||||
((Edje_Message_String_Float_Set *)em->msg)->str);
|
||||
|
@ -633,6 +665,7 @@ _edje_message_parameters_push(Edje_Message *em)
|
|||
embryo_parameter_cell_array_push(em->edje->collection->script, &v, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -853,3 +886,4 @@ _edje_message_del(Edje *ed)
|
|||
if (ed->message.num <= 0) return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ _edje_module_init(void)
|
|||
if (getenv("EFL_RUN_IN_TREE"))
|
||||
{
|
||||
struct stat st;
|
||||
const char mp[] = PACKAGE_BUILD_DIR"/src/modules/edje";
|
||||
const char mp[] = PACKAGE_BUILD_DIR "/src/modules/edje";
|
||||
if (stat(mp, &st) == 0)
|
||||
{
|
||||
_modules_paths = eina_list_append(_modules_paths, strdup(mp));
|
||||
|
@ -102,15 +102,15 @@ _edje_module_init(void)
|
|||
paths[1] = strdup(PACKAGE_LIB_DIR "/edje/modules");
|
||||
#endif
|
||||
|
||||
for (j = 0; j < ((sizeof (paths) / sizeof (char*)) - 1); ++j)
|
||||
for (i = j + 1; i < sizeof (paths) / sizeof (char*); ++i)
|
||||
for (j = 0; j < ((sizeof (paths) / sizeof (char *)) - 1); ++j)
|
||||
for (i = j + 1; i < sizeof (paths) / sizeof (char *); ++i)
|
||||
if (paths[i] && paths[j] && !strcmp(paths[i], paths[j]))
|
||||
{
|
||||
free(paths[i]);
|
||||
paths[i] = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < sizeof (paths) / sizeof (char*); ++i)
|
||||
for (i = 0; i < sizeof (paths) / sizeof (char *); ++i)
|
||||
if (paths[i])
|
||||
_modules_paths = eina_list_append(_modules_paths, paths[i]);
|
||||
}
|
||||
|
@ -177,3 +177,4 @@ edje_available_modules_get(void)
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,14 +7,16 @@ static Eo *out = NULL;
|
|||
static int outs = 0;
|
||||
static Eina_Bool outfail = EINA_FALSE;
|
||||
|
||||
static Eina_Bool _play_finished(void *data EINA_UNUSED, Eo *in, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
static Eina_Bool
|
||||
_play_finished(void *data EINA_UNUSED, Eo *in, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
eo_del(in);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool _out_fail(void *data EINA_UNUSED, Eo *output EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
static Eina_Bool
|
||||
_out_fail(void *data EINA_UNUSED, Eo *output EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
outfail = EINA_TRUE;
|
||||
eo_del(out);
|
||||
|
@ -47,12 +49,15 @@ eet_snd_file_seek(void *data, Eo *eo_obj EINA_UNUSED, int offset, int whence)
|
|||
case SEEK_SET:
|
||||
vf->offset = offset;
|
||||
break;
|
||||
|
||||
case SEEK_CUR:
|
||||
vf->offset += offset;
|
||||
break;
|
||||
|
||||
case SEEK_END:
|
||||
vf->offset = vf->length + offset;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -110,11 +115,11 @@ EAPI void
|
|||
edje_audio_channel_mute_set(Edje_Channel channel, Eina_Bool mute)
|
||||
{
|
||||
#ifdef ENABLE_MULTISENSE
|
||||
if ((unsigned) channel > 7) return;
|
||||
if ((unsigned)channel > 7) return;
|
||||
_channel_mute_states[channel] = mute;
|
||||
#else
|
||||
(void) channel;
|
||||
(void) mute;
|
||||
(void)channel;
|
||||
(void)mute;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -122,10 +127,10 @@ EAPI Eina_Bool
|
|||
edje_audio_channel_mute_get(Edje_Channel channel)
|
||||
{
|
||||
#ifdef ENABLE_MULTISENSE
|
||||
if ((unsigned) channel > 7) return EINA_FALSE;
|
||||
if ((unsigned)channel > 7) return EINA_FALSE;
|
||||
return _channel_mute_states[channel];
|
||||
#else
|
||||
(void) channel;
|
||||
(void)channel;
|
||||
return EINA_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
@ -153,7 +158,7 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
|
|||
if ((!ed) || (!ed->file) || (!ed->file->sound_dir))
|
||||
return EINA_FALSE;
|
||||
|
||||
for(i=0; i<(int)ed->file->sound_dir->samples_count; i++)
|
||||
for (i = 0; i < (int)ed->file->sound_dir->samples_count; i++)
|
||||
{
|
||||
sample = &ed->file->sound_dir->samples[i];
|
||||
if (!strcmp(sample->name, sample_name))
|
||||
|
@ -234,10 +239,10 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
|
|||
return EINA_TRUE;
|
||||
#else
|
||||
// warning shh
|
||||
(void) ed;
|
||||
(void) sample_name;
|
||||
(void) speed;
|
||||
(void) channel;
|
||||
(void)ed;
|
||||
(void)sample_name;
|
||||
(void)speed;
|
||||
(void)channel;
|
||||
return EINA_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
@ -264,7 +269,7 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
|
|||
if ((!ed) || (!ed->file) || (!ed->file->sound_dir))
|
||||
return EINA_FALSE;
|
||||
|
||||
for (i=0; i<ed->file->sound_dir->tones_count; i++)
|
||||
for (i = 0; i < ed->file->sound_dir->tones_count; i++)
|
||||
{
|
||||
tone = &ed->file->sound_dir->tones[i];
|
||||
if (!strcmp(tone->name, tone_name))
|
||||
|
@ -287,7 +292,8 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
|
|||
}
|
||||
|
||||
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
|
||||
if (!ret) {
|
||||
if (!ret)
|
||||
{
|
||||
ERR("Could not attach input");
|
||||
eo_del(in);
|
||||
return EINA_FALSE;
|
||||
|
@ -297,13 +303,12 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
|
|||
return EINA_TRUE;
|
||||
#else
|
||||
// warning shh
|
||||
(void) ed;
|
||||
(void) duration;
|
||||
(void) tone_name;
|
||||
(void) channel;
|
||||
(void)ed;
|
||||
(void)duration;
|
||||
(void)tone_name;
|
||||
(void)channel;
|
||||
return EINA_FALSE;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Eina_Bool
|
||||
|
@ -313,8 +318,8 @@ _edje_multisense_internal_vibration_sample_play(Edje *ed EINA_UNUSED, const char
|
|||
ERR("Vibration is not supported yet, name:%s, repeat:%d", sample_name, repeat);
|
||||
return EINA_FALSE;
|
||||
#else
|
||||
(void) ed;
|
||||
(void) repeat;
|
||||
(void)ed;
|
||||
(void)repeat;
|
||||
return EINA_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
@ -345,3 +350,4 @@ _edje_multisense_shutdown(void)
|
|||
ecore_audio_shutdown();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ int _edje_anim_count = 0;
|
|||
Ecore_Animator *_edje_timer = NULL;
|
||||
Eina_List *_edje_animators = NULL;
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_edje_emit_aliased(Edje *ed, const char *part, const char *sig, const char *src)
|
||||
{
|
||||
|
@ -113,7 +112,7 @@ _edje_emit_child(Edje *ed, Edje_Real_Part *rp, const char *part, const char *sig
|
|||
_edje_emit(ed2, sig, src);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
break ;
|
||||
break;
|
||||
|
||||
default:
|
||||
// ERR("SPANK SPANK SPANK !!!\nYou should never be here !");
|
||||
|
@ -168,8 +167,8 @@ _edje_emit_send(Edje *ed, Eina_Bool broadcast, const char *sig, const char *src,
|
|||
}
|
||||
|
||||
/*============================================================================*
|
||||
* API *
|
||||
*============================================================================*/
|
||||
* API *
|
||||
*============================================================================*/
|
||||
|
||||
EAPI void
|
||||
edje_frametime_set(double t)
|
||||
|
@ -184,7 +183,7 @@ edje_frametime_get(void)
|
|||
}
|
||||
|
||||
void
|
||||
edje_object_propagate_callback_add(Evas_Object *obj, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
|
||||
edje_object_propagate_callback_add(Evas_Object *obj, void (*func)(void *data, Evas_Object *o, const char *emission, const char *source), void *data)
|
||||
{
|
||||
const char *sig;
|
||||
const char *src;
|
||||
|
@ -232,7 +231,7 @@ _edje_object_signal_callback_add(Eo *obj EINA_UNUSED, Edje *ed, const char *emis
|
|||
}
|
||||
|
||||
EAPI void *
|
||||
edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source))
|
||||
edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func)(void *data, Evas_Object *o, const char *emission, const char *source))
|
||||
{
|
||||
if (!obj) return NULL;
|
||||
void *ret = NULL;
|
||||
|
@ -240,7 +239,7 @@ edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const ch
|
|||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN void*
|
||||
EOLIAN void *
|
||||
_edje_object_signal_callback_del(Eo *obj EINA_UNUSED, Edje *ed, const char *emission, const char *source, Edje_Signal_Cb func, void *data)
|
||||
{
|
||||
if ((!emission) || (!source) || (!func)) return NULL;
|
||||
|
@ -420,7 +419,8 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
|||
if (pt->id >= 0)
|
||||
{
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if (rp) _edje_part_pos_set(ed, rp,
|
||||
if (rp)
|
||||
_edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, t,
|
||||
runp->program->tween.v1,
|
||||
runp->program->tween.v2,
|
||||
|
@ -575,6 +575,7 @@ _edje_physics_action_set(Edje *ed, Edje_Program *pr, void (*func)(EPhysics_Body
|
|||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -652,9 +653,9 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
|
|||
|
||||
if (rp->current)
|
||||
{
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &rp->current->map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &rp->current->physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics);
|
||||
#endif
|
||||
free(rp->current);
|
||||
}
|
||||
|
@ -665,9 +666,9 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
|
|||
low_mem_current:
|
||||
if (rp->current)
|
||||
{
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **) &rp->current->map);
|
||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map);
|
||||
#ifdef HAVE_EPHYSICS
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **) &rp->current->physics);
|
||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics);
|
||||
#endif
|
||||
free(rp->current);
|
||||
}
|
||||
|
@ -747,6 +748,7 @@ low_mem_current:
|
|||
_edje_recalc(ed);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_ACTION_STOP:
|
||||
// _edje_emit(ed, "program,start", pr->name);
|
||||
EINA_LIST_FOREACH(pr->targets, l, pt)
|
||||
|
@ -783,6 +785,7 @@ low_mem_current:
|
|||
// _edje_emit(ed, "program,stop", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_SIGNAL_EMIT:
|
||||
// _edje_emit(ed, "program,start", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
|
@ -808,6 +811,7 @@ low_mem_current:
|
|||
// _edje_emit(ed, "program,stop", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_DRAG_VAL_SET:
|
||||
// _edje_emit(ed, "program,start", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
|
@ -821,9 +825,11 @@ low_mem_current:
|
|||
rp->drag->val.x = pr->value;
|
||||
rp->drag->val.y = pr->value2;
|
||||
if (rp->drag->val.x < 0.0) rp->drag->val.x = 0.0;
|
||||
else if (rp->drag->val.x > 1.0) rp->drag->val.x = 1.0;
|
||||
else if (rp->drag->val.x > 1.0)
|
||||
rp->drag->val.x = 1.0;
|
||||
if (rp->drag->val.y < 0.0) rp->drag->val.y = 0.0;
|
||||
else if (rp->drag->val.y > 1.0) rp->drag->val.y = 1.0;
|
||||
else if (rp->drag->val.y > 1.0)
|
||||
rp->drag->val.y = 1.0;
|
||||
_edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y);
|
||||
_edje_emit(ed, "drag,set", rp->part->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
|
@ -833,6 +839,7 @@ low_mem_current:
|
|||
// _edje_emit(ed, "program,stop", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_DRAG_VAL_STEP:
|
||||
// _edje_emit(ed, "program,start", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
|
@ -846,9 +853,11 @@ low_mem_current:
|
|||
rp->drag->val.x += pr->value * rp->drag->step.x * rp->part->dragable.x;
|
||||
rp->drag->val.y += pr->value2 * rp->drag->step.y * rp->part->dragable.y;
|
||||
if (rp->drag->val.x < 0.0) rp->drag->val.x = 0.0;
|
||||
else if (rp->drag->val.x > 1.0) rp->drag->val.x = 1.0;
|
||||
else if (rp->drag->val.x > 1.0)
|
||||
rp->drag->val.x = 1.0;
|
||||
if (rp->drag->val.y < 0.0) rp->drag->val.y = 0.0;
|
||||
else if (rp->drag->val.y > 1.0) rp->drag->val.y = 1.0;
|
||||
else if (rp->drag->val.y > 1.0)
|
||||
rp->drag->val.y = 1.0;
|
||||
_edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y);
|
||||
_edje_emit(ed, "drag,step", rp->part->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
|
@ -858,6 +867,7 @@ low_mem_current:
|
|||
// _edje_emit(ed, "program,stop", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_DRAG_VAL_PAGE:
|
||||
// _edje_emit(ed, "program,start", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
|
@ -871,9 +881,11 @@ low_mem_current:
|
|||
rp->drag->val.x += pr->value * rp->drag->page.x * rp->part->dragable.x;
|
||||
rp->drag->val.y += pr->value2 * rp->drag->page.y * rp->part->dragable.y;
|
||||
if (rp->drag->val.x < 0.0) rp->drag->val.x = 0.0;
|
||||
else if (rp->drag->val.x > 1.0) rp->drag->val.x = 1.0;
|
||||
else if (rp->drag->val.x > 1.0)
|
||||
rp->drag->val.x = 1.0;
|
||||
if (rp->drag->val.y < 0.0) rp->drag->val.y = 0.0;
|
||||
else if (rp->drag->val.y > 1.0) rp->drag->val.y = 1.0;
|
||||
else if (rp->drag->val.y > 1.0)
|
||||
rp->drag->val.y = 1.0;
|
||||
_edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y);
|
||||
_edje_emit(ed, "drag,page", rp->part->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
|
@ -883,6 +895,7 @@ low_mem_current:
|
|||
// _edje_emit(ed, "program,stop", pr->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_SCRIPT:
|
||||
{
|
||||
char fname[128];
|
||||
|
@ -896,6 +909,7 @@ low_mem_current:
|
|||
_edje_recalc_do(ed);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_FOCUS_SET:
|
||||
if (!pr->targets)
|
||||
{
|
||||
|
@ -927,6 +941,7 @@ low_mem_current:
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_FOCUS_OBJECT:
|
||||
if (!pr->targets)
|
||||
{
|
||||
|
@ -968,21 +983,25 @@ low_mem_current:
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_SOUND_SAMPLE:
|
||||
if (_edje_block_break(ed))
|
||||
goto break_prog;
|
||||
_edje_multisense_internal_sound_sample_play(ed, pr->sample_name, pr->speed, pr->channel);
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_SOUND_TONE:
|
||||
if (_edje_block_break(ed))
|
||||
goto break_prog;
|
||||
_edje_multisense_internal_sound_tone_play(ed, pr->tone_name, pr->duration, pr->channel);
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_VIBRATION_SAMPLE:
|
||||
if (_edje_block_break(ed))
|
||||
goto break_prog;
|
||||
_edje_multisense_internal_vibration_sample_play(ed, pr->vibration_name, pr->vibration_repeat);
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PARAM_COPY:
|
||||
{
|
||||
Edje_Real_Part *src_part, *dst_part;
|
||||
|
@ -999,6 +1018,7 @@ low_mem_current:
|
|||
if (_edje_block_break(ed)) goto break_prog;
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PARAM_SET:
|
||||
{
|
||||
Edje_Real_Part *part;
|
||||
|
@ -1014,23 +1034,28 @@ low_mem_current:
|
|||
if (_edje_block_break(ed)) goto break_prog;
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef HAVE_EPHYSICS
|
||||
case EDJE_ACTION_TYPE_PHYSICS_IMPULSE:
|
||||
if (!_edje_physics_action_set(ed, pr, ephysics_body_central_impulse_apply))
|
||||
goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PHYSICS_TORQUE_IMPULSE:
|
||||
if (!_edje_physics_action_set(ed, pr, ephysics_body_torque_impulse_apply))
|
||||
goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PHYSICS_FORCE:
|
||||
if (!_edje_physics_action_set(ed, pr, ephysics_body_central_force_apply))
|
||||
goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PHYSICS_TORQUE:
|
||||
if (!_edje_physics_action_set(ed, pr, ephysics_body_torque_apply))
|
||||
goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PHYSICS_FORCES_CLEAR:
|
||||
if (_edje_block_break(ed))
|
||||
goto break_prog;
|
||||
|
@ -1044,14 +1069,17 @@ low_mem_current:
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PHYSICS_VEL_SET:
|
||||
if (!_edje_physics_action_set(ed, pr, ephysics_body_linear_velocity_set))
|
||||
goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PHYSICS_ANG_VEL_SET:
|
||||
if (!_edje_physics_action_set(ed, pr, ephysics_body_angular_velocity_set))
|
||||
goto break_prog;
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PHYSICS_STOP:
|
||||
if (_edje_block_break(ed))
|
||||
goto break_prog;
|
||||
|
@ -1065,6 +1093,7 @@ low_mem_current:
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_ACTION_TYPE_PHYSICS_ROT_SET:
|
||||
if (_edje_block_break(ed))
|
||||
goto break_prog;
|
||||
|
@ -1085,6 +1114,7 @@ low_mem_current:
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
#endif
|
||||
default:
|
||||
// _edje_emit(ed, "program,start", pr->name);
|
||||
|
@ -1165,7 +1195,8 @@ struct _Edje_Program_Data
|
|||
const char *source;
|
||||
};
|
||||
|
||||
static Eina_Bool _edje_glob_callback(Edje_Program *pr, void *dt)
|
||||
static Eina_Bool
|
||||
_edje_glob_callback(Edje_Program *pr, void *dt)
|
||||
{
|
||||
struct _Edje_Program_Data *data = dt;
|
||||
Edje_Real_Part *rp = NULL;
|
||||
|
@ -1383,7 +1414,7 @@ _edje_emit_cb(Edje *ed, const char *sig, const char *src, Edje_Message_Signal_Da
|
|||
|
||||
ssp = _edje_signal_callback_patterns_ref(ed->callbacks);
|
||||
|
||||
m = (Edje_Signal_Callback_Matches*) ed->callbacks->matches;
|
||||
m = (Edje_Signal_Callback_Matches *)ed->callbacks->matches;
|
||||
EINA_REFCOUNT_REF(m);
|
||||
|
||||
callback_extra_data = (data) ? data->data : NULL;
|
||||
|
@ -1413,7 +1444,7 @@ _edje_emit_cb(Edje *ed, const char *sig, const char *src, Edje_Message_Signal_Da
|
|||
|
||||
cb = &m->matches[*i];
|
||||
|
||||
cb->func((void*) ed->callbacks->custom_data[*i], ed->obj, sig, src);
|
||||
cb->func((void *)ed->callbacks->custom_data[*i], ed->obj, sig, src);
|
||||
if (_edje_block_break(ed))
|
||||
break;
|
||||
}
|
||||
|
@ -1901,14 +1932,17 @@ _edje_param_convert(Edje_External_Param *param, const Edje_External_Param_Info *
|
|||
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
||||
i = (int)param->d;
|
||||
break;
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_STRING:
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_CHOICE:
|
||||
i = (param->s) ? atoi(param->s) : 0;
|
||||
break;
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_BOOL:
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
||||
i = param->i;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1927,13 +1961,16 @@ _edje_param_convert(Edje_External_Param *param, const Edje_External_Param_Info *
|
|||
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
||||
d = (double)param->i;
|
||||
break;
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_STRING:
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_CHOICE:
|
||||
d = (param->s) ? atof(param->s) : 0.0;
|
||||
break;
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_BOOL:
|
||||
d = (double)param->i;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1951,12 +1988,15 @@ _edje_param_convert(Edje_External_Param *param, const Edje_External_Param_Info *
|
|||
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
||||
if (!snprintf(s, sizeof(s), "%i", param->i)) return NULL;
|
||||
break;
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
||||
if (!snprintf(s, sizeof(s), "%f", param->d)) return NULL;
|
||||
break;
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_CHOICE:
|
||||
param->type = dst_info->type;
|
||||
return param;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1976,13 +2016,16 @@ _edje_param_convert(Edje_External_Param *param, const Edje_External_Param_Info *
|
|||
if (!snprintf(s, sizeof(s), "%i", param->i)) return NULL;
|
||||
val = s;
|
||||
break;
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
|
||||
if (!snprintf(s, sizeof(s), "%f", param->d)) return NULL;
|
||||
val = s;
|
||||
break;
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_STRING:
|
||||
val = param->s;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2002,7 +2045,7 @@ _edje_param_validate(const Edje_External_Param *param, const Edje_External_Param
|
|||
switch (info->type)
|
||||
{
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_BOOL:
|
||||
return ((param->i == 0) || (param->i == 1));
|
||||
return (param->i == 0) || (param->i == 1);
|
||||
|
||||
case EDJE_EXTERNAL_PARAM_TYPE_INT:
|
||||
if ((info->info.i.min != EDJE_EXTERNAL_INT_UNSET) &&
|
||||
|
@ -2197,3 +2240,4 @@ _edje_param_set(Edje *ed, Edje_Real_Part *part, const char *param, const char *v
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ _edje_signal_match_key_cmp(const void *key1, int key1_length EINA_UNUSED, const
|
|||
{
|
||||
if (a->matches[i].signal != b->matches[i].signal) return a->matches[i].signal - b->matches[i].signal;
|
||||
if (a->matches[i].source != b->matches[i].source) return a->matches[i].source - b->matches[i].source;
|
||||
if (a->matches[i].func != b->matches[i].func) return (unsigned char*) a->matches[i].func - (unsigned char*) b->matches[i].func;
|
||||
if (a->matches[i].func != b->matches[i].func) return (unsigned char *)a->matches[i].func - (unsigned char *)b->matches[i].func;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -37,13 +37,13 @@ _edje_signal_match_key_hash(const void *key, int key_length EINA_UNUSED)
|
|||
for (i = 0; i < a->matches_count; ++i)
|
||||
{
|
||||
#ifdef EFL64
|
||||
hash ^= eina_hash_int64((const unsigned long long int*) &a->matches[i].signal, sizeof (char *));
|
||||
hash ^= eina_hash_int64((const unsigned long long int*) &a->matches[i].source, sizeof (char *));
|
||||
hash ^= eina_hash_int64((const unsigned long long int*) &a->matches[i].func, sizeof (Edje_Signal_Cb));
|
||||
hash ^= eina_hash_int64((const unsigned long long int *)&a->matches[i].signal, sizeof (char *));
|
||||
hash ^= eina_hash_int64((const unsigned long long int *)&a->matches[i].source, sizeof (char *));
|
||||
hash ^= eina_hash_int64((const unsigned long long int *)&a->matches[i].func, sizeof (Edje_Signal_Cb));
|
||||
#else
|
||||
hash ^= eina_hash_int32((const unsigned int*) a->matches[i].signal, sizeof (char *));
|
||||
hash ^= eina_hash_int32((const unsigned int*) a->matches[i].source, sizeof (char *));
|
||||
hash ^= eina_hash_int32((const unsigned int*) a->matches[i].func, sizeof (Edje_Signal_Cb));
|
||||
hash ^= eina_hash_int32((const unsigned int *)a->matches[i].signal, sizeof (char *));
|
||||
hash ^= eina_hash_int32((const unsigned int *)a->matches[i].source, sizeof (char *));
|
||||
hash ^= eina_hash_int32((const unsigned int *)a->matches[i].func, sizeof (Edje_Signal_Cb));
|
||||
#endif
|
||||
}
|
||||
return hash;
|
||||
|
@ -80,7 +80,7 @@ _edje_callbacks_patterns_clean(Edje_Signal_Callback_Group *gp)
|
|||
Edje_Signal_Callback_Matches *tmp;
|
||||
|
||||
assert(EINA_REFCOUNT_GET(gp->matches) == 1);
|
||||
tmp = (Edje_Signal_Callback_Matches*) gp->matches;
|
||||
tmp = (Edje_Signal_Callback_Matches *)gp->matches;
|
||||
|
||||
_edje_signal_callback_patterns_unref(tmp->patterns);
|
||||
tmp->patterns = NULL;
|
||||
|
@ -94,7 +94,7 @@ _edje_callbacks_patterns_init(Edje_Signal_Callback_Group *gp)
|
|||
|
||||
if (gp->matches->patterns) return;
|
||||
|
||||
tmp = (Edje_Signal_Callback_Matches*) gp->matches;
|
||||
tmp = (Edje_Signal_Callback_Matches *)gp->matches;
|
||||
tmp->patterns = calloc(1, sizeof (Edje_Signals_Sources_Patterns));
|
||||
if (!gp->matches->patterns) return;
|
||||
|
||||
|
@ -160,10 +160,10 @@ _edje_signal_callback_grow(Edje_Signal_Callback_Group *gp)
|
|||
{
|
||||
Edje_Signal_Callback_Matches *tmp;
|
||||
|
||||
tmp = (Edje_Signal_Callback_Matches*) gp->matches;
|
||||
tmp = (Edje_Signal_Callback_Matches *)gp->matches;
|
||||
tmp->matches_count++;
|
||||
tmp->matches = realloc(tmp->matches, sizeof (Edje_Signal_Callback_Match) * tmp->matches_count);
|
||||
gp->custom_data = realloc(gp->custom_data, sizeof (void*) * tmp->matches_count);
|
||||
gp->custom_data = realloc(gp->custom_data, sizeof (void *) * tmp->matches_count);
|
||||
gp->flags = realloc(gp->flags, sizeof (Edje_Signal_Callback_Flags) * tmp->matches_count);
|
||||
|
||||
return gp;
|
||||
|
@ -174,7 +174,7 @@ _edje_signal_callback_push(const Edje_Signal_Callback_Group *cgp,
|
|||
const char *sig, const char *src,
|
||||
Edje_Signal_Cb func, void *data, Eina_Bool propagate)
|
||||
{
|
||||
Edje_Signal_Callback_Group *gp = (Edje_Signal_Callback_Group*) cgp;
|
||||
Edje_Signal_Callback_Group *gp = (Edje_Signal_Callback_Group *)cgp;
|
||||
unsigned int i;
|
||||
Edje_Signal_Callback_Flags flags;
|
||||
|
||||
|
@ -200,7 +200,7 @@ _edje_signal_callback_push(const Edje_Signal_Callback_Group *cgp,
|
|||
{
|
||||
Edje_Signal_Callback_Matches *tmp;
|
||||
|
||||
tmp = (Edje_Signal_Callback_Matches*) gp->matches;
|
||||
tmp = (Edje_Signal_Callback_Matches *)gp->matches;
|
||||
|
||||
if (EINA_REFCOUNT_GET(tmp) == 1)
|
||||
{
|
||||
|
@ -210,7 +210,7 @@ _edje_signal_callback_push(const Edje_Signal_Callback_Group *cgp,
|
|||
else
|
||||
{
|
||||
Edje_Signal_Callback_Matches *tmp_dup;
|
||||
tmp_dup = (Edje_Signal_Callback_Matches*) _edje_signal_callback_matches_dup(tmp);
|
||||
tmp_dup = (Edje_Signal_Callback_Matches *)_edje_signal_callback_matches_dup(tmp);
|
||||
if (!tmp_dup) return;
|
||||
EINA_REFCOUNT_UNREF(tmp)
|
||||
(void) 0; // Nothing to do because the case where refcount == 1 was already handle above.
|
||||
|
@ -285,11 +285,11 @@ _edje_signal_callback_matches_unref(Edje_Signal_Callback_Matches *m)
|
|||
void
|
||||
_edje_signal_callback_free(const Edje_Signal_Callback_Group *cgp)
|
||||
{
|
||||
Edje_Signal_Callback_Group *gp = (Edje_Signal_Callback_Group*) cgp;
|
||||
Edje_Signal_Callback_Group *gp = (Edje_Signal_Callback_Group *)cgp;
|
||||
|
||||
if (!gp) return;
|
||||
|
||||
_edje_signal_callback_matches_unref((Edje_Signal_Callback_Matches*) gp->matches);
|
||||
_edje_signal_callback_matches_unref((Edje_Signal_Callback_Matches *)gp->matches);
|
||||
gp->matches = NULL;
|
||||
free(gp->flags);
|
||||
free(gp->custom_data);
|
||||
|
@ -301,7 +301,7 @@ _edje_signal_callback_disable(const Edje_Signal_Callback_Group *cgp,
|
|||
const char *sig, const char *src,
|
||||
Edje_Signal_Cb func, void *data)
|
||||
{
|
||||
Edje_Signal_Callback_Group *gp = (Edje_Signal_Callback_Group*) cgp;
|
||||
Edje_Signal_Callback_Group *gp = (Edje_Signal_Callback_Group *)cgp;
|
||||
unsigned int i;
|
||||
|
||||
if (!gp || !gp->matches) return NULL;
|
||||
|
@ -343,7 +343,7 @@ _edje_signal_callback_move_last(Edje_Signal_Callback_Group *gp,
|
|||
Edje_Signal_Callback_Matches *m;
|
||||
unsigned int j;
|
||||
|
||||
m = (Edje_Signal_Callback_Matches*) gp->matches;
|
||||
m = (Edje_Signal_Callback_Matches *)gp->matches;
|
||||
|
||||
for (j = --m->matches_count; j > i; --j)
|
||||
{
|
||||
|
@ -372,7 +372,7 @@ _edje_signal_callback_patterns_ref(const Edje_Signal_Callback_Group *gp)
|
|||
m = eina_hash_find(signal_match, gp->matches);
|
||||
if (!m)
|
||||
{
|
||||
tmp = (Edje_Signal_Callback_Matches*) gp->matches;
|
||||
tmp = (Edje_Signal_Callback_Matches *)gp->matches;
|
||||
if (!(tmp->patterns && (EINA_REFCOUNT_GET(tmp->patterns) > 1)))
|
||||
{
|
||||
// Let compact it and remove uneeded pattern before building it
|
||||
|
@ -382,15 +382,14 @@ _edje_signal_callback_patterns_ref(const Edje_Signal_Callback_Group *gp)
|
|||
for (i = 0; i < tmp->matches_count; i++)
|
||||
{
|
||||
if (gp->flags[i].delete_me)
|
||||
_edje_signal_callback_move_last((Edje_Signal_Callback_Group*) gp, i);
|
||||
_edje_signal_callback_move_last((Edje_Signal_Callback_Group *)gp, i);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
_edje_signal_callback_patterns_unref(tmp->patterns);
|
||||
tmp->patterns = NULL;
|
||||
|
||||
_edje_callbacks_patterns_init((Edje_Signal_Callback_Group*) gp);
|
||||
_edje_callbacks_patterns_init((Edje_Signal_Callback_Group *)gp);
|
||||
eina_hash_add(signal_match, tmp, tmp);
|
||||
// We should be able to use direct_add, but if I do so valgrind stack explode and
|
||||
// it bagain to be a pain to debug efl apps. I can't understand what is going on.
|
||||
|
@ -399,14 +398,14 @@ _edje_signal_callback_patterns_ref(const Edje_Signal_Callback_Group *gp)
|
|||
}
|
||||
else
|
||||
{
|
||||
_edje_signal_callback_matches_unref((Edje_Signal_Callback_Matches*) gp->matches);
|
||||
((Edje_Signal_Callback_Group*)gp)->matches = m;
|
||||
tmp = (Edje_Signal_Callback_Matches*) gp->matches;
|
||||
_edje_signal_callback_matches_unref((Edje_Signal_Callback_Matches *)gp->matches);
|
||||
((Edje_Signal_Callback_Group *)gp)->matches = m;
|
||||
tmp = (Edje_Signal_Callback_Matches *)gp->matches;
|
||||
EINA_REFCOUNT_REF(tmp);
|
||||
}
|
||||
|
||||
got_it:
|
||||
tmp = (Edje_Signal_Callback_Matches*) gp->matches;
|
||||
got_it:
|
||||
tmp = (Edje_Signal_Callback_Matches *)gp->matches;
|
||||
|
||||
EINA_REFCOUNT_REF(tmp->patterns);
|
||||
return gp->matches->patterns;
|
||||
|
@ -419,7 +418,7 @@ _edje_signal_callback_patterns_unref(const Edje_Signals_Sources_Patterns *essp)
|
|||
|
||||
if (!essp) return;
|
||||
|
||||
ssp = (Edje_Signals_Sources_Patterns*) essp;
|
||||
ssp = (Edje_Signals_Sources_Patterns *)essp;
|
||||
|
||||
EINA_REFCOUNT_UNREF(ssp)
|
||||
{
|
||||
|
|
|
@ -72,7 +72,6 @@ _edje_color_class_free(void *data)
|
|||
free(cc);
|
||||
}
|
||||
|
||||
|
||||
/* Private Routines */
|
||||
EOLIAN static void
|
||||
_edje_object_evas_object_smart_add(Eo *obj, Edje *ed)
|
||||
|
@ -386,7 +385,7 @@ edje_object_file_set(Edje_Object *obj, const char *file, const char *group)
|
|||
EAPI void
|
||||
edje_object_file_get(const Edje_Object *obj, const char **file, const char **group)
|
||||
{
|
||||
eo_do((Edje_Object *) obj, efl_file_get(file, group));
|
||||
eo_do((Edje_Object *)obj, efl_file_get(file, group));
|
||||
}
|
||||
|
||||
#include "edje_object.eo.c"
|
||||
|
|
|
@ -34,7 +34,7 @@ _set_translated_string(Edje *ed, Edje_Real_Part *ep)
|
|||
const char *text = NULL;
|
||||
Edje_Part_Description_Text *chosen_desc;
|
||||
|
||||
chosen_desc = (Edje_Part_Description_Text*)ep->chosen_description;
|
||||
chosen_desc = (Edje_Part_Description_Text *)ep->chosen_description;
|
||||
domain = chosen_desc->text.domain;
|
||||
text = edje_string_get(&chosen_desc->text.text);
|
||||
|
||||
|
@ -76,14 +76,14 @@ _edje_text_part_on_add(Edje *ed, Edje_Real_Part *ep)
|
|||
if (ep->part->type != EDJE_PART_TYPE_TEXT) return;
|
||||
|
||||
/* if text class exists for this part, add the edje to the tc member list */
|
||||
desc = (Edje_Part_Description_Text *) pt->default_desc;
|
||||
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 */
|
||||
for (i = 0; i < pt->other.desc_count; ++i)
|
||||
{
|
||||
desc = (Edje_Part_Description_Text *) pt->other.desc[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);
|
||||
}
|
||||
|
@ -99,13 +99,13 @@ _edje_text_part_on_del(Edje *ed, Edje_Part *pt)
|
|||
if (pt->type != EDJE_PART_TYPE_TEXT)
|
||||
return;
|
||||
|
||||
desc = (Edje_Part_Description_Text *) pt->default_desc;
|
||||
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.desc_count; ++i)
|
||||
{
|
||||
desc = (Edje_Part_Description_Text *) pt->other.desc[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);
|
||||
}
|
||||
|
@ -426,7 +426,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
int bottom, top;
|
||||
|
||||
if (th < sh) bottom = 10;
|
||||
else if (th > sh) bottom = 1;
|
||||
else if (th > sh)
|
||||
bottom = 1;
|
||||
else bottom = 0; /* XXX shut up GCC, th == sh is handled before! */
|
||||
|
||||
top = size;
|
||||
|
@ -442,7 +443,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
part_get_geometry(ep, &tw, &th);
|
||||
|
||||
if (th < sh) bottom = current + 1;
|
||||
else if (th > sh) top = current - 1;
|
||||
else if (th > sh)
|
||||
top = current - 1;
|
||||
} while ((bottom < top) && (th != sh));
|
||||
}
|
||||
|
||||
|
@ -473,7 +475,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
|||
/* Handle ellipsis */
|
||||
if (!chosen_desc->text.min_x)
|
||||
{
|
||||
eo_do(ep->object,
|
||||
eo_do (ep->object,
|
||||
if (inlined_font) efl_text_properties_font_source_set(ed->path);
|
||||
else efl_text_properties_font_source_set(NULL));
|
||||
|
||||
|
@ -535,7 +537,7 @@ arrange_text:
|
|||
{
|
||||
Edje_Real_Part *rp = _edje_real_part_get(ed, source_name);
|
||||
evas_obj_text_filter_source_set(source_name, rp ? rp->object : NULL);
|
||||
};
|
||||
}
|
||||
evas_obj_text_filter_program_set(filter));
|
||||
|
||||
/* Handle alignment */
|
||||
|
@ -570,7 +572,6 @@ arrange_text:
|
|||
efl_gfx_visible_set(params->visible));
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
Evas_Text_Style_Type style;
|
||||
Edje_Text_Effect effect;
|
||||
|
@ -589,6 +590,7 @@ arrange_text:
|
|||
case EDJE_TEXT_EFFECT_PLAIN:
|
||||
style = EVAS_TEXT_STYLE_PLAIN;
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_OUTLINE:
|
||||
style = EVAS_TEXT_STYLE_OUTLINE;
|
||||
evas_object_text_outline_color_set(ep->object,
|
||||
|
@ -597,6 +599,7 @@ arrange_text:
|
|||
(params->type.text.color2.b * params->type.text.color2.a) / 255,
|
||||
params->type.text.color2.a);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SOFT_OUTLINE:
|
||||
style = EVAS_TEXT_STYLE_SOFT_OUTLINE;
|
||||
evas_object_text_outline_color_set(ep->object,
|
||||
|
@ -605,6 +608,7 @@ arrange_text:
|
|||
(params->type.text.color2.b * params->type.text.color2.a) / 255,
|
||||
params->type.text.color2.a);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SHADOW:
|
||||
style = EVAS_TEXT_STYLE_SHADOW;
|
||||
evas_object_text_shadow_color_set(ep->object,
|
||||
|
@ -613,6 +617,7 @@ arrange_text:
|
|||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
||||
params->type.text.color3.a);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SOFT_SHADOW:
|
||||
style = EVAS_TEXT_STYLE_SOFT_SHADOW;
|
||||
evas_object_text_shadow_color_set(ep->object,
|
||||
|
@ -621,6 +626,7 @@ arrange_text:
|
|||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
||||
params->type.text.color3.a);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_OUTLINE_SHADOW:
|
||||
style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
|
||||
eo_do(ep->object,
|
||||
|
@ -633,6 +639,7 @@ arrange_text:
|
|||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
||||
params->type.text.color3.a));
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW:
|
||||
style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
|
||||
eo_do(ep->object,
|
||||
|
@ -645,6 +652,7 @@ arrange_text:
|
|||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
||||
params->type.text.color3.a));
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_FAR_SHADOW:
|
||||
style = EVAS_TEXT_STYLE_FAR_SHADOW;
|
||||
evas_object_text_shadow_color_set(ep->object,
|
||||
|
@ -653,6 +661,7 @@ arrange_text:
|
|||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
||||
params->type.text.color3.a);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW:
|
||||
style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW;
|
||||
evas_object_text_shadow_color_set(ep->object,
|
||||
|
@ -661,6 +670,7 @@ arrange_text:
|
|||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
||||
params->type.text.color3.a);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_GLOW:
|
||||
style = EVAS_TEXT_STYLE_GLOW;
|
||||
eo_do(ep->object,
|
||||
|
@ -673,6 +683,7 @@ arrange_text:
|
|||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
||||
params->type.text.color3.a));
|
||||
break;
|
||||
|
||||
default:
|
||||
style = EVAS_TEXT_STYLE_PLAIN;
|
||||
break;
|
||||
|
@ -684,34 +695,42 @@ arrange_text:
|
|||
EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
|
||||
(style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM:
|
||||
EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
|
||||
(style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT:
|
||||
EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
|
||||
(style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT:
|
||||
EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
|
||||
(style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT:
|
||||
EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
|
||||
(style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP:
|
||||
EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
|
||||
(style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT:
|
||||
EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
|
||||
(style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT);
|
||||
break;
|
||||
|
||||
case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT:
|
||||
EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
|
||||
(style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -721,11 +740,11 @@ arrange_text:
|
|||
if (free_text) free((char *)text);
|
||||
if (font2) free(font2);
|
||||
if (sfont) free(sfont);
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Font_Size
|
||||
_edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc)
|
||||
{
|
||||
Evas_Font_Size
|
||||
_edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class * tc)
|
||||
{
|
||||
int val;
|
||||
|
||||
if (tc->size == 0)
|
||||
|
@ -741,4 +760,4 @@ _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class *tc)
|
|||
val = (size * -tc->size) / 100;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ _edje_format_parse(const char **s)
|
|||
|
||||
p = *s;
|
||||
if ((!p) || (*p == 0)) return NULL;
|
||||
for (;;)
|
||||
for (;; )
|
||||
{
|
||||
if (!s1)
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ _edje_textblock_style_all_update(Edje *ed)
|
|||
|
||||
if (tc && tc->size)
|
||||
snprintf(font_size, sizeof(font_size), "%f",
|
||||
(double) _edje_text_size_calc(tag->font_size, tc));
|
||||
(double)_edje_text_size_calc(tag->font_size, tc));
|
||||
else
|
||||
snprintf(font_size, sizeof(font_size), "%f",
|
||||
tag->font_size);
|
||||
|
@ -291,7 +291,7 @@ _edje_textblock_style_member_add(Edje *ed, Edje_Style *stl)
|
|||
Edje_Style_Tag *tag;
|
||||
Eina_List *l;
|
||||
|
||||
if (!stl) return ;
|
||||
if (!stl) return;
|
||||
|
||||
EINA_LIST_FOREACH(stl->tags, l, tag)
|
||||
{
|
||||
|
@ -538,3 +538,4 @@ _edje_textblock_style_cleanup(Edje_File *edf)
|
|||
free(stl);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -113,16 +113,19 @@ _edje_user_definition_free(Edje_User_Defined *eud)
|
|||
_edje_recalc_do(eud->ed);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDJE_USER_BOX_PACK:
|
||||
child = eud->u.box.child;
|
||||
rp = _edje_real_part_recursive_get(&eud->ed, eud->part);
|
||||
if (rp) _edje_child_remove(eud->ed, rp, child);
|
||||
break;
|
||||
|
||||
case EDJE_USER_TABLE_PACK:
|
||||
child = eud->u.table.child;
|
||||
rp = _edje_real_part_recursive_get(&eud->ed, eud->part);
|
||||
if (rp) _edje_child_remove(eud->ed, rp, child);
|
||||
break;
|
||||
|
||||
case EDJE_USER_STRING:
|
||||
case EDJE_USER_DRAG_STEP:
|
||||
case EDJE_USER_DRAG_PAGE:
|
||||
|
@ -233,7 +236,7 @@ _edje_class_members_clean(Edje *ed, Eina_Hash *ghash)
|
|||
Eina_Iterator *it;
|
||||
Eina_Hash *members;
|
||||
|
||||
if (!ed || !ghash) return ;
|
||||
if (!ed || !ghash) return;
|
||||
|
||||
it = eina_hash_iterator_data_new(ghash);
|
||||
EINA_ITERATOR_FOREACH(it, members)
|
||||
|
@ -252,7 +255,6 @@ _edje_class_members_clean(Edje *ed, Eina_Hash *ghash)
|
|||
eina_iterator_free(it);
|
||||
}
|
||||
|
||||
|
||||
/************************** API Routines **************************/
|
||||
|
||||
#define FASTFREEZE 1
|
||||
|
@ -297,6 +299,7 @@ _edje_util_thaw_edje(Edje *ed)
|
|||
}
|
||||
if ((ed->recalc) && (ed->freeze <= 0)) _edje_recalc_do(ed);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -313,20 +316,20 @@ _edje_language_signal_emit(Edje *ed, Evas_Object *obj, char *signal)
|
|||
{
|
||||
Edje_Part_Description_Text *text;
|
||||
|
||||
text = (Edje_Part_Description_Text *) rp->param1.description;
|
||||
text = (Edje_Part_Description_Text *)rp->param1.description;
|
||||
if (text->text.text.translated)
|
||||
text->text.text.translated = NULL;
|
||||
|
||||
if (rp->param2)
|
||||
{
|
||||
text = (Edje_Part_Description_Text *) rp->param2->description;
|
||||
text = (Edje_Part_Description_Text *)rp->param2->description;
|
||||
if (text->text.text.translated)
|
||||
text->text.text.translated = NULL;
|
||||
}
|
||||
|
||||
if (rp->custom)
|
||||
{
|
||||
text = (Edje_Part_Description_Text *) rp->custom->description;
|
||||
text = (Edje_Part_Description_Text *)rp->custom->description;
|
||||
if (text->text.text.translated)
|
||||
text->text.text.translated = NULL;
|
||||
}
|
||||
|
@ -354,7 +357,7 @@ _edje_object_language_set(Eo *obj, Edje *ed, const char *locale)
|
|||
_edje_language_signal_emit(ed, obj, signal);
|
||||
}
|
||||
|
||||
EOLIAN const char*
|
||||
EOLIAN const char *
|
||||
_edje_object_language_get(Eo *obj EINA_UNUSED, Edje *ed)
|
||||
{
|
||||
if (!ed->language)
|
||||
|
@ -363,7 +366,6 @@ _edje_object_language_get(Eo *obj EINA_UNUSED, Edje *ed)
|
|||
return ed->language;
|
||||
}
|
||||
|
||||
|
||||
EAPI void
|
||||
edje_language_set(const char *locale)
|
||||
{
|
||||
|
@ -375,7 +377,7 @@ edje_language_set(const char *locale)
|
|||
int length;
|
||||
|
||||
lookup = strstr(locale, ".");
|
||||
length = lookup ? lookup - locale : (int) strlen(locale);
|
||||
length = lookup ? lookup - locale : (int)strlen(locale);
|
||||
loc = alloca(length + 1);
|
||||
memcpy(loc, locale, length);
|
||||
loc[length] = '\0';
|
||||
|
@ -393,7 +395,6 @@ edje_language_set(const char *locale)
|
|||
continue;
|
||||
|
||||
_edje_language_signal_emit(ed, obj, signal);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -538,7 +539,7 @@ _edje_object_mirrored_set(Eo *obj, Edje *ed, Eina_Bool rtl)
|
|||
|
||||
ed->is_rtl = rtl;
|
||||
|
||||
for (i = 0 ; i < ed->table_parts_size ; i++)
|
||||
for (i = 0; i < ed->table_parts_size; i++)
|
||||
{
|
||||
Edje_Real_Part *ep;
|
||||
const char *s;
|
||||
|
@ -547,7 +548,7 @@ _edje_object_mirrored_set(Eo *obj, Edje *ed, Eina_Bool rtl)
|
|||
ep = ed->table_parts[i];
|
||||
s = ep->param1.description->state.name,
|
||||
v = ep->param1.description->state.value;
|
||||
_edje_part_description_apply(ed, ep, s, v , NULL, 0.0);
|
||||
_edje_part_description_apply(ed, ep, s, v, NULL, 0.0);
|
||||
ep->chosen_description = ep->param1.description;
|
||||
}
|
||||
_edje_recalc_do(ed);
|
||||
|
@ -557,7 +558,7 @@ _edje_object_mirrored_set(Eo *obj, Edje *ed, Eina_Bool rtl)
|
|||
return;
|
||||
}
|
||||
|
||||
EOLIAN const char*
|
||||
EOLIAN const char *
|
||||
_edje_object_data_get(Eo *obj EINA_UNUSED, Edje *ed, const char *key)
|
||||
{
|
||||
if ((!ed) || (!key))
|
||||
|
@ -632,13 +633,17 @@ edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2
|
|||
}
|
||||
|
||||
if (r < 0) r = 0;
|
||||
else if (r > 255) r = 255;
|
||||
else if (r > 255)
|
||||
r = 255;
|
||||
if (g < 0) g = 0;
|
||||
else if (g > 255) g = 255;
|
||||
else if (g > 255)
|
||||
g = 255;
|
||||
if (b < 0) b = 0;
|
||||
else if (b > 255) b = 255;
|
||||
else if (b > 255)
|
||||
b = 255;
|
||||
if (a < 0) a = 0;
|
||||
else if (a > 255) a = 255;
|
||||
else if (a > 255)
|
||||
a = 255;
|
||||
if ((cc->r == r) && (cc->g == g) &&
|
||||
(cc->b == b) && (cc->a == a) &&
|
||||
(cc->r2 == r2) && (cc->g2 == g2) &&
|
||||
|
@ -688,7 +693,8 @@ edje_color_class_get(const char *color_class, int *r, int *g, int *b, int *a, in
|
|||
|
||||
if (cc)
|
||||
{
|
||||
#define X(C) if (C) *C = cc->C
|
||||
#define X(C) if (C) \
|
||||
*C = cc->C
|
||||
#define S(_r, _g, _b, _a) X(_r); X(_g); X(_b); X(_a)
|
||||
S(r, g, b, a);
|
||||
S(r2, g2, b2, a2);
|
||||
|
@ -699,7 +705,8 @@ edje_color_class_get(const char *color_class, int *r, int *g, int *b, int *a, in
|
|||
}
|
||||
else
|
||||
{
|
||||
#define X(C) if (C) *C = 0
|
||||
#define X(C) if (C) \
|
||||
*C = 0
|
||||
#define S(_r, _g, _b, _a) X(_r); X(_g); X(_b); X(_a)
|
||||
S(r, g, b, a);
|
||||
S(r2, g2, b2, a2);
|
||||
|
@ -768,17 +775,17 @@ struct _Edje_Active_Color_Class_Iterator
|
|||
static Eina_Bool
|
||||
_edje_color_class_active_iterator_next(Eina_Iterator *it, void **data)
|
||||
{
|
||||
Edje_Active_Color_Class_Iterator *et = (void*) it;
|
||||
Edje_Active_Color_Class_Iterator *et = (void *)it;
|
||||
Eina_Hash_Tuple *tuple = NULL;
|
||||
Edje_Refcount *er = NULL;
|
||||
Eina_Iterator *ith;
|
||||
Edje_Color_Class *cc;
|
||||
|
||||
if (!eina_iterator_next(et->classes, (void**) &tuple)) return EINA_FALSE;
|
||||
if (!eina_iterator_next(et->classes, (void **)&tuple)) return EINA_FALSE;
|
||||
if (!tuple) return EINA_FALSE;
|
||||
|
||||
ith = eina_hash_iterator_data_new(tuple->data);
|
||||
if (!eina_iterator_next(ith, (void**) &er)) return EINA_FALSE;
|
||||
if (!eina_iterator_next(ith, (void **)&er)) return EINA_FALSE;
|
||||
|
||||
/*
|
||||
We actually need to ask on an object to get the correct value.
|
||||
|
@ -810,7 +817,7 @@ _edje_color_class_active_iterator_container(Eina_Iterator *it EINA_UNUSED)
|
|||
static void
|
||||
_edje_color_class_active_iterator_free(Eina_Iterator *it)
|
||||
{
|
||||
Edje_Active_Color_Class_Iterator *et = (void*) it;
|
||||
Edje_Active_Color_Class_Iterator *et = (void *)it;
|
||||
|
||||
eina_iterator_free(et->classes);
|
||||
EINA_MAGIC_SET(&et->iterator, 0);
|
||||
|
@ -855,13 +862,17 @@ _edje_object_color_class_set(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
|
|||
|
||||
if ((!ed) || (!color_class)) return EINA_FALSE;
|
||||
if (r < 0) r = 0;
|
||||
else if (r > 255) r = 255;
|
||||
else if (r > 255)
|
||||
r = 255;
|
||||
if (g < 0) g = 0;
|
||||
else if (g > 255) g = 255;
|
||||
else if (g > 255)
|
||||
g = 255;
|
||||
if (b < 0) b = 0;
|
||||
else if (b > 255) b = 255;
|
||||
else if (b > 255)
|
||||
b = 255;
|
||||
if (a < 0) a = 0;
|
||||
else if (a > 255) a = 255;
|
||||
else if (a > 255)
|
||||
a = 255;
|
||||
cc = eina_hash_find(ed->color_classes, color_class);
|
||||
if (cc)
|
||||
{
|
||||
|
@ -935,7 +946,8 @@ _edje_object_color_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
|
|||
|
||||
if (cc)
|
||||
{
|
||||
#define X(C) if (C) *C = cc->C
|
||||
#define X(C) if (C) \
|
||||
*C = cc->C
|
||||
#define S(_r, _g, _b, _a) X(_r); X(_g); X(_b); X(_a)
|
||||
S(r, g, b, a);
|
||||
S(r2, g2, b2, a2);
|
||||
|
@ -946,7 +958,8 @@ _edje_object_color_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *color_cl
|
|||
}
|
||||
else
|
||||
{
|
||||
#define X(C) if (C) *C = 0
|
||||
#define X(C) if (C) \
|
||||
*C = 0
|
||||
#define S(_r, _g, _b, _a) X(_r); X(_g); X(_b); X(_a)
|
||||
S(r, g, b, a);
|
||||
S(r2, g2, b2, a2);
|
||||
|
@ -1011,11 +1024,11 @@ struct _Edje_File_Color_Class_Iterator
|
|||
static Eina_Bool
|
||||
_edje_mmap_color_class_iterator_next(Eina_Iterator *it, void **data)
|
||||
{
|
||||
Edje_File_Color_Class_Iterator *et = (void*) it;
|
||||
Edje_File_Color_Class_Iterator *et = (void *)it;
|
||||
Eina_Hash_Tuple *tuple = NULL;
|
||||
Edje_Color_Class *cc = NULL;
|
||||
|
||||
if (!eina_iterator_next(et->it.classes, (void**) &tuple)) return EINA_FALSE;
|
||||
if (!eina_iterator_next(et->it.classes, (void **)&tuple)) return EINA_FALSE;
|
||||
if (!tuple) return EINA_FALSE;
|
||||
|
||||
cc = tuple->data;
|
||||
|
@ -1029,7 +1042,7 @@ _edje_mmap_color_class_iterator_next(Eina_Iterator *it, void **data)
|
|||
static void *
|
||||
_edje_mmap_color_class_iterator_container(Eina_Iterator *it)
|
||||
{
|
||||
Edje_File_Color_Class_Iterator *et = (void*) it;
|
||||
Edje_File_Color_Class_Iterator *et = (void *)it;
|
||||
|
||||
return et->edf->f;
|
||||
}
|
||||
|
@ -1037,7 +1050,7 @@ _edje_mmap_color_class_iterator_container(Eina_Iterator *it)
|
|||
static void
|
||||
_edje_mmap_color_class_iterator_free(Eina_Iterator *it)
|
||||
{
|
||||
Edje_File_Color_Class_Iterator *et = (void*) it;
|
||||
Edje_File_Color_Class_Iterator *et = (void *)it;
|
||||
|
||||
eina_iterator_free(et->it.classes);
|
||||
_edje_cache_file_unref(et->edf);
|
||||
|
@ -1069,7 +1082,7 @@ edje_mmap_color_class_iterator_new(Eina_File *f)
|
|||
|
||||
return &it->it.iterator;
|
||||
|
||||
on_error:
|
||||
on_error:
|
||||
_edje_cache_file_unref(edf);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1315,7 +1328,7 @@ _edje_object_part_exists(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN const Evas_Object*
|
||||
EOLIAN const Evas_Object *
|
||||
_edje_object_part_object_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -1412,7 +1425,8 @@ _edje_object_part_text_raw_set(Edje *ed, Evas_Object *obj, Edje_Real_Part *rp, c
|
|||
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
|
||||
_edje_entry_text_markup_set(rp, text);
|
||||
else
|
||||
if (text) rp->typedata.text->text = eina_stringshare_add(text);
|
||||
if (text)
|
||||
rp->typedata.text->text = eina_stringshare_add(text);
|
||||
ed->dirty = EINA_TRUE;
|
||||
ed->recalc_call = EINA_TRUE;
|
||||
ed->recalc_hints = EINA_TRUE;
|
||||
|
@ -1502,7 +1516,7 @@ _edje_object_part_text_style_user_pop(Eo *obj EINA_UNUSED, Edje *ed, const char
|
|||
_edje_recalc(ed);
|
||||
}
|
||||
|
||||
EOLIAN const char*
|
||||
EOLIAN const char *
|
||||
_edje_object_part_text_style_user_peek(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -1567,7 +1581,7 @@ _edje_object_part_text_set(Eo *obj, Edje *ed, const char *part, const char *text
|
|||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN const char*
|
||||
EOLIAN const char *
|
||||
_edje_object_part_text_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -1623,7 +1637,7 @@ _edje_object_part_text_escaped_set(Eo *obj, Edje *ed, const char *part, const ch
|
|||
sbuf = eina_strbuf_new();
|
||||
p = (char *)text;
|
||||
s = p;
|
||||
for (;;)
|
||||
for (;; )
|
||||
{
|
||||
if ((*p == 0) || (esc_end) || (esc_start))
|
||||
{
|
||||
|
@ -1808,7 +1822,7 @@ _edje_object_part_text_unescaped_set(Eo *obj, Edje *ed, const char *part, const
|
|||
return int_ret;
|
||||
}
|
||||
|
||||
EOLIAN char*
|
||||
EOLIAN char *
|
||||
_edje_object_part_text_unescaped_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -1843,7 +1857,7 @@ _edje_object_part_text_unescaped_get(Eo *obj EINA_UNUSED, Edje *ed, const char *
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EOLIAN const char*
|
||||
EOLIAN const char *
|
||||
_edje_object_part_text_selection_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -1924,7 +1938,7 @@ _edje_object_part_text_append(Eo *obj, Edje *ed, const char *part, const char *t
|
|||
ed->text_change.func(ed->text_change.data, obj, part);
|
||||
}
|
||||
|
||||
EOLIAN const Eina_List*
|
||||
EOLIAN const Eina_List *
|
||||
_edje_object_part_text_anchor_list_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -1938,7 +1952,7 @@ _edje_object_part_text_anchor_list_get(Eo *obj EINA_UNUSED, Edje *ed, const char
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EOLIAN const Eina_List*
|
||||
EOLIAN const Eina_List *
|
||||
_edje_object_part_text_anchor_geometry_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, const char *anchor)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -1952,7 +1966,7 @@ _edje_object_part_text_anchor_geometry_get(Eo *obj EINA_UNUSED, Edje *ed, const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EOLIAN const Eina_List*
|
||||
EOLIAN const Eina_List *
|
||||
_edje_object_part_text_item_list_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -2062,7 +2076,7 @@ _edje_object_part_text_select_extend(Eo *obj EINA_UNUSED, Edje *ed, const char *
|
|||
_edje_entry_select_extend(rp);
|
||||
}
|
||||
|
||||
EOLIAN void*
|
||||
EOLIAN void *
|
||||
_edje_object_part_text_imf_context_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -2259,7 +2273,7 @@ _edje_object_part_text_cursor_is_visible_format_get(Eo *obj EINA_UNUSED, Edje *e
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN char*
|
||||
EOLIAN char *
|
||||
_edje_object_part_text_cursor_content_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Edje_Cursor cur)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -2704,7 +2718,7 @@ _edje_object_text_insert_filter_callback_add(Eo *obj EINA_UNUSED, Edje *ed, cons
|
|||
eina_list_append(ed->text_insert_filter_callbacks, cb);
|
||||
}
|
||||
|
||||
EOLIAN void*
|
||||
EOLIAN void *
|
||||
_edje_object_text_insert_filter_callback_del(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Edje_Text_Filter_Cb func)
|
||||
{
|
||||
Edje_Text_Insert_Filter_Callback *cb;
|
||||
|
@ -2727,7 +2741,7 @@ _edje_object_text_insert_filter_callback_del(Eo *obj EINA_UNUSED, Edje *ed, cons
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EOLIAN void*
|
||||
EOLIAN void *
|
||||
_edje_object_text_insert_filter_callback_del_full(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Edje_Text_Filter_Cb func, void *data)
|
||||
{
|
||||
Edje_Text_Insert_Filter_Callback *cb;
|
||||
|
@ -2765,7 +2779,7 @@ _edje_object_text_markup_filter_callback_add(Eo *obj EINA_UNUSED, Edje *ed, cons
|
|||
eina_list_append(ed->markup_filter_callbacks, cb);
|
||||
}
|
||||
|
||||
EOLIAN void*
|
||||
EOLIAN void *
|
||||
_edje_object_text_markup_filter_callback_del(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Edje_Markup_Filter_Cb func)
|
||||
{
|
||||
Edje_Markup_Filter_Callback *cb;
|
||||
|
@ -2788,7 +2802,7 @@ _edje_object_text_markup_filter_callback_del(Eo *obj EINA_UNUSED, Edje *ed, cons
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EOLIAN void*
|
||||
EOLIAN void *
|
||||
_edje_object_text_markup_filter_callback_del_full(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Edje_Markup_Filter_Cb func, void *data)
|
||||
{
|
||||
Edje_Markup_Filter_Callback *cb;
|
||||
|
@ -2896,10 +2910,15 @@ edje_extern_object_aspect_set(Evas_Object *obj, Edje_Aspect_Control aspect, Evas
|
|||
switch (aspect)
|
||||
{
|
||||
case EDJE_ASPECT_CONTROL_NONE: asp = EVAS_ASPECT_CONTROL_NONE; break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_NEITHER: asp = EVAS_ASPECT_CONTROL_NEITHER; break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_HORIZONTAL: asp = EVAS_ASPECT_CONTROL_HORIZONTAL; break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_VERTICAL: asp = EVAS_ASPECT_CONTROL_VERTICAL; break;
|
||||
|
||||
case EDJE_ASPECT_CONTROL_BOTH: asp = EVAS_ASPECT_CONTROL_BOTH; break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
if (aw < 1) aw = 1;
|
||||
|
@ -2907,7 +2926,8 @@ edje_extern_object_aspect_set(Evas_Object *obj, Edje_Aspect_Control aspect, Evas
|
|||
evas_object_size_hint_aspect_set(obj, asp, aw, ah);
|
||||
}
|
||||
|
||||
struct edje_box_layout_builtin {
|
||||
struct edje_box_layout_builtin
|
||||
{
|
||||
const char *name;
|
||||
Evas_Object_Box_Layout cb;
|
||||
};
|
||||
|
@ -2934,12 +2954,15 @@ _edje_box_layout_builtin_find(const char *name)
|
|||
case 'h':
|
||||
base = _edje_box_layout_builtin + 0;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
base = _edje_box_layout_builtin + 4;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
base = _edje_box_layout_builtin + 5;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2979,7 +3002,7 @@ _edje_box_layout_external_find(const char *name)
|
|||
}
|
||||
|
||||
Eina_Bool
|
||||
_edje_box_layout_find(const char *name, Evas_Object_Box_Layout *cb, void **data, void (**free_data)(void *data))
|
||||
_edje_box_layout_find(const char *name, Evas_Object_Box_Layout *cb, void **data, void(**free_data) (void *data))
|
||||
{
|
||||
const Edje_Box_Layout *l;
|
||||
|
||||
|
@ -3157,7 +3180,7 @@ _edje_object_part_unswallow(Eo *obj EINA_UNUSED, Edje *ed, Evas_Object *obj_swal
|
|||
}
|
||||
}
|
||||
|
||||
EOLIAN Evas_Object*
|
||||
EOLIAN Evas_Object *
|
||||
_edje_object_part_swallow_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -3466,7 +3489,7 @@ again:
|
|||
}
|
||||
|
||||
/* FIXME: Correctly return other states */
|
||||
EOLIAN const char*
|
||||
EOLIAN const char *
|
||||
_edje_object_part_state_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double *val_ret)
|
||||
{
|
||||
const char *ret;
|
||||
|
@ -3531,8 +3554,10 @@ _edje_object_part_drag_dir_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
|
|||
rp = _edje_real_part_recursive_get(&ed, part);
|
||||
if (!rp) return ret;
|
||||
if ((rp->part->dragable.x) && (rp->part->dragable.y)) ret = EDJE_DRAG_DIR_XY;
|
||||
else if (rp->part->dragable.x) ret = EDJE_DRAG_DIR_X;
|
||||
else if (rp->part->dragable.y) ret = EDJE_DRAG_DIR_Y;
|
||||
else if (rp->part->dragable.x)
|
||||
ret = EDJE_DRAG_DIR_X;
|
||||
else if (rp->part->dragable.y)
|
||||
ret = EDJE_DRAG_DIR_Y;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -3653,9 +3678,11 @@ _edje_object_part_drag_size_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
|
|||
}
|
||||
|
||||
if (dw < 0.0) dw = 0.0;
|
||||
else if (dw > 1.0) dw = 1.0;
|
||||
else if (dw > 1.0)
|
||||
dw = 1.0;
|
||||
if (dh < 0.0) dh = 0.0;
|
||||
else if (dh > 1.0) dh = 1.0;
|
||||
else if (dh > 1.0)
|
||||
dh = 1.0;
|
||||
if ((rp->drag->size.x == FROM_DOUBLE(dw)) && (rp->drag->size.y == FROM_DOUBLE(dh)))
|
||||
{
|
||||
return EINA_TRUE;
|
||||
|
@ -3730,9 +3757,11 @@ _edje_object_part_drag_step_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
|
|||
}
|
||||
|
||||
if (dx < 0.0) dx = 0.0;
|
||||
else if (dx > 1.0) dx = 1.0;
|
||||
else if (dx > 1.0)
|
||||
dx = 1.0;
|
||||
if (dy < 0.0) dy = 0.0;
|
||||
else if (dy > 1.0) dy = 1.0;
|
||||
else if (dy > 1.0)
|
||||
dy = 1.0;
|
||||
rp->drag->step.x = FROM_DOUBLE(dx);
|
||||
rp->drag->step.y = FROM_DOUBLE(dy);
|
||||
#ifdef EDJE_CALC_CACHE
|
||||
|
@ -3800,9 +3829,11 @@ _edje_object_part_drag_page_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
|
|||
}
|
||||
|
||||
if (dx < 0.0) dx = 0.0;
|
||||
else if (dx > 1.0) dx = 1.0;
|
||||
else if (dx > 1.0)
|
||||
dx = 1.0;
|
||||
if (dy < 0.0) dy = 0.0;
|
||||
else if (dy > 1.0) dy = 1.0;
|
||||
else if (dy > 1.0)
|
||||
dy = 1.0;
|
||||
rp->drag->page.x = FROM_DOUBLE(dx);
|
||||
rp->drag->page.y = FROM_DOUBLE(dy);
|
||||
#ifdef EDJE_CALC_CACHE
|
||||
|
@ -3877,8 +3908,8 @@ _edje_object_part_drag_step(Eo *obj EINA_UNUSED, Edje *ed, const char *part, dou
|
|||
MUL(rp->drag->step.x, rp->part->dragable.x)));
|
||||
rp->drag->val.y = ADD(py, MUL(FROM_DOUBLE(dy),
|
||||
MUL(rp->drag->step.y, rp->part->dragable.y)));
|
||||
rp->drag->val.x = CLAMP (rp->drag->val.x, ZERO, FROM_DOUBLE(1.0));
|
||||
rp->drag->val.y = CLAMP (rp->drag->val.y, ZERO, FROM_DOUBLE(1.0));
|
||||
rp->drag->val.x = CLAMP(rp->drag->val.x, ZERO, FROM_DOUBLE(1.0));
|
||||
rp->drag->val.y = CLAMP(rp->drag->val.y, ZERO, FROM_DOUBLE(1.0));
|
||||
if ((px == rp->drag->val.x) && (py == rp->drag->val.y))
|
||||
{
|
||||
return EINA_TRUE;
|
||||
|
@ -3927,8 +3958,8 @@ _edje_object_part_drag_page(Eo *obj EINA_UNUSED, Edje *ed, const char *part, dou
|
|||
py = rp->drag->val.y;
|
||||
rp->drag->val.x = ADD(px, MUL(FROM_DOUBLE(dx), MUL(rp->drag->page.x, rp->part->dragable.x)));
|
||||
rp->drag->val.y = ADD(py, MUL(FROM_DOUBLE(dy), MUL(rp->drag->page.y, rp->part->dragable.y)));
|
||||
rp->drag->val.x = CLAMP (rp->drag->val.x, ZERO, FROM_DOUBLE(1.0));
|
||||
rp->drag->val.y = CLAMP (rp->drag->val.y, ZERO, FROM_DOUBLE(1.0));
|
||||
rp->drag->val.x = CLAMP(rp->drag->val.x, ZERO, FROM_DOUBLE(1.0));
|
||||
rp->drag->val.y = CLAMP(rp->drag->val.y, ZERO, FROM_DOUBLE(1.0));
|
||||
if ((px == rp->drag->val.x) && (py == rp->drag->val.y))
|
||||
{
|
||||
return EINA_TRUE;
|
||||
|
@ -3945,7 +3976,6 @@ _edje_object_part_drag_page(Eo *obj EINA_UNUSED, Edje *ed, const char *part, dou
|
|||
void
|
||||
_edje_box_init(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -4072,7 +4102,7 @@ _edje_object_part_box_insert_at(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
|
|||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN Evas_Object*
|
||||
EOLIAN Evas_Object *
|
||||
_edje_object_part_box_remove(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Evas_Object *child)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -4101,7 +4131,7 @@ _edje_object_part_box_remove(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Ev
|
|||
return r;
|
||||
}
|
||||
|
||||
EOLIAN Evas_Object*
|
||||
EOLIAN Evas_Object *
|
||||
_edje_object_part_box_remove_at(Eo *obj EINA_UNUSED, Edje *ed, const char *part, unsigned int pos)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -4160,7 +4190,7 @@ _edje_object_part_box_remove_all(Eo *obj EINA_UNUSED, Edje *ed, const char *part
|
|||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN Eina_List*
|
||||
EOLIAN Eina_List *
|
||||
_edje_object_access_part_list_get(Eo *obj EINA_UNUSED, Edje *ed)
|
||||
{
|
||||
Eina_List *access_parts = NULL;
|
||||
|
@ -4379,7 +4409,7 @@ _edje_real_part_box_remove_all(Edje *ed, Edje_Real_Part *rp, Eina_Bool clear)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN Evas_Object*
|
||||
EOLIAN Evas_Object *
|
||||
_edje_object_part_table_child_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, unsigned int col, unsigned int row)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -4647,7 +4677,7 @@ _edje_object_perspective_set(Eo *obj, Edje *ed, Edje_Perspective *ps)
|
|||
_edje_recalc_do(ed);
|
||||
}
|
||||
|
||||
EOLIAN const Edje_Perspective*
|
||||
EOLIAN const Edje_Perspective *
|
||||
_edje_object_perspective_get(Eo *obj EINA_UNUSED, Edje *ed)
|
||||
{
|
||||
return ed->persp;
|
||||
|
@ -4887,12 +4917,15 @@ _edje_children_get(Edje_Real_Part *rp, const char *partid)
|
|||
(!rp->typedata.swallow)) return NULL;
|
||||
return _edje_external_content_get
|
||||
(rp->typedata.swallow->swallowed_object, partid);
|
||||
|
||||
case EDJE_PART_TYPE_BOX:
|
||||
it = evas_object_box_iterator_new(rp->object);
|
||||
break;
|
||||
|
||||
case EDJE_PART_TYPE_TABLE:
|
||||
it = evas_object_table_iterator_new(rp->object);
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
@ -4929,7 +4962,7 @@ _edje_children_get(Edje_Real_Part *rp, const char *partid)
|
|||
|
||||
/* rebuild alternative path */
|
||||
char *
|
||||
_edje_merge_path(const char *alias, char * const *path)
|
||||
_edje_merge_path(const char *alias, char *const *path)
|
||||
{
|
||||
char *tmp;
|
||||
unsigned int length = 1;
|
||||
|
@ -4956,7 +4989,6 @@ _edje_merge_path(const char *alias, char * const *path)
|
|||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
Edje_Real_Part *
|
||||
_edje_real_part_recursive_get_helper(Edje **ed, char **path)
|
||||
{
|
||||
|
@ -4972,7 +5004,8 @@ _edje_real_part_recursive_get_helper(Edje **ed, char **path)
|
|||
char *alias;
|
||||
|
||||
alias = _edje_merge_path(eina_hash_find((*ed)->collection->alias, path[0]), path + 1);
|
||||
if (alias) {
|
||||
if (alias)
|
||||
{
|
||||
rp = _edje_real_part_recursive_get(ed, alias);
|
||||
free(alias);
|
||||
return rp;
|
||||
|
@ -5008,6 +5041,7 @@ _edje_real_part_recursive_get_helper(Edje **ed, char **path)
|
|||
if (!*ed) return NULL;
|
||||
path++;
|
||||
return _edje_real_part_recursive_get_helper(ed, path);
|
||||
|
||||
case EDJE_PART_TYPE_BOX:
|
||||
case EDJE_PART_TYPE_TABLE:
|
||||
case EDJE_PART_TYPE_EXTERNAL:
|
||||
|
@ -5020,6 +5054,7 @@ _edje_real_part_recursive_get_helper(Edje **ed, char **path)
|
|||
|
||||
if (!*ed) return NULL;
|
||||
return _edje_real_part_recursive_get_helper(ed, path);
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
@ -5331,18 +5366,23 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp)
|
|||
case EVAS_ASPECT_CONTROL_NONE:
|
||||
rp->typedata.swallow->swallow_params.aspect.mode = EDJE_ASPECT_CONTROL_NONE;
|
||||
break;
|
||||
|
||||
case EVAS_ASPECT_CONTROL_NEITHER:
|
||||
rp->typedata.swallow->swallow_params.aspect.mode = EDJE_ASPECT_CONTROL_NEITHER;
|
||||
break;
|
||||
|
||||
case EVAS_ASPECT_CONTROL_HORIZONTAL:
|
||||
rp->typedata.swallow->swallow_params.aspect.mode = EDJE_ASPECT_CONTROL_HORIZONTAL;
|
||||
break;
|
||||
|
||||
case EVAS_ASPECT_CONTROL_VERTICAL:
|
||||
rp->typedata.swallow->swallow_params.aspect.mode = EDJE_ASPECT_CONTROL_VERTICAL;
|
||||
break;
|
||||
|
||||
case EVAS_ASPECT_CONTROL_BOTH:
|
||||
rp->typedata.swallow->swallow_params.aspect.mode = EDJE_ASPECT_CONTROL_BOTH;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -5579,7 +5619,7 @@ _edje_program_remove(Edje_Part_Collection *edc, Edje_Program *p)
|
|||
for (i = 0; i < *count; ++i)
|
||||
if ((*array)[i] == p)
|
||||
{
|
||||
memmove(*array + i, *array + i + 1, sizeof (Edje_Program *) * (*count - i -1));
|
||||
memmove(*array + i, *array + i + 1, sizeof (Edje_Program *) * (*count - i - 1));
|
||||
(*count)--;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ _edje_var_anim_cb(void *data EINA_UNUSED)
|
|||
int ret;
|
||||
|
||||
v = (t - ea->start) / ea->len;
|
||||
if (v > 1.0) v= 1.0;
|
||||
if (v > 1.0) v = 1.0;
|
||||
// _edje_embryo_script_reset(ed);
|
||||
embryo_program_vm_push(ed->collection->script);
|
||||
_edje_embryo_globals_init(ed);
|
||||
|
@ -623,7 +623,8 @@ _edje_var_list_count_get(Edje *ed, int id)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return 0;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return 0;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return 0;
|
||||
return eina_list_count(ed->var_pool->vars[id].data.l.v);
|
||||
}
|
||||
|
||||
|
@ -636,7 +637,8 @@ _edje_var_list_remove_nth(Edje *ed, int id, int n)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Eina_List *nth;
|
||||
|
||||
|
@ -658,7 +660,8 @@ _edje_var_list_nth_int_get(Edje *ed, int id, int n)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return 0;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return 0;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return 0;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -678,7 +681,8 @@ _edje_var_list_nth_int_set(Edje *ed, int id, int n, int v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -698,7 +702,8 @@ _edje_var_list_int_append(Edje *ed, int id, int v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -719,7 +724,8 @@ _edje_var_list_int_prepend(Edje *ed, int id, int v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -740,7 +746,8 @@ _edje_var_list_int_insert(Edje *ed, int id, int n, int v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var, *var_rel;
|
||||
|
||||
|
@ -765,7 +772,8 @@ _edje_var_list_nth_float_get(Edje *ed, int id, int n)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return 0;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return 0;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return 0;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -785,7 +793,8 @@ _edje_var_list_nth_float_set(Edje *ed, int id, int n, double v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -805,7 +814,8 @@ _edje_var_list_float_append(Edje *ed, int id, double v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -826,7 +836,8 @@ _edje_var_list_float_prepend(Edje *ed, int id, double v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -847,7 +858,8 @@ _edje_var_list_float_insert(Edje *ed, int id, int n, double v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var, *var_rel;
|
||||
|
||||
|
@ -872,7 +884,8 @@ _edje_var_list_nth_str_get(Edje *ed, int id, int n)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return NULL;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return NULL;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return NULL;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -892,7 +905,8 @@ _edje_var_list_nth_str_set(Edje *ed, int id, int n, const char *v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -912,7 +926,8 @@ _edje_var_list_str_append(Edje *ed, int id, const char *v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -933,7 +948,8 @@ _edje_var_list_str_prepend(Edje *ed, int id, const char *v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var;
|
||||
|
||||
|
@ -954,7 +970,8 @@ _edje_var_list_str_insert(Edje *ed, int id, int n, const char *v)
|
|||
if ((id < 0) || (id >= ed->var_pool->size)) return;
|
||||
if (ed->var_pool->vars[id].type == EDJE_VAR_NONE)
|
||||
ed->var_pool->vars[id].type = EDJE_VAR_LIST;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST) return;
|
||||
else if (ed->var_pool->vars[id].type != EDJE_VAR_LIST)
|
||||
return;
|
||||
{
|
||||
Edje_Var *var, *var_rel;
|
||||
|
||||
|
@ -1101,3 +1118,4 @@ _edje_var_anim_del(Edje *ed, int id)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue