Add parameter checking to SetWindowSize functions; add tests to video suite
This commit is contained in:
parent
5916b2bc1e
commit
edbf26b139
3 changed files with 545 additions and 148 deletions
|
@ -504,6 +504,9 @@ extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
|
|||
/**
|
||||
* \brief Get the position of a window.
|
||||
*
|
||||
* \param x Pointer to variable for storing the x position, may be NULL
|
||||
* \param y Pointer to variable for storing the y position, may be NULL
|
||||
*
|
||||
* \sa SDL_SetWindowPosition()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
|
||||
|
@ -512,6 +515,9 @@ extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
|
|||
/**
|
||||
* \brief Set the size of a window's client area.
|
||||
*
|
||||
* \param w The width of the window, must be >0
|
||||
* \param h The height of the window, must be >0
|
||||
*
|
||||
* \note You can't change the size of a fullscreen window, it automatically
|
||||
* matches the size of the display mode.
|
||||
*
|
||||
|
@ -523,6 +529,9 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
|
|||
/**
|
||||
* \brief Get the size of a window's client area.
|
||||
*
|
||||
* \param w Pointer to variable for storing the width, may be NULL
|
||||
* \param h Pointer to variable for storing the height, may be NULL
|
||||
*
|
||||
* \sa SDL_SetWindowSize()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
|
||||
|
@ -530,6 +539,9 @@ extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
|
|||
|
||||
/**
|
||||
* \brief Set the minimum size of a window's client area.
|
||||
*
|
||||
* \param min_w The minimum width of the window, must be >0
|
||||
* \param min_h The minimum height of the window, must be >0
|
||||
*
|
||||
* \note You can't change the minimum size of a fullscreen window, it
|
||||
* automatically matches the size of the display mode.
|
||||
|
@ -542,7 +554,10 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
|
|||
|
||||
/**
|
||||
* \brief Get the minimum size of a window's client area.
|
||||
*
|
||||
*
|
||||
* \param w Pointer to variable for storing the minimum width, may be NULL
|
||||
* \param h Pointer to variable for storing the minimum height, may be NULL
|
||||
*
|
||||
* \sa SDL_GetWindowMaximumSize()
|
||||
* \sa SDL_SetWindowMinimumSize()
|
||||
*/
|
||||
|
@ -552,6 +567,9 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
|
|||
/**
|
||||
* \brief Set the maximum size of a window's client area.
|
||||
*
|
||||
* \param max_w The maximum width of the window, must be >0
|
||||
* \param max_h The maximum height of the window, must be >0
|
||||
*
|
||||
* \note You can't change the maximum size of a fullscreen window, it
|
||||
* automatically matches the size of the display mode.
|
||||
*
|
||||
|
@ -563,6 +581,9 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
|
|||
|
||||
/**
|
||||
* \brief Get the maximum size of a window's client area.
|
||||
*
|
||||
* \param w Pointer to variable for storing the maximum width, may be NULL
|
||||
* \param h Pointer to variable for storing the maximum height, may be NULL
|
||||
*
|
||||
* \sa SDL_GetWindowMinimumSize()
|
||||
* \sa SDL_SetWindowMaximumSize()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue