Sync wiki -> header

This commit is contained in:
SDL Wiki Bot
2021-10-27 01:36:05 +00:00
parent 6b8e880a10
commit c7dafb1556
40 changed files with 1001 additions and 9 deletions

View File

@@ -286,6 +286,8 @@ typedef enum
* \returns a number >= 1 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetVideoDriver
*/
extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
@@ -299,6 +301,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
* \param index the index of a video driver
* \returns the name of the video driver with the given **index**.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetNumVideoDrivers
*/
extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
@@ -325,6 +329,8 @@ extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetNumVideoDrivers
* \sa SDL_GetVideoDriver
* \sa SDL_InitSubSystem
@@ -337,6 +343,8 @@ extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);
*
* This function closes all windows, and restores the original video mode.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_VideoInit
*/
extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
@@ -390,6 +398,8 @@ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetNumVideoDisplays
*/
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
@@ -458,6 +468,8 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, fl
* \returns The SDL_DisplayOrientation enum value of the display, or
* `SDL_ORIENTATION_UNKNOWN` if it isn't available.
*
* \since This function is available since SDL 2.0.9.
*
* \sa SDL_GetNumVideoDisplays
*/
extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
@@ -497,6 +509,8 @@ extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetNumDisplayModes
*/
extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
@@ -516,6 +530,8 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetCurrentDisplayMode
* \sa SDL_GetDisplayMode
* \sa SDL_SetWindowDisplayMode
@@ -536,6 +552,8 @@ extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_Disp
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetDesktopDisplayMode
* \sa SDL_GetDisplayMode
* \sa SDL_GetNumVideoDisplays
@@ -562,6 +580,8 @@ extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_Disp
* \returns the passed in value `closest` or NULL if no matching video mode
* was available; call SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetDisplayMode
* \sa SDL_GetNumDisplayModes
*/
@@ -575,6 +595,8 @@ extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayI
* success or a negative error code on failure; call SDL_GetError()
* for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetDisplayBounds
* \sa SDL_GetNumVideoDisplays
*/
@@ -594,6 +616,8 @@ extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowDisplayMode
* \sa SDL_SetWindowFullscreen
*/
@@ -609,6 +633,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_SetWindowDisplayMode
* \sa SDL_SetWindowFullscreen
*/
@@ -624,6 +650,9 @@ extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
* \param size the size of the ICC profile
* \returns the raw ICC profile data on success or NULL on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL git HEAD (in development, not
* in an official release yet).
*/
extern DECLSPEC void* SDLCALL SDL_GetWindowICCProfile(SDL_Window * window, size_t* size);
@@ -634,6 +663,8 @@ extern DECLSPEC void* SDLCALL SDL_GetWindowICCProfile(SDL_Window * window, size_
* \returns the pixel format of the window on success or
* SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more
* information.
*
* \since This function is available since SDL 2.0.0.
*/
extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
@@ -721,6 +752,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
* \returns the window that was created or NULL on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_CreateWindow
* \sa SDL_DestroyWindow
*/
@@ -752,6 +785,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
* \returns the window associated with `id` or NULL if it doesn't exist; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowID
*/
extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
@@ -762,6 +797,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
* \param window the window to query
* \returns a mask of the SDL_WindowFlags associated with `window`
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_CreateWindow
* \sa SDL_HideWindow
* \sa SDL_MaximizeWindow
@@ -780,6 +817,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
* \param window the window to change
* \param title the desired window title in UTF-8 format
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowTitle
*/
extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
@@ -792,6 +831,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
* \returns the title of the window in UTF-8 format or "" if there is no
* title.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_SetWindowTitle
*/
extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
@@ -801,6 +842,8 @@ extern 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
*
* \since This function is available since SDL 2.0.0.
*/
extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
SDL_Surface * icon);
@@ -815,6 +858,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
* \param userdata the associated pointer
* \returns the previous value associated with `name`.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowData
*/
extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
@@ -828,6 +873,8 @@ extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
* \param name the name of the pointer
* \returns the value associated with `name`.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_SetWindowData
*/
extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
@@ -844,6 +891,8 @@ extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
* \param y the y coordinate of the window in screen coordinates, or
* `SDL_WINDOWPOS_CENTERED` or `SDL_WINDOWPOS_UNDEFINED`
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowPosition
*/
extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
@@ -861,6 +910,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
* \param y a pointer filled in with the y position of the window, in screen
* coordinates, may be NULL
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_SetWindowPosition
*/
extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
@@ -883,6 +934,8 @@ extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
* \param h the height of the window in pixels, in screen coordinates, must be
* > 0
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowSize
* \sa SDL_SetWindowDisplayMode
*/
@@ -907,6 +960,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
* \param h a pointer filled in with the height of the window, in screen
* coordinates, may be NULL
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GL_GetDrawableSize
* \sa SDL_Vulkan_GetDrawableSize
* \sa SDL_SetWindowSize
@@ -957,6 +1012,8 @@ extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
* \param min_w the minimum width of the window in pixels
* \param min_h the minimum height of the window in pixels
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowMinimumSize
* \sa SDL_SetWindowMaximumSize
*/
@@ -972,6 +1029,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
* \param h a pointer filled in with the minimum height of the window, may be
* NULL
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowMaximumSize
* \sa SDL_SetWindowMinimumSize
*/
@@ -985,6 +1044,8 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
* \param max_w the maximum width of the window in pixels
* \param max_h the maximum height of the window in pixels
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowMaximumSize
* \sa SDL_SetWindowMinimumSize
*/
@@ -1000,6 +1061,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
* \param h a pointer filled in with the maximum height of the window, may be
* NULL
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowMinimumSize
* \sa SDL_SetWindowMaximumSize
*/
@@ -1066,6 +1129,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window,
*
* \param window the window to show
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_HideWindow
* \sa SDL_RaiseWindow
*/
@@ -1076,6 +1141,8 @@ extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
*
* \param window the window to hide
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_ShowWindow
*/
extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
@@ -1084,6 +1151,8 @@ extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
* Raise a window above other windows and set the input focus.
*
* \param window the window to raise
*
* \since This function is available since SDL 2.0.0.
*/
extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
@@ -1092,6 +1161,8 @@ extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
*
* \param window the window to maximize
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_MinimizeWindow
* \sa SDL_RestoreWindow
*/
@@ -1102,6 +1173,8 @@ extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
*
* \param window the window to minimize
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_MaximizeWindow
* \sa SDL_RestoreWindow
*/
@@ -1112,6 +1185,8 @@ extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
*
* \param window the window to restore
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_MaximizeWindow
* \sa SDL_MinimizeWindow
*/
@@ -1155,6 +1230,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
* \returns the surface associated with the window, or NULL on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_UpdateWindowSurface
* \sa SDL_UpdateWindowSurfaceRects
*/
@@ -1172,6 +1249,8 @@ extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowSurface
* \sa SDL_UpdateWindowSurfaceRects
*/
@@ -1192,6 +1271,8 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowSurface
* \sa SDL_UpdateWindowSurface
*/
@@ -1210,6 +1291,8 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
* \param window the window for which the input grab mode should be set
* \param grabbed SDL_TRUE to grab input or SDL_FALSE to release input
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetGrabbedWindow
* \sa SDL_GetWindowGrab
*/
@@ -1239,6 +1322,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
*
* \param window The window for which the mouse grab mode should be set.
*
* \since This function is available since SDL 2.0.16.
*
* \sa SDL_GetWindowMouseGrab
* \sa SDL_SetWindowKeyboardGrab
* \sa SDL_SetWindowGrab
@@ -1252,6 +1337,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window * window,
* \param window the window to query
* \returns SDL_TRUE if input is grabbed, SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_SetWindowGrab
*/
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
@@ -1262,6 +1349,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
* \param window the window to query
* \returns SDL_TRUE if keyboard is grabbed, and SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.0.16.
*
* \sa SDL_SetWindowKeyboardGrab
* \sa SDL_GetWindowGrab
*/
@@ -1273,6 +1362,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window * window);
* \param window the window to query
* \returns SDL_TRUE if mouse is grabbed, and SDL_FALSE otherwise.
*
* \since This function is available since SDL 2.0.16.
*
* \sa SDL_SetWindowKeyboardGrab
* \sa SDL_GetWindowGrab
*/
@@ -1311,6 +1402,8 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowBrightness
* \sa SDL_SetWindowGammaRamp
*/
@@ -1329,6 +1422,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float b
* \returns the brightness for the display where 0.0 is completely dark and
* 1.0 is normal brightness.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_SetWindowBrightness
*/
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
@@ -1428,6 +1523,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GetWindowGammaRamp
*/
extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
@@ -1454,6 +1551,8 @@ extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_SetWindowGammaRamp
*/
extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
@@ -1558,6 +1657,8 @@ extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, SDL_FlashOperat
*
* \param window the window to destroy
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_CreateWindow
* \sa SDL_CreateWindowFrom
*/
@@ -1626,6 +1727,8 @@ extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GL_GetProcAddress
* \sa SDL_GL_UnloadLibrary
*/
@@ -1676,6 +1779,8 @@ extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
* \returns a pointer to the named OpenGL function. The returned pointer
* should be cast to the appropriate function signature.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GL_ExtensionSupported
* \sa SDL_GL_LoadLibrary
* \sa SDL_GL_UnloadLibrary
@@ -1685,6 +1790,8 @@ extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
/**
* Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GL_LoadLibrary
*/
extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
@@ -1734,6 +1841,8 @@ extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GL_GetAttribute
* \sa SDL_GL_ResetAttributes
*/
@@ -1747,6 +1856,8 @@ extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GL_ResetAttributes
* \sa SDL_GL_SetAttribute
*/
@@ -1767,6 +1878,8 @@ extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
* \returns the OpenGL context associated with `window` or NULL on error; call
* SDL_GetError() for more details.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GL_DeleteContext
* \sa SDL_GL_MakeCurrent
*/
@@ -1783,6 +1896,8 @@ extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
* \returns 0 on success or a negative error code on failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GL_CreateContext
*/
extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
@@ -1895,6 +2010,8 @@ extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
* extra.
*
* \param window the window to change
*
* \since This function is available since SDL 2.0.0.
*/
extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
@@ -1903,6 +2020,8 @@ extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
*
* \param context the OpenGL context to be deleted
*
* \since This function is available since SDL 2.0.0.
*
* \sa SDL_GL_CreateContext
*/
extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);