Skip to content

Commit

Permalink
Changed the return types of some functions from integer to boolean.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aermoss committed Aug 28, 2024
1 parent 25a2ec4 commit 0f45d9e
Show file tree
Hide file tree
Showing 33 changed files with 382 additions and 385 deletions.
53 changes: 27 additions & 26 deletions sdl3/SDL_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

SDL_AudioFormat = ctypes.c_int

SDL_AUDIO_UNKNOWN = 0x0000
SDL_AUDIO_U8 = 0x0008
SDL_AUDIO_S8 = 0x8008
SDL_AUDIO_S16LE = 0x8010
Expand Down Expand Up @@ -71,59 +72,59 @@ class SDL_AudioStream(ctypes.c_void_p):
SDL_FUNC("SDL_GetAudioRecordingDevices", ctypes.POINTER(SDL_AudioDeviceID), ctypes.POINTER(ctypes.c_int))

SDL_FUNC("SDL_GetAudioDeviceName", ctypes.c_char_p, SDL_AudioDeviceID)
SDL_FUNC("SDL_GetAudioDeviceFormat", ctypes.c_int, SDL_AudioDeviceID, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.c_int))
SDL_FUNC("SDL_GetAudioDeviceFormat", ctypes.c_bool, SDL_AudioDeviceID, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.c_int))
SDL_FUNC("SDL_GetAudioDeviceChannelMap", ctypes.POINTER(ctypes.c_int), SDL_AudioDeviceID, ctypes.POINTER(ctypes.c_int))

SDL_FUNC("SDL_OpenAudioDevice", SDL_AudioDeviceID, SDL_AudioDeviceID, ctypes.POINTER(SDL_AudioSpec))
SDL_FUNC("SDL_PauseAudioDevice", ctypes.c_int, SDL_AudioDeviceID)
SDL_FUNC("SDL_ResumeAudioDevice", ctypes.c_int, SDL_AudioDeviceID)
SDL_FUNC("SDL_PauseAudioDevice", ctypes.c_bool, SDL_AudioDeviceID)
SDL_FUNC("SDL_ResumeAudioDevice", ctypes.c_bool, SDL_AudioDeviceID)
SDL_FUNC("SDL_AudioDevicePaused", ctypes.c_bool, SDL_AudioDeviceID)
SDL_FUNC("SDL_GetAudioDeviceGain", ctypes.c_float, SDL_AudioDeviceID)
SDL_FUNC("SDL_SetAudioDeviceGain", ctypes.c_int, SDL_AudioDeviceID, ctypes.c_float)
SDL_FUNC("SDL_SetAudioDeviceGain", ctypes.c_bool, SDL_AudioDeviceID, ctypes.c_float)
SDL_FUNC("SDL_CloseAudioDevice", None, SDL_AudioDeviceID)

