summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-13 16:49:04 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-13 18:03:34 +0900
commit13da5e980eb43288b9b9f502cb6a7a000e1f26ea (patch)
treee37670643988bb990b3101257332c490a2e21131 /src
parent0c46fc71033edda92f4e86b86f6d1d62751f8998 (diff)
efl_gfx: Use Eina.Rectangle for geometry (EO)
This saves a few lines already (without even having the proper helpers for stack rectangles).
Diffstat (limited to 'src')
-rw-r--r--src/bin/elementary/test_evas_map.c2
-rw-r--r--src/bin/elementary/test_photocam.c9
-rw-r--r--src/bin/elementary/test_ui_box.c18
-rw-r--r--src/examples/evas/evas-3d-cube-rotate.c2
-rw-r--r--src/examples/evas/evas-map-utils-eo.c9
-rw-r--r--src/lib/edje/edje_part.c22
-rw-r--r--src/lib/edje/edje_private.h7
-rw-r--r--src/lib/efl/interfaces/efl_gfx.eo6
-rw-r--r--src/lib/elementary/efl_ui_textpath.c21
-rw-r--r--src/lib/elementary/efl_ui_win.c21
-rw-r--r--src/lib/elementary/elm_menu.c4
-rw-r--r--src/lib/elementary/elm_widget.c6
-rw-r--r--src/lib/evas/canvas/efl_gfx_map.c4
-rw-r--r--src/lib/evas/canvas/evas_object_image.c4
-rw-r--r--src/lib/evas/canvas/evas_object_main.c30
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c11
-rw-r--r--src/tests/elementary/elm_test_focus_common.c10
17 files changed, 82 insertions, 104 deletions
diff --git a/src/bin/elementary/test_evas_map.c b/src/bin/elementary/test_evas_map.c
index 7f4e8481e7..5a7bfe4374 100644
--- a/src/bin/elementary/test_evas_map.c
+++ b/src/bin/elementary/test_evas_map.c
@@ -41,7 +41,7 @@ _image_resize_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj,
41{ 41{
42 Evas_Coord w, h; 42 Evas_Coord w, h;
43 43
44 efl_gfx_geometry_get(obj, NULL, NULL, &w, &h); 44 efl_gfx_size_get(obj, &w, &h);
45 _map_set(obj, w, h); 45 _map_set(obj, w, h);
46} 46}
47 47
diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c
index 490255b6da..c7a8ea2c34 100644
--- a/src/bin/elementary/test_photocam.c
+++ b/src/bin/elementary/test_photocam.c
@@ -763,12 +763,11 @@ _zoomable_clicked_cb(void *data EINA_UNUSED, const Efl_Event *ev)
763static void 763static void
764_zoomable_move_resize_cb(void *data, const Efl_Event *ev) 764_zoomable_move_resize_cb(void *data, const Efl_Event *ev)
765{ 765{
766 int x, y, w, h; 766 Eina_Rectangle r;
767
768 efl_gfx_geometry_get(ev->object, &x, &y, &w, &h);
769 767
770 efl_gfx_size_set(data, w, h); 768 r = efl_gfx_geometry_get(ev->object);
771 efl_gfx_position_set(data, x, y); 769 efl_gfx_size_set(data, r.w, r.h);
770 efl_gfx_position_set(data, r.x, r.y);
772} 771}
773 772
774static void 773static void
diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c
index 1929369c52..7d8d33b3f6 100644
--- a/src/bin/elementary/test_ui_box.c
+++ b/src/bin/elementary/test_ui_box.c
@@ -170,7 +170,7 @@ _custom_layout_update(Eo *pack, const void *data EINA_UNUSED)
170{ 170{
171 Eina_Iterator *it = efl_content_iterate(pack); 171 Eina_Iterator *it = efl_content_iterate(pack);
172 int count = efl_content_count(pack), i = 0; 172 int count = efl_content_count(pack), i = 0;
173 int px, py, pw, ph; 173 Eina_Rectangle rp;
174 Eo *sobj; 174 Eo *sobj;
175 175
176 // Note: This is a TERRIBLE layout. Just an example of the API, not showing 176 // Note: This is a TERRIBLE layout. Just an example of the API, not showing
@@ -178,16 +178,18 @@ _custom_layout_update(Eo *pack, const void *data EINA_UNUSED)
178 178
179 if (!count) return; 179 if (!count) return;
180 180
181 efl_gfx_geometry_get(pack, &px, &py, &pw, &ph); 181 rp = efl_gfx_geometry_get(pack);
182 EINA_ITERATOR_FOREACH(it, sobj) 182 EINA_ITERATOR_FOREACH(it, sobj)
183 { 183 {
184 int x, y, h, w, mw, mh; 184 Eina_Rectangle r;
185 int mw, mh;
186
185 efl_gfx_size_hint_combined_min_get(sobj, &mw, &mh); 187 efl_gfx_size_hint_combined_min_get(sobj, &mw, &mh);
186 x = (pw / count) * i; 188 r.x = (rp.w / count) * i;
187 y = (ph / count) * i; 189 r.y = (rp.h / count) * i;
188 w = mw; 190 r.w = mw;
189 h = mh; 191 r.h = mh;
190 efl_gfx_geometry_set(sobj, x + px, y + py, w, h); 192 efl_gfx_geometry_set(sobj, r);
191 i++; 193 i++;
192 } 194 }
193 eina_iterator_free(it); 195 eina_iterator_free(it);
diff --git a/src/examples/evas/evas-3d-cube-rotate.c b/src/examples/evas/evas-3d-cube-rotate.c
index 79ff7932a3..8ddd326da0 100644
--- a/src/examples/evas/evas-3d-cube-rotate.c
+++ b/src/examples/evas/evas-3d-cube-rotate.c
@@ -262,7 +262,7 @@ main(void)
262 262
263 /* Add an image object for 3D scene rendering. */ 263 /* Add an image object for 3D scene rendering. */
264 image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas); 264 image = efl_add(EFL_CANVAS_SCENE3D_CLASS, evas);
265 efl_gfx_geometry_set(image, 0, 0, WIDTH, HEIGHT); 265 efl_gfx_geometry_set(image, (Eina_Rectangle) { 0, 0, WIDTH, HEIGHT });
266 evas_object_show(image); 266 evas_object_show(image);
267 267
268 /* Set the image object as render target for 3D scene. */ 268 /* 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 36912eb71c..2c701a03ac 100644
--- a/src/examples/evas/evas-map-utils-eo.c
+++ b/src/examples/evas/evas-map-utils-eo.c
@@ -70,7 +70,8 @@ _anim_cb(void *data)
70{ 70{
71 App_Data *ad = data; 71 App_Data *ad = data;
72 Evas_Object *o; 72 Evas_Object *o;
73 int r, g, b, a, x, y, w, h, f; 73 Eina_Rectangle r;
74 int r, g, b, a, f;
74 int win_w, win_h, mx, my; 75 int win_w, win_h, mx, my;
75 76
76 f = ad->frame; 77 f = ad->frame;
@@ -127,12 +128,12 @@ _anim_cb(void *data)
127 128
128 129
129 o = evas_object_name_find(ad->canvas, "obj4"); 130 o = evas_object_name_find(ad->canvas, "obj4");
130 efl_gfx_geometry_get(o, &x, &y, &w, &h); 131 r = efl_gfx_geometry_get(o);
131 efl_gfx_map_reset(o); 132 efl_gfx_map_reset(o);
132 efl_gfx_map_smooth_set(o, ad->smooth); 133 efl_gfx_map_smooth_set(o, ad->smooth);
133 efl_gfx_map_alpha_set(o, ad->alpha); 134 efl_gfx_map_alpha_set(o, ad->alpha);
134 efl_gfx_map_coord_absolute_set(o, 0, x, y + h, 0); 135 efl_gfx_map_coord_absolute_set(o, 0, r.x, r.y + r.h, 0);
135 efl_gfx_map_coord_absolute_set(o, 1, x + w, y + h, 0); 136 efl_gfx_map_coord_absolute_set(o, 1, r.x + r.w, r.y + r.h, 0);
136 efl_gfx_map_coord_absolute_set(o, 2, win_w - 10, win_h - 30, 0); 137 efl_gfx_map_coord_absolute_set(o, 2, win_w - 10, win_h - 30, 0);
137 efl_gfx_map_coord_absolute_set(o, 3, (win_w / 2) + 10, win_h - 30, 0); 138 efl_gfx_map_coord_absolute_set(o, 3, (win_w / 2) + 10, win_h - 30, 0);
138 efl_gfx_map_uv_set(o, 0, 0, 1); 139 efl_gfx_map_uv_set(o, 0, 0, 1);
diff --git a/src/lib/edje/edje_part.c b/src/lib/edje/edje_part.c
index 061df2120e..b9790d8e5d 100644
--- a/src/lib/edje/edje_part.c
+++ b/src/lib/edje/edje_part.c
@@ -100,27 +100,17 @@ _efl_canvas_layout_part_efl_object_finalize(Eo *obj, Efl_Canvas_Layout_Part_Data
100 return efl_finalize(efl_super(obj, MY_CLASS)); 100 return efl_finalize(efl_super(obj, MY_CLASS));
101} 101}
102 102
103EOLIAN void 103EOLIAN Eina_Rectangle
104_efl_canvas_layout_part_efl_gfx_geometry_get(Eo *obj, Efl_Canvas_Layout_Part_Data *pd, int *x, int *y, int *w, int *h) 104_efl_canvas_layout_part_efl_gfx_geometry_get(Eo *obj, Efl_Canvas_Layout_Part_Data *pd)
105{ 105{
106 Edje_Real_Part *rp = pd->rp; 106 Edje_Real_Part *rp = pd->rp;
107 PROXY_CALL_BEGIN(pd); 107 Eina_Rectangle r = { 0, };
108 108
109 PROXY_CALL_BEGIN(pd);
109 _edje_recalc_do(pd->ed); 110 _edje_recalc_do(pd->ed);
110 if (!rp) 111 if (!rp) RETURN_VAL(r);
111 {
112 if (x) *x = 0;
113 if (y) *y = 0;
114 if (w) *w = 0;
115 if (h) *h = 0;
116 RETURN_VOID;
117 }
118 112
119 if (x) *x = rp->x; 113 RETURN_VAL(rp->rect);
120 if (y) *y = rp->y;
121 if (w) *w = rp->w;
122 if (h) *h = rp->h;
123 RETURN_VOID;
124} 114}
125 115
126EOLIAN static void 116EOLIAN static void
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 89867977a1..b98e02af13 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2034,7 +2034,12 @@ struct _Edje_Real_Part
2034 } typedata; // 4 2034 } typedata; // 4
2035 FLOAT_T description_pos; // 8 2035 FLOAT_T description_pos; // 8
2036 Edje_Rectangle req; // 16 2036 Edje_Rectangle req; // 16
2037 int x, y, w, h; // 16 2037 union {
2038 struct {
2039 int x, y, w, h; // 16
2040 };
2041 Eina_Rectangle rect;
2042 };
2038 Evas_Object_Pointer_Mode pointer_mode; 2043 Evas_Object_Pointer_Mode pointer_mode;
2039#ifdef EDJE_CALC_CACHE 2044#ifdef EDJE_CALC_CACHE
2040 unsigned short state; // 2 2045 unsigned short state; // 2
diff --git a/src/lib/efl/interfaces/efl_gfx.eo b/src/lib/efl/interfaces/efl_gfx.eo
index f35fa3fc1b..1670ddc3c6 100644
--- a/src/lib/efl/interfaces/efl_gfx.eo
+++ b/src/lib/efl/interfaces/efl_gfx.eo
@@ -1,3 +1,4 @@
1import eina_types;
1import efl_gfx_types; 2import efl_gfx_types;
2 3
3interface Efl.Gfx { 4interface Efl.Gfx {
@@ -45,10 +46,7 @@ interface Efl.Gfx {
45 @property geometry { 46 @property geometry {
46 [[Rectangular geometry that combines both position and size.]] 47 [[Rectangular geometry that combines both position and size.]]
47 values { 48 values {
48 x: int; [[X coordinate]] 49 rect: Eina.Rectangle; [[The X,Y position and W,H size, in pixels.]]
49 y: int; [[Y coordinate]]
50 w: int; [[Width]]
51 h: int; [[Height]]
52 } 50 }
53 } 51 }
54 @property color { 52 @property color {
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c
index 5eb5ac0ee2..b92331ccd1 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -163,8 +163,8 @@ static void
163_text_on_line_draw(Efl_Ui_Textpath_Data *pd, int w1, int w2, int cmp, Evas_Map *map, Efl_Ui_Textpath_Line line) 163_text_on_line_draw(Efl_Ui_Textpath_Data *pd, int w1, int w2, int cmp, Evas_Map *map, Efl_Ui_Textpath_Line line)
164{ 164{
165 double x1, x2, y1, y2; 165 double x1, x2, y1, y2;
166 Evas_Coord x, y, w, h;
167 double line_len, len, sina, cosa; 166 double line_len, len, sina, cosa;
167 Eina_Rectangle r;
168 168
169 x1 = line.start.x; 169 x1 = line.start.x;
170 y1 = line.start.y; 170 y1 = line.start.y;
@@ -179,23 +179,22 @@ _text_on_line_draw(Efl_Ui_Textpath_Data *pd, int w1, int w2, int cmp, Evas_Map *
179 y2 = y1 + len * (y2 - y1) / line_len; 179 y2 = y1 + len * (y2 - y1) / line_len;
180 } 180 }
181 181
182 efl_gfx_geometry_get(pd->text_obj, &x, &y, &w, &h);
183
184 len = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1)); 182 len = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
185 sina = (y2 - y1) / len; 183 sina = (y2 - y1) / len;
186 cosa = (x2 - x1) / len; 184 cosa = (x2 - x1) / len;
187 185
188 h = h / 2; 186 r = efl_gfx_geometry_get(pd->text_obj);
189 evas_map_point_coord_set(map, cmp + 3, x1 - h * sina, y1 + h * cosa, 0); 187 r.h /= 2;
190 evas_map_point_coord_set(map, cmp + 2, x2 - h * sina, y2 + h * cosa, 0); 188 evas_map_point_coord_set(map, cmp + 3, x1 - r.h * sina, y1 + r.h * cosa, 0);
191 evas_map_point_coord_set(map, cmp + 1, x2 + h * sina, y2 - h * cosa, 0); 189 evas_map_point_coord_set(map, cmp + 2, x2 - r.h * sina, y2 + r.h * cosa, 0);
192 evas_map_point_coord_set(map, cmp + 0, x1 + h * sina, y1 - h * cosa, 0); 190 evas_map_point_coord_set(map, cmp + 1, x2 + r.h * sina, y2 - r.h * cosa, 0);
191 evas_map_point_coord_set(map, cmp + 0, x1 + r.h * sina, y1 - r.h * cosa, 0);
193 192
194 h *= 2; 193 r.h *= 2;
195 evas_map_point_image_uv_set(map, cmp + 0, w1, 0); 194 evas_map_point_image_uv_set(map, cmp + 0, w1, 0);
196 evas_map_point_image_uv_set(map, cmp + 1, w2, 0); 195 evas_map_point_image_uv_set(map, cmp + 1, w2, 0);
197 evas_map_point_image_uv_set(map, cmp + 2, w2, h); 196 evas_map_point_image_uv_set(map, cmp + 2, w2, r.h);
198 evas_map_point_image_uv_set(map, cmp + 3, w1, h); 197 evas_map_point_image_uv_set(map, cmp + 3, w1, r.h);
199} 198}
200 199
201static int 200static int
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 3d0a2d6f09..69401220f4 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1037,26 +1037,25 @@ static void
1037_elm_win_focus_highlight_anim_setup(Efl_Ui_Win_Data *sd, 1037_elm_win_focus_highlight_anim_setup(Efl_Ui_Win_Data *sd,
1038 Evas_Object *obj) 1038 Evas_Object *obj)
1039{ 1039{
1040 Eina_Rectangle rt; 1040 Eina_Rectangle rt, rp;
1041 Evas_Coord px, py, pw, ph;
1042 Edje_Message_Int_Set *m; 1041 Edje_Message_Int_Set *m;
1043 Evas_Object *target = sd->focus_highlight.cur.target; 1042 Evas_Object *target = sd->focus_highlight.cur.target;
1044 1043
1045 evas_object_geometry_get(obj, &px, &py, &pw, &ph); 1044 rp = efl_gfx_geometry_get(obj);
1046 rt = elm_widget_focus_highlight_geometry_get(target); 1045 rt = elm_widget_focus_highlight_geometry_get(target);
1047 efl_gfx_geometry_set(obj, rt.x, rt.y, rt.w, rt.h); 1046 efl_gfx_geometry_set(obj, rt);
1048 1047
1049 if ((px == rt.x) && (py == rt.y) && (pw == rt.w) && (ph == rt.h)) return; 1048 if (eina_rectangle_equal(&rp, &rt)) return;
1050 1049
1051 if (!_elm_config->focus_highlight_clip_disable) 1050 if (!_elm_config->focus_highlight_clip_disable)
1052 evas_object_clip_unset(obj); 1051 evas_object_clip_unset(obj);
1053 1052
1054 m = alloca(sizeof(*m) + (sizeof(int) * 8)); 1053 m = alloca(sizeof(*m) + (sizeof(int) * 8));
1055 m->count = 8; 1054 m->count = 8;
1056 m->val[0] = px - rt.x; 1055 m->val[0] = rp.x - rt.x;
1057 m->val[1] = py - rt.y; 1056 m->val[1] = rp.y - rt.y;
1058 m->val[2] = pw; 1057 m->val[2] = rp.w;
1059 m->val[3] = ph; 1058 m->val[3] = rp.h;
1060 m->val[4] = 0; 1059 m->val[4] = 0;
1061 m->val[5] = 0; 1060 m->val[5] = 0;
1062 m->val[6] = rt.w; 1061 m->val[6] = rt.w;
@@ -1069,10 +1068,8 @@ _elm_win_focus_highlight_simple_setup(Efl_Ui_Win_Data *sd,
1069 Evas_Object *obj) 1068 Evas_Object *obj)
1070{ 1069{
1071 Evas_Object *clip, *target = sd->focus_highlight.cur.target; 1070 Evas_Object *clip, *target = sd->focus_highlight.cur.target;
1072 Eina_Rectangle r;
1073 1071
1074 r = elm_widget_focus_highlight_geometry_get(target); 1072 efl_gfx_geometry_set(obj, elm_widget_focus_highlight_geometry_get(target));
1075 efl_gfx_geometry_set(obj, r.x, r.y, r.w, r.h);
1076 1073
1077 if (!_elm_config->focus_highlight_clip_disable) 1074 if (!_elm_config->focus_highlight_clip_disable)
1078 { 1075 {
diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c
index fee91547a5..76e7ba9d35 100644
--- a/src/lib/elementary/elm_menu.c
+++ b/src/lib/elementary/elm_menu.c
@@ -184,6 +184,7 @@ _sizing_eval(Evas_Object *obj)
184 Elm_Object_Item *eo_item; 184 Elm_Object_Item *eo_item;
185 Evas_Coord x_p, y_p, w_p, h_p, x2, y2, w2, h2, bw, bh; 185 Evas_Coord x_p, y_p, w_p, h_p, x2, y2, w2, h2, bw, bh;
186 Elm_Widget_Smart_Data *hover; 186 Elm_Widget_Smart_Data *hover;
187 Eina_Rectangle r;
187 188
188 ELM_MENU_DATA_GET(obj, sd); 189 ELM_MENU_DATA_GET(obj, sd);
189 190
@@ -210,7 +211,8 @@ _sizing_eval(Evas_Object *obj)
210 if (y_p + h_p + bh > y2 + h2) y_p -= y_p + h_p + bh - (y2 + h2); 211 if (y_p + h_p + bh > y2 + h2) y_p -= y_p + h_p + bh - (y2 + h2);
211 if (y_p < y2) y_p = y2; 212 if (y_p < y2) y_p = y2;
212 213
213 efl_gfx_geometry_set(sd->location, x_p, y_p, bw, h_p); 214 r = (Eina_Rectangle) { x_p, y_p, bw, h_p };
215 efl_gfx_geometry_set(sd->location, r);
214 evas_object_size_hint_min_set(sd->location, bw, h_p); 216 evas_object_size_hint_min_set(sd->location, bw, h_p);
215 evas_object_size_hint_max_set(sd->location, bw, h_p); 217 evas_object_size_hint_max_set(sd->location, bw, h_p);
216 elm_hover_target_set(sd->hv, sd->location); 218 elm_hover_target_set(sd->hv, sd->location);
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index b59f92ee6c..477ce26c6b 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -6515,11 +6515,7 @@ _elm_widget_efl_ui_focus_user_manager_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_
6515EOLIAN static Eina_Rectangle 6515EOLIAN static Eina_Rectangle
6516_elm_widget_efl_ui_focus_object_focus_geometry_get(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED) 6516_elm_widget_efl_ui_focus_object_focus_geometry_get(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
6517{ 6517{
6518 Eina_Rectangle rect; 6518 return efl_gfx_geometry_get(obj);
6519
6520 efl_gfx_geometry_get(obj, &rect.x , &rect.y, &rect.w, &rect.h);
6521
6522 return rect;
6523} 6519}
6524 6520
6525EOLIAN static void 6521EOLIAN static void
diff --git a/src/lib/evas/canvas/efl_gfx_map.c b/src/lib/evas/canvas/efl_gfx_map.c
index bb21a0999c..5f434b76ad 100644
--- a/src/lib/evas/canvas/efl_gfx_map.c
+++ b/src/lib/evas/canvas/efl_gfx_map.c
@@ -269,9 +269,7 @@ _map_calc(Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Map_Data *pd)
269 pivot->changed = EINA_FALSE; 269 pivot->changed = EINA_FALSE;
270 if (!pivot->is_canvas) 270 if (!pivot->is_canvas)
271 { 271 {
272 efl_gfx_geometry_get(pivot->eo_obj, 272 pivot->geometry = efl_gfx_geometry_get(pivot->eo_obj);
273 &pivot->geometry.x, &pivot->geometry.y,
274 &pivot->geometry.w, &pivot->geometry.h);
275 } 273 }
276 else 274 else
277 { 275 {
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 097fb9de5f..e3f428d91b 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -601,7 +601,7 @@ _efl_canvas_image_internal_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Dat
601 { 601 {
602 Evas_Coord w, h; 602 Evas_Coord w, h;
603 603
604 efl_gfx_geometry_get(eo_obj, NULL, NULL, &w, &h); 604 efl_gfx_size_get(eo_obj, &w, &h);
605 _evas_image_fill_set(eo_obj, o, 0, 0, w, h); 605 _evas_image_fill_set(eo_obj, o, 0, 0, w, h);
606 606
607 evas_object_event_callback_add(eo_obj, EVAS_CALLBACK_RESIZE, 607 evas_object_event_callback_add(eo_obj, EVAS_CALLBACK_RESIZE,
@@ -3526,7 +3526,7 @@ evas_object_image_filled_resize_listener(void *data EINA_UNUSED, Evas *e EINA_UN
3526 Evas_Image_Data *o = efl_data_scope_get(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS); 3526 Evas_Image_Data *o = efl_data_scope_get(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
3527 Evas_Coord w, h; 3527 Evas_Coord w, h;
3528 3528
3529 efl_gfx_geometry_get(obj, NULL, NULL, &w, &h); 3529 efl_gfx_size_get(obj, &w, &h);
3530 if (w < 1) w = 1; 3530 if (w < 1) w = 1;
3531 if (h < 1) h = 1; 3531 if (h < 1) h = 1;
3532 _evas_image_fill_set(obj, o, 0, 0, w, h); 3532 _evas_image_fill_set(obj, o, 0, 0, w, h);
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index 056adff0aa..e8efe87265 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1156,11 +1156,10 @@ end:
1156} 1156}
1157 1157
1158EOLIAN static void 1158EOLIAN static void
1159_efl_canvas_object_efl_gfx_geometry_set(Eo *obj, Evas_Object_Protected_Data *pd EINA_UNUSED, 1159_efl_canvas_object_efl_gfx_geometry_set(Eo *obj, Evas_Object_Protected_Data *pd EINA_UNUSED, Eina_Rectangle r)
1160 int x, int y, int w, int h)
1161{ 1160{
1162 efl_gfx_position_set(obj, x, y); 1161 efl_gfx_position_set(obj, r.x, r.y);
1163 efl_gfx_size_set(obj, w, h); 1162 efl_gfx_size_set(obj, r.w, r.h);
1164} 1163}
1165 1164
1166EAPI void 1165EAPI void
@@ -1169,7 +1168,7 @@ evas_object_geometry_set(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y, Evas_C
1169 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); 1168 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
1170 return; 1169 return;
1171 MAGIC_CHECK_END(); 1170 MAGIC_CHECK_END();
1172 efl_gfx_geometry_set(eo_obj, x, y, w, h); 1171 efl_gfx_geometry_set(eo_obj, (Eina_Rectangle) { x, y, w, h });
1173} 1172}
1174 1173
1175EAPI void 1174EAPI void
@@ -1317,25 +1316,20 @@ _efl_canvas_object_efl_gfx_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
1317 evas_object_inform_call_resize(eo_obj); 1316 evas_object_inform_call_resize(eo_obj);
1318} 1317}
1319 1318
1320EOLIAN void 1319EOLIAN Eina_Rectangle
1321_efl_canvas_object_efl_gfx_geometry_get(Eo *obj, Evas_Object_Protected_Data *pd EINA_UNUSED, 1320_efl_canvas_object_efl_gfx_geometry_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
1322 int *x, int *y, int *w, int *h)
1323{ 1321{
1324 efl_gfx_position_get(obj, x, y); 1322 return obj->cur->geometry;
1325 efl_gfx_size_get(obj, w, h);
1326} 1323}
1327 1324
1328EAPI void 1325EAPI void
1329evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) 1326evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
1330{ 1327{
1331 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); 1328 Eina_Rectangle r = efl_gfx_geometry_get(eo_obj);
1332 if (x) *x = 0; 1329 if (x) *x = r.x;
1333 if (y) *y = 0; 1330 if (y) *y = r.y;
1334 if (w) *w = 0; 1331 if (w) *w = r.w;
1335 if (h) *h = 0; 1332 if (h) *h = r.h;
1336 return;
1337 MAGIC_CHECK_END();
1338 efl_gfx_geometry_get(eo_obj, x, y, w, h);
1339} 1333}
1340 1334
1341EOLIAN static void 1335EOLIAN static void
diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c
index b64af96807..f6ce22d4eb 100644
--- a/src/lib/evas/canvas/evas_vg_node.c
+++ b/src/lib/evas/canvas/evas_vg_node.c
@@ -223,12 +223,13 @@ _efl_vg_efl_gfx_size_get(Eo *obj,
223 if (h) *h = r.h; 223 if (h) *h = r.h;
224} 224}
225 225
226EOLIAN static void 226EOLIAN static Eina_Rectangle
227_efl_vg_efl_gfx_geometry_get(Eo *obj, Efl_VG_Data *pd EINA_UNUSED, 227_efl_vg_efl_gfx_geometry_get(Eo *obj, Efl_VG_Data *pd EINA_UNUSED)
228 int *x, int *y, int *w, int *h)
229{ 228{
230 efl_gfx_position_get(obj, x, y); 229 Eina_Rectangle r = { 0, };
231 efl_gfx_size_get(obj, w, h); 230 efl_gfx_position_get(obj, &r.x, &r.y);
231 efl_gfx_size_get(obj, &r.w, &r.h);
232 return r;
232} 233}
233 234
234// Parent should be a container otherwise dismissing the stacking operation 235// Parent should be a container otherwise dismissing the stacking operation
diff --git a/src/tests/elementary/elm_test_focus_common.c b/src/tests/elementary/elm_test_focus_common.c
index 128e1c00ac..f75730b9dd 100644
--- a/src/tests/elementary/elm_test_focus_common.c
+++ b/src/tests/elementary/elm_test_focus_common.c
@@ -91,14 +91,10 @@ _focus_test_size(Eo *obj EINA_UNUSED, Focus_Test_Data *pd, Eina_Rectangle rect)
91 pd->rect = rect; 91 pd->rect = rect;
92} 92}
93 93
94 94EOLIAN static Eina_Rectangle
95EOLIAN static void 95_focus_test_efl_gfx_geometry_get(Eo *obj EINA_UNUSED, Focus_Test_Data *pd)
96_focus_test_efl_gfx_geometry_get(Eo *obj EINA_UNUSED, Focus_Test_Data *pd, int *x, int *y, int *w, int *h)
97{ 96{
98 *x = pd->rect.x; 97 return pd->rect;
99 *y = pd->rect.y;
100 *w = pd->rect.w;
101 *h = pd->rect.h;
102} 98}
103 99
104 100