diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 16743c1209..69309d9ec8 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -294,6 +294,18 @@ EAPI void ecore_wl2_window_free(Ecore_Wl2_Window *window); */ EAPI void ecore_wl2_window_move(Ecore_Wl2_Window *window, int x, int y); +/** + * Resize a given Ecore_Wl2_Window + * + * @param window The Ecore_Wl2_Window which to resize + * @param w Desired width of window + * @param h Desired height of window + * @param location The edge of the window from where the resize should start + * + * @ingroup Ecore_Wl2_Window_Group + */ +EAPI void ecore_wl2_window_resize(Ecore_Wl2_Window *window, int w, int h, int location); + /* # ifdef __cplusplus */ /* } */ /* # endif */ diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 9b6cd132d3..82629c8398 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -321,3 +321,26 @@ ecore_wl2_window_move(Ecore_Wl2_Window *window, int x, int y) /* wl_shell_surface_move(window->wl_shell_surface, seat, */ /* window->display->serial); */ } + +EAPI void +ecore_wl2_window_resize(Ecore_Wl2_Window *window, int w, int h, int location) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + + /* test for no-op resize */ + if ((window->geometry.w == w) && (window->geometry.h == h)) + return; + + window->geometry.w = w; + window->geometry.h = h; + + /* TODO: input grab release ? */ + + /* TODO: enable once input is done */ + /* if (window->xdg_surface) */ + /* xdg_surface_resize(window->xdg_surface, seat, */ + /* window->display->serial, location); */ + /* else if (window->wl_shell_surface) */ + /* wl_shell_surface_resize(window->wl_shell_surface, seat, */ + /* window->display->serial, location); */ +}