Add simplewindow_resize() function
This commit is contained in:
parent
f1109b055c
commit
61f9ae172f
|
@ -96,6 +96,20 @@ simplewindow_move(SimpleWindow *sw, int x, int y)
|
|||
return XMoveWindow(sw->display, sw->window, x, y);
|
||||
}
|
||||
|
||||
/** Resize a simple window
|
||||
* \param sw the SimpleWindow to resize
|
||||
* \param w new width
|
||||
* \param h new height
|
||||
* \return status
|
||||
*/
|
||||
int
|
||||
simplewindow_resize(SimpleWindow *sw, unsigned int w, unsigned int h)
|
||||
{
|
||||
sw->geometry.width = w;
|
||||
sw->geometry.height = h;
|
||||
return XResizeWindow(sw->display, sw->window, w, h);
|
||||
}
|
||||
|
||||
/** Refresh the window content
|
||||
* \param sw the SimpleWindow to refresh
|
||||
* \param phys_screen physical screen id
|
||||
|
|
|
@ -36,6 +36,7 @@ typedef struct SimpleWindow
|
|||
SimpleWindow * simplewindow_new(Display *, int, int, int, unsigned int, unsigned int, unsigned int);
|
||||
void simplewindow_delete(SimpleWindow *);
|
||||
int simplewindow_move(SimpleWindow *, int, int);
|
||||
int simplewindow_resize(SimpleWindow *, unsigned int, unsigned int);
|
||||
int simplewindow_refresh_drawable(SimpleWindow *, int);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue