Sync SDL3 wiki -> header

This commit is contained in:
SDL Wiki Bot
2024-07-19 19:23:24 +00:00
parent a340de6196
commit 975457cfb6
30 changed files with 426 additions and 250 deletions

View File

@@ -282,9 +282,9 @@ typedef struct SDL_GamepadBinding
* existing gamepad.
*
* The mapping string has the format "GUID,name,mapping", where GUID is the
* string value from SDL_GUIDToString(), name is the human readable
* string for the device and mappings are gamepad mappings to joystick ones.
* Under Windows there is a reserved GUID of "xinput" that covers all XInput
* string value from SDL_GUIDToString(), name is the human readable string for
* the device and mappings are gamepad mappings to joystick ones. Under
* Windows there is a reserved GUID of "xinput" that covers all XInput
* devices. The mapping format for joystick is:
*
* - `bX`: a joystick button, index X
@@ -389,7 +389,8 @@ extern SDL_DECLSPEC int SDLCALL SDL_ReloadGamepadMappings(void);
/**
* Get the current gamepad mappings.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param count a pointer filled in with the number of mappings returned, can
* be NULL.
@@ -403,7 +404,8 @@ extern SDL_DECLSPEC const char * const * SDLCALL SDL_GetGamepadMappings(int *cou
/**
* Get the gamepad mapping string for a given GUID.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \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
@@ -419,7 +421,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_GUID g
/**
* Get the current mapping of a gamepad.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* Details about mappings are discussed with SDL_AddGamepadMapping().
*
@@ -468,11 +471,13 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasGamepad(void);
/**
* Get a list of currently connected gamepads.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \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.
* \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.
*
* \since This function is available since SDL 3.0.0.
*
@@ -500,7 +505,8 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_IsGamepad(SDL_JoystickID instance_id);
*
* This can be called before any gamepads are opened.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param instance_id the joystick instance ID.
* \returns the name of the selected gamepad. If no name can be found, this
@@ -518,7 +524,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadNameForID(SDL_JoystickID
*
* This can be called before any gamepads are opened.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param instance_id the joystick instance ID.
* \returns the path of the selected gamepad. If no path can be found, this
@@ -651,7 +658,8 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeForID(SDL_Joys
*
* This can be called before any gamepads are opened.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param instance_id the joystick instance ID.
* \returns the mapping string. Returns NULL if no mapping is available.
@@ -750,7 +758,8 @@ extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadID(SDL_Gamepad *gamepad
/**
* Get the implementation-dependent name for an opened gamepad.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param gamepad a gamepad identifier previously returned by
* SDL_OpenGamepad().
@@ -766,7 +775,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadName(SDL_Gamepad *gamepad
/**
* Get the implementation-dependent path for an opened gamepad.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param gamepad a gamepad identifier previously returned by
* SDL_OpenGamepad().
@@ -893,7 +903,8 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadFirmwareVersion(SDL_Gamepad *ga
*
* Returns the serial number of the gamepad, or NULL if it is not available.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param gamepad the gamepad object to query.
* \returns the serial number, or NULL if unavailable.
@@ -972,7 +983,8 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GamepadConnected(SDL_Gamepad *gamepad);
* SDL to crash.
*
* \param gamepad the gamepad object that you want to get a joystick from.
* \returns an SDL_Joystick object, or NULL on failure; call SDL_GetError() for more information.
* \returns an SDL_Joystick object, or NULL on failure; call SDL_GetError()
* for more information.
*
* \since This function is available since SDL 3.0.0.
*/
@@ -1053,7 +1065,8 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromString(const c
/**
* Convert from an SDL_GamepadType enum to a string.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param type an enum value for a given SDL_GamepadType.
* \returns a string for the given type, or NULL if an invalid type is
@@ -1091,7 +1104,8 @@ extern SDL_DECLSPEC SDL_GamepadAxis SDLCALL SDL_GetGamepadAxisFromString(const c
/**
* Convert from an SDL_GamepadAxis enum to a string.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param axis an enum value for a given SDL_GamepadAxis.
* \returns a string for the given axis, or NULL if an invalid axis is
@@ -1166,7 +1180,8 @@ extern SDL_DECLSPEC SDL_GamepadButton SDLCALL SDL_GetGamepadButtonFromString(con
/**
* Convert from an SDL_GamepadButton enum to a string.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param button an enum value for a given SDL_GamepadButton.
* \returns a string for the given button, or NULL if an invalid button is
@@ -1454,7 +1469,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_CloseGamepad(SDL_Gamepad *gamepad);
* Return the sfSymbolsName for a given button on a gamepad on Apple
* platforms.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param gamepad the gamepad to query.
* \param button a button on the gamepad.
@@ -1469,7 +1485,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetGamepadAppleSFSymbolsNameForButt
/**
* Return the sfSymbolsName for a given axis on a gamepad on Apple platforms.
*
* This returns temporary memory which will be automatically freed later, and can be claimed with SDL_ClaimTemporaryMemory().
* This returns temporary memory which will be automatically freed later, and
* can be claimed with SDL_ClaimTemporaryMemory().
*
* \param gamepad the gamepad to query.
* \param axis an axis on the gamepad.