ed->image.fill.angle = 0;
ed->image.fill.spread = 0;
ed->image.fill.type = EDJE_FILL_TYPE_SCALE;
- ed->color_class = NULL;
- ed->color.r = 255;
- ed->color.g = 255;
- ed->color.b = 255;
- ed->color.a = 255;
- ed->color2.r = 0;
- ed->color2.g = 0;
- ed->color2.b = 0;
- ed->color2.a = 255;
- ed->color3.r = 0;
- ed->color3.g = 0;
- ed->color3.b = 0;
- ed->color3.a = 128;
+ ed->common.color_class = NULL;
+ ed->common.color.r = 255;
+ ed->common.color.g = 255;
+ ed->common.color.b = 255;
+ ed->common.color.a = 255;
+ ed->common.color2.r = 0;
+ ed->common.color2.g = 0;
+ ed->common.color2.b = 0;
+ ed->common.color2.a = 255;
+ ed->text.color3.r = 0;
+ ed->text.color3.g = 0;
+ ed->text.color3.b = 0;
+ ed->text.color3.a = 128;
ed->text.align.x = FROM_DOUBLE(0.5);
ed->text.align.y = FROM_DOUBLE(0.5);
ed->text.id_source = -1;
#define STRDUP(x) x ? strdup(x) : NULL
- ed->color_class = STRDUP(ed->color_class);
+ ed->common.color_class = STRDUP(ed->common.color_class);
ed->text.text = STRDUP(ed->text.text);
ed->text.text_class = STRDUP(ed->text.text_class);
ed->text.font = STRDUP(ed->text.font);
ep = eina_list_data_get(eina_list_last(pc->parts));
ed = ep->default_desc;
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
- ed->color_class = parse_str(0);
+ ed->common.color_class = parse_str(0);
}
/**
ep = eina_list_data_get(eina_list_last(pc->parts));
ed = ep->default_desc;
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
- ed->color.r = parse_int_range(0, 0, 255);
- ed->color.g = parse_int_range(1, 0, 255);
- ed->color.b = parse_int_range(2, 0, 255);
- ed->color.a = parse_int_range(3, 0, 255);
+ ed->common.color.r = parse_int_range(0, 0, 255);
+ ed->common.color.g = parse_int_range(1, 0, 255);
+ ed->common.color.b = parse_int_range(2, 0, 255);
+ ed->common.color.a = parse_int_range(3, 0, 255);
}
/**
ep = eina_list_data_get(eina_list_last(pc->parts));
ed = ep->default_desc;
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
- ed->color2.r = parse_int_range(0, 0, 255);
- ed->color2.g = parse_int_range(1, 0, 255);
- ed->color2.b = parse_int_range(2, 0, 255);
- ed->color2.a = parse_int_range(3, 0, 255);
+ ed->common.color2.r = parse_int_range(0, 0, 255);
+ ed->common.color2.g = parse_int_range(1, 0, 255);
+ ed->common.color2.b = parse_int_range(2, 0, 255);
+ ed->common.color2.a = parse_int_range(3, 0, 255);
}
/**
ep = eina_list_data_get(eina_list_last(pc->parts));
ed = ep->default_desc;
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
- ed->color3.r = parse_int_range(0, 0, 255);
- ed->color3.g = parse_int_range(1, 0, 255);
- ed->color3.b = parse_int_range(2, 0, 255);
- ed->color3.a = parse_int_range(3, 0, 255);
+ ed->text.color3.r = parse_int_range(0, 0, 255);
+ ed->text.color3.g = parse_int_range(1, 0, 255);
+ ed->text.color3.b = parse_int_range(2, 0, 255);
+ ed->text.color3.a = parse_int_range(3, 0, 255);
}
/**
_edje_part_recalc_single_fill(ep, &desc->image, params, flags);
/* colors */
- if ((desc->color_class) && (*desc->color_class))
- cc = _edje_color_class_find(ed, desc->color_class);
+ if ((desc->common.color_class) && (*desc->common.color_class))
+ cc = _edje_color_class_find(ed, desc->common.color_class);
if (cc)
{
- params->color.r = (((int)cc->r + 1) * desc->color.r) >> 8;
- params->color.g = (((int)cc->g + 1) * desc->color.g) >> 8;
- params->color.b = (((int)cc->b + 1) * desc->color.b) >> 8;
- params->color.a = (((int)cc->a + 1) * desc->color.a) >> 8;
+ params->color.r = (((int)cc->r + 1) * desc->common.color.r) >> 8;
+ params->color.g = (((int)cc->g + 1) * desc->common.color.g) >> 8;
+ params->color.b = (((int)cc->b + 1) * desc->common.color.b) >> 8;
+ params->color.a = (((int)cc->a + 1) * desc->common.color.a) >> 8;
}
else
{
- params->color.r = desc->color.r;
- params->color.g = desc->color.g;
- params->color.b = desc->color.b;
- params->color.a = desc->color.a;
+ params->color.r = desc->common.color.r;
+ params->color.g = desc->common.color.g;
+ params->color.b = desc->common.color.b;
+ params->color.a = desc->common.color.a;
}
/* visible */
/* text colors */
if (cc)
{
- params->type.text.color2.r = (((int)cc->r2 + 1) * desc->color2.r) >> 8;
- params->type.text.color2.g = (((int)cc->g2 + 1) * desc->color2.g) >> 8;
- params->type.text.color2.b = (((int)cc->b2 + 1) * desc->color2.b) >> 8;
- params->type.text.color2.a = (((int)cc->a2 + 1) * desc->color2.a) >> 8;
- params->type.text.color3.r = (((int)cc->r3 + 1) * desc->color3.r) >> 8;
- params->type.text.color3.g = (((int)cc->g3 + 1) * desc->color3.g) >> 8;
- params->type.text.color3.b = (((int)cc->b3 + 1) * desc->color3.b) >> 8;
- params->type.text.color3.a = (((int)cc->a3 + 1) * desc->color3.a) >> 8;
+ params->type.text.color2.r = (((int)cc->r2 + 1) * desc->common.color2.r) >> 8;
+ params->type.text.color2.g = (((int)cc->g2 + 1) * desc->common.color2.g) >> 8;
+ params->type.text.color2.b = (((int)cc->b2 + 1) * desc->common.color2.b) >> 8;
+ params->type.text.color2.a = (((int)cc->a2 + 1) * desc->common.color2.a) >> 8;
+ params->type.text.color3.r = (((int)cc->r3 + 1) * desc->text.color3.r) >> 8;
+ params->type.text.color3.g = (((int)cc->g3 + 1) * desc->text.color3.g) >> 8;
+ params->type.text.color3.b = (((int)cc->b3 + 1) * desc->text.color3.b) >> 8;
+ params->type.text.color3.a = (((int)cc->a3 + 1) * desc->text.color3.a) >> 8;
}
else
{
- params->type.text.color2.r = desc->color2.r;
- params->type.text.color2.g = desc->color2.g;
- params->type.text.color2.b = desc->color2.b;
- params->type.text.color2.a = desc->color2.a;
- params->type.text.color3.r = desc->color3.r;
- params->type.text.color3.g = desc->color3.g;
- params->type.text.color3.b = desc->color3.b;
- params->type.text.color3.a = desc->color3.a;
+ params->type.text.color2.r = desc->common.color2.r;
+ params->type.text.color2.g = desc->common.color2.g;
+ params->type.text.color2.b = desc->common.color2.b;
+ params->type.text.color2.a = desc->common.color2.a;
+ params->type.text.color3.r = desc->text.color3.r;
+ params->type.text.color3.g = desc->text.color3.g;
+ params->type.text.color3.b = desc->text.color3.b;
+ params->type.text.color3.a = desc->text.color3.a;
}
break;
case EDJE_PART_TYPE_RECTANGLE:
lz1 = ep2desc1->common.persp.zplane +
TO_INT(SCALE(ep2pos, ep2desc2->common.persp.zplane -
ep2desc1->common.persp.zplane));
- lr1 = ep2desc1->color.r +
- TO_INT(SCALE(ep2pos, ep2desc2->color.r -
- ep2desc1->color.r));
- lg1 = ep2desc1->color.g +
- TO_INT(SCALE(ep2pos, ep2desc2->color.g -
- ep2desc1->color.b));
- lb1 = ep2desc1->color.b +
- TO_INT(SCALE(ep2pos, ep2desc2->color.g -
- ep2desc1->color.b));
- lar1 = ep2desc1->color2.r +
- TO_INT(SCALE(ep2pos, ep2desc2->color2.r -
- ep2desc1->color2.r));
- lag1 = ep2desc1->color2.g +
- TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
- ep2desc1->color2.b));
- lab1 = ep2desc1->color2.b +
- TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
- ep2desc1->color2.b));
+ lr1 = ep2desc1->common.color.r +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color.r -
+ ep2desc1->common.color.r));
+ lg1 = ep2desc1->common.color.g +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
+ ep2desc1->common.color.b));
+ lb1 = ep2desc1->common.color.b +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
+ ep2desc1->common.color.b));
+ lar1 = ep2desc1->common.color2.r +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color2.r -
+ ep2desc1->common.color2.r));
+ lag1 = ep2desc1->common.color2.g +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
+ ep2desc1->common.color2.b));
+ lab1 = ep2desc1->common.color2.b +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
+ ep2desc1->common.color2.b));
}
else
{
lz1 = ep2desc1->common.persp.zplane;
- lr1 = ep2desc1->color.r;
- lg1 = ep2desc1->color.g;
- lb1 = ep2desc1->color.b;
- lar1 = ep2desc1->color2.r;
- lag1 = ep2desc1->color2.g;
- lab1 = ep2desc1->color2.b;
+ lr1 = ep2desc1->common.color.r;
+ lg1 = ep2desc1->common.color.g;
+ lb1 = ep2desc1->common.color.b;
+ lar1 = ep2desc1->common.color2.r;
+ lag1 = ep2desc1->common.color2.g;
+ lab1 = ep2desc1->common.color2.b;
}
}
}
lz2 = ep2desc1->common.persp.zplane +
TO_INT(SCALE(ep2pos, ep2desc2->common.persp.zplane -
ep2desc1->common.persp.zplane));
- lr2 = ep2desc1->color.r +
- TO_INT(SCALE(ep2pos, ep2desc2->color.r -
- ep2desc1->color.r));
- lg2 = ep2desc1->color.g +
- TO_INT(SCALE(ep2pos, ep2desc2->color.g -
- ep2desc1->color.b));
- lb2 = ep2desc1->color.b +
- TO_INT(SCALE(ep2pos, ep2desc2->color.g -
- ep2desc1->color.b));
- lar2 = ep2desc1->color2.r +
- TO_INT(SCALE(ep2pos, ep2desc2->color2.r -
- ep2desc1->color2.r));
- lag2 = ep2desc1->color2.g +
- TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
- ep2desc1->color2.b));
- lab2 = ep2desc1->color2.b +
- TO_INT(SCALE(ep2pos, ep2desc2->color2.g -
- ep2desc1->color2.b));
+ lr2 = ep2desc1->common.color.r +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color.r -
+ ep2desc1->common.color.r));
+ lg2 = ep2desc1->common.color.g +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
+ ep2desc1->common.color.b));
+ lb2 = ep2desc1->common.color.b +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color.g -
+ ep2desc1->common.color.b));
+ lar2 = ep2desc1->common.color2.r +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color2.r -
+ ep2desc1->common.color2.r));
+ lag2 = ep2desc1->common.color2.g +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
+ ep2desc1->common.color2.b));
+ lab2 = ep2desc1->common.color2.b +
+ TO_INT(SCALE(ep2pos, ep2desc2->common.color2.g -
+ ep2desc1->common.color2.b));
}
else
{
lz2 = ep2desc1->common.persp.zplane;
- lr2 = ep2desc1->color.r;
- lg2 = ep2desc1->color.g;
- lb2 = ep2desc1->color.b;
- lar2 = ep2desc1->color2.r;
- lag2 = ep2desc1->color2.g;
- lab2 = ep2desc1->color2.b;
+ lr2 = ep2desc1->common.color.r;
+ lg2 = ep2desc1->common.color.g;
+ lb2 = ep2desc1->common.color.b;
+ lar2 = ep2desc1->common.color2.r;
+ lag2 = ep2desc1->common.color2.g;
+ lab2 = ep2desc1->common.color2.b;
}
}
}
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.angle", image.fill.angle, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.spread", image.fill.spread, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.type", image.fill.type, EET_T_CHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color_class", color_class, EET_T_STRING);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.r", color.r, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.g", color.g, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.b", color.b, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.a", color.a, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.r", color2.r, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.g", color2.g, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.b", color2.b, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.a", color2.a, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.r", color3.r, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.g", color3.g, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.b", color3.b, EET_T_UCHAR);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.a", color3.a, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color_class", common.color_class, EET_T_STRING);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.r", common.color.r, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.g", common.color.g, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.b", common.color.b, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color.a", common.color.a, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.r", common.color2.r, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.g", common.color2.g, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.b", common.color2.b, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color2.a", common.color2.a, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.r", text.color3.r, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.g", text.color3.g, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.b", text.color3.b, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color3.a", text.color3.a, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.text", text.text, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.text_class", text.text_class, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "text.style", text.style, EET_T_STRING);
pd->image.fill.angle = 0;
pd->image.fill.spread = 0;
pd->image.fill.type = EDJE_FILL_TYPE_SCALE;
- pd->color_class = NULL;
- pd->color.r = 255;
- pd->color.g = 255;
- pd->color.b = 255;
- pd->color.a = 255;
- pd->color2.r = 0;
- pd->color2.g = 0;
- pd->color2.b = 0;
- pd->color2.a = 255;
- pd->color3.r = 0;
- pd->color3.g = 0;
- pd->color3.b = 0;
- pd->color3.a = 128;
+ pd->common.color_class = NULL;
+ pd->common.color.r = 255;
+ pd->common.color.g = 255;
+ pd->common.color.b = 255;
+ pd->common.color.a = 255;
+ pd->common.color2.r = 0;
+ pd->common.color2.g = 0;
+ pd->common.color2.b = 0;
+ pd->common.color2.a = 255;
+ pd->text.color3.r = 0;
+ pd->text.color3.g = 0;
+ pd->text.color3.b = 0;
+ pd->text.color3.a = 128;
pd->text.align.x = 0.5;
pd->text.align.y = 0.5;
pd->text.id_source = -1;
PD_COPY(image.fill.spread);
PD_COPY(image.fill.smooth);
PD_COPY(image.fill.type);
- PD_STRING_COPY(color_class);
+ PD_STRING_COPY(common.color_class);
PD_STRING_COPY(text.text);
PD_STRING_COPY(text.text_class);
PD_STRING_COPY(text.style);
PD_COPY(table.align.y);
PD_COPY(table.padding.x);
PD_COPY(table.padding.y);
- PD_COPY(color.r);
- PD_COPY(color.g);
- PD_COPY(color.b);
- PD_COPY(color.a);
- PD_COPY(color2.r);
- PD_COPY(color2.g);
- PD_COPY(color2.b);
- PD_COPY(color2.a);
- PD_COPY(color3.r);
- PD_COPY(color3.g);
- PD_COPY(color3.b);
- PD_COPY(color3.a);
+ PD_COPY(common.color.r);
+ PD_COPY(common.color.g);
+ PD_COPY(common.color.b);
+ PD_COPY(common.color.a);
+ PD_COPY(common.color2.r);
+ PD_COPY(common.color2.g);
+ PD_COPY(common.color2.b);
+ PD_COPY(common.color2.a);
+ PD_COPY(text.color3.r);
+ PD_COPY(text.color3.g);
+ PD_COPY(text.color3.b);
+ PD_COPY(text.color3.a);
/* XXX: optimize this, most likely we don't need to remove and add */
EINA_LIST_FREE(pdto->external_params, p)
{
FUNC_STATE_REL(rel2, y);
//colors
-#define FUNC_COLOR(Code) \
+#define FUNC_COLOR(Class, Code) \
EAPI void \
edje_edit_state_color##Code##_get(Evas_Object *obj, const char *part, const char *state, double value, int *r, int *g, int *b, int *a) \
{ \
GET_PD_OR_RETURN(); \
\
- if (r) *r = pd->color##Code.r; \
- if (g) *g = pd->color##Code.g; \
- if (b) *b = pd->color##Code.b; \
- if (a) *a = pd->color##Code.a; \
+ if (r) *r = pd->Class.color##Code.r; \
+ if (g) *g = pd->Class.color##Code.g; \
+ if (b) *b = pd->Class.color##Code.b; \
+ if (a) *a = pd->Class.color##Code.a; \
} \
EAPI void \
edje_edit_state_color##Code##_set(Evas_Object *obj, const char *part, const char *state, double value, int r, int g, int b, int a) \
{ \
GET_PD_OR_RETURN(); \
\
- if (r > -1 && r < 256) pd->color##Code.r = r; \
- if (g > -1 && g < 256) pd->color##Code.g = g; \
- if (b > -1 && b < 256) pd->color##Code.b = b; \
- if (a > -1 && a < 256) pd->color##Code.a = a; \
+ if (r > -1 && r < 256) pd->Class.color##Code.r = r; \
+ if (g > -1 && g < 256) pd->Class.color##Code.g = g; \
+ if (b > -1 && b < 256) pd->Class.color##Code.b = b; \
+ if (a > -1 && a < 256) pd->Class.color##Code.a = a; \
\
edje_object_calc_force(obj); \
}
-FUNC_COLOR();
-FUNC_COLOR(2);
-FUNC_COLOR(3);
+FUNC_COLOR(common, );
+FUNC_COLOR(common, 2);
+FUNC_COLOR(text, 3);
#define FUNC_STATE_DOUBLE(Class, Value) \
EAPI double \
{
GET_PD_OR_RETURN(NULL);
//printf("Get ColorClass of part: %s state: %s\n", part, state);
- return eina_stringshare_add(pd->color_class);
+ return eina_stringshare_add(pd->common.color_class);
}
EAPI void
{
GET_PD_OR_RETURN();
//printf("Set ColorClass of part: %s state: %s [to: %s]\n", part, state, color_class);
- _edje_if_string_free(ed, pd->color_class);
- pd->color_class = (char*)eina_stringshare_add(color_class);
+ _edje_if_string_free(ed, pd->common.color_class);
+ pd->common.color_class = (char*)eina_stringshare_add(color_class);
}
EAPI const Eina_List *
if (pd->common.aspect.prefer)
BUF_APPENDF(I5"aspect_preference: %s;\n", prefers[pd->common.aspect.prefer]);
- if (pd->color_class)
- BUF_APPENDF(I5"color_class: \"%s\";\n", pd->color_class);
-
- if (pd->color.r != 255 || pd->color.g != 255 ||
- pd->color.b != 255 || pd->color.a != 255)
- BUF_APPENDF(I5"color: %d %d %d %d;\n",
- pd->color.r, pd->color.g, pd->color.b, pd->color.a);
- if (pd->color2.r != 0 || pd->color2.g != 0 ||
- pd->color2.b != 0 || pd->color2.a != 255)
- BUF_APPENDF(I5"color2: %d %d %d %d;\n",
- pd->color2.r, pd->color2.g, pd->color2.b, pd->color2.a);
- if (pd->color3.r != 0 || pd->color3.g != 0 ||
- pd->color3.b != 0 || pd->color3.a != 128)
- BUF_APPENDF(I5"color3: %d %d %d %d;\n",
- pd->color3.r, pd->color3.g, pd->color3.b, pd->color3.a);
+ if (pd->common.color_class)
+ BUF_APPENDF(I5"color_class: \"%s\";\n", pd->common.color_class);
+
+ if (pd->common.color.r != 255 || pd->common.color.g != 255 ||
+ pd->common.color.b != 255 || pd->common.color.a != 255)
+ BUF_APPENDF(I5"color: %d %d %d %d;\n",
+ pd->common.color.r, pd->common.color.g, pd->common.color.b, pd->common.color.a);
+ if (pd->common.color2.r != 0 || pd->common.color2.g != 0 ||
+ pd->common.color2.b != 0 || pd->common.color2.a != 255)
+ BUF_APPENDF(I5"color2: %d %d %d %d;\n",
+ pd->common.color2.r, pd->common.color2.g, pd->common.color2.b, pd->common.color2.a);
+ if (pd->text.color3.r != 0 || pd->text.color3.g != 0 ||
+ pd->text.color3.b != 0 || pd->text.color3.a != 128)
+ BUF_APPENDF(I5"color3: %d %d %d %d;\n",
+ pd->text.color3.r, pd->text.color3.g, pd->text.color3.b, pd->text.color3.a);
//Rel1
if (pd->common.rel1.relative_x || pd->common.rel1.relative_y || pd->common.rel1.offset_x ||
}
#define DUP(x) x ? (char *)eina_stringshare_add(x) : NULL
- d->color_class = DUP(d->color_class);
+ d->common.color_class = DUP(d->common.color_class);
d->text.text = DUP(d->text.text);
d->text.text_class = DUP(d->text.text_class);
d->text.font = DUP(d->text.font);
case EDJE_STATE_PARAM_COLOR:
CHKPARAM(6);
- GETINT(rp->custom->description->color.r, params[3]);
- GETINT(rp->custom->description->color.g, params[4]);
- GETINT(rp->custom->description->color.b, params[5]);
- GETINT(rp->custom->description->color.a, params[6]);
+ GETINT(rp->custom->description->common.color.r, params[3]);
+ GETINT(rp->custom->description->common.color.g, params[4]);
+ GETINT(rp->custom->description->common.color.b, params[5]);
+ GETINT(rp->custom->description->common.color.a, params[6]);
break;
case EDJE_STATE_PARAM_COLOR2:
CHKPARAM(6);
- GETINT(rp->custom->description->color2.r, params[3]);
- GETINT(rp->custom->description->color2.g, params[4]);
- GETINT(rp->custom->description->color2.b, params[5]);
- GETINT(rp->custom->description->color2.a, params[6]);
+ GETINT(rp->custom->description->common.color2.r, params[3]);
+ GETINT(rp->custom->description->common.color2.g, params[4]);
+ GETINT(rp->custom->description->common.color2.b, params[5]);
+ GETINT(rp->custom->description->common.color2.a, params[6]);
break;
case EDJE_STATE_PARAM_COLOR3:
CHKPARAM(6);
- GETINT(rp->custom->description->color3.r, params[3]);
- GETINT(rp->custom->description->color3.g, params[4]);
- GETINT(rp->custom->description->color3.b, params[5]);
- GETINT(rp->custom->description->color3.a, params[6]);
+ GETINT(rp->custom->description->text.color3.r, params[3]);
+ GETINT(rp->custom->description->text.color3.g, params[4]);
+ GETINT(rp->custom->description->text.color3.b, params[5]);
+ GETINT(rp->custom->description->text.color3.a, params[6]);
break;
case EDJE_STATE_PARAM_COLOR_CLASS:
CHKPARAM(3);
GETSTR(s, params[3]);
- GETSTREVAS(s, rp->custom->description->color_class);
+ GETSTREVAS(s, rp->custom->description->common.color_class);
break;
case EDJE_STATE_PARAM_REL1:
case EDJE_STATE_PARAM_COLOR:
CHKPARAM(6);
- SETINT(rp->custom->description->color.r, params[3]);
- SETINT(rp->custom->description->color.g, params[4]);
- SETINT(rp->custom->description->color.b, params[5]);
- SETINT(rp->custom->description->color.a, params[6]);
+ SETINT(rp->custom->description->common.color.r, params[3]);
+ SETINT(rp->custom->description->common.color.g, params[4]);
+ SETINT(rp->custom->description->common.color.b, params[5]);
+ SETINT(rp->custom->description->common.color.a, params[6]);
break;
case EDJE_STATE_PARAM_COLOR2:
CHKPARAM(6);
- SETINT(rp->custom->description->color2.r, params[3]);
- SETINT(rp->custom->description->color2.g, params[4]);
- SETINT(rp->custom->description->color2.b, params[5]);
- SETINT(rp->custom->description->color2.a, params[6]);
+ SETINT(rp->custom->description->common.color2.r, params[3]);
+ SETINT(rp->custom->description->common.color2.g, params[4]);
+ SETINT(rp->custom->description->common.color2.b, params[5]);
+ SETINT(rp->custom->description->common.color2.a, params[6]);
break;
case EDJE_STATE_PARAM_COLOR3:
CHKPARAM(6);
- SETINT(rp->custom->description->color3.r, params[3]);
- SETINT(rp->custom->description->color3.g, params[4]);
- SETINT(rp->custom->description->color3.b, params[5]);
- SETINT(rp->custom->description->color3.a, params[6]);
+ SETINT(rp->custom->description->text.color3.r, params[3]);
+ SETINT(rp->custom->description->text.color3.g, params[4]);
+ SETINT(rp->custom->description->text.color3.b, params[5]);
+ SETINT(rp->custom->description->text.color3.a, params[6]);
break;
case EDJE_STATE_PARAM_COLOR_CLASS:
CHKPARAM(4);
- s = rp->custom->description->color_class;
+ s = rp->custom->description->common.color_class;
SETSTRALLOCATE(s);
break;
if (errors)
break;
/* Register any color classes in this parts descriptions. */
- if ((ep->default_desc) && (ep->default_desc->color_class))
- _edje_color_class_member_add(ed, ep->default_desc->color_class);
+ if ((ep->default_desc) && (ep->default_desc->common.color_class))
+ _edje_color_class_member_add(ed, ep->default_desc->common.color_class);
EINA_LIST_FOREACH(ep->other_desc, hist, desc)
- if (desc->color_class)
- _edje_color_class_member_add(ed, desc->color_class);
+ if (desc->common.color_class)
+ _edje_color_class_member_add(ed, desc->common.color_class);
}
/* build real parts */
for (n = 0, l = ed->collection->parts; l; l = eina_list_next(l), n++)
_edje_external_params_free(desc->external_params, free_strings);
if (free_strings)
{
- if (desc->color_class) eina_stringshare_del(desc->color_class);
- if (desc->text.text) eina_stringshare_del(desc->text.text);
- if (desc->text.text_class) eina_stringshare_del(desc->text.text_class);
- if (desc->text.style) eina_stringshare_del(desc->text.style);
- if (desc->text.font) eina_stringshare_del(desc->text.font);
+ if (desc->common.color_class) eina_stringshare_del(desc->common.color_class);
+ if (desc->text.text) eina_stringshare_del(desc->text.text);
+ if (desc->text.text_class) eina_stringshare_del(desc->text.text_class);
+ if (desc->text.style) eina_stringshare_del(desc->text.style);
+ if (desc->text.font) eina_stringshare_del(desc->text.font);
}
free(desc);
}
Edje_Position step; /* size stepping by n pixels, 0 = none */
Edje_Aspect_Prefer aspect;
+ char *color_class; /* how to modify the color */
+ Edje_Color color;
+ Edje_Color color2;
+
struct {
FLOAT_T relative_x;
FLOAT_T relative_y;
char *repch; /* replacement char for password mode entry */
Edje_Alignment align; /* text alignment within bounds */
+ Edje_Color color3;
double elipsis; /* 0.0 - 1.0 defining where the elipsis align */
int size; /* 0 = use user set size */
Edje_Part_Description_Spec_Box box;
Edje_Part_Description_Spec_Table table;
- char *color_class; /* how to modify the color */
-
- Edje_Color color, color2, color3; /* color for rect or text, shadow etc. */
Eina_List *external_params; /* parameters for external objects */
};
Eina_List *tmp;
Edje_Part_Description *desc;
- if ((ep->default_desc) && (ep->default_desc->color_class))
- _edje_color_class_member_del(ed, ep->default_desc->color_class);
+ if ((ep->default_desc) && (ep->default_desc->common.color_class))
+ _edje_color_class_member_del(ed, ep->default_desc->common.color_class);
EINA_LIST_FOREACH(ep->other_desc, tmp, desc)
- if (desc->color_class)
- _edje_color_class_member_del(ed, desc->color_class);
+ if (desc->common.color_class)
+ _edje_color_class_member_del(ed, desc->common.color_class);
}
Edje_Text_Class *