efl: Use Eina.Size2D for size hint combined min

For this patch I decided to add a pseudo legacy wrapper as the function
is called in a very large number of places. Fixing all those calls to
use the size2d form is a lot of work and a greater risk of b0rking
something.
This commit is contained in:
Jean-Philippe Andre 2017-09-18 16:22:01 +09:00
parent 7d2b4b6916
commit a72f3ec64e
43 changed files with 158 additions and 146 deletions

View File

@ -182,13 +182,10 @@ _custom_layout_update(Eo *pack, const void *data EINA_UNUSED)
EINA_ITERATOR_FOREACH(it, sobj)
{
Eina_Rect r;
int mw, mh;
efl_gfx_size_hint_combined_min_get(sobj, &mw, &mh);
r.x = (rp.w / count) * i;
r.y = (rp.h / count) * i;
r.w = mw;
r.h = mh;
r.size = efl_gfx_size_hint_combined_min_get(sobj);
efl_gfx_geometry_set(sobj, r);
i++;
}

View File

@ -151,9 +151,9 @@ _custom_layout_update(Eo *pack, void *_pd EINA_UNUSED)
{
Eina_Rect m;
efl_gfx_size_hint_combined_min_get(item, &m.w, &m.h);
m.x = g.x + c * g.w / cols + (cs * g.w / cols - m.w) / 2;
m.y = g.y + r * g.h / rows + (rs * g.h / rows - m.h) / 2;
m.size = efl_gfx_size_hint_combined_min_get(item);
efl_gfx_geometry_set(item, m);
gmw = MAX(gmw, m.w);

View File

@ -52,13 +52,12 @@ _bt2_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_
static void
_size_update(void *data, const Efl_Event *ev)
{
int wc, hc;
Eina_Size2D sz, max, min;
Eina_Size2D sz, max, min, cmin;
char buf[2048];
Eo *dia = ev->object;
Eo *lbl = data;
efl_gfx_size_hint_combined_min_get(dia, &wc, &hc);
cmin = efl_gfx_size_hint_combined_min_get(dia);
min = efl_gfx_size_hint_min_get(dia);
max = efl_gfx_size_hint_max_get(dia);
sz = efl_gfx_size_get(dia);
@ -66,7 +65,7 @@ _size_update(void *data, const Efl_Event *ev)
sprintf(buf, "This is a dialog with min/max size<br>"
"Min size: %dx%d (requested) %dx%d (effective)<br>"
"Max size: %dx%d<br>"
"Current size: %dx%d", min.w, min.h, wc, hc, max.w, max.h, sz.w, sz.h);
"Current size: %dx%d", min.w, min.h, cmin.w, cmin.h, max.w, max.h, sz.w, sz.h);
//efl_text_set(lbl, buf);
elm_object_text_set(lbl, buf);
}

View File

@ -112,15 +112,16 @@ static void
_print_rect_stats(Evas_Object *rect)
{
Evas_Coord w, h, l, r, t, b;
Eina_Size2D cmin;
double x, y;
evas_object_size_hint_align_get(rect, &x, &y);
printf("\talign hints: h(%f), v(%f)\n",
x, y);
efl_gfx_size_hint_combined_min_get(rect, &w, &h);
cmin = efl_gfx_size_hint_combined_min_get(rect);
printf("\tmin. size hints: h(%d), v(%d)\n",
w, h);
cmin.w, cmin.h);
evas_object_size_hint_max_get(rect, &w, &h);
printf("\tmax. size hints: h(%d), v(%d)\n",

View File

@ -11,6 +11,7 @@
#include "Ecore_Evas.h"
#include "ecore_evas_private.h"
#include "Evas_Internal.h"
static const char ASSOCIATE_KEY[] = "__Ecore_Evas_Associate";
@ -132,7 +133,7 @@ _ecore_evas_object_callback_changed_size_hints(void *data, Evas *e EINA_UNUSED,
Ecore_Evas *ee = data;
Evas_Coord w, h;
efl_gfx_size_hint_combined_min_get(obj, &w, &h);
evas_object_size_hint_combined_min_get(obj, &w, &h);
ecore_evas_size_min_set(ee, w, h);
evas_object_size_hint_max_get(obj, &w, &h);

View File

@ -212,7 +212,7 @@ _edje_box_recalc_apply(Edje *ed EINA_UNUSED, Edje_Real_Part *ep, Edje_Calc_Param
evas_object_smart_calculate(ep->object);
}
#if 0 /* Why the hell do we affect part size after resize ??? */
efl_gfx_size_hint_combined_min_get(ep->object, &min_w, &min_h);
evas_object_size_hint_combined_min_get(ep->object, &min_w, &min_h);
if (chosen_desc->box.min.h && (p3->w < min_w))
p3->w = min_w;
if (chosen_desc->box.min.v && (p3->h < min_h))

View File

@ -1424,7 +1424,7 @@ _edje_lua_object_get_size_hint_min(lua_State *L)
{
Edje_Lua_Evas_Object *obj = _edje_lua_checkudata(L, 1, &mObject);
int w, h;
efl_gfx_size_hint_combined_min_get(obj->eo, &w, &h);
evas_object_size_hint_combined_min_get(obj->eo, &w, &h);
lua_createtable(L, 2, 0);
lua_pushnumber(L, w);
lua_rawseti(L, -2, 1);

View File

@ -5507,7 +5507,7 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp)
Evas_Coord w1 = 0, h1 = 0, w2 = 0, h2 = 0, aw = 0, ah = 0;
Evas_Aspect_Control am = EVAS_ASPECT_CONTROL_NONE;
efl_gfx_size_hint_combined_min_get(rp->typedata.swallow->swallowed_object, &w1, &h1);
evas_object_size_hint_combined_min_get(rp->typedata.swallow->swallowed_object, &w1, &h1);
evas_object_size_hint_max_get(rp->typedata.swallow->swallowed_object, &w2, &h2);
evas_object_size_hint_aspect_get(rp->typedata.swallow->swallowed_object, &am, &aw, &ah);
rp->typedata.swallow->swallow_params.min.w = w1;

View File

@ -148,8 +148,7 @@ interface Efl.Gfx.Size.Hint
]]
get {}
values {
w: int; [[Integer to use as the minimum width hint.]]
h: int; [[Integer to use as the minimum height hint.]]
sz: Eina.Size2D; [[Minimum size (hint) in pixels.]]
}
}
@property hint_margin {

View File

@ -112,7 +112,7 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Box_Data *sd)
if (sd->delete_me)
return;
efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh);

View File

@ -12,9 +12,8 @@ struct _Item_Calc
Evas_Object *obj;
double weight[2];
double align[2];
Eina_Size2D max;
Eina_Size2D max, want;
int pad[4];
int want[2];
Efl_Gfx_Size_Hint_Aspect aspect_type;
int aspect[2];
int id;
@ -79,7 +78,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
efl_gfx_size_hint_align_get(o, &item->align[0], &item->align[1]);
efl_gfx_size_hint_margin_get(o, &item->pad[0], &item->pad[1], &item->pad[2], &item->pad[3]);
item->max = efl_gfx_size_hint_max_get(o);
efl_gfx_size_hint_combined_min_get(o, &item->want[0], &item->want[1]);
item->want = efl_gfx_size_hint_combined_min_get(o);
efl_gfx_size_hint_aspect_get(o, &item->aspect_type, &item->aspect[0], &item->aspect[1]);
if (item->aspect[0] <= 0 || item->aspect[1] <= 0)
@ -94,11 +93,11 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
{
double w, h;
w = item->want[0];
w = item->want.w;
h = w * item->aspect[1] / item->aspect[0];
if (h < item->want[1])
if (h < item->want.h)
{
h = item->want[1];
h = item->want.h;
w = h * item->aspect[0] / item->aspect[1];
}
@ -124,8 +123,8 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
h = item->max.h > 0 ? MIN(h1, item->max.h) : h1;
}
}
item->want[0] = w;
item->want[1] = h;
item->want.w = w;
item->want.h = h;
}
if (item->weight[0] < 0) item->weight[0] = 0;
@ -136,30 +135,30 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
if (item->align[0] > 1) item->align[0] = 1;
if (item->align[1] > 1) item->align[1] = 1;
if (item->want[0] < 0) item->want[0] = 0;
if (item->want[1] < 0) item->want[1] = 0;
if (item->want.w < 0) item->want.w = 0;
if (item->want.h < 0) item->want.h = 0;
if (item->max.w < 0) item->max.w = INT_MAX;
if (item->max.h < 0) item->max.h = INT_MAX;
if (item->max.w < item->want[0]) item->max.w = item->want[0];
if (item->max.h < item->want[1]) item->max.h = item->want[1];
if (item->max.w < item->want.w) item->max.w = item->want.w;
if (item->max.h < item->want.h) item->max.h = item->want.h;
item->want[0] += item->pad[0] + item->pad[1];
item->want[1] += item->pad[2] + item->pad[3];
item->want.w += item->pad[0] + item->pad[1];
item->want.h += item->pad[2] + item->pad[3];
weight[0] += item->weight[0];
weight[1] += item->weight[1];
if (horiz)
{
wantw += item->want[0];
if (item->want[1] > wanth)
wanth = item->want[1];
wantw += item->want.w;
if (item->want.h > wanth)
wanth = item->want.h;
}
else
{
wanth += item->want[1];
if (item->want[0] > wantw)
wantw = item->want[0];
wanth += item->want.h;
if (item->want.w > wantw)
wantw = item->want.w;
}
item->id = id++;
@ -234,7 +233,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
{
cx = boxx + cur_pos;
cy = boxy;
cw = item->want[0] + rounding + (zeroweight ? 1.0 : item->weight[0]) * extra / weight[0];
cw = item->want.w + rounding + (zeroweight ? 1.0 : item->weight[0]) * extra / weight[0];
ch = boxh;
cur_pos += cw + pad;
}
@ -243,7 +242,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
cx = boxx;
cy = boxy + cur_pos;
cw = boxw;
ch = item->want[1] + rounding + (zeroweight ? 1.0 : item->weight[1]) * extra / weight[1];
ch = item->want.h + rounding + (zeroweight ? 1.0 : item->weight[1]) * extra / weight[1];
cur_pos += ch + pad;
}
@ -251,10 +250,10 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
{
if (horiz)
{
w = item->want[0];
h = item->want[1];
w = item->want.w;
h = item->want.h;
if (weight[0] > 0)
w = item->want[0] + extra * item->weight[0] / weight[0];
w = item->want.w + extra * item->weight[0] / weight[0];
h = w * item->aspect[1] / item->aspect[0];
if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH ||
@ -269,10 +268,10 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
}
else
{
w = item->want[0];
h = item->want[1];
w = item->want.w;
h = item->want.h;
if (weight[1] > 0)
h = item->want[1] + extra * item->weight[1] / weight[1];
h = item->want.h + extra * item->weight[1] / weight[1];
w = h * item->aspect[0] / item->aspect[1];
if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH ||
@ -310,12 +309,12 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
}
else if (item->max.w != INT_MAX)
{
w = MIN(w, MAX(item->want[0], item->max.w));
w = MIN(w, MAX(item->want.w, item->max.w));
h = w * item->aspect[1] / item->aspect[0];
}
else
{
h = MIN(h, MAX(item->want[1], item->max.h));
h = MIN(h, MAX(item->want.h, item->max.h));
w = h * item->aspect[0] / item->aspect[1];
}
w = w - item->pad[0] - item->pad[1];
@ -336,7 +335,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
// horizontally
if (item->max.w < INT_MAX)
{
w = MIN(MAX(item->want[0] - item->pad[0] - item->pad[1], item->max.w), cw);
w = MIN(MAX(item->want.w - item->pad[0] - item->pad[1], item->max.w), cw);
if (item->align[0] < 0)
{
// bad case: fill+max are not good together
@ -356,14 +355,14 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
if (horiz && item->weight[0] > 0)
w = cw - item->pad[0] - item->pad[1];
else
w = item->want[0] - item->pad[0] - item->pad[1];
w = item->want.w - item->pad[0] - item->pad[1];
x = cx + ((cw - w) * item->align[0]) + item->pad[0];
}
// vertically
if (item->max.h < INT_MAX)
{
h = MIN(MAX(item->want[1] - item->pad[2] - item->pad[3], item->max.h), ch);
h = MIN(MAX(item->want.h - item->pad[2] - item->pad[3], item->max.h), ch);
if (item->align[1] < 0)
{
// bad case: fill+max are not good together
@ -383,7 +382,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
if (!horiz && item->weight[1] > 0)
h = ch - item->pad[2] - item->pad[3];
else
h = item->want[1] - item->pad[2] - item->pad[3];
h = item->want.h - item->pad[2] - item->pad[3];
y = cy + ((ch - h) * item->align[1]) + item->pad[2];
}
}

View File

@ -9,7 +9,7 @@ _efl_ui_box_stack_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED)
{
Evas_Object_Box_Option *opt;
Evas_Object_Box_Data *bd;
Eina_Size2D min = { 0, 0 };
Eina_Size2D min = { 0, 0 }, cmin;
Eina_List *l;
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(obj, EFL_UI_BOX_CLASS));
@ -24,11 +24,10 @@ _efl_ui_box_stack_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED)
EINA_LIST_FOREACH(bd->children, l, opt)
{
Evas_Object *child = opt->obj;
int mw = 0, mh = 0;
efl_gfx_size_hint_combined_min_get(child, &mw, &mh);
if (mw > min.w) min.w = mw;
if (mh > min.h) min.h = mh;
cmin = efl_gfx_size_hint_combined_min_get(child);
if (cmin.w > min.w) min.w = cmin.w;
if (cmin.h > min.h) min.h = cmin.h;
}
efl_gfx_size_hint_restricted_min_set(obj, min);
}

View File

@ -73,9 +73,9 @@ _sizing_eval(Evas_Object *obj)
EFL_UI_FLIP_DATA_GET(obj, sd);
if (sd->front.content)
efl_gfx_size_hint_combined_min_get(sd->front.content, &minw, &minh);
evas_object_size_hint_combined_min_get(sd->front.content, &minw, &minh);
if (sd->back.content)
efl_gfx_size_hint_combined_min_get(sd->back.content, &minw2, &minh2);
evas_object_size_hint_combined_min_get(sd->back.content, &minw2, &minh2);
if (sd->front.content)
evas_object_size_hint_max_get(sd->front.content, &maxw, &maxh);
if (sd->back.content)

View File

@ -138,7 +138,7 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh);

View File

@ -767,7 +767,7 @@ _efl_ui_image_sizing_eval(Evas_Object *obj)
efl_gfx_view_size_get(obj, &w, &h);
sd->scale = ts;
efl_gfx_size_hint_combined_min_get(obj, &minw, &minh);
evas_object_size_hint_combined_min_get(obj, &minw, &minh);
if (sd->no_scale)
{
@ -1171,7 +1171,10 @@ _efl_ui_image_efl_canvas_layout_group_group_size_min_get(Eo *obj EINA_UNUSED, Ef
if (sd->edje)
edje_object_size_min_get(sd->img, w, h);
else
efl_gfx_size_hint_combined_min_get(sd->img, w, h);
{
if (w) *w = 0;
if (h) *h = 0;
}
}
EOLIAN static void
@ -1180,7 +1183,10 @@ _efl_ui_image_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_UNUSED, Ef
if (sd->edje)
edje_object_size_max_get(sd->img, w, h);
else
evas_object_size_hint_max_get(sd->img, w, h);
{
if (w) *w = 0;
if (h) *h = 0;
}
}
EOLIAN static void
@ -1196,7 +1202,7 @@ _efl_ui_image_efl_canvas_layout_calc_calc_size_min(Eo *obj EINA_UNUSED, Efl_Ui_I
if (sd->edje)
edje_object_size_min_calc(sd->img, w, h);
else
efl_gfx_size_hint_combined_min_get(sd->img, w, h);
evas_object_size_hint_combined_min_get(sd->img, w, h);
}
EOLIAN static void

View File

@ -1558,7 +1558,10 @@ _efl_ui_image_zoomable_efl_canvas_layout_group_group_size_min_get(Eo *obj EINA_U
if (sd->edje)
edje_object_size_min_get(sd->edje, w, h);
else
efl_gfx_size_hint_combined_min_get(sd->img, w, h);
{
if (w) *w = 0;
if (h) *h = 0;
}
}
EOLIAN static void
@ -1567,7 +1570,10 @@ _efl_ui_image_zoomable_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_U
if (sd->edje)
edje_object_size_max_get(sd->edje, w, h);
else
evas_object_size_hint_max_get(sd->img, w, h);
{
if (w) *w = 0;
if (h) *h = 0;
}
}
static Eina_Bool

View File

