ecore-wl2: Add API function to resize a window

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-09-09 12:27:23 -04:00
parent e9b6c5d4b7
commit 5c6376fa29
2 changed files with 35 additions and 0 deletions

View File

@ -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 */

View File

@ -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); */
}