forked from enlightenment/efl
ecore-wl2: Add API function to resize a window
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
e9b6c5d4b7
commit
5c6376fa29
|
@ -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);
|
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 */
|
/* # ifdef __cplusplus */
|
||||||
/* } */
|
/* } */
|
||||||
/* # endif */
|
/* # endif */
|
||||||
|
|
|
@ -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, */
|
/* wl_shell_surface_move(window->wl_shell_surface, seat, */
|
||||||
/* window->display->serial); */
|
/* 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); */
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue