|
|
|
@ -106,7 +106,7 @@ typedef enum
|
|
|
|
|
{
|
|
|
|
|
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
|
|
|
|
|
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
|
|
|
|
|
/* 0x4 was SDL_WINDOW_SHOWN in SDL2, please reserve this bit for sdl2-compat. */
|
|
|
|
|
/* 0x00000004 was SDL_WINDOW_SHOWN in SDL2, please reserve this bit for sdl2-compat. */
|
|
|
|
|
SDL_WINDOW_HIDDEN = 0x00000008, /**< window is not visible */
|
|
|
|
|
SDL_WINDOW_BORDERLESS = 0x00000010, /**< no window decoration */
|
|
|
|
|
SDL_WINDOW_RESIZABLE = 0x00000020, /**< window can be resized */
|
|
|
|
@ -117,9 +117,7 @@ typedef enum
|
|
|
|
|
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
|
|
|
|
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
|
|
|
|
|
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
|
|
|
|
|
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported.
|
|
|
|
|
On macOS NSHighResolutionCapable must be set true in the
|
|
|
|
|
application's Info.plist for this to have any effect. */
|
|
|
|
|
/* 0x00002000 was SDL_WINDOW_ALLOW_HIGHDPI in SDL2, please reserve this bit for sdl2-compat. */
|
|
|
|
|
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
|
|
|
|
|
SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
|
|
|
|
|
SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
|
|
|
|
@ -457,8 +455,7 @@ extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetNumDisplayModes
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
|
|
|
|
|
SDL_DisplayMode * mode);
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex, SDL_DisplayMode *mode);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get information about the desktop's display mode.
|
|
|
|
@ -594,8 +591,7 @@ extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
|
|
|
|
|
* \sa SDL_GetWindowDisplayMode
|
|
|
|
|
* \sa SDL_SetWindowFullscreen
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
|
|
|
|
|
const SDL_DisplayMode * mode);
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window *window, const SDL_DisplayMode *mode);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Query the display mode to use when a window is visible at fullscreen.
|
|
|
|
@ -611,8 +607,7 @@ extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
|
|
|
|
|
* \sa SDL_SetWindowDisplayMode
|
|
|
|
|
* \sa SDL_SetWindowFullscreen
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
|
|
|
|
|
SDL_DisplayMode * mode);
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the raw ICC profile data for the screen the window is currently on.
|
|
|
|
@ -656,22 +651,19 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
|
|
|
|
* - `SDL_WINDOW_MINIMIZED`: window is minimized
|
|
|
|
|
* - `SDL_WINDOW_MAXIMIZED`: window is maximized
|
|
|
|
|
* - `SDL_WINDOW_INPUT_GRABBED`: window has grabbed input focus
|
|
|
|
|
* - `SDL_WINDOW_ALLOW_HIGHDPI`: window should be created in high-DPI mode if
|
|
|
|
|
* supported (>= SDL 2.0.1)
|
|
|
|
|
*
|
|
|
|
|
* The SDL_Window is implicitly shown if SDL_WINDOW_HIDDEN is not set.
|
|
|
|
|
*
|
|
|
|
|
* On Apple's macOS, you **must** set the NSHighResolutionCapable Info.plist
|
|
|
|
|
* property to YES, otherwise you will not receive a High-DPI OpenGL canvas.
|
|
|
|
|
*
|
|
|
|
|
* If the window is created with the `SDL_WINDOW_ALLOW_HIGHDPI` flag, its size
|
|
|
|
|
* in pixels may differ from its size in screen coordinates on platforms with
|
|
|
|
|
* high-DPI support (e.g. iOS and macOS). Use SDL_GetWindowSize() to query the
|
|
|
|
|
* client area's size in screen coordinates, and SDL_GetWindowSizeInPixels() or
|
|
|
|
|
* SDL_GetRendererOutputSize() to query the drawable size in pixels. Note that
|
|
|
|
|
* when this flag is set, the drawable size can vary after the window is
|
|
|
|
|
* created and should be queried after major window events such as when the
|
|
|
|
|
* window is resized or moved between displays.
|
|
|
|
|
* The window size in pixels may differ from its size in screen coordinates if
|
|
|
|
|
* the window is on a high density display (one with an OS scaling factor).
|
|
|
|
|
* Use SDL_GetWindowSize() to query the client area's size in screen coordinates,
|
|
|
|
|
* and SDL_GetWindowSizeInPixels() or SDL_GetRendererOutputSize() to query the
|
|
|
|
|
* drawable size in pixels. Note that the drawable size can vary after the window
|
|
|
|
|
* is created and should be queried again when the window is resized or moved
|
|
|
|
|
* between displays.
|
|
|
|
|
*
|
|
|
|
|
* If the window is set fullscreen, the width and height parameters `w` and
|
|
|
|
|
* `h` will not be used. However, invalid size parameters (e.g. too large) may
|
|
|
|
@ -709,9 +701,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
|
|
|
|
* \sa SDL_CreateWindowFrom
|
|
|
|
|
* \sa SDL_DestroyWindow
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
|
|
|
|
|
int x, int y, int w,
|
|
|
|
|
int h, Uint32 flags);
|
|
|
|
|
extern DECLSPEC SDL_Window *SDLCALL SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create an SDL window from an existing native window.
|
|
|
|
@ -794,8 +784,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowTitle
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
|
|
|
|
|
const char *title);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window *window, const char *title);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the title of a window.
|
|
|
|
@ -818,8 +807,7 @@ extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
|
|
|
|
|
*
|
|
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
|
|
|
|
|
SDL_Surface * icon);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Associate an arbitrary named pointer with a window.
|
|
|
|
@ -835,9 +823,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowData
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
|
|
|
|
|
const char *name,
|
|
|
|
|
void *userdata);
|
|
|
|
|
extern DECLSPEC void *SDLCALL SDL_SetWindowData(SDL_Window *window, const char *name, void *userdata);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Retrieve the data pointer associated with a window.
|
|
|
|
@ -850,101 +836,86 @@ extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_SetWindowData
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
|
|
|
|
|
const char *name);
|
|
|
|
|
extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window *window, const char *name);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the position of a window.
|
|
|
|
|
*
|
|
|
|
|
* The window coordinate origin is the upper left of the display.
|
|
|
|
|
* Set the position of a window, in screen coordinates.
|
|
|
|
|
*
|
|
|
|
|
* \param window the window to reposition
|
|
|
|
|
* \param x the x coordinate of the window in screen coordinates, or
|
|
|
|
|
* `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
|
|
|
|
|
* \param y the y coordinate of the window in screen coordinates, or
|
|
|
|
|
* `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
|
|
|
|
|
* \param x the x coordinate of the window, or `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
|
|
|
|
|
* \param y the y coordinate of the window, or `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
|
|
|
|
|
*
|
|
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowPosition
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
|
|
|
|
|
int x, int y);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window *window, int x, int y);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the position of a window.
|
|
|
|
|
* Get the position of a window, in screen coordinates.
|
|
|
|
|
*
|
|
|
|
|
* If you do not need the value for one of the positions a NULL may be passed
|
|
|
|
|
* in the `x` or `y` parameter.
|
|
|
|
|
*
|
|
|
|
|
* \param window the window to query
|
|
|
|
|
* \param x a pointer filled in with the x position of the window, in screen
|
|
|
|
|
* coordinates, may be NULL
|
|
|
|
|
* \param y a pointer filled in with the y position of the window, in screen
|
|
|
|
|
* coordinates, may be NULL
|
|
|
|
|
* \param x a pointer filled in with the x position of the window, may be NULL
|
|
|
|
|
* \param y a pointer filled in with the y position of the window, may be NULL
|
|
|
|
|
*
|
|
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_SetWindowPosition
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
|
|
|
|
|
int *x, int *y);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window *window, int *x, int *y);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the size of a window's client area.
|
|
|
|
|
* Set the size of a window's client area, in screen coordinates.
|
|
|
|
|
*
|
|
|
|
|
* The window size in screen coordinates may differ from the size in pixels,
|
|
|
|
|
* if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
|
|
|
|
|
* with high-dpi support (e.g. iOS or macOS). Use SDL_GL_GetDrawableSize() or
|
|
|
|
|
* SDL_GetRendererOutputSize() to get the real client area size in pixels.
|
|
|
|
|
* The window size in screen coordinates may differ from the size in pixels if
|
|
|
|
|
* the window is on a high density display (one with an OS scaling factor).
|
|
|
|
|
*
|
|
|
|
|
* Fullscreen windows automatically match the size of the display mode, and
|
|
|
|
|
* you should use SDL_SetWindowDisplayMode() to change their size.
|
|
|
|
|
*
|
|
|
|
|
* \param window the window to change
|
|
|
|
|
* \param w the width of the window in pixels, in screen coordinates, must be
|
|
|
|
|
* > 0
|
|
|
|
|
* \param h the height of the window in pixels, in screen coordinates, must be
|
|
|
|
|
* > 0
|
|
|
|
|
* \param w the width of the window, must be > 0
|
|
|
|
|
* \param h the height of the window, must be > 0
|
|
|
|
|
*
|
|
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowSize
|
|
|
|
|
* \sa SDL_SetWindowDisplayMode
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
|
|
|
|
|
int h);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window *window, int w, int h);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the size of a window's client area.
|
|
|
|
|
* Get the size of a window's client area, in screen coordinates.
|
|
|
|
|
*
|
|
|
|
|
* NULL can safely be passed as the `w` or `h` parameter if the width or
|
|
|
|
|
* height value is not desired.
|
|
|
|
|
*
|
|
|
|
|
* The window size in screen coordinates may differ from the size in pixels,
|
|
|
|
|
* if the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a platform
|
|
|
|
|
* with high-dpi support (e.g. iOS or macOS). Use SDL_GetWindowSizeInPixels(),
|
|
|
|
|
* SDL_GL_GetDrawableSize(), SDL_Vulkan_GetDrawableSize(), or
|
|
|
|
|
* SDL_GetRendererOutputSize() to get the real client area size in pixels.
|
|
|
|
|
* The window size in screen coordinates may differ from the size in pixels if
|
|
|
|
|
* the window is on a high density display (one with an OS scaling factor).
|
|
|
|
|
* Use SDL_GetWindowSizeInPixels(), SDL_GL_GetDrawableSize(),
|
|
|
|
|
* SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to get the
|
|
|
|
|
* real client area size in pixels.
|
|
|
|
|
*
|
|
|
|
|
* \param window the window to query the width and height from
|
|
|
|
|
* \param w a pointer filled in with the width of the window, in screen
|
|
|
|
|
* coordinates, may be NULL
|
|
|
|
|
* \param h a pointer filled in with the height of the window, in screen
|
|
|
|
|
* coordinates, may be NULL
|
|
|
|
|
* \param w a pointer filled in with the width of the window, may be NULL
|
|
|
|
|
* \param h a pointer filled in with the height of the window, may be NULL
|
|
|
|
|
*
|
|
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowSizeInPixels
|
|
|
|
|
* \sa SDL_GL_GetDrawableSize
|
|
|
|
|
* \sa SDL_Vulkan_GetDrawableSize
|
|
|
|
|
* \sa SDL_GetWindowSizeInPixels
|
|
|
|
|
* \sa SDL_GetRendererOutputSize
|
|
|
|
|
* \sa SDL_SetWindowSize
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
|
|
|
|
|
int *h);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, int *h);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the size of a window's borders (decorations) around the client area.
|
|
|
|
|
* Get the size of a window's borders (decorations) around the client area,
|
|
|
|
|
* in screen coordinates.
|
|
|
|
|
*
|
|
|
|
|
* Note: If this function fails (returns -1), the size values will be
|
|
|
|
|
* initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the
|
|
|
|
@ -975,17 +946,13 @@ extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowSize
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
|
|
|
|
|
int *top, int *left,
|
|
|
|
|
int *bottom, int *right);
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the size of a window in pixels.
|
|
|
|
|
* Get the size of a window's client area, in pixels.
|
|
|
|
|
*
|
|
|
|
|
* This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
|
|
|
|
|
* drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
|
|
|
|
|
* platform with high-DPI support (Apple calls this "Retina"), and not
|
|
|
|
|
* disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
|
|
|
|
|
* The window size in pixels may differ from the size in screen coordinates if
|
|
|
|
|
* the window is on a high density display (one with an OS scaling factor).
|
|
|
|
|
*
|
|
|
|
|
* \param window the window from which the drawable size should be queried
|
|
|
|
|
* \param w a pointer to variable for storing the width in pixels, may be NULL
|
|
|
|
@ -997,26 +964,24 @@ extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
|
|
|
|
|
* \sa SDL_CreateWindow
|
|
|
|
|
* \sa SDL_GetWindowSize
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowSizeInPixels(SDL_Window * window,
|
|
|
|
|
int *w, int *h);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the minimum size of a window's client area.
|
|
|
|
|
* Set the minimum size of a window's client area, in screen coordinates.
|
|
|
|
|
*
|
|
|
|
|
* \param window the window to change
|
|
|
|
|
* \param min_w the minimum width of the window in pixels
|
|
|
|
|
* \param min_h the minimum height of the window in pixels
|
|
|
|
|
* \param min_w the minimum width of the window
|
|
|
|
|
* \param min_h the minimum height of the window
|
|
|
|
|
*
|
|
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowMinimumSize
|
|
|
|
|
* \sa SDL_SetWindowMaximumSize
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
|
|
|
|
|
int min_w, int min_h);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the minimum size of a window's client area.
|
|
|
|
|
* Get the minimum size of a window's client area, in screen coordinates.
|
|
|
|
|
*
|
|
|
|
|
* \param window the window to query
|
|
|
|
|
* \param w a pointer filled in with the minimum width of the window, may be
|
|
|
|
@ -1029,26 +994,24 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
|
|
|
|
|
* \sa SDL_GetWindowMaximumSize
|
|
|
|
|
* \sa SDL_SetWindowMinimumSize
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
|
|
|
|
|
int *w, int *h);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the maximum size of a window's client area.
|
|
|
|
|
* Set the maximum size of a window's client area, in screen coordinates.
|
|
|
|
|
*
|
|
|
|
|
* \param window the window to change
|
|
|
|
|
* \param max_w the maximum width of the window in pixels
|
|
|
|
|
* \param max_h the maximum height of the window in pixels
|
|
|
|
|
* \param max_w the maximum width of the window
|
|
|
|
|
* \param max_h the maximum height of the window
|
|
|
|
|
*
|
|
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowMaximumSize
|
|
|
|
|
* \sa SDL_SetWindowMinimumSize
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
|
|
|
|
|
int max_w, int max_h);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the maximum size of a window's client area.
|
|
|
|
|
* Get the maximum size of a window's client area, in screen coordinates.
|
|
|
|
|
*
|
|
|
|
|
* \param window the window to query
|
|
|
|
|
* \param w a pointer filled in with the maximum width of the window, may be
|
|
|
|
@ -1061,8 +1024,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
|
|
|
|
|
* \sa SDL_GetWindowMinimumSize
|
|
|
|
|
* \sa SDL_SetWindowMaximumSize
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
|
|
|
|
|
int *w, int *h);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the border state of a window.
|
|
|
|
@ -1080,8 +1042,7 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowFlags
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
|
|
|
|
|
SDL_bool bordered);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the user-resizable state of a window.
|
|
|
|
@ -1099,8 +1060,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowFlags
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
|
|
|
|
|
SDL_bool resizable);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the window to always be above the others.
|
|
|
|
@ -1116,8 +1076,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GetWindowFlags
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window,
|
|
|
|
|
SDL_bool on_top);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL_bool on_top);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Show a window.
|
|
|
|
@ -1204,8 +1163,7 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
|
|
|
|
|
* \sa SDL_GetWindowDisplayMode
|
|
|
|
|
* \sa SDL_SetWindowDisplayMode
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
|
|
|
|
|
Uint32 flags);
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, Uint32 flags);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the SDL surface associated with the window.
|
|
|
|
@ -1271,9 +1229,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
|
|
|
|
|
* \sa SDL_GetWindowSurface
|
|
|
|
|
* \sa SDL_UpdateWindowSurface
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
|
|
|
|
|
const SDL_Rect * rects,
|
|
|
|
|
int numrects);
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set a window's input grab mode.
|
|
|
|
@ -1293,8 +1249,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
|
|
|
|
|
* \sa SDL_GetGrabbedWindow
|
|
|
|
|
* \sa SDL_GetWindowGrab
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
|
|
|
|
|
SDL_bool grabbed);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window *window, SDL_bool grabbed);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set a window's keyboard grab mode.
|
|
|
|
@ -1324,8 +1279,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
|
|
|
|
|
* \sa SDL_SetWindowMouseGrab
|
|
|
|
|
* \sa SDL_SetWindowGrab
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
|
|
|
|
|
SDL_bool grabbed);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window *window, SDL_bool grabbed);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set a window's mouse grab mode.
|
|
|
|
@ -1341,8 +1295,7 @@ extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
|
|
|
|
|
* \sa SDL_SetWindowKeyboardGrab
|
|
|
|
|
* \sa SDL_SetWindowGrab
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window * window,
|
|
|
|
|
SDL_bool grabbed);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window *window, SDL_bool grabbed);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get a window's input grab mode.
|
|
|
|
@ -1568,9 +1521,7 @@ typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
|
|
|
|
|
*
|
|
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
|
|
|
|
|
SDL_HitTest callback,
|
|
|
|
|
void *callback_data);
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Request a window to demand attention from the user.
|
|
|
|
@ -1770,8 +1721,7 @@ extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
|
|
|
|
|
*
|
|
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
|
|
|
|
|
*extension);
|
|
|
|
|
extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char *extension);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reset all previously set OpenGL context attributes to their default values.
|
|
|
|
@ -1838,8 +1788,7 @@ extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
|
|
|
|
|
* \sa SDL_GL_DeleteContext
|
|
|
|
|
* \sa SDL_GL_MakeCurrent
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
|
|
|
|
|
window);
|
|
|
|
|
extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *window);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set up an OpenGL context for rendering into an OpenGL window.
|
|
|
|
@ -1855,8 +1804,7 @@ extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
|
|
|
|
|
*
|
|
|
|
|
* \sa SDL_GL_CreateContext
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
|
|
|
|
|
SDL_GLContext context);
|
|
|
|
|
extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the currently active OpenGL window.
|
|
|
|
@ -1941,11 +1889,6 @@ extern DECLSPEC void SDLCALL SDL_EGL_SetEGLAttributeCallbacks(SDL_EGLAttribArray
|
|
|
|
|
*
|
|
|
|
|
* This returns info useful for calling glViewport().
|
|
|
|
|
*
|
|
|
|
|
* This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
|
|
|
|
|
* drawable, i.e. the window was created with `SDL_WINDOW_ALLOW_HIGHDPI` on a
|
|
|
|
|
* platform with high-DPI support (Apple calls this "Retina"), and not
|
|
|
|
|
* disabled by the `SDL_HINT_VIDEO_HIGHDPI_DISABLED` hint.
|
|
|
|
|
*
|
|
|
|
|
* \param window the window from which the drawable size should be queried
|
|
|
|
|
* \param w a pointer to variable for storing the width in pixels, may be NULL
|
|
|
|
|
* \param h a pointer to variable for storing the height in pixels, may be
|
|
|
|
@ -1956,8 +1899,7 @@ extern DECLSPEC void SDLCALL SDL_EGL_SetEGLAttributeCallbacks(SDL_EGLAttribArray
|
|
|
|
|
* \sa SDL_CreateWindow
|
|
|
|
|
* \sa SDL_GetWindowSize
|
|
|
|
|
*/
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
|
|
|
|
|
int *h);
|
|
|
|
|
extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window *window, int *w, int *h);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the swap interval for the current OpenGL context.
|
|
|
|
|