Skip to content

Commit

Permalink
Sync SDL3 wiki -> header
Browse files Browse the repository at this point in the history
  • Loading branch information
SDLWikiBot committed Jul 27, 2024
1 parent 4f55271 commit 0f2fc2f
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 33 deletions.
15 changes: 10 additions & 5 deletions include/SDL3/SDL_audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentAudioDriver(void);
* \param count a pointer filled in with the number of devices returned, may
* be NULL.
* \returns a 0 terminated array of device instance IDs or NULL on error; call
* SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* SDL_GetError() for more information. This should be freed with
* SDL_free() when it is no longer needed.
*
* \threadsafety It is safe to call this function from any thread.
*
Expand Down Expand Up @@ -475,7 +476,8 @@ extern SDL_DECLSPEC_FREE SDL_AudioDeviceID * SDLCALL SDL_GetAudioPlaybackDevices
* \param count a pointer filled in with the number of devices returned, may
* be NULL.
* \returns a 0 terminated array of device instance IDs, or NULL on failure;
* call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This should be freed
* with SDL_free() when it is no longer needed.
*
* \threadsafety It is safe to call this function from any thread.
*
Expand Down Expand Up @@ -550,7 +552,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid
* \param devid the instance ID of the device to query.
* \param count On output, set to number of channels in the map. Can be NULL.
* \returns an array of the current channel mapping, with as many elements as
* the current output spec's channels, or NULL if default. This should be freed with SDL_free() when it is no longer needed.
* the current output spec's channels, or NULL if default. This
* should be freed with SDL_free() when it is no longer needed.
*
* \threadsafety It is safe to call this function from any thread.
*
Expand Down Expand Up @@ -1098,7 +1101,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetAudioStreamGain(SDL_AudioStream *stream,
* \param stream the SDL_AudioStream to query.
* \param count On output, set to number of channels in the map. Can be NULL.
* \returns an array of the current channel mapping, with as many elements as
* the current output spec's channels, or NULL if default. This should be freed with SDL_free() when it is no longer needed.
* the current output spec's channels, or NULL if default. This
* should be freed with SDL_free() when it is no longer needed.
*
* \threadsafety It is safe to call this function from any thread, as it holds
* a stream-specific mutex while running.
Expand All @@ -1121,7 +1125,8 @@ extern SDL_DECLSPEC_FREE int * SDLCALL SDL_GetAudioStreamInputChannelMap(SDL_Aud
* \param stream the SDL_AudioStream to query.
* \param count On output, set to number of channels in the map. Can be NULL.
* \returns an array of the current channel mapping, with as many elements as
* the current output spec's channels, or NULL if default. This should be freed with SDL_free() when it is no longer needed.
* the current output spec's channels, or NULL if default. This
* should be freed with SDL_free() when it is no longer needed.
*
* \threadsafety It is safe to call this function from any thread, as it holds
* a stream-specific mutex while running.
Expand Down
7 changes: 5 additions & 2 deletions include/SDL3/SDL_camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentCameraDriver(void);
* \param count a pointer filled in with the number of cameras returned, may
* be NULL.
* \returns a 0 terminated array of camera instance IDs or NULL on failure;
* call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This should be freed
* with SDL_free() when it is no longer needed.
*
* \threadsafety It is safe to call this function from any thread.
*
Expand Down Expand Up @@ -205,7 +206,9 @@ extern SDL_DECLSPEC_FREE SDL_CameraID * SDLCALL SDL_GetCameras(int *count);
* \param count a pointer filled in with the number of elements in the list,
* may be NULL.
* \returns a NULL terminated array of pointers to SDL_CameraSpec or NULL on
* failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
* failure; call SDL_GetError() for more information. This is a
* single allocation that should be freed with SDL_free() when it is
* no longer needed.
*
* \threadsafety It is safe to call this function from any thread.
*
Expand Down
9 changes: 6 additions & 3 deletions include/SDL3/SDL_clipboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
* a copy of the clipboard's content.
*
* \returns the clipboard text on success or an empty string on failure; call
* SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* SDL_GetError() for more information. This should be freed with
* SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down Expand Up @@ -105,7 +106,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetPrimarySelectionText(const char *text);
* a copy of the primary selection's content.
*
* \returns the primary selection text on success or an empty string on
* failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* failure; call SDL_GetError() for more information. This should be
* freed with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down Expand Up @@ -215,7 +217,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_ClearClipboardData(void);
* \param mime_type the mime type to read from the clipboard.
* \param size a pointer filled in with the length of the returned data.
* \returns the retrieved data buffer or NULL on failure; call SDL_GetError()
* for more information. This should be freed with SDL_free() when it is no longer needed.
* for more information. This should be freed with SDL_free() when it
* is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down
6 changes: 4 additions & 2 deletions include/SDL3/SDL_filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetBasePath(void);
* \param app the name of your application.
* \returns a UTF-8 string of the user directory in platform-dependent
* notation. NULL if there's a problem (creating directory failed,
* etc.). This should be freed with SDL_free() when it is no longer needed.
* etc.). This should be freed with SDL_free() when it is no longer
* needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down Expand Up @@ -367,7 +368,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *
* \param count on return, will be set to the number of items in the returned
* array. Can be NULL.
* \returns an array of strings on success or NULL on failure; call
* SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
* SDL_GetError() for more information. This is a single allocation
* that should be freed with SDL_free() when it is no longer needed.
*
* \threadsafety It is safe to call this function from any thread.
*
Expand Down
20 changes: 14 additions & 6 deletions include/SDL3/SDL_gamepad.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,9 @@ extern SDL_DECLSPEC int SDLCALL SDL_ReloadGamepadMappings(void);
* \param count a pointer filled in with the number of mappings returned, can
* be NULL.
* \returns an array of the mapping strings, NULL-terminated, or NULL on
* failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
* failure; call SDL_GetError() for more information. This is a
* single allocation that should be freed with SDL_free() when it is
* no longer needed.
*
* \since This function is available since SDL 3.0.0.
*/
Expand All @@ -403,7 +405,8 @@ extern SDL_DECLSPEC_FREE char ** SDLCALL SDL_GetGamepadMappings(int *count);
*
* \param guid a structure containing the GUID for which a mapping is desired.
* \returns a mapping string or NULL on failure; call SDL_GetError() for more
* information. This should be freed with SDL_free() when it is no longer needed.
* information. This should be freed with SDL_free() when it is no
* longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand All @@ -419,7 +422,8 @@ extern SDL_DECLSPEC_FREE char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_GUID gu
*
* \param gamepad the gamepad you want to get the current mapping for.
* \returns a string that has the gamepad's mapping or NULL if no mapping is
* available; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* available; call SDL_GetError() for more information. This should
* be freed with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down Expand Up @@ -465,7 +469,8 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasGamepad(void);
* \param count a pointer filled in with the number of gamepads returned, may
* be NULL.
* \returns a 0 terminated array of joystick instance IDs or NULL on failure;
* call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This should be freed
* with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down Expand Up @@ -640,7 +645,8 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeForID(SDL_Joys
* This can be called before any gamepads are opened.
*
* \param instance_id the joystick instance ID.
* \returns the mapping string. Returns NULL if no mapping is available. This should be freed with SDL_free() when it is no longer needed.
* \returns the mapping string. Returns NULL if no mapping is available. This
* should be freed with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down Expand Up @@ -995,7 +1001,9 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GamepadEventsEnabled(void);
* \param gamepad a gamepad.
* \param count a pointer filled in with the number of bindings returned.
* \returns a NULL terminated array of pointers to bindings or NULL on
* failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
* failure; call SDL_GetError() for more information. This is a
* single allocation that should be freed with SDL_free() when it is
* no longer needed.
*
* \since This function is available since SDL 3.0.0.
*/
Expand Down
3 changes: 2 additions & 1 deletion include/SDL3/SDL_haptic.h
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,8 @@ typedef Uint32 SDL_HapticID;
* \param count a pointer filled in with the number of haptic devices
* returned, may be NULL.
* \returns a 0 terminated array of haptic device instance IDs or NULL on
* failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* failure; call SDL_GetError() for more information. This should be
* freed with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down
3 changes: 2 additions & 1 deletion include/SDL3/SDL_joystick.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasJoystick(void);
* \param count a pointer filled in with the number of joysticks returned, may
* be NULL.
* \returns a 0 terminated array of joystick instance IDs or NULL on failure;
* call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This should be freed
* with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down
3 changes: 2 additions & 1 deletion include/SDL3/SDL_keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasKeyboard(void);
* \param count a pointer filled in with the number of keyboards returned, may
* be NULL.
* \returns a 0 terminated array of keyboards instance IDs or NULL on failure;
* call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This should be freed
* with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down
4 changes: 3 additions & 1 deletion include/SDL3/SDL_locale.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ typedef struct SDL_Locale
* \param count a pointer filled in with the number of locales returned, may
* be NULL.
* \returns a NULL terminated array of locale pointers, or NULL on failure;
* call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This is a single
* allocation that should be freed with SDL_free() when it is no
* longer needed.
*
* \since This function is available since SDL 3.0.0.
*/
Expand Down
3 changes: 2 additions & 1 deletion include/SDL3/SDL_mouse.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasMouse(void);
* \param count a pointer filled in with the number of mice returned, may be
* NULL.
* \returns a 0 terminated array of mouse instance IDs or NULL on failure;
* call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This should be freed
* with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand Down
3 changes: 2 additions & 1 deletion include/SDL3/SDL_sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ typedef enum SDL_SensorType
* \param count a pointer filled in with the number of sensors returned, may
* be NULL.
* \returns a 0 terminated array of sensor instance IDs or NULL on failure;
* call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This should be freed
* with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*/
Expand Down
4 changes: 3 additions & 1 deletion include/SDL3/SDL_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetStorageSpaceRemaining(SDL_Storage *sto
* array. Can be NULL.
* \returns an array of strings on success or NULL on failure; call
* SDL_GetError() for more information. The caller should pass the
* returned pointer to SDL_free when done with it. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
* returned pointer to SDL_free when done with it. This is a single
* allocation that should be freed with SDL_free() when it is no
* longer needed.
*
* \threadsafety It is safe to call this function from any thread, assuming
* the `storage` object is thread-safe.
Expand Down
7 changes: 5 additions & 2 deletions include/SDL3/SDL_touch.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ typedef struct SDL_Finger
* \param count a pointer filled in with the number of devices returned, may
* be NULL.
* \returns a 0 terminated array of touch device IDs or NULL on failure; call
* SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* SDL_GetError() for more information. This should be freed with
* SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*/
Expand Down Expand Up @@ -120,7 +121,9 @@ extern SDL_DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_Touch
* \param count a pointer filled in with the number of fingers returned, can
* be NULL.
* \returns a NULL terminated array of SDL_Finger pointers or NULL on failure;
* call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This is a single
* allocation that should be freed with SDL_free() when it is no
* longer needed.
*
* \since This function is available since SDL 3.0.0.
*/
Expand Down
18 changes: 12 additions & 6 deletions include/SDL3/SDL_video.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ extern SDL_DECLSPEC SDL_SystemTheme SDLCALL SDL_GetSystemTheme(void);
* \param count a pointer filled in with the number of displays returned, may
* be NULL.
* \returns a 0 terminated array of display instance IDs or NULL on failure;
* call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This should be freed
* with SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*/
Expand Down Expand Up @@ -551,7 +552,9 @@ extern SDL_DECLSPEC float SDLCALL SDL_GetDisplayContentScale(SDL_DisplayID displ
* \param count a pointer filled in with the number of display modes returned,
* may be NULL.
* \returns a NULL terminated array of display mode pointers or NULL on
* failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
* failure; call SDL_GetError() for more information. This is a
* single allocation that should be freed with SDL_free() when it is
* no longer needed.
*
* \since This function is available since SDL 3.0.0.
*
Expand All @@ -576,8 +579,8 @@ extern SDL_DECLSPEC_FREE SDL_DisplayMode ** SDLCALL SDL_GetFullscreenDisplayMode
* for the desktop refresh rate.
* \param include_high_density_modes boolean to include high density modes in
* the search.
* \param mode a pointer filled in with the closest display mode equal to or larger than the
* desired mode.
* \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
* SDL_GetError() for more information.
*
Expand Down Expand Up @@ -762,7 +765,8 @@ extern SDL_DECLSPEC const SDL_DisplayMode * SDLCALL SDL_GetWindowFullscreenMode(
* \param window the window to query.
* \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. This should be freed with SDL_free() when it is no longer needed.
* SDL_GetError() for more information. This should be freed with
* SDL_free() when it is no longer needed.
*
* \since This function is available since SDL 3.0.0.
*/
Expand All @@ -786,7 +790,9 @@ extern SDL_DECLSPEC SDL_PixelFormat SDLCALL SDL_GetWindowPixelFormat(SDL_Window
* \param count a pointer filled in with the number of windows returned, may
* be NULL.
* \returns a NULL terminated array of SDL_Window pointers or NULL on failure;
* call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
* call SDL_GetError() for more information. This is a single
* allocation that should be freed with SDL_free() when it is no
* longer needed.
*
* \since This function is available since SDL 3.0.0.
*/
Expand Down

0 comments on commit 0f2fc2f

Please sign in to comment.