SDL_FUNC("SDL_BindAudioStreams", ctypes.c_int, SDL_AudioDeviceID, ctypes.POINTER(ctypes.POINTER(SDL_AudioStream)), ctypes.c_int)
SDL_FUNC("SDL_BindAudioStream", ctypes.c_int, SDL_AudioDeviceID, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_BindAudioStreams", ctypes.c_bool, SDL_AudioDeviceID, ctypes.POINTER(ctypes.POINTER(SDL_AudioStream)), ctypes.c_int)
SDL_FUNC("SDL_BindAudioStream", ctypes.c_bool, SDL_AudioDeviceID, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_UnbindAudioStreams", None, ctypes.POINTER(ctypes.POINTER(SDL_AudioStream)), ctypes.c_int)
SDL_FUNC("SDL_UnbindAudioStream", None, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_GetAudioStreamDevice", SDL_AudioDeviceID, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_CreateAudioStream", ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(SDL_AudioSpec))
SDL_FUNC("SDL_GetAudioStreamProperties", SDL_PropertiesID, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_GetAudioStreamFormat", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(SDL_AudioSpec))
SDL_FUNC("SDL_SetAudioStreamFormat", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(SDL_AudioSpec))
SDL_FUNC("SDL_GetAudioStreamFormat", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(SDL_AudioSpec))
SDL_FUNC("SDL_SetAudioStreamFormat", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(SDL_AudioSpec))
SDL_FUNC("SDL_GetAudioStreamFrequencyRatio", ctypes.c_float, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_SetAudioStreamFrequencyRatio", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), ctypes.c_float)
SDL_FUNC("SDL_SetAudioStreamFrequencyRatio", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream), ctypes.c_float)
SDL_FUNC("SDL_GetAudioStreamGain", ctypes.c_float, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_SetAudioStreamGain", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), ctypes.c_float)
SDL_FUNC("SDL_SetAudioStreamGain", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream), ctypes.c_float)
SDL_FUNC("SDL_GetAudioStreamInputChannelMap", ctypes.POINTER(ctypes.c_int), ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(ctypes.c_int))
SDL_FUNC("SDL_GetAudioStreamOutputChannelMap", ctypes.POINTER(ctypes.c_int), ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(ctypes.c_int))
SDL_FUNC("SDL_SetAudioStreamInputChannelMap", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(ctypes.c_int), ctypes.c_int)
SDL_FUNC("SDL_SetAudioStreamOutputChannelMap", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(ctypes.c_int), ctypes.c_int)
SDL_FUNC("SDL_PutAudioStreamData", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), ctypes.c_void_p, ctypes.c_int)
SDL_FUNC("SDL_SetAudioStreamInputChannelMap", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(ctypes.c_int), ctypes.c_int)
SDL_FUNC("SDL_SetAudioStreamOutputChannelMap", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream), ctypes.POINTER(ctypes.c_int), ctypes.c_int)
SDL_FUNC("SDL_PutAudioStreamData", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream), ctypes.c_void_p, ctypes.c_int)
SDL_FUNC("SDL_GetAudioStreamData", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), ctypes.c_void_p, ctypes.c_int)
SDL_FUNC("SDL_GetAudioStreamAvailable", ctypes.c_int, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_GetAudioStreamQueued", ctypes.c_int, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_FlushAudioStream", ctypes.c_int, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_ClearAudioStream", ctypes.c_int, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_PauseAudioStreamDevice", ctypes.c_int, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_ResumeAudioStreamDevice", ctypes.c_int, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_LockAudioStream", ctypes.c_int, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_UnlockAudioStream", ctypes.c_int, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_FlushAudioStream", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_ClearAudioStream", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_PauseAudioStreamDevice", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_ResumeAudioStreamDevice", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_LockAudioStream", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_UnlockAudioStream", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream))

SDL_AudioStreamCallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.POINTER(SDL_AudioStream), ctypes.c_int, ctypes.c_int)

SDL_FUNC("SDL_SetAudioStreamGetCallback", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), SDL_AudioStreamCallback, ctypes.c_void_p)
SDL_FUNC("SDL_SetAudioStreamPutCallback", ctypes.c_int, ctypes.POINTER(SDL_AudioStream), SDL_AudioStreamCallback, ctypes.c_void_p)
SDL_FUNC("SDL_SetAudioStreamGetCallback", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream), SDL_AudioStreamCallback, ctypes.c_void_p)
SDL_FUNC("SDL_SetAudioStreamPutCallback", ctypes.c_bool, ctypes.POINTER(SDL_AudioStream), SDL_AudioStreamCallback, ctypes.c_void_p)
SDL_FUNC("SDL_DestroyAudioStream", None, ctypes.POINTER(SDL_AudioStream))
SDL_FUNC("SDL_OpenAudioDeviceStream", ctypes.POINTER(SDL_AudioStream), SDL_AudioDeviceID, ctypes.POINTER(SDL_AudioSpec), SDL_AudioStreamCallback, ctypes.c_void_p)

SDL_AudioPostmixCallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.c_float), ctypes.c_int)

SDL_FUNC("SDL_SetAudioPostmixCallback", ctypes.c_int, SDL_AudioDeviceID, SDL_AudioPostmixCallback, ctypes.c_void_p)
SDL_FUNC("SDL_SetAudioPostmixCallback", ctypes.c_bool, SDL_AudioDeviceID, SDL_AudioPostmixCallback, ctypes.c_void_p)

SDL_FUNC("SDL_LoadWAV_IO", ctypes.c_int, ctypes.POINTER(SDL_IOStream), ctypes.c_bool, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.POINTER(ctypes.c_uint8)), ctypes.POINTER(ctypes.c_uint32))
SDL_FUNC("SDL_LoadWAV", ctypes.c_int, ctypes.c_char_p, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.POINTER(ctypes.c_uint8)), ctypes.POINTER(ctypes.c_uint32))
SDL_FUNC("SDL_MixAudio", ctypes.c_int, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_uint8), SDL_AudioFormat, ctypes.c_uint32, ctypes.c_float)
SDL_FUNC("SDL_ConvertAudioSamples", ctypes.c_int, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.c_uint8), ctypes.c_int, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.POINTER(ctypes.c_uint8)), ctypes.POINTER(ctypes.c_int))
SDL_FUNC("SDL_LoadWAV_IO", ctypes.c_bool, ctypes.POINTER(SDL_IOStream), ctypes.c_bool, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.POINTER(ctypes.c_uint8)), ctypes.POINTER(ctypes.c_uint32))
SDL_FUNC("SDL_LoadWAV", ctypes.c_bool, ctypes.c_char_p, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.POINTER(ctypes.c_uint8)), ctypes.POINTER(ctypes.c_uint32))
SDL_FUNC("SDL_MixAudio", ctypes.c_bool, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_uint8), SDL_AudioFormat, ctypes.c_uint32, ctypes.c_float)
SDL_FUNC("SDL_ConvertAudioSamples", ctypes.c_bool, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.c_uint8), ctypes.c_int, ctypes.POINTER(SDL_AudioSpec), ctypes.POINTER(ctypes.POINTER(ctypes.c_uint8)), ctypes.POINTER(ctypes.c_int))
SDL_FUNC("SDL_GetAudioFormatName", ctypes.c_char_p, SDL_AudioFormat)
SDL_FUNC("SDL_GetSilenceValueForFormat", ctypes.c_int, SDL_AudioFormat)
4 changes: 2 additions & 2 deletions sdl3/SDL_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SDL_CameraSpec(ctypes.Structure):
SDL_FUNC("SDL_GetCameraPermissionState", ctypes.c_int, ctypes.POINTER(SDL_Camera))
SDL_FUNC("SDL_GetCameraID", SDL_CameraID, ctypes.POINTER(SDL_Camera))
SDL_FUNC("SDL_GetCameraProperties", SDL_PropertiesID, ctypes.POINTER(SDL_Camera))
SDL_FUNC("SDL_GetCameraFormat", ctypes.c_int, ctypes.POINTER(SDL_Camera), ctypes.POINTER(SDL_CameraSpec))
SDL_FUNC("SDL_GetCameraFormat", ctypes.c_bool, ctypes.POINTER(SDL_Camera), ctypes.POINTER(SDL_CameraSpec))
SDL_FUNC("SDL_AcquireCameraFrame", ctypes.POINTER(SDL_Surface), ctypes.POINTER(SDL_Camera), ctypes.POINTER(ctypes.c_int64))
SDL_FUNC("SDL_ReleaseCameraFrame", ctypes.c_int, ctypes.POINTER(SDL_Camera), ctypes.POINTER(SDL_Surface))
SDL_FUNC("SDL_ReleaseCameraFrame", None, ctypes.POINTER(SDL_Camera), ctypes.POINTER(SDL_Surface))
SDL_FUNC("SDL_CloseCamera", None, ctypes.POINTER(SDL_Camera))
8 changes: 4 additions & 4 deletions sdl3/SDL_clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

