Renamed *FromID() to *ForID()

While it makes sense to get an object pointer from an object ID, you want to get object attributes for an ID, otherwise e.g. GetNameFromID() sounds like it's a name ID, not an object ID. This is also consistent with the function naming convention in SDL2.
This commit is contained in:
Sam Lantinga
2024-07-14 15:22:03 -07:00
parent 0cdc60666b
commit 5c875e1183
21 changed files with 215 additions and 215 deletions

View File

@@ -412,7 +412,7 @@ extern SDL_DECLSPEC char ** SDLCALL SDL_GetGamepadMappings(int *count);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickGUIDFromID
* \sa SDL_GetJoystickGUIDForID
* \sa SDL_GetJoystickGUID
*/
extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_JoystickGUID guid);
@@ -431,7 +431,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_GetGamepadMappingForGUID(SDL_JoystickGUID
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AddGamepadMapping
* \sa SDL_GetGamepadMappingFromID
* \sa SDL_GetGamepadMappingForID
* \sa SDL_GetGamepadMappingForGUID
* \sa SDL_SetGamepadMapping
*/
@@ -511,7 +511,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_IsGamepad(SDL_JoystickID instance_id);
* \sa SDL_GetGamepadName
* \sa SDL_GetGamepads
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadNameFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadNameForID(SDL_JoystickID instance_id);
/**
* Get the implementation dependent path of a gamepad.
@@ -529,7 +529,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadNameFromID(SDL_JoystickID
* \sa SDL_GetGamepadPath
* \sa SDL_GetGamepads
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPathFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPathForID(SDL_JoystickID instance_id);
/**
* Get the player index of a gamepad.
@@ -544,7 +544,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPathFromID(SDL_JoystickID
* \sa SDL_GetGamepadPlayerIndex
* \sa SDL_GetGamepads
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndexFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndexForID(SDL_JoystickID instance_id);
/**
* Get the implementation-dependent GUID of a gamepad.
@@ -561,7 +561,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndexFromID(SDL_JoystickID i
* \sa SDL_GetGamepadGUIDString
* \sa SDL_GetGamepads
*/
extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetGamepadGUIDFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetGamepadGUIDForID(SDL_JoystickID instance_id);
/**
* Get the USB vendor ID of a gamepad, if available.
@@ -578,7 +578,7 @@ extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetGamepadGUIDFromID(SDL_Joysti
* \sa SDL_GetGamepadVendor
* \sa SDL_GetGamepads
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendorFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendorForID(SDL_JoystickID instance_id);
/**
* Get the USB product ID of a gamepad, if available.
@@ -595,7 +595,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendorFromID(SDL_JoystickID ins
* \sa SDL_GetGamepadProduct
* \sa SDL_GetGamepads
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductForID(SDL_JoystickID instance_id);
/**
* Get the product version of a gamepad, if available.
@@ -612,7 +612,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductFromID(SDL_JoystickID in
* \sa SDL_GetGamepadProductVersion
* \sa SDL_GetGamepads
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id);
/**
* Get the type of a gamepad.
@@ -626,9 +626,9 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersionFromID(SDL_Joysti
*
* \sa SDL_GetGamepadType
* \sa SDL_GetGamepads
* \sa SDL_GetRealGamepadTypeFromID
* \sa SDL_GetRealGamepadTypeForID
*/
extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeForID(SDL_JoystickID instance_id);
/**
* Get the type of a gamepad, ignoring any mapping override.
@@ -640,11 +640,11 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadTypeFromID(SDL_Joystic
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadTypeFromID
* \sa SDL_GetGamepadTypeForID
* \sa SDL_GetGamepads
* \sa SDL_GetRealGamepadType
*/
extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeForID(SDL_JoystickID instance_id);
/**
* Get the mapping of a gamepad.
@@ -660,7 +660,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadTypeFromID(SDL_Joy
* \sa SDL_GetGamepads
* \sa SDL_GetGamepadMapping
*/
extern SDL_DECLSPEC char *SDLCALL SDL_GetGamepadMappingFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC char *SDLCALL SDL_GetGamepadMappingForID(SDL_JoystickID instance_id);
/**
* Open a gamepad for use.
@@ -758,7 +758,7 @@ extern SDL_DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadID(SDL_Gamepad *gamepad
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadNameFromID
* \sa SDL_GetGamepadNameForID
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadName(SDL_Gamepad *gamepad);
@@ -774,7 +774,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadName(SDL_Gamepad *gamepad)
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadPathFromID
* \sa SDL_GetGamepadPathForID
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPath(SDL_Gamepad *gamepad);
@@ -787,7 +787,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetGamepadPath(SDL_Gamepad *gamepad)
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadTypeFromID
* \sa SDL_GetGamepadTypeForID
*/
extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadType(SDL_Gamepad *gamepad);
@@ -800,7 +800,7 @@ extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetGamepadType(SDL_Gamepad *game
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetRealGamepadTypeFromID
* \sa SDL_GetRealGamepadTypeForID
*/
extern SDL_DECLSPEC SDL_GamepadType SDLCALL SDL_GetRealGamepadType(SDL_Gamepad *gamepad);
@@ -843,7 +843,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad,
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadVendorFromID
* \sa SDL_GetGamepadVendorForID
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendor(SDL_Gamepad *gamepad);
@@ -857,7 +857,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendor(SDL_Gamepad *gamepad);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadProductFromID
* \sa SDL_GetGamepadProductForID
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProduct(SDL_Gamepad *gamepad);
@@ -871,7 +871,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProduct(SDL_Gamepad *gamepad);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetGamepadProductVersionFromID
* \sa SDL_GetGamepadProductVersionForID
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadProductVersion(SDL_Gamepad *gamepad);

View File

@@ -961,7 +961,7 @@ extern SDL_DECLSPEC SDL_HapticID *SDLCALL SDL_GetHaptics(int *count);
* \sa SDL_GetHapticName
* \sa SDL_OpenHaptic
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetHapticNameFromID(SDL_HapticID instance_id);
extern SDL_DECLSPEC const char *SDLCALL SDL_GetHapticNameForID(SDL_HapticID instance_id);
/**
* Open a haptic device for use.
@@ -1023,7 +1023,7 @@ extern SDL_DECLSPEC SDL_HapticID SDLCALL SDL_GetHapticID(SDL_Haptic *haptic);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetHapticNameFromID
* \sa SDL_GetHapticNameForID
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetHapticName(SDL_Haptic *haptic);

View File

@@ -112,7 +112,7 @@ typedef Uint32 SDL_JoystickID;
*
* In some cases, SDL can identify a low-level joystick as being a certain
* type of device, and will report it through SDL_GetJoystickType (or
* SDL_GetJoystickTypeFromID).
* SDL_GetJoystickTypeForID).
*
* This is by no means a complete list of everything that can be plugged into
* a computer.
@@ -238,7 +238,7 @@ extern SDL_DECLSPEC SDL_JoystickID *SDLCALL SDL_GetJoysticks(int *count);
* \sa SDL_GetJoystickName
* \sa SDL_GetJoysticks
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickNameFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickNameForID(SDL_JoystickID instance_id);
/**
* Get the implementation dependent path of a joystick.
@@ -256,7 +256,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickNameFromID(SDL_JoystickID
* \sa SDL_GetJoystickPath
* \sa SDL_GetJoysticks
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickPathFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickPathForID(SDL_JoystickID instance_id);
/**
* Get the player index of a joystick.
@@ -271,7 +271,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickPathFromID(SDL_JoystickID
* \sa SDL_GetJoystickPlayerIndex
* \sa SDL_GetJoysticks
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndexFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id);
/**
* Get the implementation-dependent GUID of a joystick.
@@ -287,7 +287,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetJoystickPlayerIndexFromID(SDL_JoystickID
* \sa SDL_GetJoystickGUID
* \sa SDL_GetJoystickGUIDString
*/
extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUIDFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUIDForID(SDL_JoystickID instance_id);
/**
* Get the USB vendor ID of a joystick, if available.
@@ -304,7 +304,7 @@ extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUIDFromID(SDL_Joyst
* \sa SDL_GetJoystickVendor
* \sa SDL_GetJoysticks
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendorFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendorForID(SDL_JoystickID instance_id);
/**
* Get the USB product ID of a joystick, if available.
@@ -321,7 +321,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendorFromID(SDL_JoystickID in
* \sa SDL_GetJoystickProduct
* \sa SDL_GetJoysticks
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductForID(SDL_JoystickID instance_id);
/**
* Get the product version of a joystick, if available.
@@ -338,7 +338,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductFromID(SDL_JoystickID i
* \sa SDL_GetJoystickProductVersion
* \sa SDL_GetJoysticks
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersionFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersionForID(SDL_JoystickID instance_id);
/**
* Get the type of a joystick, if available.
@@ -355,7 +355,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersionFromID(SDL_Joyst
* \sa SDL_GetJoystickType
* \sa SDL_GetJoysticks
*/
extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickTypeFromID(SDL_JoystickID instance_id);
extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickTypeForID(SDL_JoystickID instance_id);
/**
* Open a joystick for use.
@@ -674,7 +674,7 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetJoystickProperties(SDL_Joyst
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickNameFromID
* \sa SDL_GetJoystickNameForID
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickName(SDL_Joystick *joystick);
@@ -689,7 +689,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickName(SDL_Joystick *joysti
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickPathFromID
* \sa SDL_GetJoystickPathForID
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetJoystickPath(SDL_Joystick *joystick);
@@ -735,7 +735,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_SetJoystickPlayerIndex(SDL_Joystick *joystic
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickGUIDFromID
* \sa SDL_GetJoystickGUIDForID
* \sa SDL_GetJoystickGUIDString
*/
extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUID(SDL_Joystick *joystick);
@@ -750,7 +750,7 @@ extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUID(SDL_Joystick *j
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickVendorFromID
* \sa SDL_GetJoystickVendorForID
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendor(SDL_Joystick *joystick);
@@ -764,7 +764,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendor(SDL_Joystick *joystick)
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickProductFromID
* \sa SDL_GetJoystickProductForID
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProduct(SDL_Joystick *joystick);
@@ -778,7 +778,7 @@ extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProduct(SDL_Joystick *joystick
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickProductVersionFromID
* \sa SDL_GetJoystickProductVersionForID
*/
extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickProductVersion(SDL_Joystick *joystick);
@@ -818,7 +818,7 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetJoystickSerial(SDL_Joystick *joy
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickTypeFromID
* \sa SDL_GetJoystickTypeForID
*/
extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickType(SDL_Joystick *joystick);
@@ -835,7 +835,7 @@ extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickType(SDL_Joystick *j
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickGUIDFromID
* \sa SDL_GetJoystickGUIDForID
* \sa SDL_GetJoystickGUID
* \sa SDL_GetJoystickGUIDFromString
*/
@@ -872,7 +872,7 @@ extern SDL_DECLSPEC SDL_JoystickGUID SDLCALL SDL_GetJoystickGUIDFromString(const
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetJoystickGUIDFromID
* \sa SDL_GetJoystickGUIDForID
*/
extern SDL_DECLSPEC void SDLCALL SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16);

View File

@@ -80,7 +80,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasKeyboard(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetKeyboardNameFromID
* \sa SDL_GetKeyboardNameForID
* \sa SDL_HasKeyboard
*/
extern SDL_DECLSPEC SDL_KeyboardID *SDLCALL SDL_GetKeyboards(int *count);
@@ -100,7 +100,7 @@ extern SDL_DECLSPEC SDL_KeyboardID *SDLCALL SDL_GetKeyboards(int *count);
*
* \sa SDL_GetKeyboards
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetKeyboardNameFromID(SDL_KeyboardID instance_id);
extern SDL_DECLSPEC const char *SDLCALL SDL_GetKeyboardNameForID(SDL_KeyboardID instance_id);
/**
* Query the window which currently has keyboard focus.

View File

@@ -142,7 +142,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasMouse(void);
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_GetMouseNameFromID
* \sa SDL_GetMouseNameForID
* \sa SDL_HasMouse
*/
extern SDL_DECLSPEC SDL_MouseID *SDLCALL SDL_GetMice(int *count);
@@ -162,7 +162,7 @@ extern SDL_DECLSPEC SDL_MouseID *SDLCALL SDL_GetMice(int *count);
*
* \sa SDL_GetMice
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetMouseNameFromID(SDL_MouseID instance_id);
extern SDL_DECLSPEC const char *SDLCALL SDL_GetMouseNameForID(SDL_MouseID instance_id);
/**
* Get the window which currently has mouse focus.

View File

@@ -167,7 +167,7 @@ extern SDL_DECLSPEC SDL_SensorID *SDLCALL SDL_GetSensors(int *count);
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC const char *SDLCALL SDL_GetSensorNameFromID(SDL_SensorID instance_id);
extern SDL_DECLSPEC const char *SDLCALL SDL_GetSensorNameForID(SDL_SensorID instance_id);
/**
* Get the type of a sensor.
@@ -180,7 +180,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetSensorNameFromID(SDL_SensorID ins
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorTypeFromID(SDL_SensorID instance_id);
extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorTypeForID(SDL_SensorID instance_id);
/**
* Get the platform dependent type of a sensor.
@@ -193,7 +193,7 @@ extern SDL_DECLSPEC SDL_SensorType SDLCALL SDL_GetSensorTypeFromID(SDL_SensorID
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableTypeFromID(SDL_SensorID instance_id);
extern SDL_DECLSPEC int SDLCALL SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id);
/**
* Open a sensor for use.