|
@@ -348,8 +348,7 @@ typedef enum SDL_GLContextResetNotification
|
|
|
/**
|
|
|
* Get the number of video drivers compiled into SDL.
|
|
|
*
|
|
|
- * \returns a number >= 1 on success or a negative error code on failure; call
|
|
|
- * SDL_GetError() for more information.
|
|
|
+ * \returns the number of built in video drivers.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
@@ -476,7 +475,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetDisplayName(SDL_DisplayID displa
|
|
|
*
|
|
|
* \param displayID the instance ID of the display to query.
|
|
|
* \param rect the SDL_Rect structure filled in with the display bounds.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -484,7 +483,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetDisplayName(SDL_DisplayID displa
|
|
|
* \sa SDL_GetDisplayUsableBounds
|
|
|
* \sa SDL_GetDisplays
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect *rect);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect *rect);
|
|
|
|
|
|
/**
|
|
|
* Get the usable desktop area represented by a display, in screen
|
|
@@ -500,7 +499,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDisplayBounds(SDL_DisplayID displayID, SD
|
|
|
*
|
|
|
* \param displayID the instance ID of the display to query.
|
|
|
* \param rect the SDL_Rect structure filled in with the display bounds.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -508,7 +507,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDisplayBounds(SDL_DisplayID displayID, SD
|
|
|
* \sa SDL_GetDisplayBounds
|
|
|
* \sa SDL_GetDisplays
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect *rect);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect *rect);
|
|
|
|
|
|
/**
|
|
|
* Get the orientation of a display when it is unrotated.
|
|
@@ -599,7 +598,7 @@ extern SDL_DECLSPEC SDL_DisplayMode ** SDLCALL SDL_GetFullscreenDisplayModes(SDL
|
|
|
* the search.
|
|
|
* \param mode a pointer filled in with the closest display mode equal to or
|
|
|
* larger than the desired mode.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -607,7 +606,7 @@ extern SDL_DECLSPEC SDL_DisplayMode ** SDLCALL SDL_GetFullscreenDisplayModes(SDL
|
|
|
* \sa SDL_GetDisplays
|
|
|
* \sa SDL_GetFullscreenDisplayModes
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, SDL_bool include_high_density_modes, SDL_DisplayMode *mode);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, SDL_bool include_high_density_modes, SDL_DisplayMode *mode);
|
|
|
|
|
|
/**
|
|
|
* Get information about the desktop's display mode.
|
|
@@ -752,7 +751,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetWindowDisplayScale(SDL_Window *window);
|
|
|
* borderless fullscreen desktop mode, or one of the fullscreen
|
|
|
* modes returned by SDL_GetFullscreenDisplayModes() to set an
|
|
|
* exclusive fullscreen mode.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -761,7 +760,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetWindowDisplayScale(SDL_Window *window);
|
|
|
* \sa SDL_SetWindowFullscreen
|
|
|
* \sa SDL_SyncWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowFullscreenMode(SDL_Window *window, const SDL_DisplayMode *mode);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowFullscreenMode(SDL_Window *window, const SDL_DisplayMode *mode);
|
|
|
|
|
|
/**
|
|
|
* Query the display mode to use when a window is visible at fullscreen.
|
|
@@ -1328,14 +1327,14 @@ extern SDL_DECLSPEC SDL_WindowFlags SDLCALL SDL_GetWindowFlags(SDL_Window *windo
|
|
|
*
|
|
|
* \param window the window to change.
|
|
|
* \param title the desired window title in UTF-8 format.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GetWindowTitle
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowTitle(SDL_Window *window, const char *title);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowTitle(SDL_Window *window, const char *title);
|
|
|
|
|
|
/**
|
|
|
* Get the title of a window.
|
|
@@ -1365,12 +1364,12 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetWindowTitle(SDL_Window *window);
|
|
|
*
|
|
|
* \param window the window to change.
|
|
|
* \param icon an SDL_Surface structure containing the icon for the window.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon);
|
|
|
|
|
|
/**
|
|
|
* Request that the window's position be set.
|
|
@@ -1402,7 +1401,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surfac
|
|
|
* `SDL_WINDOWPOS_UNDEFINED`.
|
|
|
* \param y the y coordinate of the window, or `SDL_WINDOWPOS_CENTERED` or
|
|
|
* `SDL_WINDOWPOS_UNDEFINED`.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1410,7 +1409,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surfac
|
|
|
* \sa SDL_GetWindowPosition
|
|
|
* \sa SDL_SyncWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowPosition(SDL_Window *window, int x, int y);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowPosition(SDL_Window *window, int x, int y);
|
|
|
|
|
|
/**
|
|
|
* Get the position of a window.
|
|
@@ -1426,14 +1425,14 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowPosition(SDL_Window *window, int x,
|
|
|
* NULL.
|
|
|
* \param y a pointer filled in with the y position of the window, may be
|
|
|
* NULL.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_SetWindowPosition
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetWindowPosition(SDL_Window *window, int *x, int *y);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowPosition(SDL_Window *window, int *x, int *y);
|
|
|
|
|
|
/**
|
|
|
* Request that the size of a window's client area be set.
|
|
@@ -1460,7 +1459,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowPosition(SDL_Window *window, int *x
|
|
|
* \param window the window to change.
|
|
|
* \param w the width of the window, must be > 0.
|
|
|
* \param h the height of the window, must be > 0.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1469,7 +1468,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowPosition(SDL_Window *window, int *x
|
|
|
* \sa SDL_SetWindowFullscreenMode
|
|
|
* \sa SDL_SyncWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowSize(SDL_Window *window, int w, int h);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowSize(SDL_Window *window, int w, int h);
|
|
|
|
|
|
/**
|
|
|
* Get the size of a window's client area.
|
|
@@ -1481,7 +1480,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowSize(SDL_Window *window, int w, int
|
|
|
* \param window the window to query the width and height from.
|
|
|
* \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.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1490,7 +1489,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowSize(SDL_Window *window, int w, int
|
|
|
* \sa SDL_GetWindowSizeInPixels
|
|
|
* \sa SDL_SetWindowSize
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, int *h);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, int *h);
|
|
|
|
|
|
/**
|
|
|
* Get the safe area for this window.
|
|
@@ -1505,12 +1504,12 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, in
|
|
|
* \param window the window to query.
|
|
|
* \param rect a pointer filled in with the client area that is safe for
|
|
|
* interactive content.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSafeArea(SDL_Window *window, SDL_Rect *rect);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowSafeArea(SDL_Window *window, SDL_Rect *rect);
|
|
|
|
|
|
/**
|
|
|
* Request that the aspect ratio of a window's client area be set.
|
|
@@ -1541,7 +1540,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSafeArea(SDL_Window *window, SDL_Re
|
|
|
* limit.
|
|
|
* \param max_aspect the maximum aspect ratio of the window, or 0.0f for no
|
|
|
* limit.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1549,7 +1548,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSafeArea(SDL_Window *window, SDL_Re
|
|
|
* \sa SDL_GetWindowAspectRatio
|
|
|
* \sa SDL_SyncWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowAspectRatio(SDL_Window *window, float min_aspect, float max_aspect);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowAspectRatio(SDL_Window *window, float min_aspect, float max_aspect);
|
|
|
|
|
|
/**
|
|
|
* Get the size of a window's client area.
|
|
@@ -1559,14 +1558,14 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowAspectRatio(SDL_Window *window, flo
|
|
|
* window, may be NULL.
|
|
|
* \param max_aspect a pointer filled in with the maximum aspect ratio of the
|
|
|
* window, may be NULL.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_SetWindowAspectRatio
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetWindowAspectRatio(SDL_Window *window, float *min_aspect, float *max_aspect);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowAspectRatio(SDL_Window *window, float *min_aspect, float *max_aspect);
|
|
|
|
|
|
/**
|
|
|
* Get the size of a window's borders (decorations) around the client area.
|
|
@@ -1593,14 +1592,14 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowAspectRatio(SDL_Window *window, flo
|
|
|
* border; NULL is permitted.
|
|
|
* \param right pointer to variable for storing the size of the right border;
|
|
|
* NULL is permitted.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GetWindowSize
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right);
|
|
|
|
|
|
/**
|
|
|
* Get the size of a window's client area, in pixels.
|
|
@@ -1610,7 +1609,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window *window, int
|
|
|
* NULL.
|
|
|
* \param h a pointer to variable for storing the height in pixels, may be
|
|
|
* NULL.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1618,7 +1617,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window *window, int
|
|
|
* \sa SDL_CreateWindow
|
|
|
* \sa SDL_GetWindowSize
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h);
|
|
|
|
|
|
/**
|
|
|
* Set the minimum size of a window's client area.
|
|
@@ -1626,7 +1625,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSizeInPixels(SDL_Window *window, in
|
|
|
* \param window the window to change.
|
|
|
* \param min_w the minimum width of the window, or 0 for no limit.
|
|
|
* \param min_h the minimum height of the window, or 0 for no limit.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1634,7 +1633,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSizeInPixels(SDL_Window *window, in
|
|
|
* \sa SDL_GetWindowMinimumSize
|
|
|
* \sa SDL_SetWindowMaximumSize
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h);
|
|
|
|
|
|
/**
|
|
|
* Get the minimum size of a window's client area.
|
|
@@ -1644,7 +1643,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowMinimumSize(SDL_Window *window, int
|
|
|
* NULL.
|
|
|
* \param h a pointer filled in with the minimum height of the window, may be
|
|
|
* NULL.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1652,7 +1651,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowMinimumSize(SDL_Window *window, int
|
|
|
* \sa SDL_GetWindowMaximumSize
|
|
|
* \sa SDL_SetWindowMinimumSize
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h);
|
|
|
|
|
|
/**
|
|
|
* Set the maximum size of a window's client area.
|
|
@@ -1660,7 +1659,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowMinimumSize(SDL_Window *window, int
|
|
|
* \param window the window to change.
|
|
|
* \param max_w the maximum width of the window, or 0 for no limit.
|
|
|
* \param max_h the maximum height of the window, or 0 for no limit.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1668,7 +1667,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowMinimumSize(SDL_Window *window, int
|
|
|
* \sa SDL_GetWindowMaximumSize
|
|
|
* \sa SDL_SetWindowMinimumSize
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h);
|
|
|
|
|
|
/**
|
|
|
* Get the maximum size of a window's client area.
|
|
@@ -1678,7 +1677,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowMaximumSize(SDL_Window *window, int
|
|
|
* NULL.
|
|
|
* \param h a pointer filled in with the maximum height of the window, may be
|
|
|
* NULL.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1686,7 +1685,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowMaximumSize(SDL_Window *window, int
|
|
|
* \sa SDL_GetWindowMinimumSize
|
|
|
* \sa SDL_SetWindowMaximumSize
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h);
|
|
|
|
|
|
/**
|
|
|
* Set the border state of a window.
|
|
@@ -1699,14 +1698,14 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowMaximumSize(SDL_Window *window, int
|
|
|
*
|
|
|
* \param window the window of which to change the border state.
|
|
|
* \param bordered SDL_FALSE to remove border, SDL_TRUE to add border.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GetWindowFlags
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered);
|
|
|
|
|
|
/**
|
|
|
* Set the user-resizable state of a window.
|
|
@@ -1719,14 +1718,14 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowBordered(SDL_Window *window, SDL_bo
|
|
|
*
|
|
|
* \param window the window of which to change the resizable state.
|
|
|
* \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GetWindowFlags
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable);
|
|
|
|
|
|
/**
|
|
|
* Set the window to always be above the others.
|
|
@@ -1737,20 +1736,20 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowResizable(SDL_Window *window, SDL_b
|
|
|
* \param window the window of which to change the always on top state.
|
|
|
* \param on_top SDL_TRUE to set the window always on top, SDL_FALSE to
|
|
|
* disable.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GetWindowFlags
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL_bool on_top);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL_bool on_top);
|
|
|
|
|
|
/**
|
|
|
* Show a window.
|
|
|
*
|
|
|
* \param window the window to show.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1758,20 +1757,20 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL
|
|
|
* \sa SDL_HideWindow
|
|
|
* \sa SDL_RaiseWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_ShowWindow(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_ShowWindow(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Hide a window.
|
|
|
*
|
|
|
* \param window the window to hide.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_ShowWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_HideWindow(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HideWindow(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Request that a window be raised above other windows and gain the input
|
|
@@ -1784,12 +1783,12 @@ extern SDL_DECLSPEC int SDLCALL SDL_HideWindow(SDL_Window *window);
|
|
|
* the window will have the SDL_WINDOW_INPUT_FOCUS flag set.
|
|
|
*
|
|
|
* \param window the window to raise.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_RaiseWindow(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_RaiseWindow(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Request that the window be made as large as possible.
|
|
@@ -1812,7 +1811,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_RaiseWindow(SDL_Window *window);
|
|
|
* and Wayland window managers may vary.
|
|
|
*
|
|
|
* \param window the window to maximize.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1821,7 +1820,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_RaiseWindow(SDL_Window *window);
|
|
|
* \sa SDL_RestoreWindow
|
|
|
* \sa SDL_SyncWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_MaximizeWindow(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_MaximizeWindow(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Request that the window be minimized to an iconic representation.
|
|
@@ -1836,7 +1835,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_MaximizeWindow(SDL_Window *window);
|
|
|
* deny the state change.
|
|
|
*
|
|
|
* \param window the window to minimize.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1845,7 +1844,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_MaximizeWindow(SDL_Window *window);
|
|
|
* \sa SDL_RestoreWindow
|
|
|
* \sa SDL_SyncWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_MinimizeWindow(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_MinimizeWindow(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Request that the size and position of a minimized or maximized window be
|
|
@@ -1861,7 +1860,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_MinimizeWindow(SDL_Window *window);
|
|
|
* deny the state change.
|
|
|
*
|
|
|
* \param window the window to restore.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1870,7 +1869,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_MinimizeWindow(SDL_Window *window);
|
|
|
* \sa SDL_MinimizeWindow
|
|
|
* \sa SDL_SyncWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_RestoreWindow(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_RestoreWindow(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Request that the window's fullscreen state be changed.
|
|
@@ -1891,7 +1890,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_RestoreWindow(SDL_Window *window);
|
|
|
* \param window the window to change.
|
|
|
* \param fullscreen SDL_TRUE for fullscreen mode, SDL_FALSE for windowed
|
|
|
* mode.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -1900,7 +1899,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_RestoreWindow(SDL_Window *window);
|
|
|
* \sa SDL_SetWindowFullscreenMode
|
|
|
* \sa SDL_SyncWindow
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, SDL_bool fullscreen);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, SDL_bool fullscreen);
|
|
|
|
|
|
/**
|
|
|
* Block until any pending window state is finalized.
|
|
@@ -1916,9 +1915,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, SDL_
|
|
|
*
|
|
|
* \param window the window for which to wait for the pending state to be
|
|
|
* applied.
|
|
|
- * \returns 0 on success, a positive value if the operation timed out before
|
|
|
- * the window was in the requested state, or a negative error code on
|
|
|
- * failure; call SDL_GetError() for more information.
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE if the operation timed out before
|
|
|
+ * the window was in the requested state.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
@@ -1930,7 +1928,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, SDL_
|
|
|
* \sa SDL_RestoreWindow
|
|
|
* \sa SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SyncWindow(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SyncWindow(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Return whether the window has a surface associated with it.
|
|
@@ -1987,14 +1985,14 @@ extern SDL_DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window *windo
|
|
|
*
|
|
|
* \param window the window.
|
|
|
* \param vsync the vertical refresh sync interval.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GetWindowSurfaceVSync
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowSurfaceVSync(SDL_Window *window, int vsync);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowSurfaceVSync(SDL_Window *window, int vsync);
|
|
|
|
|
|
#define SDL_WINDOW_SURFACE_VSYNC_DISABLED 0
|
|
|
#define SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE (-1)
|
|
@@ -2005,14 +2003,14 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowSurfaceVSync(SDL_Window *window, in
|
|
|
* \param window the window to query.
|
|
|
* \param vsync an int filled with the current vertical refresh sync interval.
|
|
|
* See SDL_SetWindowSurfaceVSync() for the meaning of the value.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_SetWindowSurfaceVSync
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSurfaceVSync(SDL_Window *window, int *vsync);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GetWindowSurfaceVSync(SDL_Window *window, int *vsync);
|
|
|
|
|
|
/**
|
|
|
* Copy the window surface to the screen.
|
|
@@ -2023,7 +2021,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSurfaceVSync(SDL_Window *window, in
|
|
|
* This function is equivalent to the SDL 1.2 API SDL_Flip().
|
|
|
*
|
|
|
* \param window the window to update.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2031,7 +2029,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetWindowSurfaceVSync(SDL_Window *window, in
|
|
|
* \sa SDL_GetWindowSurface
|
|
|
* \sa SDL_UpdateWindowSurfaceRects
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_UpdateWindowSurface(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Copy areas of the window surface to the screen.
|
|
@@ -2050,7 +2048,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window *window);
|
|
|
* \param rects an array of SDL_Rect structures representing areas of the
|
|
|
* surface to copy, in pixels.
|
|
|
* \param numrects the number of rectangles.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2058,13 +2056,13 @@ extern SDL_DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window *window);
|
|
|
* \sa SDL_GetWindowSurface
|
|
|
* \sa SDL_UpdateWindowSurface
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects);
|
|
|
|
|
|
/**
|
|
|
* Destroy the surface associated with the window.
|
|
|
*
|
|
|
* \param window the window to update.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2072,7 +2070,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window *window,
|
|
|
* \sa SDL_GetWindowSurface
|
|
|
* \sa SDL_WindowHasSurface
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_DestroyWindowSurface(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Set a window's keyboard grab mode.
|
|
@@ -2095,7 +2093,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window);
|
|
|
*
|
|
|
* \param window the window for which the keyboard grab mode should be set.
|
|
|
* \param grabbed this is SDL_TRUE to grab keyboard, and SDL_FALSE to release.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2103,7 +2101,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_DestroyWindowSurface(SDL_Window *window);
|
|
|
* \sa SDL_GetWindowKeyboardGrab
|
|
|
* \sa SDL_SetWindowMouseGrab
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window *window, SDL_bool grabbed);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window *window, SDL_bool grabbed);
|
|
|
|
|
|
/**
|
|
|
* Set a window's mouse grab mode.
|
|
@@ -2112,7 +2110,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window *window, SD
|
|
|
*
|
|
|
* \param window the window for which the mouse grab mode should be set.
|
|
|
* \param grabbed this is SDL_TRUE to grab mouse, and SDL_FALSE to release.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2120,7 +2118,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window *window, SD
|
|
|
* \sa SDL_GetWindowMouseGrab
|
|
|
* \sa SDL_SetWindowKeyboardGrab
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowMouseGrab(SDL_Window *window, SDL_bool grabbed);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowMouseGrab(SDL_Window *window, SDL_bool grabbed);
|
|
|
|
|
|
/**
|
|
|
* Get a window's keyboard grab mode.
|
|
@@ -2167,7 +2165,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
|
|
|
* \param window the window that will be associated with the barrier.
|
|
|
* \param rect a rectangle area in window-relative coordinates. If NULL the
|
|
|
* barrier for the specified window will be destroyed.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2175,7 +2173,7 @@ extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
|
|
|
* \sa SDL_GetWindowMouseRect
|
|
|
* \sa SDL_SetWindowMouseGrab
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect);
|
|
|
|
|
|
/**
|
|
|
* Get the mouse confinement rectangle of a window.
|
|
@@ -2200,14 +2198,14 @@ extern SDL_DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window *
|
|
|
*
|
|
|
* \param window the window which will be made transparent or opaque.
|
|
|
* \param opacity the opacity value (0.0f - transparent, 1.0f - opaque).
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GetWindowOpacity
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window *window, float opacity);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowOpacity(SDL_Window *window, float opacity);
|
|
|
|
|
|
/**
|
|
|
* Get the opacity of a window.
|
|
@@ -2216,8 +2214,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window *window, float o
|
|
|
* as 1.0f without error.
|
|
|
*
|
|
|
* \param window the window to get the current opacity value from.
|
|
|
- * \returns the opacity, (0.0f - transparent, 1.0f - opaque), or a negative
|
|
|
- * error code on failure; call SDL_GetError() for more information.
|
|
|
+ * \returns the opacity, (0.0f - transparent, 1.0f - opaque), or -1.0f on failure; call SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
@@ -2237,12 +2234,12 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetWindowOpacity(SDL_Window *window);
|
|
|
*
|
|
|
* \param modal_window the window that should be set modal.
|
|
|
* \param parent_window the parent window for the modal window.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window *modal_window, SDL_Window *parent_window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowModalFor(SDL_Window *modal_window, SDL_Window *parent_window);
|
|
|
|
|
|
/**
|
|
|
* Set whether the window may have input focus.
|
|
@@ -2250,12 +2247,12 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window *modal_window,
|
|
|
* \param window the window to set focusable state.
|
|
|
* \param focusable SDL_TRUE to allow input focus, SDL_FALSE to not allow
|
|
|
* input focus.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowFocusable(SDL_Window *window, SDL_bool focusable);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowFocusable(SDL_Window *window, SDL_bool focusable);
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -2274,12 +2271,12 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowFocusable(SDL_Window *window, SDL_b
|
|
|
* the client area.
|
|
|
* \param y the y coordinate of the menu, relative to the origin (top-left) of
|
|
|
* the client area.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_ShowWindowSystemMenu(SDL_Window *window, int x, int y);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_ShowWindowSystemMenu(SDL_Window *window, int x, int y);
|
|
|
|
|
|
/**
|
|
|
* Possible return values from the SDL_HitTest callback.
|
|
@@ -2337,7 +2334,7 @@ typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
|
|
|
* Specifying NULL for a callback disables hit-testing. Hit-testing is
|
|
|
* disabled by default.
|
|
|
*
|
|
|
- * Platforms that don't support this functionality will return -1
|
|
|
+ * Platforms that don't support this functionality will return SDL_FALSE
|
|
|
* unconditionally, even if you're attempting to disable hit-testing.
|
|
|
*
|
|
|
* Your callback may fire at any time, and its firing does not indicate any
|
|
@@ -2351,12 +2348,12 @@ typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
|
|
|
* \param window the window to set hit-testing on.
|
|
|
* \param callback the function to call when doing a hit-test.
|
|
|
* \param callback_data an app-defined void pointer passed to **callback**.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data);
|
|
|
|
|
|
/**
|
|
|
* Set the shape of a transparent window.
|
|
@@ -2375,24 +2372,24 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_Hit
|
|
|
* \param window the window.
|
|
|
* \param shape the surface representing the shape of the window, or NULL to
|
|
|
* remove any current shape.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape);
|
|
|
|
|
|
/**
|
|
|
* Request a window to demand attention from the user.
|
|
|
*
|
|
|
* \param window the window to be flashed.
|
|
|
* \param operation the operation to perform.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation);
|
|
|
|
|
|
/**
|
|
|
* Destroy a window.
|
|
@@ -2431,7 +2428,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_ScreenSaverEnabled(void);
|
|
|
/**
|
|
|
* Allow the screen to be blanked by a screen saver.
|
|
|
*
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2439,7 +2436,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_ScreenSaverEnabled(void);
|
|
|
* \sa SDL_DisableScreenSaver
|
|
|
* \sa SDL_ScreenSaverEnabled
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_EnableScreenSaver(void);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_EnableScreenSaver(void);
|
|
|
|
|
|
/**
|
|
|
* Prevent the screen from being blanked by a screen saver.
|
|
@@ -2450,7 +2447,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_EnableScreenSaver(void);
|
|
|
* The screensaver is disabled by default, but this may by changed by
|
|
|
* SDL_HINT_VIDEO_ALLOW_SCREENSAVER.
|
|
|
*
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2458,7 +2455,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_EnableScreenSaver(void);
|
|
|
* \sa SDL_EnableScreenSaver
|
|
|
* \sa SDL_ScreenSaverEnabled
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_DisableScreenSaver(void);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_DisableScreenSaver(void);
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -2478,7 +2475,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_DisableScreenSaver(void);
|
|
|
*
|
|
|
* \param path the platform dependent OpenGL library name, or NULL to open the
|
|
|
* default OpenGL library.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2486,7 +2483,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_DisableScreenSaver(void);
|
|
|
* \sa SDL_GL_GetProcAddress
|
|
|
* \sa SDL_GL_UnloadLibrary
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GL_LoadLibrary(const char *path);
|
|
|
|
|
|
/**
|
|
|
* Get an OpenGL function by name.
|
|
@@ -2609,7 +2606,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
|
|
|
* \param attr an SDL_GLattr enum value specifying the OpenGL attribute to
|
|
|
* set.
|
|
|
* \param value the desired value for the attribute.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2617,7 +2614,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
|
|
|
* \sa SDL_GL_GetAttribute
|
|
|
* \sa SDL_GL_ResetAttributes
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
|
|
|
|
|
|
/**
|
|
|
* Get the actual value for an attribute from the current context.
|
|
@@ -2625,7 +2622,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
|
|
|
* \param attr an SDL_GLattr enum value specifying the OpenGL attribute to
|
|
|
* get.
|
|
|
* \param value a pointer filled in with the current value of `attr`.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
@@ -2633,7 +2630,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
|
|
|
* \sa SDL_GL_ResetAttributes
|
|
|
* \sa SDL_GL_SetAttribute
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
|
|
|
|
|
|
/**
|
|
|
* Create an OpenGL context for an OpenGL window, and make it current.
|
|
@@ -2664,14 +2661,14 @@ extern SDL_DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *windo
|
|
|
*
|
|
|
* \param window the window to associate with the context.
|
|
|
* \param context the OpenGL context to associate with the window.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GL_CreateContext
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context);
|
|
|
|
|
|
/**
|
|
|
* Get the currently active OpenGL window.
|
|
@@ -2760,7 +2757,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_EGL_SetAttributeCallbacks(SDL_EGLAttribArra
|
|
|
* the vertical retrace for a given frame, it swaps buffers immediately, which
|
|
|
* might be less jarring for the user during occasional framerate drops. If an
|
|
|
* application requests adaptive vsync and the system does not support it,
|
|
|
- * this function will fail and return -1. In such a case, you should probably
|
|
|
+ * this function will fail and return SDL_FALSE. In such a case, you should probably
|
|
|
* retry the call with 1 for the interval.
|
|
|
*
|
|
|
* Adaptive vsync is implemented for some glX drivers with
|
|
@@ -2772,14 +2769,14 @@ extern SDL_DECLSPEC void SDLCALL SDL_EGL_SetAttributeCallbacks(SDL_EGLAttribArra
|
|
|
*
|
|
|
* \param interval 0 for immediate updates, 1 for updates synchronized with
|
|
|
* the vertical retrace, -1 for adaptive vsync.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GL_GetSwapInterval
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GL_SetSwapInterval(int interval);
|
|
|
|
|
|
/**
|
|
|
* Get the swap interval for the current OpenGL context.
|
|
@@ -2791,14 +2788,14 @@ extern SDL_DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
|
|
|
* synchronization, 1 if the buffer swap is synchronized with
|
|
|
* the vertical retrace, and -1 if late swaps happen
|
|
|
* immediately instead of waiting for the next retrace.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GL_SetSwapInterval
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(int *interval);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GL_GetSwapInterval(int *interval);
|
|
|
|
|
|
/**
|
|
|
* Update a window with OpenGL rendering.
|
|
@@ -2811,25 +2808,25 @@ extern SDL_DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(int *interval);
|
|
|
* extra.
|
|
|
*
|
|
|
* \param window the window to change.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GL_SwapWindow(SDL_Window *window);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GL_SwapWindow(SDL_Window *window);
|
|
|
|
|
|
/**
|
|
|
* Delete an OpenGL context.
|
|
|
*
|
|
|
* \param context the OpenGL context to be deleted.
|
|
|
- * \returns 0 on success or a negative error code on failure; call
|
|
|
+ * \returns SDL_TRUE on success or SDL_FALSE on failure; call
|
|
|
* SDL_GetError() for more information.
|
|
|
*
|
|
|
* \since This function is available since SDL 3.0.0.
|
|
|
*
|
|
|
* \sa SDL_GL_CreateContext
|
|
|
*/
|
|
|
-extern SDL_DECLSPEC int SDLCALL SDL_GL_DestroyContext(SDL_GLContext context);
|
|
|
+extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GL_DestroyContext(SDL_GLContext context);
|
|
|
|
|
|
/* @} *//* OpenGL support functions */
|
|
|
|