static void st_collections_group_parts_part_description_align(void);
static void st_collections_group_parts_part_description_fixed(void);
static void st_collections_group_parts_part_description_min(void);
+static void st_collections_group_parts_part_description_minmul(void);
static void st_collections_group_parts_part_description_max(void);
static void st_collections_group_parts_part_description_step(void);
static void st_collections_group_parts_part_description_aspect(void);
{"collections.group.parts.part.description.align", st_collections_group_parts_part_description_align},
{"collections.group.parts.part.description.fixed", st_collections_group_parts_part_description_fixed},
{"collections.group.parts.part.description.min", st_collections_group_parts_part_description_min},
+ {"collections.group.parts.part.description.minmul", st_collections_group_parts_part_description_minmul},
{"collections.group.parts.part.description.max", st_collections_group_parts_part_description_max},
{"collections.group.parts.part.description.step", st_collections_group_parts_part_description_step},
{"collections.group.parts.part.description.aspect", st_collections_group_parts_part_description_aspect},
ed->map.persp_on = 0;
ed->persp.zplane = 0;
ed->persp.focal = 1000;
+ ed->minmul.have = 1;
+ ed->minmul.w = FROM_INT(1);
+ ed->minmul.h = FROM_INT(1);
}
/**
/**
@page edcref
@property
+ minmul
+ @parameters
+ [width multipler] [height multiplier]
+ @effect
+ A multiplier FORCIBLY applied to whatever minimum size is only during
+ minimum size calculation.
+ @endproperty
+*/
+static void
+st_collections_group_parts_part_description_minmul(void)
+{
+ check_arg_count(2);
+
+ current_desc->minmul.w = FROM_DOUBLE(parse_float_range(0, 0, 999999));
+ current_desc->minmul.h = FROM_DOUBLE(parse_float_range(1, 0, 999999));
+}
+
+/**
+ @page edcref
+ @property
max
@parameters
[width] [height]
ep->description_pos = npos;
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
ep->invalidate = 1;
#endif
_edje_external_recalc_apply(ed, ep, NULL, chosen_desc);
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
ep->invalidate = 1;
#endif
ed->text_part_change = 0;
#endif
if (!ed->calc_only)
- evas_object_smart_callback_call(ed->obj, "recalc", NULL);
+ {
+ if (ed->recalc_call)
+ evas_object_smart_callback_call(ed->obj, "recalc", NULL);
+ }
else
evas_object_smart_need_recalculate_set(ed->obj, need_calc);
+ ed->recalc_call = 0;
}
void
ep->drag->tmp.x = 0;
ep->drag->need_reset = 0;
ed->dirty = 1;
+ ed->recalc_call = 1;
}
if (ep->drag->y != y || ep->drag->tmp.y)
ep->drag->tmp.y = 0;
ep->drag->need_reset = 0;
ed->dirty = 1;
+ ed->recalc_call = 1;
}
#ifdef EDJE_CALC_CACHE
if (ep->swallow_params.min.w > desc->min.w)
*minw = ep->swallow_params.min.w;
+ if (ep->edje->calc_only)
+ {
+ if (desc->minmul.have)
+ {
+ FLOAT_T mmw = desc->minmul.w;
+ if (mmw != FROM_INT(1)) *minw = TO_INT(SCALE(mmw, *minw));
+ }
+ }
+
/* XXX TODO: remove need of EDJE_INF_MAX_W, see edje_util.c */
if ((ep->swallow_params.max.w <= 0) ||
(ep->swallow_params.max.w == EDJE_INF_MAX_W))
*maxw = ep->swallow_params.max.w;
}
}
+ if ((ep->edje->calc_only) && (desc->minmul.have) &&
+ (desc->minmul.w != FROM_INT(1))) *maxw = *minw;
if (*maxw >= 0)
{
if (*maxw < *minw) *maxw = *minw;
if (ep->swallow_params.min.h > desc->min.h)
*minh = ep->swallow_params.min.h;
+ if (ep->edje->calc_only)
+ {
+ if (desc->minmul.have)
+ {
+ FLOAT_T mmh = desc->minmul.h;
+ if (mmh != FROM_INT(1)) *minh = TO_INT(SCALE(mmh, *minh));
+ }
+ }
+
+
/* XXX TODO: remove need of EDJE_INF_MAX_H, see edje_util.c */
if ((ep->swallow_params.max.h <= 0) ||
(ep->swallow_params.max.h == EDJE_INF_MAX_H))
if (ep->swallow_params.max.h < *maxh)
*maxh = ep->swallow_params.max.h;
}
- }
+ }
+ if ((ep->edje->calc_only) && (desc->minmul.have) &&
+ (desc->minmul.h != FROM_INT(1))) *maxh = *minh;
if (*maxh >= 0)
{
if (*maxh < *minh) *maxh = *minh;
sc = ed->scale;
if (sc == ZERO) sc = _edje_scale;
_edje_part_recalc_single_min_max(sc, ep, desc, &minw, &minh, &maxw, &maxh);
-
+
/* relative coords of top left & bottom right */
_edje_part_recalc_single_rel(ed, ep, desc, rel1_to_x, rel1_to_y, rel2_to_x, rel2_to_y, params);
Edje_Real_Part *pp;
int part_id = -1;
- if (pos >= 0.5)
+ if (pos >= FROM_DOUBLE(0.5))
part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id;
else
part_id = chosen_desc->proxy.id;
Edje_Real_Part *pp;
int part_id = -1;
- if (pos >= 0.5)
+ if (pos >= FROM_DOUBLE(0.5))
part_id = ((Edje_Part_Description_Proxy*) ep->param2->description)->proxy.id;
else
part_id = ((Edje_Part_Description_Proxy*) chosen_desc)->proxy.id;
((ep->part->type == EDJE_PART_TYPE_TEXT || ep->part->type == EDJE_PART_TYPE_TEXTBLOCK) && ed->text_part_change))
#endif
{
- _edje_part_recalc_single(ed, ep, ep->param2->description, chosen_desc, center[1], light[1], persp[1],
- ep->param2->rel1_to_x, ep->param2->rel1_to_y, ep->param2->rel2_to_x, ep->param2->rel2_to_y,
+ _edje_part_recalc_single(ed, ep, ep->param2->description,
+ chosen_desc,
+ center[1], light[1], persp[1],
+ ep->param2->rel1_to_x,
+ ep->param2->rel1_to_y,
+ ep->param2->rel2_to_x,
+ ep->param2->rel2_to_y,
confine_to,
p2, pos);
#ifdef EDJE_CALC_CACHE
p3->req.y = INTP(p1->req.y, p2->req.y, pos);
p3->req.w = INTP(p1->req.w, p2->req.w, pos);
p3->req.h = INTP(p1->req.h, p2->req.h, pos);
-
+
if (ep->part->dragable.x)
{
p3->req_drag.x = INTP(p1->req_drag.x, p2->req_drag.x, pos);
_edje_emit(ed, buf, events->part->name);
}
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
rp->drag->val.y = dy;
if (!ignored)
_edje_emit(ed, "drag", rp->part->name);
+ ed->recalc_call = 1;
ed->dirty = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
if (rp->drag->down.count == 0)
{
rp->drag->need_reset = 1;
+ ed->recalc_call = 1;
ed->dirty = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
rp->drag->tmp.x = ev->cur.canvas.x - rp->drag->down.x;
if (rp->part->dragable.y)
rp->drag->tmp.y = ev->cur.canvas.y - rp->drag->down.y;
+ ed->recalc_call = 1;
ed->dirty = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
rp->drag->val.y = dy;
if (!ignored)
_edje_emit(ed, "drag", rp->part->name);
+ ed->recalc_call = 1;
ed->dirty = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.y", align.y, EDJE_T_FLOAT); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", fixed.w, EET_T_UCHAR); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", fixed.h, EET_T_UCHAR); \
+ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.have", minmul.have, EET_T_UCHAR); \
+ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.w", minmul.w, EDJE_T_FLOAT); \
+ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "minmul.h", minmul.h, EDJE_T_FLOAT); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.w", min.w, EET_T_INT); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "min.h", min.h, EET_T_INT); \
EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "max.w", max.w, EET_T_INT); \
if (h < 0.0) h = 0.0;
ed->collection->prop.min.w = w;
ed->collection->prop.min.h = h;
+ ed->recalc_call = 1;
ed->dirty = 1;
#ifdef EDJE_CALC_CACHE
ed->all_part_change = 1;
if (h < 0.0) h = 0.0;
ed->collection->prop.max.w = w;
ed->collection->prop.max.h = h;
+ ed->recalc_call = 1;
ed->dirty = 1;
#ifdef EDJE_CALC_CACHE
ed->all_part_change = 1;
}
rp->swallow_params.min.w = 0;
- rp->swallow_params.min.w = 0;
+ rp->swallow_params.min.h = 0;
rp->swallow_params.max.w = -1;
rp->swallow_params.max.h = -1;
_edje_dragable_pos_set(ed, rp, rp->drag->val.x, rp->drag->val.y);
}
}
+ ed->recalc_call = 1;
ed->dirty = 1;
#ifdef EDJE_CALC_CACHE
ed->all_part_change = 1;
unsigned char w, h; /* width or height is fixed in side (cannot expand with Edje object size) */
} fixed;
+ struct { // only during recalc
+ unsigned char have;
+ FLOAT_T w, h;
+ } minmul;
+
Edje_Size min, max;
Edje_Position step; /* size stepping by n pixels, 0 = none */
Edje_Aspect_Prefer aspect;
unsigned int all_part_change : 1;
#endif
unsigned int have_mapped_part : 1;
+ unsigned int recalc_call : 1;
};
struct _Edje_Calc_Params
if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
return EINA_FALSE;
rp->drag->size.x = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0));
+ rp->edje->recalc_call = 1;
rp->edje->dirty = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
if (param->type != EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
return EINA_FALSE;
rp->drag->size.y = FROM_DOUBLE(CLAMP(param->d, 0.0, 1.0));
+ rp->edje->recalc_call = 1;
rp->edje->dirty = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
ed = eina_list_data_get(members);
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
ed->all_part_change = 1;
#endif
ed = eina_list_data_get(members);
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
ed->all_part_change = 1;
#endif
cc->b3 = b3;
cc->a3 = a3;
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
ed->all_part_change = 1;
#endif
cc->a3 = a3;
ed->color_classes = eina_list_append(ed->color_classes, cc);
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
ed->all_part_change = 1;
#endif
}
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
ed->all_part_change = 1;
#endif
ed = eina_list_data_get(members);
ed->dirty = 1;
+ ed->recalc_call = 1;
_edje_textblock_style_all_update(ed);
#ifdef EDJE_CALC_CACHE
ed->text_part_change = 1;
/* Update edje */
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
ed->text_part_change = 1;
#endif
/* Add to edje's text class list */
ed->text_classes = eina_list_append(ed->text_classes, tc);
ed->dirty = 1;
+ ed->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
ed->text_part_change = 1;
#endif
else
if (text) rp->text.text = eina_stringshare_add(text);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
}
}
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
if (rp->part->entry_mode <= EDJE_ENTRY_EDIT_MODE_NONE) return;
_edje_entry_text_markup_insert(rp, text);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)) return;
_edje_object_part_text_raw_append(obj, rp, part, text);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
ed = _edje_fetch(parent);
ed->dirty = 1;
+ ed->recalc_call = 1; // ZZZ: ???
_edje_recalc(ed);
}
rp->swallow_params.max.w = 0;
rp->swallow_params.max.h = 0;
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
rp->drag->size.x = FROM_DOUBLE(dw);
rp->drag->size.y = FROM_DOUBLE(dh);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
Edje_Real_Part *rp = data;
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
(child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
(child, EVAS_CALLBACK_DEL, _edje_box_child_del_cb, rp);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
Edje_Real_Part *rp = data;
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
(child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
(child, EVAS_CALLBACK_DEL, _edje_table_child_del_cb, rp);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
#ifdef EDJE_CALC_CACHE
rp->invalidate = 1;
#endif
if (!ed) continue;
ed->persp = NULL;
ed->dirty = 1;
+ ed->recalc_call = 1;
_edje_recalc_do(ed);
}
free(ps);
if (!ed->persp)
{
ed->dirty = 1;
+ ed->recalc_call = 1;
_edje_recalc_do(ed);
}
}
if (!ed->persp)
{
ed->dirty = 1;
+ ed->recalc_call = 1;
_edje_recalc_do(ed);
}
}
if (!ed->persp)
{
ed->dirty = 1;
+ ed->recalc_call = 1;
_edje_recalc_do(ed);
}
}
ed->persp = ps;
if (ps) ps->users = eina_list_append(ps->users, obj);
ed->dirty = 1;
+ ed->recalc_call = 1;
_edje_recalc_do(ed);
}
rp = data;
_edje_real_part_swallow_hints_update(rp);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
_edje_recalc(rp->edje);
return;
}
if (hints_update)
_edje_real_part_swallow_hints_update(rp);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
_edje_recalc(rp->edje);
return;
}
evas_object_precise_is_inside_set(obj_swallow, 1);
rp->edje->dirty = 1;
+ rp->edje->recalc_call = 1;
_edje_recalc(rp->edje);
}