Add simplewindow_resize() function

This commit is contained in:
Julien Danjou 2008-03-14 12:54:35 +01:00
parent f1109b055c
commit 61f9ae172f
2 changed files with 15 additions and 0 deletions

View File

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

View File

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