aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-15 18:37:25 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 13:34:50 +0900
commit4c634ed78e0b298f916e4c79a7e222100d0085d2 (patch)
tree9fa8b385d3d8c2445ea94c839fdc38a30eb36f7d /src/lib/elementary
parentefl: Use Eina.Position2D for Efl.Gfx.position (diff)
downloadefl-4c634ed78e0b298f916e4c79a7e222100d0085d2.tar.gz
efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I got it right... fingers crossed.
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_image.c12
-rw-r--r--src/lib/elementary/efl_ui_image_zoomable.c15
-rw-r--r--src/lib/elementary/efl_ui_text.c15
-rw-r--r--src/lib/elementary/efl_ui_textpath.c23
-rw-r--r--src/lib/elementary/efl_ui_win.c22
-rw-r--r--src/lib/elementary/elc_combobox.c6
-rw-r--r--src/lib/elementary/elm_diskselector.c8
-rw-r--r--src/lib/elementary/elm_entry.c8
-rw-r--r--src/lib/elementary/elm_gengrid.c14
-rw-r--r--src/lib/elementary/elm_genlist.c26
-rw-r--r--src/lib/elementary/elm_glview.c17
-rw-r--r--src/lib/elementary/elm_hover.c6
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c17
-rw-r--r--src/lib/elementary/elm_list.c9
-rw-r--r--src/lib/elementary/elm_map.c15
-rw-r--r--src/lib/elementary/elm_mapbuf.c9
-rw-r--r--src/lib/elementary/elm_notify.c8
-rw-r--r--src/lib/elementary/elm_panel.c11
-rw-r--r--src/lib/elementary/elm_scroller.c9
-rw-r--r--src/lib/elementary/elm_toolbar.c9
-rw-r--r--src/lib/elementary/elm_transit.c5
-rw-r--r--src/lib/elementary/elm_widget.c12
22 files changed, 136 insertions, 140 deletions
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index b8446653e9..abfc21ef0c 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -631,21 +631,21 @@ _efl_ui_image_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Position
}
EOLIAN static void
-_efl_ui_image_efl_gfx_size_set(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Coord w, Evas_Coord h)
+_efl_ui_image_efl_gfx_size_set(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- if ((sd->img_w == w) && (sd->img_h == h)) goto super;
+ if ((sd->img_w == sz.w) && (sd->img_h == sz.h)) goto super;
- sd->img_w = w;
- sd->img_h = h;
+ sd->img_w = sz.w;
+ sd->img_h = sz.h;
/* takes care of resizing */
_efl_ui_image_internal_sizing_eval(obj, sd);
super:
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
static void
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index e9922db024..2866fe882a 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -163,12 +163,12 @@ _efl_ui_image_zoomable_pan_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Zoomable_P
}
EOLIAN static void
-_efl_ui_image_zoomable_pan_efl_gfx_size_set(Eo *obj, Efl_Ui_Image_Zoomable_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
+_efl_ui_image_zoomable_pan_efl_gfx_size_set(Eo *obj, Efl_Ui_Image_Zoomable_Pan_Data *psd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), sz);
psd->wsd->resized = EINA_TRUE;
ecore_job_del(psd->wsd->calc_job);
@@ -1515,14 +1515,13 @@ _efl_ui_image_zoomable_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Zoomable_Data
}
EOLIAN static void
-_efl_ui_image_zoomable_efl_gfx_size_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Evas_Coord w, Evas_Coord h)
+_efl_ui_image_zoomable_efl_gfx_size_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
-
- evas_object_resize(sd->hit_rect, w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
+ efl_gfx_size_set(sd->hit_rect, sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index fe4287b57f..34e13e8899 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -1091,17 +1091,16 @@ _efl_ui_text_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Text_Data *sd)
if (sd->scroll)
{
Evas_Coord vw, vh;
- Evas_Coord tw, th;
elm_interface_scrollable_content_viewport_geometry_get(obj, NULL, NULL, &vw, &vh);
- efl_gfx_size_set(sd->entry_edje, vw, vh);
- efl_gfx_size_get(sw, &tw, &th);
+ efl_gfx_size_set(sd->entry_edje, EINA_SIZE2D(vw, vh));
+ //efl_gfx_size_get(sw, &tw, &th); //unused?
efl_canvas_text_size_formatted_get(sw, &fw, &fh);
evas_object_size_hint_min_set(sw, fw, fh);
edje_object_size_min_calc(sd->entry_edje, &minw, &minh);
evas_object_size_hint_min_set(sw, -1, -1);
if (vw > minw) minw = vw;
- efl_gfx_size_set(sd->entry_edje, minw, minh);
+ efl_gfx_size_set(sd->entry_edje, EINA_SIZE2D(minw, minh));
if (!efl_text_multiline_get(sw))
{
@@ -3277,15 +3276,15 @@ _efl_ui_text_efl_gfx_position_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Position2D
}
EOLIAN static void
-_efl_ui_text_efl_gfx_size_set(Eo *obj, Efl_Ui_Text_Data *sd, Evas_Coord w, Evas_Coord h)
+_efl_ui_text_efl_gfx_size_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- evas_object_resize(sd->hit_rect, w, h);
+ efl_gfx_size_set(sd->hit_rect, sz);
_update_selection_handler(obj);
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c
index c915ca904f..c183be1763 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -87,7 +87,7 @@ _segment_draw(Efl_Ui_Textpath_Data *pd, int slice_no, int w1, int w2, int cmp, E
Eina_Matrix2 mat;
len = w2 - w1;
- efl_gfx_size_get(pd->text_obj, &w, &h);
+ EINA_SIZE2D(w, h) = efl_gfx_size_get(pd->text_obj);
seg_len = eina_bezier_length_get(&bezier);
if (pd->autofit)
dt = len / (seg_len * (double) slice_no);
@@ -227,20 +227,21 @@ _text_draw(Efl_Ui_Textpath_Data *pd)
Efl_Ui_Textpath_Segment *seg;
Evas_Map *map;
double slice_unit, slice_len;
- int w, h, w1, w2;
+ int w1, w2;
int remained_w;
int total_slice, drawn_slice = 0;
int cur_map_point = 0, map_point_no;
+ Eina_Size2D sz;
- efl_gfx_size_get(pd->text_obj, &w, &h);
+ sz = efl_gfx_size_get(pd->text_obj);
if (pd->autofit)
- remained_w = w;
+ remained_w = sz.w;
else
remained_w = pd->total_length;
slice_unit = (double)pd->slice_no / pd->total_length;
slice_len = 1.0 / slice_unit;
- total_slice = w / slice_len + 1;
+ total_slice = sz.w / slice_len + 1;
map_point_no = _map_point_calc(pd);
if (map_point_no == 0)
@@ -255,12 +256,12 @@ _text_draw(Efl_Ui_Textpath_Data *pd)
{
int len = seg->length;
if (!pd->autofit)
- len = (double)seg->length * w / (double)pd->total_length;
+ len = (double)seg->length * sz.w / (double)pd->total_length;
if (remained_w <= 0)
break;
w2 = w1 + len;
- if (w2 > w)
- w2 = w;
+ if (w2 > sz.w)
+ w2 = sz.w;
if (seg->type == EFL_GFX_PATH_COMMAND_TYPE_LINE_TO)
{
drawn_slice += 1;
@@ -442,7 +443,7 @@ _ellipsis_set(Efl_Ui_Textpath_Data *pd)
w = pd->total_length;
}
}
- efl_gfx_size_set(pd->text_obj, w, h);
+ efl_gfx_size_set(pd->text_obj, EINA_SIZE2D(w, h));
_textpath_ellipsis_set(pd, is_ellipsis);
}
@@ -570,9 +571,9 @@ _efl_ui_textpath_efl_gfx_position_set(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Po
}
EOLIAN static void
-_efl_ui_textpath_efl_gfx_size_set(Eo *obj, Efl_Ui_Textpath_Data *pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
+_efl_ui_textpath_efl_gfx_size_set(Eo *obj, Efl_Ui_Textpath_Data *pd EINA_UNUSED, Eina_Size2D sz)
{
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index bddf5bf45e..275d33fbbb 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -2983,9 +2983,9 @@ super_skip:
}
EOLIAN static void
-_efl_ui_win_efl_gfx_size_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord w, Evas_Coord h)
+_efl_ui_win_efl_gfx_size_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
if (sd->img_obj)
@@ -2995,25 +2995,25 @@ _efl_ui_win_efl_gfx_size_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord w, Evas_Co
int sw, sh;
ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &sw, &sh);
- w = MIN(w, sw);
- h = MIN(h, sh);
+ sz.w = MIN(sz.w, sw);
+ sz.h = MIN(sz.h, sh);
}
- if (w < 1) w = 1;
- if (h < 1) h = 1;
+ if (sz.w < 1) sz.w = 1;
+ if (sz.h < 1) sz.h = 1;
- evas_object_image_size_set(sd->img_obj, w, h);
+ evas_object_image_size_set(sd->img_obj, sz.w, sz.h);
}
_elm_win_frame_geometry_adjust(sd);
if (!sd->response)
{
sd->req_wh = EINA_TRUE;
- sd->req_w = w;
- sd->req_h = h;
- TRAP(sd, resize, w, h);
+ sd->req_w = sz.w;
+ sd->req_h = sz.h;
+ TRAP(sd, resize, sz.w, sz.h);
}
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
static void
diff --git a/src/lib/elementary/elc_combobox.c b/src/lib/elementary/elc_combobox.c
index 449305eaf1..8d53fea303 100644
--- a/src/lib/elementary/elc_combobox.c
+++ b/src/lib/elementary/elc_combobox.c
@@ -538,13 +538,13 @@ _elm_combobox_part_text_get(const Eo *obj, const char *part)
}
EOLIAN static void
-_elm_combobox_efl_gfx_size_set(Eo *obj, Elm_Combobox_Data *pd, Evas_Coord w, Evas_Coord h)
+_elm_combobox_efl_gfx_size_set(Eo *obj, Elm_Combobox_Data *pd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
if (pd->count > 0) _table_resize(obj);
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
/* Internal EO APIs and hidden overrides */
diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c
index 9e69f3caae..628bba054e 100644
--- a/src/lib/elementary/elm_diskselector.c
+++ b/src/lib/elementary/elm_diskselector.c
@@ -1409,14 +1409,14 @@ _elm_diskselector_efl_gfx_position_set(Eo *obj, Elm_Diskselector_Data *sd, Eina_
}
EOLIAN static void
-_elm_diskselector_efl_gfx_size_set(Eo *obj, Elm_Diskselector_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_diskselector_efl_gfx_size_set(Eo *obj, Elm_Diskselector_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- evas_object_resize(sd->hit_rect, w, h);
+ efl_gfx_size_set(sd->hit_rect, sz);
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 790b3ff4cc..bf21ed0133 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -3965,16 +3965,16 @@ _elm_entry_efl_gfx_position_set(Eo *obj, Elm_Entry_Data *sd, Eina_Position2D pos
}
EOLIAN static void
-_elm_entry_efl_gfx_size_set(Eo *obj, Elm_Entry_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_entry_efl_gfx_size_set(Eo *obj, Elm_Entry_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- evas_object_resize(sd->hit_rect, w, h);
+ efl_gfx_size_set(sd->hit_rect, sz);
if (sd->have_selection)
_update_selection_handler(obj);
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 710b81e4a9..8d4ca449f3 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -673,12 +673,12 @@ _elm_gengrid_pan_efl_gfx_position_set(Eo *obj, Elm_Gengrid_Pan_Data *psd, Eina_P
}
EOLIAN static void
-_elm_gengrid_pan_efl_gfx_size_set(Eo *obj, Elm_Gengrid_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
+_elm_gengrid_pan_efl_gfx_size_set(Eo *obj, Elm_Gengrid_Pan_Data *psd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), sz);
ecore_job_del(psd->wsd->calc_job);
psd->wsd->calc_job = ecore_job_add(_calc_job, psd->wobj);
@@ -4235,13 +4235,13 @@ _elm_gengrid_efl_gfx_position_set(Eo *obj, Elm_Gengrid_Data *sd, Eina_Position2D
}
EOLIAN static void
-_elm_gengrid_efl_gfx_size_set(Eo *obj, Elm_Gengrid_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_gengrid_efl_gfx_size_set(Eo *obj, Elm_Gengrid_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- evas_object_resize(sd->hit_rect, w, h);
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(sd->hit_rect, sz);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index d66f11d377..2f561005c4 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -295,17 +295,17 @@ _elm_genlist_pan_smart_resize_job(void *data)
}
EOLIAN static void
-_elm_genlist_pan_efl_gfx_size_set(Eo *obj, Elm_Genlist_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
+_elm_genlist_pan_efl_gfx_size_set(Eo *obj, Elm_Genlist_Pan_Data *psd, Eina_Size2D size)
{
Elm_Genlist_Data *sd = psd->wsd;
- Evas_Coord ow, oh;
+ Eina_Size2D old;
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, size.w, size.h))
return;
- efl_gfx_size_get(obj, &ow, &oh);
- if ((ow == w) && (oh == h)) goto super; // should already be intercepted above
- if ((sd->mode == ELM_LIST_COMPRESS) && (ow != w))
+ old = efl_gfx_size_get(obj);
+ if ((old.w == size.w) && (old.h == size.h)) goto super; // should already be intercepted above
+ if ((sd->mode == ELM_LIST_COMPRESS) && (old.w != size.w))
{
/* fix me later */
ecore_job_del(psd->resize_job);
@@ -318,13 +318,13 @@ _elm_genlist_pan_efl_gfx_size_set(Eo *obj, Elm_Genlist_Pan_Data *psd, Evas_Coord
// if the width changed we may have to resize content if scrollbar went
// away or appeared to queue a job to deal with it. it should settle in
// the end to a steady-state
- if (ow != w)
+ if (old.w != size.w)
sd->calc_job = ecore_job_add(_calc_job, psd->wobj);
else
sd->calc_job = NULL;
super:
- efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), size);
}
static void
@@ -5715,16 +5715,16 @@ _elm_genlist_efl_gfx_position_set(Eo *obj, Elm_Genlist_Data *sd, Eina_Position2D
}
EOLIAN static void
-_elm_genlist_efl_gfx_size_set(Eo *obj, Elm_Genlist_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_genlist_efl_gfx_size_set(Eo *obj, Elm_Genlist_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- evas_object_resize(sd->hit_rect, w, h);
- if ((sd->queue) && (!sd->queue_idle_enterer) && (w > 0))
+ efl_gfx_size_set(sd->hit_rect, sz);
+ if ((sd->queue) && (!sd->queue_idle_enterer) && (sz.w > 0))
_requeue_idle_enterer(sd);
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_glview.c b/src/lib/elementary/elm_glview.c
index 6c1a3c883c..fceb850be4 100644
--- a/src/lib/elementary/elm_glview.c
+++ b/src/lib/elementary/elm_glview.c
@@ -86,25 +86,22 @@ _glview_update_surface(Evas_Object *obj)
}
EOLIAN static void
-_elm_glview_efl_gfx_size_set(Eo *obj, Elm_Glview_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_glview_efl_gfx_size_set(Eo *obj, Elm_Glview_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
sd->resized = EINA_TRUE;
if (sd->scale_policy == ELM_GLVIEW_RESIZE_POLICY_RECREATE)
{
- if ((w == 0) || (h == 0))
- {
- w = 64;
- h = 64;
- }
+ if ((sz.w == 0) || (sz.h == 0))
+ sz = EINA_SIZE2D(64, 64);
- sd->w = w;
- sd->h = h;
+ sd->w = sz.w;
+ sd->h = sz.h;
_glview_update_surface(obj);
}
diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c
index 6b406e053f..5a984e8b76 100644
--- a/src/lib/elementary/elm_hover.c
+++ b/src/lib/elementary/elm_hover.c
@@ -642,12 +642,12 @@ _elm_hover_efl_gfx_position_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Eina_P
}
EOLIAN static void
-_elm_hover_efl_gfx_size_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
+_elm_hover_efl_gfx_size_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
elm_layout_sizing_eval(obj);
}
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index 223c1fb325..6346453d4b 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -116,15 +116,15 @@ _elm_pan_efl_gfx_position_set(Eo *obj, Elm_Pan_Smart_Data *psd, Eina_Position2D
}
EOLIAN static void
-_elm_pan_efl_gfx_size_set(Eo *obj EINA_UNUSED, Elm_Pan_Smart_Data *psd, Evas_Coord w, Evas_Coord h)
+_elm_pan_efl_gfx_size_set(Eo *obj EINA_UNUSED, Elm_Pan_Smart_Data *psd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), sz);
- psd->w = w;
- psd->h = h;
+ psd->w = sz.w;
+ psd->h = sz.h;
_elm_pan_update(psd);
efl_event_callback_legacy_call(psd->self, ELM_PAN_EVENT_CHANGED, NULL);
@@ -735,7 +735,8 @@ _elm_scroll_scroll_bar_v_visibility_adjust(
static inline void
_elm_scroll_scroll_bar_auto_visibility_adjust(Elm_Scrollable_Smart_Interface_Data *sid)
{
- int sw = 0, sh = 0, w, h;
+ Eina_Size2D sz;
+ int w, h;
if ((sid->vbar_flags != ELM_SCROLLER_POLICY_AUTO) ||
(sid->hbar_flags != ELM_SCROLLER_POLICY_AUTO) ||
@@ -745,12 +746,12 @@ _elm_scroll_scroll_bar_auto_visibility_adjust(Elm_Scrollable_Smart_Interface_Dat
w = sid->content_info.w;
h = sid->content_info.h;
- efl_gfx_size_get(sid->edje_obj, &sw, &sh);
+ sz = efl_gfx_size_get(sid->edje_obj);
// Adjust when the content may fit but the bars are visible. The if() test
// does not guarantee that the content will fit (offsets & margins depend
// on the theme).
- if ((w <= sw) && (h <= sh))
+ if ((w <= sz.w) && (h <= sz.h))
{
sid->hbar_visible = EINA_FALSE;
sid->vbar_visible = EINA_FALSE;
diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c
index e740b38dc8..a06aba5891 100644
--- a/src/lib/elementary/elm_list.c
+++ b/src/lib/elementary/elm_list.c
@@ -2500,14 +2500,13 @@ _elm_list_efl_gfx_position_set(Eo *obj, Elm_List_Data *sd, Eina_Position2D pos)
}
EOLIAN static void
-_elm_list_efl_gfx_size_set(Eo *obj, Elm_List_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_list_efl_gfx_size_set(Eo *obj, Elm_List_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
-
- evas_object_resize(sd->hit_rect, w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
+ efl_gfx_size_set(sd->hit_rect, sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index e42a6a0f08..8f7ce2a229 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -3903,12 +3903,12 @@ _elm_map_pan_elm_pan_content_size_get(Eo *obj EINA_UNUSED, Elm_Map_Pan_Data *psd
}
EOLIAN static void
-_elm_map_pan_efl_gfx_size_set(Eo *obj, Elm_Map_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
+_elm_map_pan_efl_gfx_size_set(Eo *obj, Elm_Map_Pan_Data *psd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), sz);
_sizing_eval(psd->wsd->obj);
elm_map_zoom_mode_set(psd->wobj, psd->wsd->mode);
@@ -4259,14 +4259,13 @@ _elm_map_efl_gfx_position_set(Eo *obj, Elm_Map_Data *sd, Eina_Position2D pos)
}
EOLIAN static void
-_elm_map_efl_gfx_size_set(Eo *obj, Elm_Map_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_map_efl_gfx_size_set(Eo *obj, Elm_Map_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
-
- evas_object_resize(sd->hit_rect, w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
+ efl_gfx_size_set(sd->hit_rect, sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_mapbuf.c b/src/lib/elementary/elm_mapbuf.c
index f0212e14d5..aea78a9a47 100644
--- a/src/lib/elementary/elm_mapbuf.c
+++ b/src/lib/elementary/elm_mapbuf.c
@@ -169,14 +169,15 @@ _elm_mapbuf_efl_gfx_position_set(Eo *obj, Elm_Mapbuf_Data *sd, Eina_Position2D p
}
EOLIAN static void
-_elm_mapbuf_efl_gfx_size_set(Eo *obj, Elm_Mapbuf_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_mapbuf_efl_gfx_size_set(Eo *obj, Elm_Mapbuf_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
+ if (sd->content)
+ efl_gfx_size_set(sd->content, sz);
- if (sd->content) evas_object_resize(sd->content, w, h);
_mapbuf_auto_eval(obj, sd);
_configure(obj);
}
diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c
index 77b5b98f0e..a2805fa377 100644
--- a/src/lib/elementary/elm_notify.c
+++ b/src/lib/elementary/elm_notify.c
@@ -228,19 +228,19 @@ _block_area_clicked_cb(void *data,
}
EOLIAN static void
-_elm_notify_efl_gfx_size_set(Eo *obj, Elm_Notify_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_notify_efl_gfx_size_set(Eo *obj, Elm_Notify_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
if (!sd->parent && sd->content)
{
Eina_Position2D pos;
pos = efl_gfx_position_get(obj);
- _notify_move_to_orientation(obj, pos.x, pos.y, w, h);
+ _notify_move_to_orientation(obj, pos.x, pos.y, sz.w, sz.h);
}
}
diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index ba4fa2befa..bf9f75ba1d 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -968,18 +968,17 @@ _scrollable_layout_resize(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, Evas_Coord
}
EOLIAN static void
-_elm_panel_efl_gfx_size_set(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_panel_efl_gfx_size_set(Eo *obj, Elm_Panel_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
if (!sd->scrollable) return;
- evas_object_resize(sd->hit_rect, w, h);
-
- _scrollable_layout_resize(obj, sd, w, h);
+ efl_gfx_size_set(sd->hit_rect, sz);
+ _scrollable_layout_resize(obj, sd, sz.w, sz.h);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c
index 002c467041..aef2d6e02d 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -961,14 +961,13 @@ _elm_scroller_efl_gfx_position_set(Eo *obj, Elm_Scroller_Data *sd, Eina_Position
}
EOLIAN static void
-_elm_scroller_efl_gfx_size_set(Eo *obj, Elm_Scroller_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_scroller_efl_gfx_size_set(Eo *obj, Elm_Scroller_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
-
- evas_object_resize(sd->hit_rect, w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
+ efl_gfx_size_set(sd->hit_rect, sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index e43f788784..779debfd32 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -2914,14 +2914,13 @@ _elm_toolbar_efl_gfx_position_set(Eo *obj, Elm_Toolbar_Data *sd, Eina_Position2D
}
EOLIAN static void
-_elm_toolbar_efl_gfx_size_set(Eo *obj, Elm_Toolbar_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_toolbar_efl_gfx_size_set(Eo *obj, Elm_Toolbar_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
-
- evas_object_resize(sd->hit_rect, w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
+ efl_gfx_size_set(sd->hit_rect, sz);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_transit.c b/src/lib/elementary/elm_transit.c
index 0da1781c60..af68978706 100644
--- a/src/lib/elementary/elm_transit.c
+++ b/src/lib/elementary/elm_transit.c
@@ -507,9 +507,12 @@ _recover_image_uv(Evas_Object *obj, Evas_Map *map, Eina_Bool revert, Eina_Bool b
else
{
Eina_Rect fill;
+ Eina_Size2D sz;
fill = efl_gfx_fill_get(obj);
- efl_gfx_size_get(obj, &w, &h);
+ sz = efl_gfx_size_get(obj);
+ w = sz.w;
+ h = sz.h;
EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_rectangle_is_valid(&fill.rect), EINA_FALSE);
double rate_x = (double) w / (double) fill.w;
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 8ea3085612..f612521f44 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -845,16 +845,16 @@ _elm_widget_efl_gfx_position_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd,
}
EOLIAN static void
-_elm_widget_efl_gfx_size_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Evas_Coord w, Evas_Coord h)
+_elm_widget_efl_gfx_size_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- sd->w = w;
- sd->h = h;
+ sd->w = sz.w;
+ sd->h = sz.h;
_smart_reconfigure(sd);
- efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
}
EOLIAN static void
@@ -3538,7 +3538,7 @@ EOLIAN static Eina_Rect
_elm_widget_focus_region_get(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
{
Eina_Rect r = {};
- efl_gfx_size_get(obj, &r.w, &r.h);
+ r.size = efl_gfx_size_get(obj);
return r;
}