forked from enlightenment/efl
* edje: move image specific properties to their own structure.
SVN revision: 50282
This commit is contained in:
parent
83bb52f7c9
commit
04ffefa9e5
|
@ -3266,18 +3266,18 @@ ob_collections_group_parts_part_description(void)
|
|||
ed->common.rel2.id_x = -1;
|
||||
ed->common.rel2.id_y = -1;
|
||||
ed->image.id = -1;
|
||||
ed->fill.smooth = 1;
|
||||
ed->fill.pos_rel_x = FROM_DOUBLE(0.0);
|
||||
ed->fill.pos_abs_x = 0;
|
||||
ed->fill.rel_x = FROM_DOUBLE(1.0);
|
||||
ed->fill.abs_x = 0;
|
||||
ed->fill.pos_rel_y = FROM_DOUBLE(0.0);
|
||||
ed->fill.pos_abs_y = 0;
|
||||
ed->fill.rel_y = FROM_DOUBLE(1.0);
|
||||
ed->fill.abs_y = 0;
|
||||
ed->fill.angle = 0;
|
||||
ed->fill.spread = 0;
|
||||
ed->fill.type = EDJE_FILL_TYPE_SCALE;
|
||||
ed->image.fill.smooth = 1;
|
||||
ed->image.fill.pos_rel_x = FROM_DOUBLE(0.0);
|
||||
ed->image.fill.pos_abs_x = 0;
|
||||
ed->image.fill.rel_x = FROM_DOUBLE(1.0);
|
||||
ed->image.fill.abs_x = 0;
|
||||
ed->image.fill.pos_rel_y = FROM_DOUBLE(0.0);
|
||||
ed->image.fill.pos_abs_y = 0;
|
||||
ed->image.fill.rel_y = FROM_DOUBLE(1.0);
|
||||
ed->image.fill.abs_y = 0;
|
||||
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;
|
||||
|
@ -4284,10 +4284,10 @@ st_collections_group_parts_part_description_image_border(void)
|
|||
|
||||
ed = ep->default_desc;
|
||||
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
|
||||
ed->border.l = parse_int_range(0, 0, 0x7fffffff);
|
||||
ed->border.r = parse_int_range(1, 0, 0x7fffffff);
|
||||
ed->border.t = parse_int_range(2, 0, 0x7fffffff);
|
||||
ed->border.b = parse_int_range(3, 0, 0x7fffffff);
|
||||
ed->image.border.l = parse_int_range(0, 0, 0x7fffffff);
|
||||
ed->image.border.r = parse_int_range(1, 0, 0x7fffffff);
|
||||
ed->image.border.t = parse_int_range(2, 0, 0x7fffffff);
|
||||
ed->image.border.b = parse_int_range(3, 0, 0x7fffffff);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4324,13 +4324,13 @@ st_collections_group_parts_part_description_image_middle(void)
|
|||
|
||||
ed = ep->default_desc;
|
||||
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
|
||||
ed->border.no_fill = parse_enum(0,
|
||||
"1", 0,
|
||||
"DEFAULT", 0,
|
||||
"0", 1,
|
||||
"NONE", 1,
|
||||
"SOLID", 2,
|
||||
NULL);
|
||||
ed->image.border.no_fill = parse_enum(0,
|
||||
"1", 0,
|
||||
"DEFAULT", 0,
|
||||
"0", 1,
|
||||
"NONE", 1,
|
||||
"SOLID", 2,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4366,10 +4366,10 @@ st_collections_group_parts_part_description_image_border_scale(void)
|
|||
|
||||
ed = ep->default_desc;
|
||||
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
|
||||
ed->border.scale = parse_enum(0,
|
||||
"1", 0,
|
||||
"0", 1,
|
||||
NULL);
|
||||
ed->image.border.scale = parse_enum(0,
|
||||
"1", 0,
|
||||
"0", 1,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4406,11 +4406,11 @@ st_collections_group_parts_part_description_image_scale_hint(void)
|
|||
ed = ep->default_desc;
|
||||
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
|
||||
ed->image.scale_hint = parse_enum(0,
|
||||
"NONE", EVAS_IMAGE_SCALE_HINT_NONE,
|
||||
"DYNAMIC", EVAS_IMAGE_SCALE_HINT_DYNAMIC,
|
||||
"STATIC", EVAS_IMAGE_SCALE_HINT_STATIC,
|
||||
"0", EVAS_IMAGE_SCALE_HINT_NONE,
|
||||
NULL);
|
||||
"NONE", EVAS_IMAGE_SCALE_HINT_NONE,
|
||||
"DYNAMIC", EVAS_IMAGE_SCALE_HINT_DYNAMIC,
|
||||
"STATIC", EVAS_IMAGE_SCALE_HINT_STATIC,
|
||||
"0", EVAS_IMAGE_SCALE_HINT_NONE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4469,7 +4469,7 @@ st_collections_group_parts_part_description_fill_smooth(void)
|
|||
|
||||
ed = ep->default_desc;
|
||||
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
|
||||
ed->fill.smooth = parse_bool(0);
|
||||
ed->image.fill.smooth = parse_bool(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4506,7 +4506,7 @@ st_collections_group_parts_part_description_fill_spread(void)
|
|||
|
||||
ed = ep->default_desc;
|
||||
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
|
||||
ed->fill.spread = parse_int_range(0, 0, 1);
|
||||
ed->image.fill.spread = parse_int_range(0, 0, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4542,10 +4542,10 @@ st_collections_group_parts_part_description_fill_type(void)
|
|||
exit(-1);
|
||||
}
|
||||
|
||||
ed->fill.type = parse_enum(0,
|
||||
"SCALE", EDJE_FILL_TYPE_SCALE,
|
||||
"TILE", EDJE_FILL_TYPE_TILE,
|
||||
NULL);
|
||||
ed->image.fill.type = parse_enum(0,
|
||||
"SCALE", EDJE_FILL_TYPE_SCALE,
|
||||
"TILE", EDJE_FILL_TYPE_TILE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4601,8 +4601,8 @@ st_collections_group_parts_part_description_fill_origin_relative(void)
|
|||
|
||||
ed = ep->default_desc;
|
||||
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
|
||||
ed->fill.pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0));
|
||||
ed->fill.pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0));
|
||||
ed->image.fill.pos_rel_x = FROM_DOUBLE(parse_float_range(0, -999999999.0, 999999999.0));
|
||||
ed->image.fill.pos_rel_y = FROM_DOUBLE(parse_float_range(1, -999999999.0, 999999999.0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4637,8 +4637,8 @@ st_collections_group_parts_part_description_fill_origin_offset(void)
|
|||
|
||||
ed = ep->default_desc;
|
||||
if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
|
||||
ed->fill.pos_abs_x = parse_int(0);
|
||||
ed->fill.pos_abs_y = parse_int(1);
|
||||
ed->image.fill.pos_abs_x = parse_int(0);
|
||||
ed->image.fill.pos_abs_y = parse_int(1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4696,8 +4696,8 @@ st_collections_group_parts_part_description_fill_size_relative(void)
|
|||
exit(-1);
|
||||
}
|
||||
|
||||
ed->fill.rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
|
||||
ed->fill.rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
|
||||
ed->image.fill.rel_x = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
|
||||
ed->image.fill.rel_y = FROM_DOUBLE(parse_float_range(1, 0.0, 999999999.0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4732,8 +4732,8 @@ st_collections_group_parts_part_description_fill_size_offset(void)
|
|||
exit(-1);
|
||||
}
|
||||
|
||||
ed->fill.abs_x = parse_int(0);
|
||||
ed->fill.abs_y = parse_int(1);
|
||||
ed->image.fill.abs_x = parse_int(0);
|
||||
ed->image.fill.abs_y = parse_int(1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1099,7 +1099,7 @@ _edje_part_recalc_single_drag(Edje_Real_Part *ep,
|
|||
|
||||
static void
|
||||
_edje_part_recalc_single_fill(Edje_Real_Part *ep,
|
||||
Edje_Part_Description *desc,
|
||||
Edje_Part_Description_Spec_Image *desc,
|
||||
Edje_Calc_Params *params,
|
||||
int flags)
|
||||
{
|
||||
|
@ -1281,7 +1281,7 @@ _edje_part_recalc_single(Edje *ed,
|
|||
|
||||
/* fill */
|
||||
if (ep->part->type == EDJE_PART_TYPE_IMAGE)
|
||||
_edje_part_recalc_single_fill(ep, desc, params, flags);
|
||||
_edje_part_recalc_single_fill(ep, &desc->image, params, flags);
|
||||
|
||||
/* colors */
|
||||
if ((desc->color_class) && (*desc->color_class))
|
||||
|
@ -1311,13 +1311,13 @@ _edje_part_recalc_single(Edje *ed,
|
|||
/* border */
|
||||
if (flags & FLAG_X)
|
||||
{
|
||||
params->type.common.spec.image.l = desc->border.l;
|
||||
params->type.common.spec.image.r = desc->border.r;
|
||||
params->type.common.spec.image.l = desc->image.border.l;
|
||||
params->type.common.spec.image.r = desc->image.border.r;
|
||||
}
|
||||
if (flags & FLAG_Y)
|
||||
{
|
||||
params->type.common.spec.image.t = desc->border.t;
|
||||
params->type.common.spec.image.b = desc->border.b;
|
||||
params->type.common.spec.image.t = desc->image.border.t;
|
||||
params->type.common.spec.image.b = desc->image.border.b;
|
||||
}
|
||||
break;
|
||||
case EDJE_PART_TYPE_TEXT:
|
||||
|
@ -1496,17 +1496,17 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
|
|||
evas_object_image_fill_set(ep->object, p3->type.common.fill.x, p3->type.common.fill.y,
|
||||
p3->type.common.fill.w, p3->type.common.fill.h);
|
||||
evas_object_image_smooth_scale_set(ep->object, p3->smooth);
|
||||
if (chosen_desc->border.scale)
|
||||
if (chosen_desc->image.border.scale)
|
||||
evas_object_image_border_scale_set(ep->object, TO_DOUBLE(sc));
|
||||
else
|
||||
evas_object_image_border_scale_set(ep->object, 1.0);
|
||||
evas_object_image_border_set(ep->object, p3->type.common.spec.image.l, p3->type.common.spec.image.r,
|
||||
p3->type.common.spec.image.t, p3->type.common.spec.image.b);
|
||||
if (chosen_desc->border.no_fill == 0)
|
||||
if (chosen_desc->image.border.no_fill == 0)
|
||||
evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_DEFAULT);
|
||||
else if (chosen_desc->border.no_fill == 1)
|
||||
else if (chosen_desc->image.border.no_fill == 1)
|
||||
evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_NONE);
|
||||
else if (chosen_desc->border.no_fill == 2)
|
||||
else if (chosen_desc->image.border.no_fill == 2)
|
||||
evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_SOLID);
|
||||
|
||||
image_id = _edje_image_find(ep->object, ed,
|
||||
|
|
|
@ -279,24 +279,24 @@ _edje_edd_init(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "image.set", image.set, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(_edje_edd_edje_part_description, Edje_Part_Description, "image.tween_list", image.tween_list, _edje_edd_edje_part_image_id);
|
||||
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.l", border.l, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.r", border.r, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.t", border.t, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.b", border.b, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.no_fill", border.no_fill, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.scale", border.scale, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.smooth", fill.smooth, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_rel_x", fill.pos_rel_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_abs_x", fill.pos_abs_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.rel_x", fill.rel_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.abs_x", fill.abs_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_rel_y", fill.pos_rel_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_abs_y", fill.pos_abs_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.rel_y", fill.rel_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.abs_y", fill.abs_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.angle", fill.angle, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.spread", fill.spread, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.type", fill.type, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.l", image.border.l, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.r", image.border.r, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.t", image.border.t, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.b", image.border.b, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.no_fill", image.border.no_fill, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "border.scale", image.border.scale, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.smooth", image.fill.smooth, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_rel_x", image.fill.pos_rel_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_abs_x", image.fill.pos_abs_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.rel_x", image.fill.rel_x, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.abs_x", image.fill.abs_x, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_rel_y", image.fill.pos_rel_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.pos_abs_y", image.fill.pos_abs_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.rel_y", image.fill.rel_y, EDJE_T_FLOAT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.abs_y", image.fill.abs_y, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.angle", image.fill.angle, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.spread", image.fill.spread, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "fill.type", image.fill.type, EET_T_CHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "color_class", 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);
|
||||
|
|
|
@ -2643,18 +2643,18 @@ edje_edit_state_add(Evas_Object *obj, const char *part, const char *name, double
|
|||
pd->common.rel2.id_x = -1;
|
||||
pd->common.rel2.id_y = -1;
|
||||
pd->image.id = -1;
|
||||
pd->fill.smooth = 1;
|
||||
pd->fill.pos_rel_x = 0.0;
|
||||
pd->fill.pos_abs_x = 0;
|
||||
pd->fill.rel_x = 1.0;
|
||||
pd->fill.abs_x = 0;
|
||||
pd->fill.pos_rel_y = 0.0;
|
||||
pd->fill.pos_abs_y = 0;
|
||||
pd->fill.rel_y = 1.0;
|
||||
pd->fill.abs_y = 0;
|
||||
pd->fill.angle = 0;
|
||||
pd->fill.spread = 0;
|
||||
pd->fill.type = EDJE_FILL_TYPE_SCALE;
|
||||
pd->image.fill.smooth = 1;
|
||||
pd->image.fill.pos_rel_x = 0.0;
|
||||
pd->image.fill.pos_abs_x = 0;
|
||||
pd->image.fill.rel_x = 1.0;
|
||||
pd->image.fill.abs_x = 0;
|
||||
pd->image.fill.pos_rel_y = 0.0;
|
||||
pd->image.fill.pos_abs_y = 0;
|
||||
pd->image.fill.rel_y = 1.0;
|
||||
pd->image.fill.abs_y = 0;
|
||||
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;
|
||||
|
@ -2784,23 +2784,23 @@ edje_edit_state_copy(Evas_Object *obj, const char *part, const char *from, doubl
|
|||
new_i->id = i->id;
|
||||
pdto->image.tween_list = eina_list_append(pdto->image.tween_list, new_i);
|
||||
}
|
||||
PD_COPY(border.l);
|
||||
PD_COPY(border.r);
|
||||
PD_COPY(border.t);
|
||||
PD_COPY(border.b);
|
||||
PD_COPY(border.no_fill);
|
||||
PD_COPY(fill.pos_rel_x);
|
||||
PD_COPY(fill.rel_x);
|
||||
PD_COPY(fill.pos_rel_y);
|
||||
PD_COPY(fill.rel_y);
|
||||
PD_COPY(fill.pos_abs_x);
|
||||
PD_COPY(fill.abs_x);
|
||||
PD_COPY(fill.pos_abs_y);
|
||||
PD_COPY(fill.abs_y);
|
||||
PD_COPY(fill.angle);
|
||||
PD_COPY(fill.spread);
|
||||
PD_COPY(fill.smooth);
|
||||
PD_COPY(fill.type);
|
||||
PD_COPY(image.border.l);
|
||||
PD_COPY(image.border.r);
|
||||
PD_COPY(image.border.t);
|
||||
PD_COPY(image.border.b);
|
||||
PD_COPY(image.border.no_fill);
|
||||
PD_COPY(image.fill.pos_rel_x);
|
||||
PD_COPY(image.fill.rel_x);
|
||||
PD_COPY(image.fill.pos_rel_y);
|
||||
PD_COPY(image.fill.rel_y);
|
||||
PD_COPY(image.fill.pos_abs_x);
|
||||
PD_COPY(image.fill.abs_x);
|
||||
PD_COPY(image.fill.pos_abs_y);
|
||||
PD_COPY(image.fill.abs_y);
|
||||
PD_COPY(image.fill.angle);
|
||||
PD_COPY(image.fill.spread);
|
||||
PD_COPY(image.fill.smooth);
|
||||
PD_COPY(image.fill.type);
|
||||
PD_STRING_COPY(color_class);
|
||||
PD_STRING_COPY(text.text);
|
||||
PD_STRING_COPY(text.text_class);
|
||||
|
@ -3036,13 +3036,13 @@ FUNC_STATE_DOUBLE(aspect, max);
|
|||
edje_edit_state_fill_##Type##_relative_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \
|
||||
{ \
|
||||
GET_PD_OR_RETURN(0); \
|
||||
return TO_DOUBLE(pd->fill.Class##rel_##Value); \
|
||||
return TO_DOUBLE(pd->image.fill.Class##rel_##Value); \
|
||||
} \
|
||||
EAPI void \
|
||||
edje_edit_state_fill_##Type##_relative_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
|
||||
{ \
|
||||
GET_PD_OR_RETURN(); \
|
||||
pd->fill.Class##rel_##Value = FROM_DOUBLE(v); \
|
||||
pd->image.fill.Class##rel_##Value = FROM_DOUBLE(v); \
|
||||
edje_object_calc_force(obj); \
|
||||
}
|
||||
|
||||
|
@ -3051,13 +3051,13 @@ FUNC_STATE_DOUBLE(aspect, max);
|
|||
edje_edit_state_fill_##Type##_offset_##Value##_get(Evas_Object *obj, const char *part, const char *state, double value) \
|
||||
{ \
|
||||
GET_PD_OR_RETURN(0); \
|
||||
return pd->fill.Class##abs_##Value; \
|
||||
return pd->image.fill.Class##abs_##Value; \
|
||||
} \
|
||||
EAPI void \
|
||||
edje_edit_state_fill_##Type##_offset_##Value##_set(Evas_Object *obj, const char *part, const char *state, double value, double v) \
|
||||
{ \
|
||||
GET_PD_OR_RETURN(); \
|
||||
pd->fill.Class##abs_##Value = FROM_DOUBLE(v); \
|
||||
pd->image.fill.Class##abs_##Value = FROM_DOUBLE(v); \
|
||||
edje_object_calc_force(obj); \
|
||||
}
|
||||
|
||||
|
@ -4032,10 +4032,10 @@ edje_edit_state_image_border_get(Evas_Object *obj, const char *part, const char
|
|||
|
||||
//printf("GET IMAGE_BORDER of state '%s'\n", state);
|
||||
|
||||
if (l) *l = pd->border.l;
|
||||
if (r) *r = pd->border.r;
|
||||
if (t) *t = pd->border.t;
|
||||
if (b) *b = pd->border.b;
|
||||
if (l) *l = pd->image.border.l;
|
||||
if (r) *r = pd->image.border.r;
|
||||
if (t) *t = pd->image.border.t;
|
||||
if (b) *b = pd->image.border.b;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -4045,10 +4045,10 @@ edje_edit_state_image_border_set(Evas_Object *obj, const char *part, const char
|
|||
|
||||
//printf("SET IMAGE_BORDER of state '%s'\n", state);
|
||||
|
||||
if (l > -1) pd->border.l = l;
|
||||
if (r > -1) pd->border.r = r;
|
||||
if (t > -1) pd->border.t = t;
|
||||
if (b > -1) pd->border.b = b;
|
||||
if (l > -1) pd->image.border.l = l;
|
||||
if (r > -1) pd->image.border.r = r;
|
||||
if (t > -1) pd->image.border.t = t;
|
||||
if (b > -1) pd->image.border.b = b;
|
||||
|
||||
edje_object_calc_force(obj);
|
||||
}
|
||||
|
@ -4057,9 +4057,9 @@ EAPI unsigned char
|
|||
edje_edit_state_image_border_fill_get(Evas_Object *obj, const char *part, const char *state, double value)
|
||||
{
|
||||
GET_PD_OR_RETURN(0);
|
||||
if (pd->border.no_fill == 0) return 1;
|
||||
else if (pd->border.no_fill == 1) return 0;
|
||||
else if (pd->border.no_fill == 2) return 2;
|
||||
if (pd->image.border.no_fill == 0) return 1;
|
||||
else if (pd->image.border.no_fill == 1) return 0;
|
||||
else if (pd->image.border.no_fill == 2) return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -4067,9 +4067,9 @@ EAPI void
|
|||
edje_edit_state_image_border_fill_set(Evas_Object *obj, const char *part, const char *state, double value, unsigned char fill)
|
||||
{
|
||||
GET_PD_OR_RETURN();
|
||||
if (fill == 0) pd->border.no_fill = 1;
|
||||
else if (fill == 1) pd->border.no_fill = 0;
|
||||
else if (fill == 2) pd->border.no_fill = 2;
|
||||
if (fill == 0) pd->image.border.no_fill = 1;
|
||||
else if (fill == 1) pd->image.border.no_fill = 0;
|
||||
else if (fill == 2) pd->image.border.no_fill = 2;
|
||||
|
||||
edje_object_calc_force(obj);
|
||||
}
|
||||
|
@ -5186,13 +5186,13 @@ _edje_generate_source_of_state(Evas_Object *obj, const char *part, const char *s
|
|||
BUF_APPENDF(I6"tween: \"%s\";\n", data);
|
||||
edje_edit_string_list_free(ll);
|
||||
|
||||
if (pd->border.l || pd->border.r || pd->border.t || pd->border.b)
|
||||
BUF_APPENDF(I6"border: %d %d %d %d;\n", pd->border.l, pd->border.r, pd->border.t, pd->border.b);
|
||||
if (pd->border.no_fill == 1)
|
||||
if (pd->image.border.l || pd->image.border.r || pd->image.border.t || pd->image.border.b)
|
||||
BUF_APPENDF(I6"border: %d %d %d %d;\n", pd->image.border.l, pd->image.border.r, pd->image.border.t, pd->image.border.b);
|
||||
if (pd->image.border.no_fill == 1)
|
||||
BUF_APPEND(I6"middle: NONE;\n");
|
||||
else if (pd->border.no_fill == 0)
|
||||
else if (pd->image.border.no_fill == 0)
|
||||
BUF_APPEND(I6"middle: DEFAULT;\n");
|
||||
else if (pd->border.no_fill == 2)
|
||||
else if (pd->image.border.no_fill == 2)
|
||||
BUF_APPEND(I6"middle: SOLID;\n");
|
||||
|
||||
BUF_APPEND(I5"}\n");//image
|
||||
|
@ -5202,29 +5202,29 @@ _edje_generate_source_of_state(Evas_Object *obj, const char *part, const char *s
|
|||
if (rp->part->type == EDJE_PART_TYPE_IMAGE)
|
||||
{
|
||||
BUF_APPEND(I5"fill {\n");
|
||||
if (rp->part->type == EDJE_PART_TYPE_IMAGE && !pd->fill.smooth)
|
||||
if (rp->part->type == EDJE_PART_TYPE_IMAGE && !pd->image.fill.smooth)
|
||||
BUF_APPEND(I6"smooth: 0;\n");
|
||||
//TODO Support spread
|
||||
|
||||
if (pd->fill.pos_rel_x || pd->fill.pos_rel_y ||
|
||||
pd->fill.pos_abs_x || pd->fill.pos_abs_y)
|
||||
if (pd->image.fill.pos_rel_x || pd->image.fill.pos_rel_y ||
|
||||
pd->image.fill.pos_abs_x || pd->image.fill.pos_abs_y)
|
||||
{
|
||||
BUF_APPEND(I6"origin {\n");
|
||||
if (pd->fill.pos_rel_x || pd->fill.pos_rel_y)
|
||||
BUF_APPENDF(I7"relative: %g %g;\n", TO_DOUBLE(pd->fill.pos_rel_x), TO_DOUBLE(pd->fill.pos_rel_y));
|
||||
if (pd->fill.pos_abs_x || pd->fill.pos_abs_y)
|
||||
BUF_APPENDF(I7"offset: %d %d;\n", pd->fill.pos_abs_x, pd->fill.pos_abs_y);
|
||||
if (pd->image.fill.pos_rel_x || pd->image.fill.pos_rel_y)
|
||||
BUF_APPENDF(I7"relative: %g %g;\n", TO_DOUBLE(pd->image.fill.pos_rel_x), TO_DOUBLE(pd->image.fill.pos_rel_y));
|
||||
if (pd->image.fill.pos_abs_x || pd->image.fill.pos_abs_y)
|
||||
BUF_APPENDF(I7"offset: %d %d;\n", pd->image.fill.pos_abs_x, pd->image.fill.pos_abs_y);
|
||||
BUF_APPEND(I6"}\n");
|
||||
}
|
||||
|
||||
if (TO_DOUBLE(pd->fill.rel_x) != 1.0 || TO_DOUBLE(pd->fill.rel_y) != 1.0 ||
|
||||
pd->fill.abs_x || pd->fill.abs_y)
|
||||
if (TO_DOUBLE(pd->image.fill.rel_x) != 1.0 || TO_DOUBLE(pd->image.fill.rel_y) != 1.0 ||
|
||||
pd->image.fill.abs_x || pd->image.fill.abs_y)
|
||||
{
|
||||
BUF_APPEND(I6"size {\n");
|
||||
if (pd->fill.rel_x != 1.0 || pd->fill.rel_y != 1.0)
|
||||
BUF_APPENDF(I7"relative: %g %g;\n", TO_DOUBLE(pd->fill.rel_x), TO_DOUBLE(pd->fill.rel_y));
|
||||
if (pd->fill.abs_x || pd->fill.abs_y)
|
||||
BUF_APPENDF(I7"offset: %d %d;\n", pd->fill.abs_x, pd->fill.abs_y);
|
||||
if (pd->image.fill.rel_x != 1.0 || pd->image.fill.rel_y != 1.0)
|
||||
BUF_APPENDF(I7"relative: %g %g;\n", TO_DOUBLE(pd->image.fill.rel_x), TO_DOUBLE(pd->image.fill.rel_y));
|
||||
if (pd->image.fill.abs_x || pd->image.fill.abs_y)
|
||||
BUF_APPENDF(I7"offset: %d %d;\n", pd->image.fill.abs_x, pd->image.fill.abs_y);
|
||||
BUF_APPEND(I6"}\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -1794,37 +1794,37 @@ _edje_embryo_fn_set_state_val(Embryo_Program *ep, Embryo_Cell *params)
|
|||
if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
|
||||
CHKPARAM(6);
|
||||
|
||||
GETINT(rp->custom->description->border.l, params[3]);
|
||||
GETINT(rp->custom->description->border.r, params[4]);
|
||||
GETINT(rp->custom->description->border.t, params[5]);
|
||||
GETINT(rp->custom->description->border.b, params[6]);
|
||||
GETINT(rp->custom->description->image.border.l, params[3]);
|
||||
GETINT(rp->custom->description->image.border.r, params[4]);
|
||||
GETINT(rp->custom->description->image.border.t, params[5]);
|
||||
GETINT(rp->custom->description->image.border.b, params[6]);
|
||||
|
||||
break;
|
||||
case EDJE_STATE_PARAM_FILL_SMOOTH:
|
||||
if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
|
||||
CHKPARAM(3);
|
||||
|
||||
GETINT(rp->custom->description->fill.smooth, params[3]);
|
||||
GETINT(rp->custom->description->image.fill.smooth, params[3]);
|
||||
|
||||
break;
|
||||
case EDJE_STATE_PARAM_FILL_POS:
|
||||
if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
|
||||
CHKPARAM(6);
|
||||
|
||||
GETFLOAT_T(rp->custom->description->fill.pos_rel_x, params[3]);
|
||||
GETFLOAT_T(rp->custom->description->fill.pos_rel_y, params[4]);
|
||||
GETINT(rp->custom->description->fill.pos_abs_x, params[5]);
|
||||
GETINT(rp->custom->description->fill.pos_abs_y, params[6]);
|
||||
GETFLOAT_T(rp->custom->description->image.fill.pos_rel_x, params[3]);
|
||||
GETFLOAT_T(rp->custom->description->image.fill.pos_rel_y, params[4]);
|
||||
GETINT(rp->custom->description->image.fill.pos_abs_x, params[5]);
|
||||
GETINT(rp->custom->description->image.fill.pos_abs_y, params[6]);
|
||||
|
||||
break;
|
||||
case EDJE_STATE_PARAM_FILL_SIZE:
|
||||
if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
|
||||
CHKPARAM(6);
|
||||
|
||||
GETFLOAT_T(rp->custom->description->fill.rel_x, params[3]);
|
||||
GETFLOAT_T(rp->custom->description->fill.rel_y, params[4]);
|
||||
GETINT(rp->custom->description->fill.abs_x, params[5]);
|
||||
GETINT(rp->custom->description->fill.abs_y, params[6]);
|
||||
GETFLOAT_T(rp->custom->description->image.fill.rel_x, params[3]);
|
||||
GETFLOAT_T(rp->custom->description->image.fill.rel_y, params[4]);
|
||||
GETINT(rp->custom->description->image.fill.abs_x, params[5]);
|
||||
GETINT(rp->custom->description->image.fill.abs_y, params[6]);
|
||||
|
||||
break;
|
||||
case EDJE_STATE_PARAM_TEXT:
|
||||
|
@ -2141,37 +2141,37 @@ _edje_embryo_fn_get_state_val(Embryo_Program *ep, Embryo_Cell *params)
|
|||
if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
|
||||
CHKPARAM(6);
|
||||
|
||||
SETINT(rp->custom->description->border.l, params[3]);
|
||||
SETINT(rp->custom->description->border.r, params[4]);
|
||||
SETINT(rp->custom->description->border.t, params[5]);
|
||||
SETINT(rp->custom->description->border.b, params[6]);
|
||||
SETINT(rp->custom->description->image.border.l, params[3]);
|
||||
SETINT(rp->custom->description->image.border.r, params[4]);
|
||||
SETINT(rp->custom->description->image.border.t, params[5]);
|
||||
SETINT(rp->custom->description->image.border.b, params[6]);
|
||||
|
||||
break;
|
||||
case EDJE_STATE_PARAM_FILL_SMOOTH:
|
||||
if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
|
||||
CHKPARAM(3);
|
||||
|
||||
SETINT(rp->custom->description->fill.smooth, params[3]);
|
||||
SETINT(rp->custom->description->image.fill.smooth, params[3]);
|
||||
|
||||
break;
|
||||
case EDJE_STATE_PARAM_FILL_POS:
|
||||
if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
|
||||
CHKPARAM(6);
|
||||
|
||||
SETFLOAT_T(rp->custom->description->fill.pos_rel_x, params[3]);
|
||||
SETFLOAT_T(rp->custom->description->fill.pos_rel_y, params[4]);
|
||||
SETINT(rp->custom->description->fill.pos_abs_x, params[5]);
|
||||
SETINT(rp->custom->description->fill.pos_abs_y, params[6]);
|
||||
SETFLOAT_T(rp->custom->description->image.fill.pos_rel_x, params[3]);
|
||||
SETFLOAT_T(rp->custom->description->image.fill.pos_rel_y, params[4]);
|
||||
SETINT(rp->custom->description->image.fill.pos_abs_x, params[5]);
|
||||
SETINT(rp->custom->description->image.fill.pos_abs_y, params[6]);
|
||||
|
||||
break;
|
||||
case EDJE_STATE_PARAM_FILL_SIZE:
|
||||
if ( (rp->part->type != EDJE_PART_TYPE_IMAGE) ) return 0;
|
||||
CHKPARAM(6);
|
||||
|
||||
SETFLOAT_T(rp->custom->description->fill.rel_x, params[3]);
|
||||
SETFLOAT_T(rp->custom->description->fill.rel_y, params[4]);
|
||||
SETINT(rp->custom->description->fill.abs_x, params[5]);
|
||||
SETINT(rp->custom->description->fill.abs_y, params[6]);
|
||||
SETFLOAT_T(rp->custom->description->image.fill.rel_x, params[3]);
|
||||
SETFLOAT_T(rp->custom->description->image.fill.rel_y, params[4]);
|
||||
SETINT(rp->custom->description->image.fill.abs_x, params[5]);
|
||||
SETINT(rp->custom->description->image.fill.abs_y, params[6]);
|
||||
|
||||
break;
|
||||
case EDJE_STATE_PARAM_TEXT:
|
||||
|
|
|
@ -232,6 +232,7 @@ typedef struct _Edje_Part Edje_Part;
|
|||
typedef struct _Edje_Part_Image_Id Edje_Part_Image_Id;
|
||||
typedef struct _Edje_Part_Description Edje_Part_Description;
|
||||
typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common;
|
||||
typedef struct _Edje_Part_Description_Spec_Image Edje_Part_Description_Spec_Image;
|
||||
typedef struct _Edje_Patterns Edje_Patterns;
|
||||
|
||||
typedef struct _Old_Edje_File Old_Edje_File;
|
||||
|
@ -675,16 +676,12 @@ struct _Edje_Part_Description_Common
|
|||
unsigned char visible; /* is it shown */
|
||||
};
|
||||
|
||||
struct _Edje_Part_Description
|
||||
struct _Edje_Part_Description_Spec_Image
|
||||
{
|
||||
Edje_Part_Description_Common common;
|
||||
|
||||
struct {
|
||||
Eina_List *tween_list; /* list of Edje_Part_Image_Id */
|
||||
int id; /* the image id to use */
|
||||
int scale_hint; /* evas scale hint */
|
||||
Eina_Bool set; /* if image condition it's content */
|
||||
} image;
|
||||
Eina_List *tween_list; /* list of Edje_Part_Image_Id */
|
||||
int id; /* the image id to use */
|
||||
int scale_hint; /* evas scale hint */
|
||||
Eina_Bool set; /* if image condition it's content */
|
||||
|
||||
struct {
|
||||
int l, r, t, b; /* border scaling on image fill */
|
||||
|
@ -706,6 +703,12 @@ struct _Edje_Part_Description
|
|||
char smooth; /* fill with smooth scaling or not */
|
||||
unsigned char type; /* fill coordinate from container (SCALE) or from source image (TILE) */
|
||||
} fill;
|
||||
};
|
||||
|
||||
struct _Edje_Part_Description
|
||||
{
|
||||
Edje_Part_Description_Common common;
|
||||
Edje_Part_Description_Spec_Image image;
|
||||
|
||||
char *color_class; /* how to modify the color */
|
||||
|
||||
|
|
Loading…
Reference in New Issue