Added SDL_SetWindowMaximumSize() and SDL_GetWindowMaximumSize()

Also fixed Cocoa implementation so that it affects client area, not the whole window area.
This commit is contained in:
Sam Lantinga 2012-12-31 12:15:25 -08:00
parent ce28a79602
commit 1a92f18381
11 changed files with 148 additions and 4 deletions

View file

@ -65,6 +65,10 @@ typedef struct
int window_y;
int window_w;
int window_h;
int window_minW;
int window_minH;
int window_maxW;
int window_maxH;
int depth;
int refresh_rate;
int num_windows;

View file

@ -535,6 +535,7 @@ extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
* automatically matches the size of the display mode.
*
* \sa SDL_GetWindowMinimumSize()
* \sa SDL_SetWindowMaximumSize()
*/
extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
int min_w, int min_h);
@ -542,11 +543,33 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
/**
* \brief Get the minimum size of a window's client area.
*
* \sa SDL_GetWindowMaximumSize()
* \sa SDL_SetWindowMinimumSize()
*/
extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
int *w, int *h);
/**
* \brief Set the maximum size of a window's client area.
*
* \note You can't change the maximum size of a fullscreen window, it
* automatically matches the size of the display mode.
*
* \sa SDL_GetWindowMaximumSize()
* \sa SDL_SetWindowMinimumSize()
*/
extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
int max_w, int max_h);
/**
* \brief Get the maximum size of a window's client area.
*
* \sa SDL_GetWindowMinimumSize()
* \sa SDL_SetWindowMaximumSize()
*/
extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
int *w, int *h);
/**
* \brief Set the border state of a window.
*