forked from enlightenment/efl
ecore-wl2: Add API function to set window geometry
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
9a1435796d
commit
b02d5a1922
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue