aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-15 12:14:32 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 13:22:54 +0900
commit8fb194d969ccb9227e56ea60f538d977393408d7 (patch)
tree0673442275d29108e58a4cb0ab9fc0946db91b59 /src/lib/elementary
parentefl: Introduce Eina.Rect and switch EO APIs to it (diff)
downloadefl-8fb194d969ccb9227e56ea60f538d977393408d7.tar.gz
efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most it's more convenient than (x,y).
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_grid_static.c16
-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.c9
-rw-r--r--src/lib/elementary/efl_ui_textpath.c47
-rw-r--r--src/lib/elementary/efl_ui_win.c38
-rw-r--r--src/lib/elementary/elm_diskselector.c9
-rw-r--r--src/lib/elementary/elm_entry.c9
-rw-r--r--src/lib/elementary/elm_gengrid.c15
-rw-r--r--src/lib/elementary/elm_genlist.c15
-rw-r--r--src/lib/elementary/elm_hover.c8
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c10
-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.c6
-rw-r--r--src/lib/elementary/elm_menu.c15
-rw-r--r--src/lib/elementary/elm_notify.c14
-rw-r--r--src/lib/elementary/elm_panel.c9
-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_widget.c10
21 files changed, 143 insertions, 156 deletions
diff --git a/src/lib/elementary/efl_ui_grid_static.c b/src/lib/elementary/efl_ui_grid_static.c
index dfa128a2ef..fb5601a064 100644
--- a/src/lib/elementary/efl_ui_grid_static.c
+++ b/src/lib/elementary/efl_ui_grid_static.c
@@ -26,9 +26,9 @@ _efl_ui_grid_static_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED
Efl_Ui_Grid_Data *gd;
Grid_Item *gi;
Evas *e;
- Evas_Coord x, y, w, h;
long long xl, yl, wl, hl, vwl, vhl;
Eina_Bool mirror;
+ Eina_Rect r;
gd = efl_data_scope_get(obj, EFL_UI_GRID_CLASS);
if (!gd->items) return;
@@ -36,12 +36,11 @@ _efl_ui_grid_static_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED
e = evas_object_evas_get(obj);
efl_event_freeze(e);
- efl_gfx_position_get(obj, &x, &y);
- efl_gfx_size_get(obj, &w, &h);
- xl = x;
- yl = y;
- wl = w;
- hl = h;
+ r = efl_gfx_geometry_get(obj);
+ xl = r.x;
+ yl = r.y;
+ wl = r.w;
+ hl = r.h;
mirror = efl_ui_mirrored_get(obj);
if (!gd->req_cols || !gd->req_rows)
@@ -69,8 +68,7 @@ _efl_ui_grid_static_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED
}
y1 = yl + ((hl * (long long)gi->row) / vhl);
y2 = yl + ((hl * (long long)(gi->row + gi->row_span)) / vhl);
- efl_gfx_position_set(gi->object, x1, y1);
- efl_gfx_size_set(gi->object, x2 - x1, y2 - y1);
+ efl_gfx_geometry_set(gi->object, EINA_RECT(x1, y1, x2 - x1, y2 - y1));
}
err:
efl_event_thaw(e);
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 093e79bff2..b8446653e9 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -615,16 +615,16 @@ _efl_ui_image_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Data *sd)
}
EOLIAN static void
-_efl_ui_image_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Coord x, Evas_Coord y)
+_efl_ui_image_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
- if ((sd->img_x == x) && (sd->img_y == y)) return;
- sd->img_x = x;
- sd->img_y = y;
+ if ((sd->img_x == pos.x) && (sd->img_y == pos.y)) return;
+ sd->img_x = pos.x;
+ sd->img_y = pos.y;
/* takes care of moving */
_efl_ui_image_internal_sizing_eval(obj, sd);
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c
index 0052e6bfd6..e9922db024 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.c
+++ b/src/lib/elementary/efl_ui_image_zoomable.c
@@ -151,12 +151,12 @@ _calc_job_cb(void *data)
}
EOLIAN static void
-_efl_ui_image_zoomable_pan_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Zoomable_Pan_Data *psd, Evas_Coord x, Evas_Coord y)
+_efl_ui_image_zoomable_pan_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Zoomable_Pan_Data *psd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), pos);
ecore_job_del(psd->wsd->calc_job);
psd->wsd->calc_job = ecore_job_add(_calc_job_cb, psd->wobj);
@@ -1505,14 +1505,13 @@ _efl_ui_image_zoomable_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Zoomable
}
EOLIAN static void
-_efl_ui_image_zoomable_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Evas_Coord x, Evas_Coord y)
+_efl_ui_image_zoomable_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Zoomable_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
}
EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index a589e591d4..fe4287b57f 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -3263,14 +3263,13 @@ _efl_ui_text_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Text_Data *sd)
}
EOLIAN static void
-_efl_ui_text_efl_gfx_position_set(Eo *obj, Efl_Ui_Text_Data *sd, Evas_Coord x, Evas_Coord y)
+_efl_ui_text_efl_gfx_position_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
if (sd->hoversel) _hoversel_position(obj);
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c
index f4ac2a808d..c915ca904f 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -293,6 +293,7 @@ _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool set_min)
const Efl_Gfx_Path_Command_Type *cmd;
const double *points;
Efl_Ui_Textpath_Segment *seg;
+ Eina_Position2D opos;
EINA_INLIST_FREE(pd->segments, seg)
{
@@ -300,44 +301,43 @@ _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool set_min)
free(seg);
}
- Evas_Coord x, y;
- efl_gfx_position_get(obj, &x, &y);
+ opos = efl_gfx_position_get(obj);
pd->total_length = 0;
efl_gfx_path_get(obj, &cmd, &points);
if (cmd)
{
int pos = -1;
- Eina_Rectangle *rect = eina_rectangle_new(0, 0, 0, 0);
double px0 = 0.0, py0 = 0.0, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1, px1, py1;
+ Eina_Rect rect = EINA_RECT_ZERO();
while (*cmd != EFL_GFX_PATH_COMMAND_TYPE_END)
{
if (*cmd == EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO)
{
pos++;
- px0 = points[pos] + x;
+ px0 = points[pos] + opos.x;
pos++;
- py0 = points[pos] + y;
+ py0 = points[pos] + opos.y;
}
else if (*cmd == EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO)
{
Eina_Bezier bz;
double bx, by, bw, bh;
- Eina_Rectangle *brect;
+ Eina_Rect brect;
pos++;
- ctrl_x0 = points[pos] + x;
+ ctrl_x0 = points[pos] + opos.x;
pos++;
- ctrl_y0 = points[pos] + y;
+ ctrl_y0 = points[pos] + opos.y;
pos++;
- ctrl_x1 = points[pos] + x;
+ ctrl_x1 = points[pos] + opos.x;
pos++;
- ctrl_y1 = points[pos] + y;
+ ctrl_y1 = points[pos] + opos.y;
pos++;
- px1 = points[pos] + x;
+ px1 = points[pos] + opos.x;
pos++;
- py1 = points[pos] + y;
+ py1 = points[pos] + opos.y;
eina_bezier_values_set(&bz, px0, py0, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1, px1, py1);
seg = malloc(sizeof(Efl_Ui_Textpath_Segment));
@@ -359,18 +359,17 @@ _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool set_min)
py0 = py1;
eina_bezier_bounds_get(&bz, &bx, &by, &bw, &bh);
- brect = eina_rectangle_new(bx, by, bw, bh);
- eina_rectangle_union(rect, brect);
- eina_rectangle_free(brect);
+ brect = EINA_RECT(bx, by, bw, bh);
+ eina_rectangle_union(&rect.rect, &brect.rect);
}
else if (*cmd == EFL_GFX_PATH_COMMAND_TYPE_LINE_TO)
{
- Eina_Rectangle *lrect;
+ Eina_Rect lrect;
pos++;
- px1 = points[pos] + x;
+ px1 = points[pos] + opos.x;
pos++;
- py1 = points[pos] + y;
+ py1 = points[pos] + opos.y;
seg = malloc(sizeof(Efl_Ui_Textpath_Segment));
if (!seg)
@@ -389,17 +388,15 @@ _path_data_get(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool set_min)
pd->segments = eina_inlist_append(pd->segments, EINA_INLIST_GET(seg));
pd->total_length += seg->length;
- lrect = eina_rectangle_new(px0, py0, px1 - px0, py1 - py0);
- eina_rectangle_union(rect, lrect);
- eina_rectangle_free(lrect);
+ lrect = EINA_RECT(px0, py0, px1 - px0, py1 - py0);
+ eina_rectangle_union(&rect.rect, &lrect.rect);
}
cmd++;
}
if (set_min)
{
- efl_gfx_size_hint_min_set(obj, rect->w, rect->h);
+ efl_gfx_size_hint_min_set(obj, rect.w, rect.h);
}
- eina_rectangle_free(rect);
}
}
@@ -565,9 +562,9 @@ _efl_ui_textpath_elm_widget_theme_apply(Eo *obj, Efl_Ui_Textpath_Data *pd)
}
EOLIAN static void
-_efl_ui_textpath_efl_gfx_position_set(Eo *obj, Efl_Ui_Textpath_Data *pd, Evas_Coord x, Evas_Coord y)
+_efl_ui_textpath_efl_gfx_position_set(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Position2D pos)
{
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
_path_data_get(obj, pd, EINA_FALSE);
_text_draw(pd);
}
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 7258c5f7b0..bddf5bf45e 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -927,10 +927,10 @@ _elm_win_resize_job(void *data)
if (sd->main_menu)
{
- int mx, my;
+ Eina_Position2D pos;
- efl_gfx_position_get(sd->main_menu, &mx, &my);
- elm_menu_move(sd->main_menu, mx, my);
+ pos = efl_gfx_position_get(sd->main_menu);
+ elm_menu_move(sd->main_menu, pos.x, pos.y);
}
sd->response++;
@@ -2922,17 +2922,17 @@ _elm_win_obj_intercept_show(void *data,
}
EOLIAN static void
-_efl_ui_win_efl_gfx_position_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord x, Evas_Coord y)
+_efl_ui_win_efl_gfx_position_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
if (sd->img_obj)
{
- if ((x != sd->screen.x) || (y != sd->screen.y))
+ if ((pos.x != sd->screen.x) || (pos.y != sd->screen.y))
{
- sd->screen.x = x;
- sd->screen.y = y;
+ sd->screen.x = pos.x;
+ sd->screen.y = pos.y;
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_MOVE, NULL);
}
goto super_skip;
@@ -2942,19 +2942,19 @@ _efl_ui_win_efl_gfx_position_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord x, Eva
if (!sd->response)
{
sd->req_xy = EINA_TRUE;
- sd->req_x = x;
- sd->req_y = y;
- TRAP(sd, move, x, y);
+ sd->req_x = pos.x;
+ sd->req_y = pos.y;
+ TRAP(sd, move, pos.x, pos.y);
}
if (!ecore_evas_override_get(sd->ee)) goto super_skip;
}
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
if (ecore_evas_override_get(sd->ee))
{
- sd->screen.x = x;
- sd->screen.y = y;
+ sd->screen.x = pos.x;
+ sd->screen.y = pos.y;
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_MOVE, NULL);
}
if (sd->frame_obj)
@@ -2963,13 +2963,13 @@ _efl_ui_win_efl_gfx_position_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord x, Eva
/* TODO */
/* ecore_wl_window_update_location(sd->wl.win, x, y); */
#endif
- sd->screen.x = x;
- sd->screen.y = y;
+ sd->screen.x = pos.x;
+ sd->screen.y = pos.y;
}
if (sd->img_obj)
{
- sd->screen.x = x;
- sd->screen.y = y;
+ sd->screen.x = pos.x;
+ sd->screen.y = pos.y;
}
return;
@@ -2979,7 +2979,7 @@ super_skip:
* Ugly code flow: legacy code had an early return in smart_move, ie.
* evas object move would be processed but smart object move would be
* aborted. This super call tries to simulate that. */
- efl_gfx_position_set(efl_super(obj, EFL_CANVAS_GROUP_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, EFL_CANVAS_GROUP_CLASS), pos);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c
index b5ae1d3f1d..9e69f3caae 100644
--- a/src/lib/elementary/elm_diskselector.c
+++ b/src/lib/elementary/elm_diskselector.c
@@ -1399,14 +1399,13 @@ _elm_diskselector_efl_canvas_group_group_del(Eo *obj, Elm_Diskselector_Data *sd)
}
EOLIAN static void
-_elm_diskselector_efl_gfx_position_set(Eo *obj, Elm_Diskselector_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_diskselector_efl_gfx_position_set(Eo *obj, Elm_Diskselector_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 02fec566c8..790b3ff4cc 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -3950,14 +3950,13 @@ _elm_entry_efl_canvas_group_group_del(Eo *obj, Elm_Entry_Data *sd)
}
EOLIAN static void
-_elm_entry_efl_gfx_position_set(Eo *obj, Elm_Entry_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_entry_efl_gfx_position_set(Eo *obj, Elm_Entry_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
if (sd->hoversel) _hoversel_position(obj);
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index b700e679b9..710b81e4a9 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -661,12 +661,12 @@ _elm_gengrid_pan_efl_object_destructor(Eo *obj, Elm_Gengrid_Pan_Data *psd)
}
EOLIAN static void
-_elm_gengrid_pan_efl_gfx_position_set(Eo *obj, Elm_Gengrid_Pan_Data *psd, Evas_Coord x, Evas_Coord y)
+_elm_gengrid_pan_efl_gfx_position_set(Eo *obj, Elm_Gengrid_Pan_Data *psd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), pos);
ecore_job_del(psd->wsd->calc_job);
psd->wsd->calc_job = ecore_job_add(_calc_job, psd->wobj);
@@ -4225,14 +4225,13 @@ _elm_gengrid_efl_canvas_group_group_del(Eo *obj, Elm_Gengrid_Data *sd)
}
EOLIAN static void
-_elm_gengrid_efl_gfx_position_set(Eo *obj, Elm_Gengrid_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_gengrid_efl_gfx_position_set(Eo *obj, Elm_Gengrid_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index a8800be549..d66f11d377 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -273,12 +273,12 @@ _elm_genlist_pan_efl_canvas_group_group_del(Eo *obj, Elm_Genlist_Pan_Data *psd)
}
EOLIAN static void
-_elm_genlist_pan_efl_gfx_position_set(Eo *obj, Elm_Genlist_Pan_Data *psd, Evas_Coord x, Evas_Coord y)
+_elm_genlist_pan_efl_gfx_position_set(Eo *obj, Elm_Genlist_Pan_Data *psd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), pos);
psd->wsd->pan_changed = EINA_TRUE;
evas_object_smart_changed(obj);
@@ -5705,14 +5705,13 @@ _elm_genlist_efl_canvas_group_group_del(Eo *obj, Elm_Genlist_Data *sd)
}
EOLIAN static void
-_elm_genlist_efl_gfx_position_set(Eo *obj, Elm_Genlist_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_genlist_efl_gfx_position_set(Eo *obj, Elm_Genlist_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c
index 0bb2f5ec1f..6b406e053f 100644
--- a/src/lib/elementary/elm_hover.c
+++ b/src/lib/elementary/elm_hover.c
@@ -328,7 +328,7 @@ _elm_hover_elm_layout_sizing_eval(Eo *obj, Elm_Hover_Data *sd)
if (efl_isa(sd->parent, EFL_UI_WIN_CLASS))
{
if (efl_canvas_object_is_frame_object_get(obj))
- efl_gfx_position_get(obj, &x, &y);
+ evas_object_geometry_get(obj, &x, &y, NULL, NULL);
else
{
x = 0;
@@ -631,12 +631,12 @@ _elm_hover_efl_canvas_group_group_del(Eo *obj, Elm_Hover_Data *sd)
}
EOLIAN static void
-_elm_hover_efl_gfx_position_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Evas_Coord x, Evas_Coord y)
+_elm_hover_efl_gfx_position_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
elm_layout_sizing_eval(obj);
}
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index e659c1d3e3..223c1fb325 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -102,15 +102,15 @@ _elm_pan_efl_canvas_group_group_del(Eo *obj, Elm_Pan_Smart_Data *_pd EINA_UNUSED
}
EOLIAN static void
-_elm_pan_efl_gfx_position_set(Eo *obj, Elm_Pan_Smart_Data *psd, Evas_Coord x, Evas_Coord y)
+_elm_pan_efl_gfx_position_set(Eo *obj, Elm_Pan_Smart_Data *psd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), pos);
- psd->x = x;
- psd->y = y;
+ psd->x = pos.x;
+ psd->y = pos.y;
_elm_pan_update(psd);
}
diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c
index 2d115a0da7..e740b38dc8 100644
--- a/src/lib/elementary/elm_list.c
+++ b/src/lib/elementary/elm_list.c
@@ -2490,14 +2490,13 @@ _elm_list_efl_canvas_group_group_del(Eo *obj, Elm_List_Data *sd)
}
EOLIAN static void
-_elm_list_efl_gfx_position_set(Eo *obj, Elm_List_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_list_efl_gfx_position_set(Eo *obj, Elm_List_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index c22f6d90d7..e42a6a0f08 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -3932,12 +3932,12 @@ _elm_map_pan_efl_canvas_group_group_calculate(Eo *obj, Elm_Map_Pan_Data *psd)
}
EOLIAN static void
-_elm_map_pan_efl_gfx_position_set(Eo *obj, Elm_Map_Pan_Data *_pd EINA_UNUSED, Evas_Coord x, Evas_Coord y)
+_elm_map_pan_efl_gfx_position_set(Eo *obj, Elm_Map_Pan_Data *_pd EINA_UNUSED, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_PAN_CLASS), pos);
evas_object_smart_changed(obj);
}
@@ -4249,14 +4249,13 @@ _elm_map_efl_canvas_group_group_del(Eo *obj, Elm_Map_Data *sd)
}
EOLIAN static void
-_elm_map_efl_gfx_position_set(Eo *obj, Elm_Map_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_map_efl_gfx_position_set(Eo *obj, Elm_Map_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_mapbuf.c b/src/lib/elementary/elm_mapbuf.c
index 8ae1058e6b..f0212e14d5 100644
--- a/src/lib/elementary/elm_mapbuf.c
+++ b/src/lib/elementary/elm_mapbuf.c
@@ -156,12 +156,12 @@ _mapbuf_auto_smooth(Evas_Object *obj EINA_UNUSED, Elm_Mapbuf_Data *sd)
}
EOLIAN static void
-_elm_mapbuf_efl_gfx_position_set(Eo *obj, Elm_Mapbuf_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_mapbuf_efl_gfx_position_set(Eo *obj, Elm_Mapbuf_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
_mapbuf_auto_eval(obj, sd);
_mapbuf_auto_smooth(obj, sd);
diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c
index c32e7a88cc..d188a04a23 100644
--- a/src/lib/elementary/elm_menu.c
+++ b/src/lib/elementary/elm_menu.c
@@ -97,17 +97,20 @@ _elm_menu_item_elm_widget_item_signal_emit(Eo *eo_item EINA_UNUSED, Elm_Menu_Ite
static inline void
_parent_geometry_get(Elm_Menu_Data *sd, int *x, int *y, int *w, int *h)
{
- evas_object_geometry_get(sd->parent, x, y, w, h);
+ Eina_Rect r;
+
+ r = efl_gfx_geometry_get(sd->parent);
if (efl_isa(sd->parent, EFL_UI_WIN_CLASS))
{
if (sd->menu_bar && efl_canvas_object_is_frame_object_get(sd->obj))
- efl_gfx_position_get(sd->obj, x, y);
+ r.pos = efl_gfx_position_get(sd->obj);
else
- {
- if (x) *x = 0;
- if (y) *y = 0;
- }
+ r.pos = EINA_POSITION2D(0, 0);
}
+ if (x) *x = r.x;
+ if (y) *y = r.y;
+ if (w) *w = r.w;
+ if (h) *h = r.h;
}
static void
diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c
index 89f621c8c2..77b5b98f0e 100644
--- a/src/lib/elementary/elm_notify.c
+++ b/src/lib/elementary/elm_notify.c
@@ -237,27 +237,27 @@ _elm_notify_efl_gfx_size_set(Eo *obj, Elm_Notify_Data *sd, Evas_Coord w, Evas_Co
if (!sd->parent && sd->content)
{
- Evas_Coord x, y;
+ Eina_Position2D pos;
- efl_gfx_position_get(obj, &x, &y);
- _notify_move_to_orientation(obj, x, y, w, h);
+ pos = efl_gfx_position_get(obj);
+ _notify_move_to_orientation(obj, pos.x, pos.y, w, h);
}
}
EOLIAN static void
-_elm_notify_efl_gfx_position_set(Eo *obj, Elm_Notify_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_notify_efl_gfx_position_set(Eo *obj, Elm_Notify_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
if (!sd->parent && sd->content)
{
Evas_Coord w, h;
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- _notify_move_to_orientation(obj, x, y, w, h);
+ _notify_move_to_orientation(obj, pos.x, pos.y, w, h);
}
}
diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index 219315fe39..ba4fa2befa 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -934,14 +934,13 @@ _elm_panel_efl_canvas_group_group_del(Eo *obj, Elm_Panel_Data *sd)
}
EOLIAN static void
-_elm_panel_efl_gfx_position_set(Eo *obj, Elm_Panel_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_panel_efl_gfx_position_set(Eo *obj, Elm_Panel_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
}
static void
diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c
index 95f2694e26..002c467041 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -951,14 +951,13 @@ _elm_scroller_efl_canvas_group_group_add(Eo *obj, Elm_Scroller_Data *priv)
}
EOLIAN static void
-_elm_scroller_efl_gfx_position_set(Eo *obj, Elm_Scroller_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_scroller_efl_gfx_position_set(Eo *obj, Elm_Scroller_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index 91f126cff0..e43f788784 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -2904,14 +2904,13 @@ _elm_toolbar_efl_canvas_group_group_del(Eo *obj, Elm_Toolbar_Data *sd)
}
EOLIAN static void
-_elm_toolbar_efl_gfx_position_set(Eo *obj, Elm_Toolbar_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_toolbar_efl_gfx_position_set(Eo *obj, Elm_Toolbar_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
-
- evas_object_move(sd->hit_rect, x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+ efl_gfx_position_set(sd->hit_rect, pos);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 4c02e6f831..8ea3085612 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -832,16 +832,16 @@ _smart_reconfigure(Elm_Widget_Smart_Data *sd)
}
EOLIAN static void
-_elm_widget_efl_gfx_position_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Evas_Coord x, Evas_Coord y)
+_elm_widget_efl_gfx_position_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Eina_Position2D pos)
{
- if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
return;
- sd->x = x;
- sd->y = y;
+ sd->x = pos.x;
+ sd->y = pos.y;
_smart_reconfigure(sd);
- efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
}
EOLIAN static void