aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--src/bin/elementary/test_bg.c2
-rw-r--r--src/bin/elementary/test_box.c2
-rw-r--r--src/bin/elementary/test_efl_gfx_map.c2
-rw-r--r--src/bin/elementary/test_evas_map.c8
-rw-r--r--src/bin/elementary/test_evas_mask.c2
-rw-r--r--src/bin/elementary/test_evas_snapshot.c8
-rw-r--r--src/bin/elementary/test_gfx_filters.c8
-rw-r--r--src/bin/elementary/test_grid_static.c2
-rw-r--r--src/bin/elementary/test_panes.c2
-rw-r--r--src/bin/elementary/test_photocam.c4
-rw-r--r--src/bin/elementary/test_ui_box.c2
-rw-r--r--src/bin/elementary/test_ui_grid.c4
-rw-r--r--src/bin/elementary/test_ui_textpath.c2
-rw-r--r--src/bin/elementary/test_win_dialog.c7
-rw-r--r--src/examples/elementary/evas3d_object_on_button_example.c2
-rw-r--r--src/examples/evas/evas-3d-aabb.c8
-rw-r--r--src/examples/evas/evas-3d-blending.c4
-rw-r--r--src/examples/evas/evas-3d-colorpick.c6
-rw-r--r--src/examples/evas/evas-3d-cube.c8
-rw-r--r--src/examples/evas/evas-3d-cube2.c8
-rw-r--r--src/examples/evas/evas-3d-eet.c8
-rw-r--r--src/examples/evas/evas-3d-fog.c8
-rw-r--r--src/examples/evas/evas-3d-hull.c8
-rw-r--r--src/examples/evas/evas-3d-md2.c8
-rw-r--r--src/examples/evas/evas-3d-mmap-set.c8
-rw-r--r--src/examples/evas/evas-3d-obj.c8
-rw-r--r--src/examples/evas/evas-3d-parallax-occlusion.c8
-rw-r--r--src/examples/evas/evas-3d-pick.c4
-rw-r--r--src/examples/evas/evas-3d-ply.c8
-rw-r--r--src/examples/evas/evas-3d-proxy.c10
-rw-r--r--src/examples/evas/evas-3d-shadows.c8
-rw-r--r--src/examples/evas/evas-3d-static-lod.c8
-rw-r--r--src/examples/evas/evas-map-utils-eo.c4
-rw-r--r--src/examples/evas/evas-object-manipulation-eo.c10
-rw-r--r--src/lib/edje/edje_calc.c37
-rw-r--r--src/lib/edje/edje_smart.c16
-rw-r--r--src/lib/edje/edje_text.c8
-rw-r--r--src/lib/efl/interfaces/efl_gfx.eo5
-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
-rw-r--r--src/lib/emotion/emotion_smart.c16
-rw-r--r--src/lib/evas/canvas/efl_canvas_object_event_grabber.c6
-rw-r--r--src/lib/evas/canvas/efl_gfx_map.c2
-rw-r--r--src/lib/evas/canvas/evas_object_box.c6
-rw-r--r--src/lib/evas/canvas/evas_object_image.c16
-rw-r--r--src/lib/evas/canvas/evas_object_main.c32
-rw-r--r--src/lib/evas/canvas/evas_object_table.c6
-rw-r--r--src/lib/evas/canvas/evas_object_text.c16
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c19
-rw-r--r--src/tests/elementary/elm_test_win.c2
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c15
-rw-r--r--src/tests/evas/evas_test_textblock.c2
72 files changed, 338 insertions, 341 deletions
diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index 8ffbd65780..dbe1132531 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -364,5 +364,5 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _image_cb, win),
efl_pack(box, efl_added));
- efl_gfx_size_set(win, 300, 200);
+ efl_gfx_size_set(win, EINA_SIZE2D(300, 200));
}
diff --git a/src/bin/elementary/test_box.c b/src/bin/elementary/test_box.c
index 82e5968604..63af2e05d0 100644
--- a/src/bin/elementary/test_box.c
+++ b/src/bin/elementary/test_box.c
@@ -919,5 +919,5 @@ test_box_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
efl_file_set(efl_added, buf, NULL));
efl_pack(bx, o);
- efl_gfx_size_set(win, 300, 300);
+ efl_gfx_size_set(win, EINA_SIZE2D(300, 300));
}
diff --git a/src/bin/elementary/test_efl_gfx_map.c b/src/bin/elementary/test_efl_gfx_map.c
index e462425db3..c9bd77ddfd 100644
--- a/src/bin/elementary/test_efl_gfx_map.c
+++ b/src/bin/elementary/test_efl_gfx_map.c
@@ -61,5 +61,5 @@ test_efl_gfx_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_map_set(img);
efl_content_set(win, img);
- efl_gfx_size_set(win, W, H);
+ efl_gfx_size_set(win, EINA_SIZE2D(W, H));
}
diff --git a/src/bin/elementary/test_evas_map.c b/src/bin/elementary/test_evas_map.c
index 5a7bfe4374..2eeeee9b73 100644
--- a/src/bin/elementary/test_evas_map.c
+++ b/src/bin/elementary/test_evas_map.c
@@ -39,10 +39,10 @@ _map_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
static void
_image_resize_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
- Evas_Coord w, h;
+ Eina_Size2D sz;
- efl_gfx_size_get(obj, &w, &h);
- _map_set(obj, w, h);
+ sz = efl_gfx_size_get(obj);
+ _map_set(obj, sz.w, sz.h);
}
void
@@ -69,5 +69,5 @@ test_evas_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
_map_set(img, W, H);
efl_content_set(win, img);
- efl_gfx_size_set(win, W, H);
+ efl_gfx_size_set(win, EINA_SIZE2D(W, H));
}
diff --git a/src/bin/elementary/test_evas_mask.c b/src/bin/elementary/test_evas_mask.c
index a8fd92a0f8..050158cd86 100644
--- a/src/bin/elementary/test_evas_mask.c
+++ b/src/bin/elementary/test_evas_mask.c
@@ -176,5 +176,5 @@ test_evas_mask(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
efl_gfx_size_hint_weight_set(efl_added, 0.0, 0.0),
efl_pack(box2, efl_added));
- efl_gfx_size_set(win, 500, 600);
+ efl_gfx_size_set(win, EINA_SIZE2D(500, 600));
}
diff --git a/src/bin/elementary/test_evas_snapshot.c b/src/bin/elementary/test_evas_snapshot.c
index cb13386320..ec6c1efb68 100644
--- a/src/bin/elementary/test_evas_snapshot.c
+++ b/src/bin/elementary/test_evas_snapshot.c
@@ -62,9 +62,9 @@ _render_post(void *data, const Efl_Event *ev)
static void
_save_image(void *data, const Efl_Event *ev EINA_UNUSED)
{
+ Eina_Size2D sz;
Eo *win = data;
Eo *snap;
- int w, h;
// Save is available only during render_post
snap = efl_key_wref_get(win, "snap");
@@ -75,8 +75,8 @@ _save_image(void *data, const Efl_Event *ev EINA_UNUSED)
// This is a special case handled by snapshot for the purpose of taking
// screenshots like this. This is useful only if the button click has no
// animation on screen and there is no spinning wheel either.
- efl_gfx_size_get(snap, &w, &h);
- efl_gfx_buffer_update_add(snap, 0, 0, w, h);
+ sz = efl_gfx_size_get(snap);
+ efl_gfx_buffer_update_add(snap, 0, 0, sz.w, sz.h);
}
static void
@@ -206,5 +206,5 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
efl_key_wref_set(win, "snap", snap);
efl_key_wref_set(win, "grid", grid);
- efl_gfx_size_set(win, 400, 400);
+ efl_gfx_size_set(win, EINA_SIZE2D(400, 400));
}
diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c
index 455606dccc..1cf4cd72f1 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -237,10 +237,10 @@ _code_changed_hack(void *data, const Efl_Event *ev EINA_UNUSED)
static void
_text_resize(void *data EINA_UNUSED, const Efl_Event *ev)
{
- int w = 0, h = 0;
+ Eina_Size2D sz;
- efl_gfx_size_get(ev->object, &w, &h);
- efl_gfx_size_hint_min_set(ev->object, w, h);
+ sz = efl_gfx_size_get(ev->object);
+ efl_gfx_size_hint_min_set(ev->object, sz.w, sz.h);
}
static void
@@ -526,5 +526,5 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
elm_spinner_value_set(spinner, 1.0);
_spinner_cb(win, NULL);
- efl_gfx_size_set(win, 500, 600);
+ efl_gfx_size_set(win, EINA_SIZE2D(500, 600));
}
diff --git a/src/bin/elementary/test_grid_static.c b/src/bin/elementary/test_grid_static.c
index e02f06296c..108d7d7831 100644
--- a/src/bin/elementary/test_grid_static.c
+++ b/src/bin/elementary/test_grid_static.c
@@ -184,5 +184,5 @@ test_grid_static(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
efl_gfx_color_set(rc, 128, 64, 0, 128);
efl_pack_grid(gd, rc, 60, 80, 10, 10);
- efl_gfx_size_set(win, 480, 480);
+ efl_gfx_size_set(win, EINA_SIZE2D(480, 480));
}
diff --git a/src/bin/elementary/test_panes.c b/src/bin/elementary/test_panes.c
index fe38bd6426..755cbe46c3 100644
--- a/src/bin/elementary/test_panes.c
+++ b/src/bin/elementary/test_panes.c
@@ -143,6 +143,6 @@ test_panes_minsize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
efl_content_set(efl_part(panes_h, "second"), efl_added)
);
- efl_gfx_size_set(win, 320, 400);
+ efl_gfx_size_set(win, EINA_SIZE2D(320, 400));
}
diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c
index 25d1b3a7a0..162834e6e2 100644
--- a/src/bin/elementary/test_photocam.c
+++ b/src/bin/elementary/test_photocam.c
@@ -766,7 +766,7 @@ _zoomable_move_resize_cb(void *data, const Efl_Event *ev)
Eina_Rect r;
r = efl_gfx_geometry_get(ev->object);
- efl_gfx_size_set(data, r.w, r.h);
+ efl_gfx_size_set(data, EINA_SIZE2D(r.w, r.h));
efl_gfx_position_set(data, r.pos);
}
@@ -845,5 +845,5 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
efl_event_callback_add(zoomable, EFL_GFX_EVENT_RESIZE, _zoomable_move_resize_cb, rect);
efl_event_callback_add(zoomable, EFL_GFX_EVENT_MOVE, _zoomable_move_resize_cb, rect);
- efl_gfx_size_set(win, 300, 320);
+ efl_gfx_size_set(win, EINA_SIZE2D(300, 320));
}
diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c
index b170b82170..ac7f6a02f6 100644
--- a/src/bin/elementary/test_ui_box.c
+++ b/src/bin/elementary/test_ui_box.c
@@ -222,7 +222,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
win = elm_win_util_standard_add("ui-box", "Efl.Ui.Box");
elm_win_autodel_set(win, EINA_TRUE);
- efl_gfx_size_set(win, 600, 400);
+ efl_gfx_size_set(win, EINA_SIZE2D(600, 400));
vbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
diff --git a/src/bin/elementary/test_ui_grid.c b/src/bin/elementary/test_ui_grid.c
index 7ddcdca6c3..5704453580 100644
--- a/src/bin/elementary/test_ui_grid.c
+++ b/src/bin/elementary/test_ui_grid.c
@@ -174,7 +174,7 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
win = elm_win_util_standard_add("ui-grid", "Efl.Ui.Grid");
elm_win_autodel_set(win, EINA_TRUE);
- efl_gfx_size_set(win, 600, 400);
+ efl_gfx_size_set(win, EINA_SIZE2D(600, 400));
vbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
@@ -498,7 +498,7 @@ test_ui_grid_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
win = elm_win_util_standard_add("ui-grid-linear", "Efl.Ui.Grid Linear APIs");
elm_win_autodel_set(win, EINA_TRUE);
- efl_gfx_size_set(win, 600, 400);
+ efl_gfx_size_set(win, EINA_SIZE2D(600, 400));
vbox = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
diff --git a/src/bin/elementary/test_ui_textpath.c b/src/bin/elementary/test_ui_textpath.c
index 88e8de4ee7..d4f9b4d3c1 100644
--- a/src/bin/elementary/test_ui_textpath.c
+++ b/src/bin/elementary/test_ui_textpath.c
@@ -178,6 +178,6 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
efl_gfx_visible_set(btn, EINA_TRUE);
elm_win_resize_object_add(win, box);
- efl_gfx_size_set(win, 400, 400);
+ efl_gfx_size_set(win, EINA_SIZE2D(400, 400));
efl_gfx_visible_set(win, 1);
}
diff --git a/src/bin/elementary/test_win_dialog.c b/src/bin/elementary/test_win_dialog.c
index e20740ec6f..77c340e7fd 100644
--- a/src/bin/elementary/test_win_dialog.c
+++ b/src/bin/elementary/test_win_dialog.c
@@ -51,7 +51,8 @@ _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 w, h, W, H, wc, hc, ww, hh;
+ int w, h, W, H, wc, hc;
+ Eina_Size2D sz;
char buf[2048];
Eo *dia = ev->object;
Eo *lbl = data;
@@ -59,12 +60,12 @@ _size_update(void *data, const Efl_Event *ev)
efl_gfx_size_hint_combined_min_get(dia, &wc, &hc);
efl_gfx_size_hint_min_get(dia, &w, &h);
efl_gfx_size_hint_max_get(dia, &W, &H);
- efl_gfx_size_get(dia, &ww, &hh);
+ sz = efl_gfx_size_get(dia);
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", w, h, wc, hc, W, H, ww, hh);
+ "Current size: %dx%d", w, h, wc, hc, W, H, sz.w, sz.h);
//efl_text_set(lbl, buf);
elm_object_text_set(lbl, buf);
}
diff --git a/src/examples/elementary/evas3d_object_on_button_example.c b/src/examples/elementary/evas3d_object_on_button_example.c
index e4e1c43c83..c3866b78fe 100644
--- a/src/examples/elementary/evas3d_object_on_button_example.c
+++ b/src/examples/elementary/evas3d_object_on_button_example.c
@@ -258,7 +258,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
btn = elm_button_add(win);
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index 37f954da00..fac73ad993 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -110,8 +110,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
@@ -216,11 +216,11 @@ main(void)
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
evas_object_focus_set(image, EINA_TRUE);
efl_canvas_scene3d_set(image, scene);
diff --git a/src/examples/evas/evas-3d-blending.c b/src/examples/evas/evas-3d-blending.c
index 8409efa2fa..84f042ace1 100644
--- a/src/examples/evas/evas-3d-blending.c
+++ b/src/examples/evas/evas-3d-blending.c
@@ -126,8 +126,8 @@ _on_canvas_resize(Ecore_Evas *ee)
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
evas_object_resize(background, w, h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c
index 447ae0c880..142af34518 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -120,8 +120,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(bg, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(bg, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
@@ -392,7 +392,7 @@ int main(int argc, char **argv)
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
evas_object_focus_set(image, EINA_TRUE);
efl_canvas_scene3d_set(image, globalscene.scene);
diff --git a/src/examples/evas/evas-3d-cube.c b/src/examples/evas/evas-3d-cube.c
index f82e9bf50e..7a2cdcfd18 100644
--- a/src/examples/evas/evas-3d-cube.c
+++ b/src/examples/evas/evas-3d-cube.c
@@ -114,8 +114,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
@@ -239,12 +239,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c
index 0392c95710..f581d930b0 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -78,8 +78,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
@@ -235,12 +235,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
diff --git a/src/examples/evas/evas-3d-eet.c b/src/examples/evas/evas-3d-eet.c
index 2d73c89a5e..01c9c768f5 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -91,8 +91,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
int
@@ -187,12 +187,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
diff --git a/src/examples/evas/evas-3d-fog.c b/src/examples/evas/evas-3d-fog.c
index 94248d4dfc..38a3d632da 100644
--- a/src/examples/evas/evas-3d-fog.c
+++ b/src/examples/evas/evas-3d-fog.c
@@ -61,8 +61,8 @@ _on_canvas_resize(Ecore_Evas *ee)
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
evas_object_resize(background, w, h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
@@ -212,13 +212,13 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
diff --git a/src/examples/evas/evas-3d-hull.c b/src/examples/evas/evas-3d-hull.c
index d842a48b9d..52c121fe9f 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -195,8 +195,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
@@ -433,12 +433,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
evas_object_show(image),
diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c
index 7a5c06cfb0..463c436d19 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -68,8 +68,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
int
@@ -154,12 +154,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
diff --git a/src/examples/evas/evas-3d-mmap-set.c b/src/examples/evas/evas-3d-mmap-set.c
index 5bce02b234..fed41fa7d8 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -155,8 +155,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
int
@@ -235,12 +235,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 20, 20, 200, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c
index de4a1f3068..76a263ba3a 100644
--- a/src/examples/evas/evas-3d-obj.c
+++ b/src/examples/evas/evas-3d-obj.c
@@ -133,8 +133,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
int
@@ -216,12 +216,12 @@ main(void)
/* Add a background rectangle MESHES. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c b/src/examples/evas/evas-3d-parallax-occlusion.c
index 1d67908718..9640f2404b 100644
--- a/src/examples/evas/evas-3d-parallax-occlusion.c
+++ b/src/examples/evas/evas-3d-parallax-occlusion.c
@@ -80,8 +80,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
@@ -239,12 +239,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
evas_object_focus_set(image, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c
index 2556d5636b..b6d20e714a 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -169,12 +169,12 @@ main(void)
/* Add evas objects. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
efl_canvas_scene3d_set(image, scene);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_DOWN,
_on_mouse_down, NULL);
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index d42e3704f3..00d05f9804 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -98,8 +98,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
int
@@ -210,12 +210,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 100, 100, 100, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
diff --git a/src/examples/evas/evas-3d-proxy.c b/src/examples/evas/evas-3d-proxy.c
index 74b6d0b362..3c89ebea14 100644
--- a/src/examples/evas/evas-3d-proxy.c
+++ b/src/examples/evas/evas-3d-proxy.c
@@ -63,8 +63,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
@@ -221,7 +221,7 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add a background image. */
@@ -229,7 +229,7 @@ main(void)
source = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
efl_gfx_buffer_copy_set(source, NULL, IMG_WIDTH, IMG_HEIGHT, 0, EFL_GFX_COLORSPACE_ARGB8888, 0);
efl_gfx_position_set(source, EINA_POSITION2D((WIDTH / 2), (HEIGHT / 2)));
- efl_gfx_size_set(source, (WIDTH / 2), (HEIGHT / 2));
+ efl_gfx_size_set(source, EINA_SIZE2D((WIDTH / 2), (HEIGHT / 2)));
efl_gfx_visible_set(source, EINA_TRUE);
#else
source = evas_object_image_filled_add(evas);
@@ -241,7 +241,7 @@ main(void)
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, (WIDTH / 2), (HEIGHT / 2));
+ efl_gfx_size_set(image, EINA_SIZE2D((WIDTH / 2), (HEIGHT / 2)));
efl_gfx_visible_set(image, EINA_TRUE);
/* Setup scene */
diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c
index c1714e3a5b..f24824ebc1 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -181,8 +181,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static void
@@ -644,12 +644,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
evas_object_anti_alias_set(image, EINA_TRUE);
evas_object_focus_set(image, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-static-lod.c b/src/examples/evas/evas-3d-static-lod.c
index c2366b7cba..22f7494c40 100644
--- a/src/examples/evas/evas-3d-static-lod.c
+++ b/src/examples/evas/evas-3d-static-lod.c
@@ -66,8 +66,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(background, w, h);
- efl_gfx_size_set(image, w, h);
+ efl_gfx_size_set(background, EINA_SIZE2D(w, h));
+ efl_gfx_size_set(image, EINA_SIZE2D(w, h));
}
static Eina_Bool
@@ -256,12 +256,12 @@ main(void)
/* Add a background rectangle object. */
background = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
- efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_size_set(background, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
- efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_size_set(image, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(image, EINA_TRUE);
evas_object_focus_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
diff --git a/src/examples/evas/evas-map-utils-eo.c b/src/examples/evas/evas-map-utils-eo.c
index f6e321f5d9..34fae5e5be 100644
--- a/src/examples/evas/evas-map-utils-eo.c
+++ b/src/examples/evas/evas-map-utils-eo.c
@@ -90,7 +90,7 @@ _anim_cb(void *data)
o = evas_object_name_find(ad->canvas, "obj2");
- efl_gfx_size_get(o, NULL, &h);
+ h = efl_gfx_size_get(o).h;
efl_gfx_map_reset(o);
efl_gfx_map_smooth_set(o, ad->smooth);
efl_gfx_map_alpha_set(o, ad->alpha);
@@ -105,7 +105,7 @@ _anim_cb(void *data)
o = evas_object_name_find(ad->canvas, "obj3");
- efl_gfx_size_get(o, &w, &h);
+ EINA_SIZE2D(w, h) = efl_gfx_size_get(o);
efl_gfx_map_reset(o);
efl_gfx_map_smooth_set(o, ad->smooth);
efl_gfx_map_alpha_set(o, ad->alpha);
diff --git a/src/examples/evas/evas-object-manipulation-eo.c b/src/examples/evas/evas-object-manipulation-eo.c
index 3dad0d76e5..dfe02bb0c2 100644
--- a/src/examples/evas/evas-object-manipulation-eo.c
+++ b/src/examples/evas/evas-object-manipulation-eo.c
@@ -55,7 +55,7 @@ _canvas_resize_cb(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- efl_gfx_size_set(d.bg, w, h);
+ efl_gfx_size_set(d.bg, EINA_SIZE2D(w, h));
}
static void
@@ -178,7 +178,7 @@ main(void)
/* white bg */
efl_gfx_position_set(d.bg, EINA_POSITION2D(0, 0));
/* at canvas' origin */
- efl_gfx_size_set(d.bg, WIDTH, HEIGHT);
+ efl_gfx_size_set(d.bg, EINA_SIZE2D(WIDTH, HEIGHT));
/* covers full canvas */
efl_gfx_visible_set(d.bg, EINA_TRUE);
evas_object_focus_set(d.bg, EINA_TRUE);
@@ -203,7 +203,7 @@ main(void)
else
{
efl_gfx_position_set(d.img, EINA_POSITION2D(0, 0));
- efl_gfx_size_set(d.img, WIDTH, HEIGHT);
+ efl_gfx_size_set(d.img, EINA_SIZE2D(WIDTH, HEIGHT));
efl_gfx_visible_set(d.img, EINA_TRUE);
printf("Image object added, class name is: %s\n",
efl_class_name_get(d.img));
@@ -223,7 +223,7 @@ main(void)
efl_image_border_set(d.clipper_border, 3, 3, 3, 3);
efl_image_border_center_fill_set(d.clipper_border, EFL_GFX_BORDER_FILL_MODE_NONE);
efl_gfx_position_set(d.clipper_border, EINA_POSITION2D((WIDTH / 4) -3, (HEIGHT / 4) - 3));
- efl_gfx_size_set(d.clipper_border, (WIDTH / 2) + 6, (HEIGHT / 2) + 6);
+ efl_gfx_size_set(d.clipper_border, EINA_SIZE2D((WIDTH / 2) + 6, (HEIGHT / 2) + 6));
efl_gfx_visible_set(d.clipper_border, EINA_TRUE);
}
@@ -233,7 +233,7 @@ main(void)
d.clipper = efl_add(EFL_CANVAS_RECTANGLE_CLASS, d.canvas);
efl_gfx_position_set(d.clipper, EINA_POSITION2D(WIDTH / 4, HEIGHT / 4));
- efl_gfx_size_set(d.clipper, WIDTH / 2, HEIGHT / 2);
+ efl_gfx_size_set(d.clipper, EINA_SIZE2D(WIDTH / 2, HEIGHT / 2));
efl_gfx_visible_set(d.clipper, EINA_TRUE);
efl_canvas_object_clip_set(d.img, d.clipper);
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index b5020c9cf7..16d30218b5 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -1495,7 +1495,7 @@ _edje_part_recalc_single_textblock_min_max_calc_legacy(Edje_Real_Part *ep,
tw = th = 0;
if (!chosen_desc->text.min_x)
{
- efl_gfx_size_set(ep->object, TO_INT(params->eval.w), TO_INT(params->eval.h));
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(TO_INT(params->eval.w), TO_INT(params->eval.h)));
efl_canvas_text_size_formatted_get(ep->object, &tw, &th);
}
else
@@ -1521,7 +1521,7 @@ _edje_part_recalc_single_textblock_min_max_calc_legacy(Edje_Real_Part *ep,
tw = th = 0;
if (!chosen_desc->text.max_x)
{
- efl_gfx_size_set(ep->object, TO_INT(params->eval.w), TO_INT(params->eval.h));
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(TO_INT(params->eval.w), TO_INT(params->eval.h)));
efl_canvas_text_size_formatted_get(ep->object, &tw, &th);
}
else
@@ -1595,7 +1595,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
* don't get meaningless height for multiline */
if (temp_w > 0)
{
- efl_gfx_size_set(ep->object, temp_w, temp_h);
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
efl_canvas_text_size_formatted_get(ep->object, &tw, &th);
tw += ins_l + ins_r;
@@ -1633,7 +1633,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
temp_h = *maxh;
}
- efl_gfx_size_set(ep->object, temp_w, temp_h);
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
efl_canvas_text_size_formatted_get(ep->object, &tw, &th);
tw += ins_l + ins_r;
@@ -1718,7 +1718,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
* don't get meaningless height for multiline */
if (temp_w > 0)
{
- efl_gfx_size_set(ep->object, temp_w, temp_h);
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
efl_canvas_text_size_formatted_get(ep->object, &tw, &th);
tw += ins_l + ins_r;
@@ -1776,7 +1776,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
/* text.min: 0 0
* text.max: 1 1 */
- efl_gfx_size_set(ep->object, temp_w, temp_h);
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
efl_canvas_text_size_formatted_get(ep->object, &tw, &th);
tw += ins_l + ins_r;
@@ -1802,8 +1802,8 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
if (min_calc_w > temp_w)
temp_w = min_calc_w;
- efl_gfx_size_get(ep->object, NULL, &temp_h);
- efl_gfx_size_set(ep->object, temp_w, temp_h);
+ temp_h = efl_gfx_size_get(ep->object).h;
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
efl_canvas_text_size_formatted_get(ep->object, &tw, &th);
tw += ins_l + ins_r;
@@ -2061,6 +2061,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
*/
{
int mw, mh, size;
+ Eina_Size2D sz;
char *sfont = NULL;
_edje_text_class_font_get(ed, desc, &size, &sfont);
@@ -2077,7 +2078,9 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
return;
// Note: No need to add padding to that, it's already in the geometry
- efl_gfx_size_get(ep->object, &mw, &mh);
+ sz = efl_gfx_size_get(ep->object);
+ mw = sz.w;
+ mh = sz.h;
if (chosen_desc->text.max_x)
{
@@ -2243,7 +2246,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
evas_obj_text_style_set(ep->object, style);
evas_obj_text_set(ep->object, text);
- efl_gfx_size_get(ep->object, &tw, &th);
+ EINA_SIZE2D(tw, th) = efl_gfx_size_get(ep->object);
if (chosen_desc->text.max_x)
{
int l, r;
@@ -5244,7 +5247,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
case EDJE_PART_TYPE_EXTERNAL:
/* visibility and color have no meaning on SWALLOW and GROUP part. */
#ifdef HAVE_EPHYSICS
- efl_gfx_size_set(ep->object, pf->final.w, pf->final.h);
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(pf->final.w, pf->final.h));
if ((ep->part->physics_body) && (!ep->body))
{
if (_edje_physics_world_geometry_check(ed->world))
@@ -5267,13 +5270,13 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
efl_gfx_position_set(ep->object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y));
#else
efl_gfx_position_set(ep->object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y));
- efl_gfx_size_set(ep->object, pf->final.w, pf->final.h);
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(pf->final.w, pf->final.h));
#endif
if (ep->nested_smart) /* Move, Resize all nested parts */
{ /* Not really needed but will improve the bounding box evaluation done by Evas */
efl_gfx_position_set(ep->nested_smart, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y));
- efl_gfx_size_set(ep->nested_smart, pf->final.w, pf->final.h);
+ efl_gfx_size_set(ep->nested_smart, EINA_SIZE2D(pf->final.w, pf->final.h));
}
if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
_edje_entry_real_part_configure(ed, ep);
@@ -5308,16 +5311,16 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
Evas_Canvas3D_Camera *camera = NULL;
Edje_Part_Description_Camera *pd_camera;
- efl_gfx_size_set(ep->object, pf->req.w, pf->req.h);
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(pf->req.w, pf->req.h));
pd_camera = (Edje_Part_Description_Camera*) ep->chosen_description;
efl_gfx_position_set(ep->object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y)),
- efl_gfx_size_set(ep->object, pf->final.w, pf->final.h);
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(pf->final.w, pf->final.h));
viewport = evas_object_image_source_get(ep->object);
- efl_gfx_size_set(viewport, pf->req.w, pf->req.h);
+ efl_gfx_size_set(viewport, EINA_SIZE2D(pf->req.w, pf->req.h));
evas_object_image_source_visible_set(ep->object, EINA_FALSE);
evas_object_image_source_events_set(ep->object, EINA_TRUE);
@@ -5564,7 +5567,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
if (ep->part->type == EDJE_PART_TYPE_GROUP)
vis = evas_object_visible_get(ed->obj);
efl_gfx_position_set(ep->typedata.swallow->swallowed_object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y));
- efl_gfx_size_set(ep->typedata.swallow->swallowed_object, pf->final.w, pf->final.h);
+ efl_gfx_size_set(ep->typedata.swallow->swallowed_object, EINA_SIZE2D(pf->final.w, pf->final.h));
efl_gfx_visible_set(ep->typedata.swallow->swallowed_object, vis);
}
else evas_object_hide(ep->typedata.swallow->swallowed_object);
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index bd25e58101..8f1c219f99 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -262,19 +262,19 @@ _edje_limit_get(Edje *ed, Edje_Limit **limits, unsigned int length, Evas_Coord s
}
EOLIAN static void
-_edje_object_efl_gfx_size_set(Eo *obj, Edje *ed, Evas_Coord w, Evas_Coord h)
+_edje_object_efl_gfx_size_set(Eo *obj, Edje *ed, 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 ((w == ed->w) && (h == ed->h)) goto super;
+ if ((sz.w == ed->w) && (sz.h == ed->h)) goto super;
if (ed->collection)
{
- _edje_limit_get(ed, ed->collection->limits.horizontal, ed->collection->limits.horizontal_count, ed->w, w);
- _edje_limit_get(ed, ed->collection->limits.vertical, ed->collection->limits.vertical_count, ed->h, h);
+ _edje_limit_get(ed, ed->collection->limits.horizontal, ed->collection->limits.horizontal_count, ed->w, sz.w);
+ _edje_limit_get(ed, ed->collection->limits.vertical, ed->collection->limits.vertical_count, ed->h, sz.h);
}
- ed->w = w;
- ed->h = h;
+ ed->w = sz.w;
+ ed->h = sz.h;
#ifdef HAVE_EPHYSICS
if ((ed->collection) && (ed->world))
{
@@ -298,7 +298,7 @@ _edje_object_efl_gfx_size_set(Eo *obj, Edje *ed, Evas_Coord w, Evas_Coord h)
_edje_emit(ed, "resize", NULL);
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/edje/edje_text.c b/src/lib/edje/edje_text.c
index bb90d17f79..3144a9e264 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -21,7 +21,11 @@ static inline void
part_get_geometry(Edje_Real_Part *rp, Evas_Coord *w, Evas_Coord *h)
{
if (!rp->part->use_alternate_font_metrics)
- efl_gfx_size_get(rp->object, w, h);
+ {
+ Eina_Size2D sz = efl_gfx_size_get(rp->object);
+ if (w) *w = sz.w;
+ if (h) *h = sz.h;
+ }
else
{
if (w) *w = evas_object_text_horiz_advance_get(rp->object);
@@ -139,7 +143,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
evas_obj_text_ellipsis_set(ep->object, params->type.text->ellipsis);
efl_text_properties_font_set(ep->object, font, size);
efl_text_set(ep->object, text);
- efl_gfx_size_set(ep->object, sw, sh);
+ efl_gfx_size_set(ep->object, EINA_SIZE2D(sw, sh));
return text;
}
diff --git a/src/lib/efl/interfaces/efl_gfx.eo b/src/lib/efl/interfaces/efl_gfx.eo
index 02a92097ab..fe8ea35a1c 100644
--- a/src/lib/efl/interfaces/efl_gfx.eo
+++ b/src/lib/efl/interfaces/efl_gfx.eo
@@ -22,7 +22,7 @@ interface Efl.Gfx {
[[Retrieves the position of the given canvas object.]]
}
values {
- pos: Eina.Position2D; [[A 2D pixel coordinate.]]
+ pos: Eina.Position2D; [[A 2D coordinate in pixel units.]]
}
}
@property size {
@@ -40,8 +40,7 @@ interface Efl.Gfx {
[[Retrieves the (rectangular) size of the given Evas object.]]
}
values {
- w: int; [[Width]]
- h: int; [[Height]]
+ size: Eina.Size2D; [[A 2D size in pixel units.]]
}
}
@property geometry {
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;
}
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 549f82a79e..0cdbaaebd0 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -1956,27 +1956,27 @@ _efl_canvas_video_efl_canvas_group_group_del(Evas_Object *obj EINA_UNUSED, Efl_C
EOLIAN static void
_efl_canvas_video_efl_gfx_position_set(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Eina_Position2D pos)
{
- int w, h;
+ Eina_Size2D sz;
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_size_get(obj, &w, &h);
efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
- _clipper_position_size_update(obj, pos.x, pos.y, w, h, sd->video.w, sd->video.h);
+ sz = efl_gfx_size_get(obj);
+ _clipper_position_size_update(obj, pos.x, pos.y, sz.w, sz.h, sd->video.w, sd->video.h);
}
EOLIAN static void
-_efl_canvas_video_efl_gfx_size_set(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Evas_Coord w, Evas_Coord h)
+_efl_canvas_video_efl_gfx_size_set(Evas_Object *obj, Efl_Canvas_Video_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);
- _efl_canvas_video_aspect_border_apply(obj, sd, w, h);
- evas_object_resize(sd->bg, w, h);
+ _efl_canvas_video_aspect_border_apply(obj, sd, sz.w, sz.h);
+ evas_object_resize(sd->bg, sz.w, sz.h);
}
/* Internal EO APIs and hidden overrides */
diff --git a/src/lib/evas/canvas/efl_canvas_object_event_grabber.c b/src/lib/evas/canvas/efl_canvas_object_event_grabber.c
index 590a3f41e4..ddf31c90ba 100644
--- a/src/lib/evas/canvas/efl_canvas_object_event_grabber.c
+++ b/src/lib/evas/canvas/efl_canvas_object_event_grabber.c
@@ -281,10 +281,10 @@ _efl_canvas_object_event_grabber_efl_gfx_position_set(Eo *eo_obj, Efl_Object_Eve
}
EOLIAN static void
-_efl_canvas_object_event_grabber_efl_gfx_size_set(Eo *eo_obj, Efl_Object_Event_Grabber_Data *pd, int w, int h)
+_efl_canvas_object_event_grabber_efl_gfx_size_set(Eo *eo_obj, Efl_Object_Event_Grabber_Data *pd, Eina_Size2D sz)
{
- efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), w, h);
- efl_gfx_size_set(pd->rect, w, h);
+ efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), sz);
+ efl_gfx_size_set(pd->rect, sz);
}
EOLIAN static Eina_Bool
diff --git a/src/lib/evas/canvas/efl_gfx_map.c b/src/lib/evas/canvas/efl_gfx_map.c
index f44d1b4551..9d5dc40c6b 100644
--- a/src/lib/evas/canvas/efl_gfx_map.c
+++ b/src/lib/evas/canvas/efl_gfx_map.c
@@ -277,7 +277,7 @@ _map_calc(Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Map_Data *pd)
if (pivot->is_evas)
evas_output_size_get(pivot->eo_obj, &pivot->geometry.w, &pivot->geometry.h);
else
- efl_gfx_size_get(pivot->eo_obj, &pivot->geometry.w, &pivot->geometry.h);
+ pivot->geometry.size = efl_gfx_size_get(pivot->eo_obj);
pivot->geometry.x = 0;
pivot->geometry.y = 0;
}
diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c
index adae4b2a16..abda3fa377 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -432,12 +432,12 @@ _evas_box_efl_canvas_group_group_del(Eo *o, Evas_Object_Box_Data *priv)
}
EOLIAN static void
-_evas_box_efl_gfx_size_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
+_evas_box_efl_gfx_size_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Eina_Size2D sz)
{
- if (_evas_object_intercept_call(o, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call(o, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
- efl_gfx_size_set(efl_super(o, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(o, MY_CLASS), sz);
evas_object_smart_changed(o);
}
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 05b7ca09d3..9b6871743e 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -599,10 +599,10 @@ _efl_canvas_image_internal_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Dat
evas_object_image_filled_resize_listener);
else
{
- Evas_Coord w, h;
+ Eina_Size2D sz;
- efl_gfx_size_get(eo_obj, &w, &h);
- _evas_image_fill_set(eo_obj, o, 0, 0, w, h);
+ sz = efl_gfx_size_get(eo_obj);
+ _evas_image_fill_set(eo_obj, o, 0, 0, sz.w, sz.h);
evas_object_event_callback_add(eo_obj, EVAS_CALLBACK_RESIZE,
evas_object_image_filled_resize_listener,
@@ -3519,12 +3519,12 @@ static void
evas_object_image_filled_resize_listener(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *einfo EINA_UNUSED)
{
Evas_Image_Data *o = efl_data_scope_get(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
- Evas_Coord w, h;
+ Eina_Size2D sz;
- efl_gfx_size_get(obj, &w, &h);
- if (w < 1) w = 1;
- if (h < 1) h = 1;
- _evas_image_fill_set(obj, o, 0, 0, w, h);
+ sz = efl_gfx_size_get(obj);
+ if (sz.w < 1) sz.w = 1;
+ if (sz.h < 1) sz.h = 1;
+ _evas_image_fill_set(obj, o, 0, 0, sz.w, sz.h);
}
Eina_Bool
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index f21fea1e17..948df29faa 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1159,7 +1159,7 @@ EOLIAN static void
_efl_canvas_object_efl_gfx_geometry_set(Eo *obj, Evas_Object_Protected_Data *pd EINA_UNUSED, Eina_Rect r)
{
efl_gfx_position_set(obj, r.pos);
- efl_gfx_size_set(obj, r.w, r.h);
+ efl_gfx_size_set(obj, EINA_SIZE2D(r.w, r.h));
}
EAPI void
@@ -1239,7 +1239,7 @@ _efl_canvas_object_efl_gfx_position_set(Eo *eo_obj, Evas_Object_Protected_Data *
EAPI void
evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
- efl_gfx_size_set((Evas_Object *)obj, w, h);
+ efl_gfx_size_set((Evas_Object *)obj, EINA_SIZE2D(w, h));
}
Eina_Bool
@@ -1264,16 +1264,16 @@ _efl_canvas_object_efl_gfx_size_set_block(Eo *eo_obj, Evas_Object_Protected_Data
EOLIAN static void
_efl_canvas_object_efl_gfx_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
- Evas_Coord w, Evas_Coord h)
+ Eina_Size2D sz)
{
Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
Eina_Bool source_invisible = EINA_FALSE;
Eina_List *was = NULL;
- if (w < 0) w = 0;
- if (h < 0) h = 0;
+ if (sz.w < 0) sz.w = 0;
+ if (sz.h < 0) sz.h = 0;
- if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 1, w, h))
+ if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 1, sz.w, sz.h))
return;
if (!(obj->layer->evas->is_frozen))
@@ -1288,12 +1288,12 @@ _efl_canvas_object_efl_gfx_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
obj->doing.in_resize++;
if (obj->is_smart && obj->smart.smart && obj->smart.smart->smart_class->resize)
- obj->smart.smart->smart_class->resize(eo_obj, w, h);
+ obj->smart.smart->smart_class->resize(eo_obj, sz.w, sz.h);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
- state_write->geometry.w = w;
- state_write->geometry.h = h;
+ state_write->geometry.w = sz.w;
+ state_write->geometry.h = sz.h;
}
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
@@ -1343,20 +1343,14 @@ _efl_canvas_object_efl_gfx_position_get(Eo *obj EINA_UNUSED,
return ((Eina_Rect) pd->cur->geometry).pos;
}
-EOLIAN static void
+EOLIAN static Eina_Size2D
_efl_canvas_object_efl_gfx_size_get(Eo *obj EINA_UNUSED,
- Evas_Object_Protected_Data *pd,
- Evas_Coord *w, Evas_Coord *h)
+ Evas_Object_Protected_Data *pd)
{
if (pd->delete_me)
- {
- if (w) *w = 0;
- if (h) *h = 0;
- return;
- }
+ return EINA_SIZE2D(0, 0);
- if (w) *w = pd->cur->geometry.w;
- if (h) *h = pd->cur->geometry.h;
+ return ((Eina_Rect) pd->cur->geometry).size;
}
static void
diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c
index bd4c2cc668..9c65276b86 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -934,12 +934,12 @@ _evas_table_efl_canvas_group_group_del(Eo *obj, Evas_Table_Data *priv)
}
EOLIAN static void
-_evas_table_efl_gfx_size_set(Eo *obj, Evas_Table_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
+_evas_table_efl_gfx_size_set(Eo *obj, Evas_Table_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);
evas_object_smart_changed(obj);
}
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index fc30c74e90..6704bd3239 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -998,17 +998,17 @@ _evas_object_text_layout(Evas_Object *eo_obj, Evas_Text_Data *o, Eina_Unicode *t
}
EOLIAN static void
-_evas_text_efl_gfx_size_set(Eo *eo_obj, Evas_Text_Data *o, int w, int h)
+_evas_text_efl_gfx_size_set(Eo *eo_obj, Evas_Text_Data *o, Eina_Size2D sz)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
- if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
+ if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
return;
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
- state_write->geometry.w = w;
- state_write->geometry.h = h;
+ state_write->geometry.w = sz.w;
+ state_write->geometry.h = sz.h;
}
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
@@ -1326,7 +1326,7 @@ _evas_text_style_set(Eo *eo_obj, Evas_Text_Data *o, Evas_Text_Style_Type style)
if (o->items) w = obj->cur->geometry.w + (l - pl) + (r - pr);
h = obj->cur->geometry.h + (t - pt) + (b - pb);
- efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), w, h);
+ efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), EINA_SIZE2D(w, h));
evas_object_change(eo_obj, obj);
}
@@ -2314,11 +2314,11 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
int min;
min = w + l + r < obj->cur->geometry.w || obj->cur->geometry.w == 0 ? w + l + r : obj->cur->geometry.w;
- efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), min, h + t + b);
+ efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), EINA_SIZE2D(min, h + t + b));
}
else
{
- efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), w + l + r, h + t + b);
+ efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), EINA_SIZE2D(w + l + r, h + t + b));
}
//// obj->cur->cache.geometry.validity = 0;
}
@@ -2326,7 +2326,7 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
{
int t = 0, b = 0, l = 0, r = 0;
_evas_object_text_pad_get(eo_obj, o, &l, &r, &t, &b);
- efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), 0, o->max_ascent + o->max_descent + t + b);
+ efl_gfx_size_set(efl_super(eo_obj, MY_CLASS), EINA_SIZE2D(0, o->max_ascent + o->max_descent + t + b));
//// obj->cur->cache.geometry.validity = 0;
}
o->last_computed.w = obj->cur->geometry.w;
diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c
index f983f8d8ca..a7077abf37 100644
--- a/src/lib/evas/canvas/evas_vg_node.c
+++ b/src/lib/evas/canvas/evas_vg_node.c
@@ -185,24 +185,21 @@ _efl_vg_mask_get(Eo *obj EINA_UNUSED, Efl_VG_Data *pd)
return pd->mask;
}
-static void
-_efl_vg_efl_gfx_size_get(Eo *obj,
- Efl_VG_Data *pd EINA_UNUSED,
- int *w, int *h)
+static Eina_Size2D
+_efl_vg_efl_gfx_size_get(Eo *obj, Efl_VG_Data *pd EINA_UNUSED)
{
Eina_Rect r;
efl_vg_bounds_get(obj, &r);
- if (w) *w = r.w;
- if (h) *h = r.h;
+ return r.size;
}
EOLIAN static Eina_Rect
_efl_vg_efl_gfx_geometry_get(Eo *obj, Efl_VG_Data *pd EINA_UNUSED)
{
- Eina_Rect r = EINA_RECT_ZERO();
+ Eina_Rect r;
r.pos = efl_gfx_position_get(obj);
- efl_gfx_size_get(obj, &r.w, &r.h);
+ r.size = efl_gfx_size_get(obj);
return r;
}
@@ -808,16 +805,18 @@ evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h)
{
Eina_Rect r;
r.pos = efl_gfx_position_get(obj);
- efl_gfx_size_get(obj, w, h);
+ r.size = efl_gfx_size_get(obj);
if (x) *x = r.x;
if (y) *y = r.y;
+ if (w) *w = r.w;
+ if (h) *h = r.h;
}
EAPI void
evas_vg_node_geometry_set(Eo *obj, int x, int y, int w, int h)
{
efl_gfx_position_set(obj, EINA_POSITION2D(x, y));
- efl_gfx_size_set(obj, w, h);
+ efl_gfx_size_set(obj, EINA_SIZE2D(w, h));
}
EAPI void
diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c
index 478f5efcf4..392da564c6 100644
--- a/src/tests/elementary/elm_test_win.c
+++ b/src/tests/elementary/elm_test_win.c
@@ -377,7 +377,7 @@ START_TEST (efl_ui_win_multi_touch_inputs)
win = elm_win_add(NULL, "win", ELM_WIN_BASIC);
elm_win_autohide_set(win, EINA_TRUE);
efl_gfx_visible_set(win, EINA_TRUE);
- efl_gfx_size_set(win, 100, 100);
+ efl_gfx_size_set(win, EINA_SIZE2D(100, 100));
ecore_timer_add(_timeout1, _inputs_timer1_cb, win);
ecore_timer_add(_timeout2, _inputs_timer2_cb, win);
diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c
index 9663ab719e..fae86ccaed 100644
--- a/src/tests/emotion/emotion_test_main-eo.c
+++ b/src/tests/emotion/emotion_test_main-eo.c
@@ -76,7 +76,7 @@ static const char *theme_file = NULL;
static void
bg_resize(Evas_Coord w, Evas_Coord h)
{
- efl_gfx_size_set(o_bg, w, h);
+ efl_gfx_size_set(o_bg, EINA_SIZE2D(w, h));
}
static void
@@ -114,7 +114,7 @@ bg_setup(void)
o_bg = efl_add(EDJE_OBJECT_CLASS, evas);
efl_file_set(o_bg, theme_file, "background");
efl_gfx_position_set(o_bg, EINA_POSITION2D(0, 0));
- efl_gfx_size_set(o_bg, startw, starth);
+ efl_gfx_size_set(o_bg, EINA_SIZE2D(startw, starth));
efl_gfx_stack_layer_set(o_bg, -999);
efl_gfx_visible_set(o_bg, EINA_TRUE);
evas_object_focus_set(o_bg, EINA_TRUE);
@@ -354,7 +354,7 @@ video_obj_frame_resize_cb(void *data, const Efl_Event *event)
evas_object_size_hint_min_set(event->object, iw, ih);
edje_object_part_swallow(oe, "video_swallow", event->object);
edje_object_size_min_calc(oe, &w, &h);
- efl_gfx_size_set(oe, w, h);
+ efl_gfx_size_set(oe, EINA_SIZE2D(w, h));
evas_object_size_hint_min_set(event->object, 0, 0);
edje_object_part_swallow(oe, "video_swallow", event->object);
}
@@ -566,11 +566,12 @@ video_obj_signal_frame_move_cb(void *data EINA_UNUSED, Evas_Object *o, const cha
}
else if (fd->resizing)
{
- Evas_Coord x, y, ow, oh;
+ Evas_Coord x, y;
+ Eina_Size2D sz;
evas_canvas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
- efl_gfx_size_get(o, &ow, &oh);
- evas_object_resize(o, ow + (x - fd->x), oh + (y - fd->y));
+ sz = efl_gfx_size_get(o);
+ evas_object_resize(o, sz.w + (x - fd->x), sz.h + (y - fd->y));
fd->x = x;
fd->y = y;
}
@@ -629,7 +630,7 @@ init_video_object(const char *module_filename, const char *filename)
offset = 20 * (eina_list_count(video_objs) - 1);
efl_gfx_position_set(oe, EINA_POSITION2D(offset, offset));
edje_object_size_min_calc(oe, &w, &h);
- efl_gfx_size_set(oe, w, h);
+ efl_gfx_size_set(oe, EINA_SIZE2D(w, h));
efl_event_callback_array_add(o, emotion_object_test_callbacks(), oe);
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index 57cc36efbb..153e2bbd73 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -4401,7 +4401,7 @@ START_TEST(efl_canvas_text_cursor)
/*01234 5 6789012345678 19 01234 */
efl_text_set(tb, "тest \u202bנסיוןabcנסיון\u202c bang");
efl_canvas_text_size_native_get(tb, &nw, &nh);
- efl_gfx_size_set(tb, nw, nh);
+ efl_gfx_size_set(tb, EINA_SIZE2D(nw, nh));
/* Logical cursor after "test " */
evas_textblock_cursor_pos_set(cur, 6);