@ -193,7 +193,7 @@ _efl_ui_panes_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Panes_Data *sd)
if (first_content)
{
if (!sd->first_hint_min_allow)
efl_gfx_size_hint_combined_min_get(first_content, &sd->first_min.w, &sd->first_min.h);
sd->first_min = efl_gfx_size_hint_combined_min_get(first_content);
else
sd->first_min = efl_gfx_size_hint_min_get(first_content);
}
@ -201,7 +201,7 @@ _efl_ui_panes_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Panes_Data *sd)
if (second_content)
{
if (!sd->second_hint_min_allow)
efl_gfx_size_hint_combined_min_get(second_content, &sd->second_min.w, &sd->second_min.h);
sd->second_min = efl_gfx_size_hint_combined_min_get(second_content);
else
sd->second_min = efl_gfx_size_hint_min_get(second_content);
}

View File

@ -852,15 +852,14 @@ _elm_win_obj_intercept_layer_set(void *data, Evas_Object *obj EINA_UNUSED, int l
static void
_elm_win_size_hints_update(Efl_Ui_Win *win, Efl_Ui_Win_Data *sd)
{
Evas_Coord minw, minh;
Eina_Size2D max;
Eina_Size2D min, max;
efl_gfx_size_hint_combined_min_get(win, &minw, &minh);
min = efl_gfx_size_hint_combined_min_get(win);
max = efl_gfx_size_hint_max_get(win);
if (max.w < 1) max.w = -1;
if (max.h < 1) max.h = -1;
TRAP(sd, size_min_set, minw, minh);
TRAP(sd, size_min_set, min.w, min.h);
TRAP(sd, size_max_set, max.w, max.h);
}
@ -3453,7 +3452,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize)
Eina_Bool unresizable;
double wx, wy;
efl_gfx_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh);
evas_object_size_hint_combined_min_get(sd->legacy.edje, &minw, &minh);
if ((!minw) && (!minh)) return;
// If content has a weight, make resizable
@ -8065,7 +8064,7 @@ _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data *p, void *data)
ELM_WIN_DATA_GET(data, sd);
if (sd->main_menu && efl_gfx_visible_get(sd->main_menu))
efl_gfx_size_hint_combined_min_get(sd->main_menu, &menuw, NULL);
evas_object_size_hint_combined_min_get(sd->main_menu, &menuw, NULL);
EINA_LIST_FOREACH(p->children, l, opt)
{
@ -8074,7 +8073,7 @@ _window_layout_stack(Evas_Object *o, Evas_Object_Box_Data *p, void *data)
if (EINA_DBL_EQ(wx, 0.0)) weight_x = 0;
if (EINA_DBL_EQ(wy, 0.0)) weight_y = 0;
efl_gfx_size_hint_combined_min_get(child, &w, &h);
evas_object_size_hint_combined_min_get(child, &w, &h);
if (w > minw) minw = w;
if (h > minh) minh = h;
}

View File

@ -227,7 +227,7 @@ _base_geometry_calc(Evas_Object *obj,
if ((max_size.x > 0) && (base_size.x > max_size.x))
base_size.x = max_size.x;
//Limit to Min Size
efl_gfx_size_hint_combined_min_get(obj, &min_size.x, &min_size.y);
evas_object_size_hint_combined_min_get(obj, &min_size.x, &min_size.y);
if ((min_size.y > 0) && (base_size.y < min_size.y))
base_size.y = min_size.y;

View File

@ -253,7 +253,7 @@ _sizing_eval(void *data)
edje_object_message_signal_process(elm_layout_edje_get(sd->hover));
elm_box_recalculate(sd->bx);
efl_gfx_size_hint_combined_min_get(sd->bx, &box_w, &box_h);
evas_object_size_hint_combined_min_get(sd->bx, &box_w, &box_h);
max_size_str = elm_layout_data_get(sd->hover, "max_size");
if (max_size_str)

View File

@ -186,7 +186,7 @@ _shrink_mode_set(Evas_Object *obj,
if (shrink == EINA_TRUE)
{
Evas_Coord w = 0, w_tmp = 0;
Evas_Coord w = 0;
Evas_Coord box_inner_item_width_padding = 0;
elm_box_padding_get(sd->box, &box_inner_item_width_padding, NULL);
@ -204,8 +204,7 @@ _shrink_mode_set(Evas_Object *obj,
if (sd->label && sd->label_packed)
{
elm_box_pack_end(sd->box, sd->label);
efl_gfx_size_hint_combined_min_get(sd->label, &w_tmp, NULL);
w -= w_tmp;
w -= efl_gfx_size_hint_combined_min_get(sd->label).w;
w -= box_inner_item_width_padding;
}
@ -214,7 +213,7 @@ _shrink_mode_set(Evas_Object *obj,
EINA_LIST_FOREACH(sd->items, l, eo_item)
{
Evas_Coord item_w, w_label_count = 0, h = 0;
Evas_Coord w_label_count = 0, h = 0;
char *buf;
ELM_MULTIBUTTONENTRY_ITEM_DATA_GET(eo_item, item);
@ -222,9 +221,7 @@ _shrink_mode_set(Evas_Object *obj,
evas_object_show(VIEW(item));
item->visible = EINA_TRUE;
efl_gfx_size_hint_combined_min_get(VIEW(item), &item_w, NULL);
w -= item_w;
w -= efl_gfx_size_hint_combined_min_get(VIEW(item)).w;
w -= box_inner_item_width_padding;
count--;
@ -328,7 +325,7 @@ _view_update(Elm_Multibuttonentry_Data *sd)
// update label
if (sd->label)
efl_gfx_size_hint_combined_min_get(sd->label, &width, &height);
evas_object_size_hint_combined_min_get(sd->label, &width, &height);
if (sd->guide_text)
{
@ -829,7 +826,7 @@ _item_new(Elm_Multibuttonentry_Data *sd,
evas_object_show(VIEW(item));
evas_object_smart_calculate(VIEW(item));
efl_gfx_size_hint_combined_min_get(VIEW(item), &minw, &minh);
evas_object_size_hint_combined_min_get(VIEW(item), &minw, &minh);
evas_object_geometry_get(sd->box, NULL, NULL, &boxw, NULL);
if (sd->w_box && minw > boxw)
@ -1053,7 +1050,7 @@ _box_resize_cb(void *data,
elm_layout_sizing_eval(VIEW(it));
evas_object_smart_calculate(VIEW(it));
efl_gfx_size_hint_combined_min_get(VIEW(it), &mnw, &mnh);
evas_object_size_hint_combined_min_get(VIEW(it), &mnw, &mnh);
if (mnw > w - hpad)
{
@ -1328,14 +1325,14 @@ _box_min_size_calculate(Evas_Object *box,
Evas_Object_Box_Option *opt;
evas_object_geometry_get(box, NULL, NULL, &w, NULL);
efl_gfx_size_hint_combined_min_get(box, &minw, NULL);
evas_object_size_hint_combined_min_get(box, &minw, NULL);
if (!w) return EINA_FALSE;
line_num = 1;
EINA_LIST_FOREACH(priv->children, l, opt)
{
efl_gfx_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
evas_object_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
linew += mnw;
if (lineh < mnh) lineh = mnh;
@ -1374,7 +1371,7 @@ _box_layout_cb(Evas_Object *o,
evas_object_geometry_get(o, &x, &y, &w, &h);
efl_gfx_size_hint_combined_min_get(o, &minw, &minh);
evas_object_size_hint_combined_min_get(o, &minw, &minh);
evas_object_size_hint_align_get(o, &ax, &ay);
rtl = efl_ui_mirrored_get(data);
@ -1404,7 +1401,7 @@ _box_layout_cb(Evas_Object *o,
obj = opt->obj;
evas_object_size_hint_align_get(obj, &ax, &ay);
evas_object_size_hint_weight_get(obj, &wx, &wy);
efl_gfx_size_hint_combined_min_get(obj, &mnw, &mnh);
evas_object_size_hint_combined_min_get(obj, &mnw, &mnh);
fw = fh = EINA_FALSE;
if (EINA_DBL_EQ(ax, -1)) {fw = 1; ax = 0.5; }

View File

@ -457,14 +457,14 @@ _elm_popup_elm_layout_sizing_eval(Eo *obj, Elm_Popup_Data *sd)
EINA_LIST_FOREACH(sd->items, elist, it)
{
_item_sizing_eval(it);
efl_gfx_size_hint_combined_min_get(elm_layout_edje_get(VIEW(it)),
evas_object_size_hint_combined_min_get(elm_layout_edje_get(VIEW(it)),
NULL, &minh_box);
if (minh_box != -1) h_box += minh_box;
}
evas_object_size_hint_min_set(sd->spacer, 0, MIN(h_box, sd->max_sc_h));
evas_object_size_hint_max_set(sd->spacer, -1, sd->max_sc_h);
efl_gfx_size_hint_combined_min_get(sd->scr, &minw, &minh);
evas_object_size_hint_combined_min_get(sd->scr, &minw, &minh);
evas_object_size_hint_max_get(sd->scr, &minw, &minh);
}
else if (sd->scroll)

View File

@ -142,7 +142,7 @@ _sizing_eval(Evas_Object *obj)
if (sd->delete_me) return;
efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh);
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh);

View File

@ -1468,7 +1468,7 @@ _picker_sizing_eval(Evas_Object *obj)
ELM_COLORSELECTOR_DATA_GET(obj, sd);
efl_gfx_size_hint_combined_min_get(sd->picker, &minw, &minh);
evas_object_size_hint_combined_min_get(sd->picker, &minw, &minh);
evas_object_size_hint_min_set(obj, minw, minh);
}
@ -1523,7 +1523,7 @@ _on_resize(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
{
Evas_Coord w = 0, h = 0, minw = -1;
efl_gfx_size_hint_combined_min_get(obj, &minw, NULL);
evas_object_size_hint_combined_min_get(obj, &minw, NULL);
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
if ((w != sd->_w) && (w < minw))
elm_layout_sizing_eval(obj);

View File

@ -305,7 +305,7 @@ _resize_cb(void *data EINA_UNUSED,
if (sd->items)
{
Elm_Diskselector_Item_Data *it = sd->items->data;
efl_gfx_size_hint_combined_min_get(VIEW(it), &mw, &mh);
evas_object_size_hint_combined_min_get(VIEW(it), &mw, &mh);
}
if (sd->minh < mh) sd->minh = mh;
edje_object_size_min_restricted_calc

View File

@ -1042,7 +1042,7 @@ _deferred_recalc_job(void *data)
{
Evas_Coord ominw = -1;
efl_gfx_size_hint_combined_min_get(data, &ominw, NULL);
evas_object_size_hint_combined_min_get(data, &ominw, NULL);
minw = ominw;
}
@ -1148,7 +1148,7 @@ _elm_entry_elm_layout_sizing_eval(Eo *obj, Elm_Entry_Data *sd)
{
Evas_Coord ominw = -1;
efl_gfx_size_hint_combined_min_get(sd->entry_edje, &ominw, NULL);
evas_object_size_hint_combined_min_get(sd->entry_edje, &ominw, NULL);
minw = ominw;
}
sd->ent_mw = minw;
@ -1388,7 +1388,7 @@ _hoversel_position(Evas_Object *obj)
edje_object_part_text_cursor_geometry_get
(sd->entry_edje, "elm.text", &cx, &cy, &cw, &ch);
efl_gfx_size_hint_combined_min_get(sd->hoversel, &mw, &mh);
evas_object_size_hint_combined_min_get(sd->hoversel, &mw, &mh);
if (cx + mw > w)
cx = w - mw;
if (cy + mh > h)
@ -2132,7 +2132,7 @@ _entry_changed_handle(void *data,
/* Reset the size hints which are no more relevant. Keep the
* height, this is a hack, but doesn't really matter cause we'll
* re-eval in a moment. */
efl_gfx_size_hint_combined_min_get(data, NULL, &minh);
evas_object_size_hint_combined_min_get(data, NULL, &minh);
evas_object_size_hint_min_set(data, -1, minh);
elm_layout_sizing_eval(data);

View File

@ -87,7 +87,7 @@ _sizing_eval(Evas_Object *obj)
if (!wd) return;
if (!wd->content) return;
efl_gfx_size_hint_combined_min_get(wd->content, &minw, &minh);
evas_object_size_hint_combined_min_get(wd->content, &minw, &minh);
evas_object_size_hint_max_get(wd->content, &maxw, &maxh);
if (wd->maxmin)
{

View File

@ -88,7 +88,7 @@ _elm_flipselector_elm_layout_sizing_eval(Eo *obj, Elm_Flipselector_Data *sd)
edje_object_size_min_restricted_calc
(wd->resize_obj, &minw, &minh, minw, minh);
elm_coords_finger_size_adjust(1, &minw, 2, &minh);
efl_gfx_size_hint_combined_min_get(obj, &w, &h);
evas_object_size_hint_combined_min_get(obj, &w, &h);
if (sd->sentinel)
{

View File

@ -910,7 +910,7 @@ _elm_genlist_elm_layout_sizing_eval(Eo *obj, Elm_Genlist_Data *sd)
if (sd->on_sub_del) return;;
efl_gfx_size_hint_combined_min_get(obj, &minw, NULL);
evas_object_size_hint_combined_min_get(obj, &minw, NULL);
evas_object_size_hint_max_get(obj, &maxw, &maxh);
edje_object_size_min_calc(wd->resize_obj, &vmw, &vmh);

View File

@ -175,7 +175,7 @@ _elm_hover_smart_content_location_get(Elm_Hover_Data *sd,
Evas_Coord c_w = 0, c_h = 0, mid_w, mid_h;
int max;
efl_gfx_size_hint_combined_min_get(sd->smt_sub->obj, &c_w, &c_h);
evas_object_size_hint_combined_min_get(sd->smt_sub->obj, &c_w, &c_h);
mid_w = c_w / 2;
mid_h = c_h / 2;

View File

@ -671,7 +671,7 @@ _elm_list_elm_layout_sizing_eval(Eo *obj, Elm_List_Data *sd)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
efl_gfx_size_hint_combined_min_get(sd->box, &minw, &minh);
evas_object_size_hint_combined_min_get(sd->box, &minw, &minh);
evas_object_size_hint_max_get(sd->box, &maxw, &maxh);
evas_object_size_hint_weight_get(sd->box, &xw, &yw);
@ -828,13 +828,13 @@ _items_fix(Evas_Object *obj)
if (it->deleted) continue;
if (it->icon)
{
efl_gfx_size_hint_combined_min_get(it->icon, &mw, &mh);
evas_object_size_hint_combined_min_get(it->icon, &mw, &mh);
if (mw > minw[0]) minw[0] = mw;
if (mh > minh[0]) minh[0] = mh;
}
if (it->end)
{
efl_gfx_size_hint_combined_min_get(it->end, &mw, &mh);
evas_object_size_hint_combined_min_get(it->end, &mw, &mh);
if (mw > minw[1]) minw[1] = mw;
if (mh > minh[1]) minh[1] = mh;
}

View File

@ -1484,7 +1484,7 @@ _icon_dup(Evas_Object *icon,
evas_object_geometry_get(icon, NULL, NULL, &w, &h);
if (w <= 0 || h <= 0)
{
efl_gfx_size_hint_combined_min_get(icon, &w, &h);
evas_object_size_hint_combined_min_get(icon, &w, &h);
evas_object_size_hint_min_set(dupp, w, h);
}
else evas_object_resize(dupp, w, h);
@ -1535,7 +1535,7 @@ _overlay_default_show(Overlay_Default *ovl)
{
disp = ovl->content;
evas_object_geometry_get(disp, NULL, NULL, &w, &h);
if (w <= 0 || h <= 0) efl_gfx_size_hint_combined_min_get(disp, &w, &h);
if (w <= 0 || h <= 0) evas_object_size_hint_combined_min_get(disp, &w, &h);
ovl->w = w;
ovl->h = h;
}
@ -1544,7 +1544,7 @@ _overlay_default_show(Overlay_Default *ovl)
disp = ovl->clas_content;
evas_object_geometry_get(disp, NULL, NULL, &w, &h);
if (w <= 0 || h <= 0) efl_gfx_size_hint_combined_min_get(disp, &w, &h);
if (w <= 0 || h <= 0) evas_object_size_hint_combined_min_get(disp, &w, &h);
}
else
{

View File

@ -28,7 +28,7 @@ _sizing_eval(Evas_Object *obj)
ELM_MAPBUF_DATA_GET(obj, sd);
if (sd->content)
{
efl_gfx_size_hint_combined_min_get(sd->content, &minw, &minh);
evas_object_size_hint_combined_min_get(sd->content, &minw, &minh);
evas_object_size_hint_max_get(sd->content, &maxw, &maxh);
}
evas_object_size_hint_min_set(obj, minw, minh);

View File

@ -326,7 +326,7 @@ _elm_scroller_elm_layout_sizing_eval(Eo *obj, Elm_Scroller_Data *sd)
if (sd->content)
{
efl_gfx_size_hint_combined_min_get(sd->content, &minw, &minh);
evas_object_size_hint_combined_min_get(sd->content, &minw, &minh);
evas_object_size_hint_max_get(sd->content, &maxw, &maxh);
evas_object_size_hint_weight_get(sd->content, &xw, &yw);
}

View File

@ -52,7 +52,7 @@ _elm_segment_control_elm_layout_sizing_eval(Eo *obj, Elm_Segment_Control_Data *s
edje_object_size_min_restricted_calc
(wd->resize_obj, &minw, &minh, minw, minh);
efl_gfx_size_hint_combined_min_get(obj, &w, &h);
evas_object_size_hint_combined_min_get(obj, &w, &h);
if (w > minw) minw = w;
if (h > minh) minh = h;

View File

@ -138,7 +138,7 @@ _sizing_eval(Evas_Object *obj)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_combined_min_get(wd->resize_obj, &minw, &minh);
evas_object_size_hint_min_set(obj, minw, minh);
}

View File

@ -430,7 +430,7 @@ _resize_job(void *data)
sd->resize_job = NULL;
elm_interface_scrollable_content_viewport_geometry_get
(obj, NULL, NULL, &vw, &vh);
efl_gfx_size_hint_combined_min_get(sd->bx, &mw, &mh);
evas_object_size_hint_combined_min_get(sd->bx, &mw, &mh);
w = sd->minw_bx;
h = sd->minh_bx;
@ -1449,7 +1449,7 @@ _sizing_eval(Evas_Object *obj)
evas_object_resize(wd->resize_obj, w, h);
efl_gfx_size_hint_combined_min_get(sd->bx, &minw_bx, &minh_bx);
evas_object_size_hint_combined_min_get(sd->bx, &minw_bx, &minh_bx);
elm_interface_scrollable_content_viewport_geometry_get
(obj, NULL, NULL, &vw, &vh);

View File

@ -148,7 +148,7 @@ _smart_extents_non_homogeneous_calc(Evas_Object_Box_Data *priv, int w, int h, in
rrw = &oh, rrh = &ow;
evas_object_size_hint_padding_get(opt->obj, &pad_l, &pad_r, &pad_t, &pad_b);
efl_gfx_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
evas_object_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
mnw += pad_l + pad_r;
mnh += pad_t + pad_b;
if (*rminw < *rw) *rminw = *rw;
@ -254,7 +254,7 @@ _smart_extents_calculate(Evas_Object *box, Evas_Object_Box_Data *priv, int w, in
if (ay < 0) fh = 1;
evas_object_size_hint_padding_get(opt->obj, &pad_l, &pad_r, &pad_t, &pad_b);
efl_gfx_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
evas_object_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
mnw += pad_l + pad_r;
mnh += pad_t + pad_b;
if (minh < mnh) minh = mnh;
@ -375,7 +375,7 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal
_smart_extents_calculate(o, priv, w, h, expand, horizontal, homogeneous);
evas_object_geometry_get(o, &x, &y, &w, &h);
efl_gfx_size_hint_combined_min_get(o, &minw, &minh);
evas_object_size_hint_combined_min_get(o, &minw, &minh);
evas_object_box_align_get(o, &ax, &ay);
/* if object size is less than min, apply align to trigger viewporting */
if (w < minw)
@ -418,7 +418,7 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal
evas_object_size_hint_align_get(obj, &ax, &ay);
evas_object_size_hint_weight_get(obj, &wx, &wy);
evas_object_size_hint_padding_get(obj, &pad_l, &pad_r, &pad_t, &pad_b);
efl_gfx_size_hint_combined_min_get(obj, &mnw, &mnh);
evas_object_size_hint_combined_min_get(obj, &mnw, &mnh);
mnw += pad_l + pad_r;
mnh += pad_t + pad_b;
evas_object_size_hint_max_get(obj, &mxw, &mxh);

View File

@ -512,7 +512,7 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
evas_object_layer_set(tt->tooltip, ELM_OBJECT_LAYER_TOOLTIP);
}
TTDBG("*******RECALC\n");
efl_gfx_size_hint_combined_min_get(tt->content, &ominw, &ominh);
evas_object_size_hint_combined_min_get(tt->content, &ominw, &ominh);
edje_object_size_min_get(tt->tooltip, &eminw, &eminh);
if (eminw && (ominw < eminw)) ominw = eminw;

View File

@ -48,6 +48,15 @@ EAPI Eina_Bool efl_canvas_output_unlock(Efl_Canvas_Output *output);
EAPI void efl_input_pointer_finalize(Efl_Input_Pointer *obj);
static inline void
evas_object_size_hint_combined_min_get(const Eo *obj, int *w, int *h)
{
Eina_Size2D sz;
sz = efl_gfx_size_hint_combined_min_get(obj);
if (w) *w = sz.w;
if (h) *h = sz.h;
}
/* Internal EO APIs */
EOAPI void efl_canvas_object_legacy_ctor(Eo *obj);
EOAPI void efl_canvas_object_type_set(Eo *obj, const char *type);

View File

@ -608,7 +608,7 @@ _sizing_eval(Evas_Object *obj)
Evas_Coord minw, minh, maxw, maxh;
Evas_Coord w, h;
efl_gfx_size_hint_combined_min_get(obj, &minw, &minh);
evas_object_size_hint_combined_min_get(obj, &minw, &minh);
evas_object_size_hint_max_get(obj, &maxw, &maxh);
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
@ -638,7 +638,7 @@ _evas_object_box_layout_horizontal_weight_apply(Evas_Object_Box_Data *priv, Evas
{
int min_w;
efl_gfx_size_hint_combined_min_get(o, &min_w, NULL);
evas_object_size_hint_combined_min_get(o, &min_w, NULL);
evas_object_resize(o, min_w, h);
}
else
@ -718,7 +718,7 @@ _evas_box_layout_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_D
(opt->obj, &padding_l, &padding_r, NULL, NULL);
req_w += padding_l + padding_r;
efl_gfx_size_hint_combined_min_get(opt->obj, &minw, NULL);
evas_object_size_hint_combined_min_get(opt->obj, &minw, NULL);
if (minw > 0) totalminw += minw + padding_l + padding_r;
if (EINA_DBL_EQ(weight_x, 0.0))
{
@ -760,7 +760,7 @@ _evas_box_layout_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_D
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
evas_object_size_hint_max_get(opt->obj, NULL, &max_h);
efl_gfx_size_hint_combined_min_get(opt->obj, &minw, &minh);
evas_object_size_hint_combined_min_get(opt->obj, &minw, &minh);
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
off_x = padding_l;
@ -804,7 +804,7 @@ _evas_object_box_layout_vertical_weight_apply(Evas_Object_Box_Data *priv, Evas_O
{
int min_h;
efl_gfx_size_hint_combined_min_get(o, NULL, &min_h);
evas_object_size_hint_combined_min_get(o, NULL, &min_h);
evas_object_resize(o, w, min_h);
}
else
@ -884,7 +884,7 @@ _evas_box_layout_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Dat
(opt->obj, NULL, NULL, &padding_t, &padding_b);
req_h += padding_t + padding_b;
efl_gfx_size_hint_combined_min_get(opt->obj, NULL, &minh);
evas_object_size_hint_combined_min_get(opt->obj, NULL, &minh);
if (minh > 0) totalminh += minh + padding_t + padding_b;
if (EINA_DBL_EQ(weight_y, 0.0))
{
@ -926,7 +926,7 @@ _evas_box_layout_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Dat
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
evas_object_size_hint_max_get(opt->obj, &max_w, NULL);
efl_gfx_size_hint_combined_min_get(opt->obj, &minw, &minh);
evas_object_size_hint_combined_min_get(opt->obj, &minw, &minh);
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
off_y = padding_t;
@ -986,7 +986,7 @@ _evas_box_layout_homogeneous_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_
evas_object_size_hint_padding_get
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
efl_gfx_size_hint_combined_min_get(opt->obj, &min_w, NULL);
evas_object_size_hint_combined_min_get(opt->obj, &min_w, NULL);
_sizing_eval(opt->obj);
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
@ -1050,7 +1050,7 @@ _evas_box_layout_homogeneous_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Ob
evas_object_size_hint_padding_get
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
efl_gfx_size_hint_combined_min_get(opt->obj, NULL, &min_h);
evas_object_size_hint_combined_min_get(opt->obj, NULL, &min_h);
_sizing_eval(opt->obj);
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
@ -1136,7 +1136,7 @@ _evas_box_layout_homogeneous_max_size_horizontal(Eo *o, Evas_Object_Box_Data *pr
evas_object_size_hint_padding_get
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
efl_gfx_size_hint_combined_min_get(opt->obj, &min_w, NULL);
evas_object_size_hint_combined_min_get(opt->obj, &min_w, NULL);
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
@ -1223,7 +1223,7 @@ _evas_box_layout_homogeneous_max_size_vertical(Eo *o, Evas_Object_Box_Data *priv
evas_object_size_hint_padding_get
(opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
efl_gfx_size_hint_combined_min_get(opt->obj, NULL, &min_h);
evas_object_size_hint_combined_min_get(opt->obj, NULL, &min_h);
evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
@ -1634,7 +1634,7 @@ _evas_box_layout_stack(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *
evas_object_size_hint_padding_get
(child, &pad_l, &pad_r, &pad_t, &pad_b);
evas_object_size_hint_max_get(child, &max_w, &max_h);
efl_gfx_size_hint_combined_min_get(child, &min_w, &min_h);
evas_object_size_hint_combined_min_get(child, &min_w, &min_h);
_sizing_eval(opt->obj);
evas_object_geometry_get(child, NULL, NULL, &child_w, &child_h);

View File

@ -1423,17 +1423,17 @@ _efl_canvas_object_efl_gfx_size_hint_hint_restricted_min_set(Eo *eo_obj, Evas_Ob
evas_object_inform_call_changed_size_hints(eo_obj);
}
EOLIAN static void
_efl_canvas_object_efl_gfx_size_hint_hint_combined_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
EOLIAN static Eina_Size2D
_efl_canvas_object_efl_gfx_size_hint_hint_combined_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
{
Eina_Size2D sz = { 0, 0 };
if ((!obj->size_hints) || obj->delete_me)
{
if (w) *w = 0;
if (h) *h = 0;
return;
}
if (w) *w = MAX(obj->size_hints->min.w, obj->size_hints->user_min.w);
if (h) *h = MAX(obj->size_hints->min.h, obj->size_hints->user_min.h);
return sz;
sz.w = MAX(obj->size_hints->min.w, obj->size_hints->user_min.w);
sz.h = MAX(obj->size_hints->min.h, obj->size_hints->user_min.h);
return sz;
}
EOLIAN static Eina_Size2D

View File

@ -344,7 +344,7 @@ _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Table_Data *
Evas_Coord child_minw, child_minh, cell_minw, cell_minh;
double weightw, weighth;
efl_gfx_size_hint_combined_min_get(child, &opt->min.w, &opt->min.h);
evas_object_size_hint_combined_min_get(child, &opt->min.w, &opt->min.h);
evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h);
evas_object_size_hint_padding_get
(child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);
@ -435,7 +435,7 @@ _evas_object_table_calculate_layout_homogeneous_sizes_item(const Evas_Object *o,
Evas_Coord minw, minh;
Eina_Bool expand_h, expand_v;
efl_gfx_size_hint_combined_min_get(o, &minw, &minh);
evas_object_size_hint_combined_min_get(o, &minw, &minh);
expand_h = priv->expand_h;
expand_v = priv->expand_v;
@ -659,7 +659,7 @@ _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Table_Data *priv
Evas_Object *child = opt->obj;
double weightw, weighth;
efl_gfx_size_hint_combined_min_get(child, &opt->min.w, &opt->min.h);
evas_object_size_hint_combined_min_get(child, &opt->min.w, &opt->min.h);
evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h);
evas_object_size_hint_padding_get
(child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);