ecore-wl2: Add API function to set window geometry

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-09-28 11:18:23 -04:00
parent 9a1435796d
commit b02d5a1922
2 changed files with 21 additions and 0 deletions

View File

@ -412,6 +412,9 @@ EAPI void ecore_wl2_window_class_name_set(Ecore_Wl2_Window *window, const char *
/* TODO: doxy */
EAPI void ecore_wl2_window_geometry_get(Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h);
/* TODO: doxy */
EAPI void ecore_wl2_window_geometry_set(Ecore_Wl2_Window *window, int x, int y, int w, int h);
/* # ifdef __cplusplus */
/* } */
/* # endif */

View File

@ -650,3 +650,21 @@ ecore_wl2_window_geometry_get(Ecore_Wl2_Window *window, int *x, int *y, int *w,
if (w) *w = window->geometry.w;
if (h) *h = window->geometry.h;
}
EAPI void
ecore_wl2_window_geometry_set(Ecore_Wl2_Window *window, int x, int y, int w, int h)
{
EINA_SAFETY_ON_NULL_RETURN(window);
if ((window->geometry.x == x) && (window->geometry.y == y) &&
(window->geometry.w == w) && (window->geometry.h == h))
return;
window->geometry.x = x;
window->geometry.y = y;
window->geometry.w = w;
window->geometry.h = h;
if (window->xdg_surface)
xdg_surface_set_window_geometry(window->xdg_surface, x, y, w, h);
}