SDL_SET_CURRENT_DLL(SDL_DLL)

SDL_FUNC("SDL_SetClipboardText", ctypes.c_int, ctypes.c_char_p)
SDL_FUNC("SDL_SetClipboardText", ctypes.c_bool, ctypes.c_char_p)
SDL_FUNC("SDL_GetClipboardText", ctypes.c_char_p)
SDL_FUNC("SDL_HasClipboardText", ctypes.c_bool)

SDL_FUNC("SDL_SetPrimarySelectionText", ctypes.c_int, ctypes.c_char_p)
SDL_FUNC("SDL_SetPrimarySelectionText", ctypes.c_bool, ctypes.c_char_p)
SDL_FUNC("SDL_GetPrimarySelectionText", ctypes.c_char_p)
SDL_FUNC("SDL_HasPrimarySelectionText", ctypes.c_bool)

SDL_ClipboardDataCallback = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_size_t))
SDL_ClipboardCleanupCallback = ctypes.CFUNCTYPE(None, ctypes.c_void_p)

SDL_FUNC("SDL_SetClipboardData", ctypes.c_int, SDL_ClipboardDataCallback, SDL_ClipboardCleanupCallback, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char_p), ctypes.c_size_t)
SDL_FUNC("SDL_ClearClipboardData", ctypes.c_int)
SDL_FUNC("SDL_SetClipboardData", ctypes.c_bool, SDL_ClipboardDataCallback, SDL_ClipboardCleanupCallback, ctypes.c_void_p, ctypes.POINTER(ctypes.c_char_p), ctypes.c_size_t)
SDL_FUNC("SDL_ClearClipboardData", ctypes.c_bool)
SDL_FUNC("SDL_GetClipboardData", ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_size_t))
SDL_FUNC("SDL_HasClipboardData", ctypes.c_bool, ctypes.c_char_p)
6 changes: 3 additions & 3 deletions sdl3/SDL_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

SDL_SET_CURRENT_DLL(SDL_DLL)

SDL_FUNC("SDL_SetError", ctypes.c_int, ctypes.c_char_p)
SDL_FUNC("SDL_OutOfMemory", ctypes.c_int)
SDL_FUNC("SDL_SetError", ctypes.c_bool, ctypes.c_char_p)
SDL_FUNC("SDL_OutOfMemory", ctypes.c_bool)
SDL_FUNC("SDL_GetError", ctypes.c_char_p)
SDL_FUNC("SDL_ClearError", ctypes.c_int)
SDL_FUNC("SDL_ClearError", ctypes.c_bool)

def SDL_Unsupported() -> ctypes.c_int:
return SDL_GET_DLL(SDL_DLL).SDL_SetError("That operation is not supported".encode())
Expand Down
12 changes: 6 additions & 6 deletions sdl3/SDL_filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ class SDL_PathInfo(ctypes.Structure):

SDL_GLOB_CASEINSENSITIVE = 1 << 0

SDL_FUNC("SDL_CreateDirectory", ctypes.c_int, ctypes.c_char_p)
SDL_FUNC("SDL_CreateDirectory", ctypes.c_bool, ctypes.c_char_p)

SDL_EnumerateDirectoryCallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p)

SDL_FUNC("SDL_EnumerateDirectory", ctypes.c_int, ctypes.c_char_p, SDL_EnumerateDirectoryCallback, ctypes.c_void_p)
SDL_FUNC("SDL_RemovePath", ctypes.c_int, ctypes.c_char_p)
SDL_FUNC("SDL_RenamePath", ctypes.c_int, ctypes.c_char_p, ctypes.c_char_p)
SDL_FUNC("SDL_CopyFile", ctypes.c_int, ctypes.c_char_p, ctypes.c_char_p)
SDL_FUNC("SDL_GetPathInfo", ctypes.c_int, ctypes.c_char_p, ctypes.POINTER(SDL_PathInfo))
SDL_FUNC("SDL_EnumerateDirectory", ctypes.c_bool, ctypes.c_char_p, SDL_EnumerateDirectoryCallback, ctypes.c_void_p)
SDL_FUNC("SDL_RemovePath", ctypes.c_bool, ctypes.c_char_p)
SDL_FUNC("SDL_RenamePath", ctypes.c_bool, ctypes.c_char_p, ctypes.c_char_p)
SDL_FUNC("SDL_CopyFile", ctypes.c_bool, ctypes.c_char_p, ctypes.c_char_p)
SDL_FUNC("SDL_GetPathInfo", ctypes.c_bool, ctypes.c_char_p, ctypes.POINTER(SDL_PathInfo))
SDL_FUNC("SDL_GlobDirectory", ctypes.POINTER(ctypes.c_char_p), ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(SDL_GlobFlags), ctypes.POINTER(ctypes.c_int))
22 changes: 11 additions & 11 deletions sdl3/SDL_gamepad.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ class SDL_GamepadBinding(ctypes.Structure):
SDL_FUNC("SDL_AddGamepadMapping", ctypes.c_int, ctypes.c_char_p)
SDL_FUNC("SDL_AddGamepadMappingsFromIO", ctypes.c_int, ctypes.POINTER(SDL_IOStream), ctypes.c_bool)
SDL_FUNC("SDL_AddGamepadMappingsFromFile", ctypes.c_int, ctypes.c_char_p)
SDL_FUNC("SDL_ReloadGamepadMappings", ctypes.c_int)
SDL_FUNC("SDL_ReloadGamepadMappings", ctypes.c_bool)
SDL_FUNC("SDL_GetGamepadMappings", ctypes.POINTER(ctypes.c_char_p), ctypes.POINTER(ctypes.c_int))
SDL_FUNC("SDL_GetGamepadMappingForGUID", ctypes.c_char_p, SDL_GUID)
SDL_FUNC("SDL_GetGamepadMapping", ctypes.c_char_p, ctypes.POINTER(SDL_Gamepad))
SDL_FUNC("SDL_SetGamepadMapping", ctypes.c_int, SDL_JoystickID, ctypes.c_char_p)
SDL_FUNC("SDL_SetGamepadMapping", ctypes.c_bool, SDL_JoystickID, ctypes.c_char_p)
SDL_FUNC("SDL_HasGamepad", ctypes.c_bool)
SDL_FUNC("SDL_GetGamepads", ctypes.POINTER(SDL_JoystickID), ctypes.POINTER(ctypes.c_int))
SDL_FUNC("SDL_IsGamepad", ctypes.c_bool, SDL_JoystickID)
Expand Down Expand Up @@ -164,7 +164,7 @@ class SDL_GamepadBinding(ctypes.Structure):
SDL_FUNC("SDL_GetGamepadType", SDL_GamepadType, ctypes.POINTER(SDL_Gamepad))
SDL_FUNC("SDL_GetRealGamepadType", SDL_GamepadType, ctypes.POINTER(SDL_Gamepad))
SDL_FUNC("SDL_GetGamepadPlayerIndex", ctypes.c_int, ctypes.POINTER(SDL_Gamepad))
SDL_FUNC("SDL_SetGamepadPlayerIndex", ctypes.c_int, ctypes.POINTER(SDL_Gamepad), ctypes.c_int)
SDL_FUNC("SDL_SetGamepadPlayerIndex", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), ctypes.c_int)
SDL_FUNC("SDL_GetGamepadVendor", ctypes.c_uint16, ctypes.POINTER(SDL_Gamepad))
SDL_FUNC("SDL_GetGamepadProduct", ctypes.c_uint16, ctypes.POINTER(SDL_Gamepad))
SDL_FUNC("SDL_GetGamepadProductVersion", ctypes.c_uint16, ctypes.POINTER(SDL_Gamepad))
Expand Down Expand Up @@ -193,17 +193,17 @@ class SDL_GamepadBinding(ctypes.Structure):
SDL_FUNC("SDL_GetGamepadButtonLabel", SDL_GamepadButtonLabel, ctypes.POINTER(SDL_Gamepad), SDL_GamepadButton)
SDL_FUNC("SDL_GetNumGamepadTouchpads", ctypes.c_int, ctypes.POINTER(SDL_Gamepad))
SDL_FUNC("SDL_GetNumGamepadTouchpadFingers", ctypes.c_int, ctypes.POINTER(SDL_Gamepad), ctypes.c_int)
SDL_FUNC("SDL_GetGamepadTouchpadFinger", ctypes.c_int, ctypes.POINTER(SDL_Gamepad), ctypes.c_int, ctypes.c_int, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float))
SDL_FUNC("SDL_GetGamepadTouchpadFinger", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), ctypes.c_int, ctypes.c_int, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float))
SDL_FUNC("SDL_GamepadHasSensor", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), SDL_SensorType)
SDL_FUNC("SDL_SetGamepadSensorEnabled", ctypes.c_int, ctypes.POINTER(SDL_Gamepad), SDL_SensorType, ctypes.c_bool)
SDL_FUNC("SDL_SetGamepadSensorEnabled", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), SDL_SensorType, ctypes.c_bool)
SDL_FUNC("SDL_GamepadSensorEnabled", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), SDL_SensorType)
SDL_FUNC("SDL_GetGamepadSensorDataRate", ctypes.c_float, ctypes.POINTER(SDL_Gamepad), SDL_SensorType)
SDL_FUNC("SDL_GetGamepadSensorData", ctypes.c_int, ctypes.POINTER(SDL_Gamepad), SDL_SensorType, ctypes.POINTER(ctypes.c_float), ctypes.c_int)
SDL_FUNC("SDL_RumbleGamepad", ctypes.c_int, ctypes.POINTER(SDL_Gamepad), ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32)
SDL_FUNC("SDL_RumbleGamepadTriggers", ctypes.c_int, ctypes.POINTER(SDL_Gamepad), ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32)
SDL_FUNC("SDL_SetGamepadLED", ctypes.c_int, ctypes.POINTER(SDL_Gamepad), ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8)
SDL_FUNC("SDL_SendGamepadEffect", ctypes.c_int, ctypes.POINTER(SDL_Gamepad), ctypes.c_void_p, ctypes.c_int)
SDL_FUNC("SDL_CloseGamepad", ctypes.c_int, ctypes.POINTER(SDL_Gamepad))
SDL_FUNC("SDL_GetGamepadSensorData", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), SDL_SensorType, ctypes.POINTER(ctypes.c_float), ctypes.c_int)
SDL_FUNC("SDL_RumbleGamepad", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32)
SDL_FUNC("SDL_RumbleGamepadTriggers", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), ctypes.c_uint16, ctypes.c_uint16, ctypes.c_uint32)
SDL_FUNC("SDL_SetGamepadLED", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8)
SDL_FUNC("SDL_SendGamepadEffect", ctypes.c_bool, ctypes.POINTER(SDL_Gamepad), ctypes.c_void_p, ctypes.c_int)
SDL_FUNC("SDL_CloseGamepad", None, ctypes.POINTER(SDL_Gamepad))

SDL_FUNC("SDL_GetGamepadAppleSFSymbolsNameForButton", ctypes.c_char_p, ctypes.POINTER(SDL_Gamepad), SDL_GamepadButton)
SDL_FUNC("SDL_GetGamepadAppleSFSymbolsNameForAxis", ctypes.c_char_p, ctypes.POINTER(SDL_Gamepad), SDL_GamepadAxis)
Loading

0 comments on commit 0f45d9e

Please sign in to comment.