Source code for SDL3

from sdl3.SDL import * # type: ignore
from sdl3 import SDL_POINTER

import ctypes, typing

LP_LP_SDL_Surface: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_Surface]]
LP_c_float: typing.TypeAlias = SDL_POINTER[ctypes.c_float]
LP_SDL_GPUTexture: typing.TypeAlias = SDL_POINTER[SDL_GPUTexture]
LP_SDL_DialogFileFilter: typing.TypeAlias = SDL_POINTER[SDL_DialogFileFilter]
LP_SDL_GPUBufferBinding: typing.TypeAlias = SDL_POINTER[SDL_GPUBufferBinding]
LP_SDL_Color: typing.TypeAlias = SDL_POINTER[SDL_Color]
LP_SDL_calloc_func: typing.TypeAlias = SDL_POINTER[SDL_calloc_func]
LP_SDL_Camera: typing.TypeAlias = SDL_POINTER[SDL_Camera]
LP_LP_SDL_Window: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_Window]]
LP_SDL_DateTime: typing.TypeAlias = SDL_POINTER[SDL_DateTime]
LP_SDL_GPUComputePass: typing.TypeAlias = SDL_POINTER[SDL_GPUComputePass]
LP_LP_SDL_TrayEntry: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_TrayEntry]]
LP_c_bool: typing.TypeAlias = SDL_POINTER[ctypes.c_bool]
LP_SDL_SharedObject: typing.TypeAlias = SDL_POINTER[SDL_SharedObject]
LP_SDL_Joystick: typing.TypeAlias = SDL_POINTER[SDL_Joystick]
LP_SDL_RWLock: typing.TypeAlias = SDL_POINTER[SDL_RWLock]
LP_SDL_DisplayMode: typing.TypeAlias = SDL_POINTER[SDL_DisplayMode]
LP_SDL_AudioStream: typing.TypeAlias = SDL_POINTER[SDL_AudioStream]
LP_SDL_GPUBuffer: typing.TypeAlias = SDL_POINTER[SDL_GPUBuffer]
LP_SDL_GPUCopyPass: typing.TypeAlias = SDL_POINTER[SDL_GPUCopyPass]
LP_SDL_GPUComputePipelineCreateInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUComputePipelineCreateInfo]
LP_SDL_GPUGraphicsPipeline: typing.TypeAlias = SDL_POINTER[SDL_GPUGraphicsPipeline]
LP_SDL_RendererLogicalPresentation: typing.TypeAlias = SDL_POINTER[SDL_RendererLogicalPresentation]
LP_SDL_TrayMenu: typing.TypeAlias = SDL_POINTER[SDL_TrayMenu]
LP_SDL_FColor: typing.TypeAlias = SDL_POINTER[SDL_FColor]
LP_SDL_realloc_func: typing.TypeAlias = SDL_POINTER[SDL_realloc_func]
LP_LP_SDL_Renderer: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_Renderer]]
LP_SDL_GPUGraphicsPipelineCreateInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUGraphicsPipelineCreateInfo]
LP_SDL_GPUStorageTextureReadWriteBinding: typing.TypeAlias = SDL_POINTER[SDL_GPUStorageTextureReadWriteBinding]
LP_SDL_ScaleMode: typing.TypeAlias = SDL_POINTER[SDL_ScaleMode]
LP_SDL_GPUBufferLocation: typing.TypeAlias = SDL_POINTER[SDL_GPUBufferLocation]
LP_SDL_IOStream: typing.TypeAlias = SDL_POINTER[SDL_IOStream]
LP_SDL_Condition: typing.TypeAlias = SDL_POINTER[SDL_Condition]
LP_SDL_malloc_func: typing.TypeAlias = SDL_POINTER[SDL_malloc_func]
LP_c_char_p: typing.TypeAlias = SDL_POINTER[ctypes.c_char_p]
LP_SDL_Vertex: typing.TypeAlias = SDL_POINTER[SDL_Vertex]
LP_SDL_LogOutputFunction: typing.TypeAlias = SDL_POINTER[SDL_LogOutputFunction]
LP_c_uint16: typing.TypeAlias = SDL_POINTER[ctypes.c_uint16]
LP_c_int32: typing.TypeAlias = SDL_POINTER[ctypes.c_int32]
LP_SDL_CursorFrameInfo: typing.TypeAlias = SDL_POINTER[SDL_CursorFrameInfo]
LP_SDL_KeyboardID: typing.TypeAlias = SDL_POINTER[SDL_KeyboardID]
LP_SDL_Keymod: typing.TypeAlias = SDL_POINTER[SDL_Keymod]
LP_SDL_Thread: typing.TypeAlias = SDL_POINTER[SDL_Thread]
LP_c_int64: typing.TypeAlias = SDL_POINTER[ctypes.c_int64]
LP_SDL_GPUSampler: typing.TypeAlias = SDL_POINTER[SDL_GPUSampler]
LP_SDL_GPUTextureTransferInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUTextureTransferInfo]
LP_SDL_StorageInterface: typing.TypeAlias = SDL_POINTER[SDL_StorageInterface]
LP_SDL_GPURenderState: typing.TypeAlias = SDL_POINTER[SDL_GPURenderState]
LP_SDL_GPUSamplerCreateInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUSamplerCreateInfo]
LP_SDL_TrayEntry: typing.TypeAlias = SDL_POINTER[SDL_TrayEntry]
LP_LP_SDL_Locale: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_Locale]]
LP_SDL_GPURenderPass: typing.TypeAlias = SDL_POINTER[SDL_GPURenderPass]
LP_SDL_Renderer: typing.TypeAlias = SDL_POINTER[SDL_Renderer]
LP_LP_SDL_GPUTexture: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_GPUTexture]]
LP_VkSurfaceKHR: typing.TypeAlias = SDL_POINTER[VkSurfaceKHR]
LP_SDL_GPUTransferBufferCreateInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUTransferBufferCreateInfo]
LP_SDL_Gamepad: typing.TypeAlias = SDL_POINTER[SDL_Gamepad]
LP_SDL_PixelFormatDetails: typing.TypeAlias = SDL_POINTER[SDL_PixelFormatDetails]
LP_SDL_GPUFence: typing.TypeAlias = SDL_POINTER[SDL_GPUFence]
LP_SDL_GPUDevice: typing.TypeAlias = SDL_POINTER[SDL_GPUDevice]
LP_SDL_GPUShaderCreateInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUShaderCreateInfo]
LP_SDL_hid_device_info: typing.TypeAlias = SDL_POINTER[SDL_hid_device_info]
LP_SDL_Haptic: typing.TypeAlias = SDL_POINTER[SDL_Haptic]
LP_SDL_AtomicU32: typing.TypeAlias = SDL_POINTER[SDL_AtomicU32]
LP_c_int: typing.TypeAlias = SDL_POINTER[ctypes.c_int]
LP_SDL_hid_device: typing.TypeAlias = SDL_POINTER[SDL_hid_device]
LP_LP_SDL_DisplayMode: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_DisplayMode]]
LP_SDL_MessageBoxData: typing.TypeAlias = SDL_POINTER[SDL_MessageBoxData]
LP_SDL_Rect: typing.TypeAlias = SDL_POINTER[SDL_Rect]
LP_SDL_HapticEffect: typing.TypeAlias = SDL_POINTER[SDL_HapticEffect]
LP_SDL_JoystickID: typing.TypeAlias = SDL_POINTER[SDL_JoystickID]
LP_SDL_TimeFormat: typing.TypeAlias = SDL_POINTER[SDL_TimeFormat]
LP_SDL_GPUViewport: typing.TypeAlias = SDL_POINTER[SDL_GPUViewport]
LP_SDL_Event: typing.TypeAlias = SDL_POINTER[SDL_Event]
LP_SDL_GPURenderStateCreateInfo: typing.TypeAlias = SDL_POINTER[SDL_GPURenderStateCreateInfo]
LP_SDL_Semaphore: typing.TypeAlias = SDL_POINTER[SDL_Semaphore]
LP_LP_SDL_GPUBuffer: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_GPUBuffer]]
LP_SDL_AtomicInt: typing.TypeAlias = SDL_POINTER[SDL_AtomicInt]
LP_SDL_CameraID: typing.TypeAlias = SDL_POINTER[SDL_CameraID]
LP_SDL_GPUStorageBufferReadWriteBinding: typing.TypeAlias = SDL_POINTER[SDL_GPUStorageBufferReadWriteBinding]
LP_SDL_Process: typing.TypeAlias = SDL_POINTER[SDL_Process]
LP_SDL_AssertData: typing.TypeAlias = SDL_POINTER[SDL_AssertData]
LP_c_size_t: typing.TypeAlias = SDL_POINTER[ctypes.c_size_t]
LP_SDL_GPUTransferBuffer: typing.TypeAlias = SDL_POINTER[SDL_GPUTransferBuffer]
LP_SDL_Mutex: typing.TypeAlias = SDL_POINTER[SDL_Mutex]
LP_SDL_Tray: typing.TypeAlias = SDL_POINTER[SDL_Tray]
LP_SDL_TLSID: typing.TypeAlias = SDL_POINTER[SDL_TLSID]
LP_SDL_GPUCommandBuffer: typing.TypeAlias = SDL_POINTER[SDL_GPUCommandBuffer]
LP_c_uint8: typing.TypeAlias = SDL_POINTER[ctypes.c_uint8]
LP_VkAllocationCallbacks: typing.TypeAlias = SDL_POINTER[VkAllocationCallbacks]
LP_SDL_Window: typing.TypeAlias = SDL_POINTER[SDL_Window]
LP_SDL_FRect: typing.TypeAlias = SDL_POINTER[SDL_FRect]
LP_SDL_Time: typing.TypeAlias = SDL_POINTER[SDL_Time]
LP_SDL_GPUComputePipeline: typing.TypeAlias = SDL_POINTER[SDL_GPUComputePipeline]
LP_LP_SDL_Finger: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_Finger]]
LP_SDL_GPUShader: typing.TypeAlias = SDL_POINTER[SDL_GPUShader]
LP_SDL_AudioDeviceID: typing.TypeAlias = SDL_POINTER[SDL_AudioDeviceID]
LP_c_ubyte: typing.TypeAlias = SDL_POINTER[ctypes.c_ubyte]
LP_LP_c_uint8: typing.TypeAlias = SDL_POINTER[SDL_POINTER[ctypes.c_uint8]]
LP_SDL_AsyncIOOutcome: typing.TypeAlias = SDL_POINTER[SDL_AsyncIOOutcome]
LP_SDL_AudioSpec: typing.TypeAlias = SDL_POINTER[SDL_AudioSpec]
LP_SDL_MouseID: typing.TypeAlias = SDL_POINTER[SDL_MouseID]
LP_SDL_Point: typing.TypeAlias = SDL_POINTER[SDL_Point]
LP_SDL_VirtualJoystickDesc: typing.TypeAlias = SDL_POINTER[SDL_VirtualJoystickDesc]
LP_SDL_Environment: typing.TypeAlias = SDL_POINTER[SDL_Environment]
LP_SDL_Palette: typing.TypeAlias = SDL_POINTER[SDL_Palette]
LP_SDL_GPUBufferCreateInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUBufferCreateInfo]
LP_SDL_GPUTextureRegion: typing.TypeAlias = SDL_POINTER[SDL_GPUTextureRegion]
LP_SDL_SensorID: typing.TypeAlias = SDL_POINTER[SDL_SensorID]
LP_SDL_PathInfo: typing.TypeAlias = SDL_POINTER[SDL_PathInfo]
LP_SDL_HapticID: typing.TypeAlias = SDL_POINTER[SDL_HapticID]
LP_c_wchar_p: typing.TypeAlias = SDL_POINTER[ctypes.c_wchar_p]
LP_SDL_GPUTextureCreateInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUTextureCreateInfo]
LP_c_uint64: typing.TypeAlias = SDL_POINTER[ctypes.c_uint64]
LP_SDL_AsyncIO: typing.TypeAlias = SDL_POINTER[SDL_AsyncIO]
LP_SDL_GPUTextureLocation: typing.TypeAlias = SDL_POINTER[SDL_GPUTextureLocation]
LP_SDL_InitState: typing.TypeAlias = SDL_POINTER[SDL_InitState]
LP_c_int8: typing.TypeAlias = SDL_POINTER[ctypes.c_int8]
LP_LP_SDL_AudioStream: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_AudioStream]]
LP_SDL_FPoint: typing.TypeAlias = SDL_POINTER[SDL_FPoint]
LP_SDL_Sensor: typing.TypeAlias = SDL_POINTER[SDL_Sensor]
LP_SDL_SpinLock: typing.TypeAlias = SDL_POINTER[SDL_SpinLock]
LP_SDL_AsyncIOQueue: typing.TypeAlias = SDL_POINTER[SDL_AsyncIOQueue]
LP_SDL_GPUBlitInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUBlitInfo]
LP_SDL_GPUColorTargetInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUColorTargetInfo]
LP_SDL_DisplayID: typing.TypeAlias = SDL_POINTER[SDL_DisplayID]
LP_c_uint32: typing.TypeAlias = SDL_POINTER[ctypes.c_uint32]
LP_SDL_IOStreamInterface: typing.TypeAlias = SDL_POINTER[SDL_IOStreamInterface]
LP_SDL_EventFilter: typing.TypeAlias = SDL_POINTER[SDL_EventFilter]
LP_SDL_DateFormat: typing.TypeAlias = SDL_POINTER[SDL_DateFormat]
LP_c_double: typing.TypeAlias = SDL_POINTER[ctypes.c_double]
LP_SDL_TextureAddressMode: typing.TypeAlias = SDL_POINTER[SDL_TextureAddressMode]
LP_c_int16: typing.TypeAlias = SDL_POINTER[ctypes.c_int16]
LP_LP_SDL_GamepadBinding: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_GamepadBinding]]
LP_SDL_free_func: typing.TypeAlias = SDL_POINTER[SDL_free_func]
LP_SDL_TouchID: typing.TypeAlias = SDL_POINTER[SDL_TouchID]
LP_LP_SDL_CameraSpec: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_CameraSpec]]
LP_SDL_Surface: typing.TypeAlias = SDL_POINTER[SDL_Surface]
LP_SDL_GPUBufferRegion: typing.TypeAlias = SDL_POINTER[SDL_GPUBufferRegion]
LP_SDL_Storage: typing.TypeAlias = SDL_POINTER[SDL_Storage]
LP_SDL_GPUDepthStencilTargetInfo: typing.TypeAlias = SDL_POINTER[SDL_GPUDepthStencilTargetInfo]
LP_c_void_p: typing.TypeAlias = SDL_POINTER[ctypes.c_void_p]
LP_LP_SDL_GPUFence: typing.TypeAlias = SDL_POINTER[SDL_POINTER[SDL_GPUFence]]
LP_SDL_Cursor: typing.TypeAlias = SDL_POINTER[SDL_Cursor]
LP_SDL_CameraSpec: typing.TypeAlias = SDL_POINTER[SDL_CameraSpec]
LP_SDL_Texture: typing.TypeAlias = SDL_POINTER[SDL_Texture]
LP_SDL_BlendMode: typing.TypeAlias = SDL_POINTER[SDL_BlendMode]
LP_SDL_GPUTextureSamplerBinding: typing.TypeAlias = SDL_POINTER[SDL_GPUTextureSamplerBinding]
LP_SDL_GPUTransferBufferLocation: typing.TypeAlias = SDL_POINTER[SDL_GPUTransferBufferLocation]

[docs] def SDL_ReportAssertion(data: LP_SDL_AssertData, func: ctypes.c_char_p, file: ctypes.c_char_p, line: ctypes.c_int) -> SDL_AssertState: """ Never call this directly. """
[docs] def SDL_SetAssertionHandler(handler: SDL_AssertionHandler, userdata: ctypes.c_void_p) -> None: """ Set an application-defined assertion handler. """
[docs] def SDL_GetDefaultAssertionHandler() -> SDL_AssertionHandler: """ Get the default assertion handler. """
[docs] def SDL_GetAssertionHandler(puserdata: LP_c_void_p) -> SDL_AssertionHandler: """ Get the current assertion handler. """
[docs] def SDL_GetAssertionReport() -> LP_SDL_AssertData: """ Get a list of all assertion failures. """
[docs] def SDL_ResetAssertionReport() -> None: """ Clear the list of all assertion failures. """
[docs] def SDL_AsyncIOFromFile(file: ctypes.c_char_p, mode: ctypes.c_char_p) -> LP_SDL_AsyncIO: """ Use this function to create a new SDL_AsyncIO object for reading from and/or writing to a named file. """
[docs] def SDL_GetAsyncIOSize(asyncio: LP_SDL_AsyncIO) -> ctypes.c_int64: """ Use this function to get the size of the data stream in an SDL_AsyncIO. """
[docs] def SDL_ReadAsyncIO(asyncio: LP_SDL_AsyncIO, ptr: ctypes.c_void_p, offset: ctypes.c_uint64, size: ctypes.c_uint64, queue: LP_SDL_AsyncIOQueue, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Start an async read. """
[docs] def SDL_WriteAsyncIO(asyncio: LP_SDL_AsyncIO, ptr: ctypes.c_void_p, offset: ctypes.c_uint64, size: ctypes.c_uint64, queue: LP_SDL_AsyncIOQueue, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Start an async write. """
[docs] def SDL_CloseAsyncIO(asyncio: LP_SDL_AsyncIO, flush: ctypes.c_bool, queue: LP_SDL_AsyncIOQueue, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Close and free any allocated resources for an async I/O object. """
[docs] def SDL_CreateAsyncIOQueue() -> LP_SDL_AsyncIOQueue: """ Create a task queue for tracking multiple I/O operations. """
[docs] def SDL_DestroyAsyncIOQueue(queue: LP_SDL_AsyncIOQueue) -> None: """ Destroy a previously-created async I/O task queue. """
[docs] def SDL_GetAsyncIOResult(queue: LP_SDL_AsyncIOQueue, outcome: LP_SDL_AsyncIOOutcome) -> ctypes.c_bool: """ Query an async I/O task queue for completed tasks. """
[docs] def SDL_WaitAsyncIOResult(queue: LP_SDL_AsyncIOQueue, outcome: LP_SDL_AsyncIOOutcome, timeoutMS: ctypes.c_int32) -> ctypes.c_bool: """ Block until an async I/O task queue has a completed task. """
[docs] def SDL_SignalAsyncIOQueue(queue: LP_SDL_AsyncIOQueue) -> None: """ Wake up any threads that are blocking in SDL_WaitAsyncIOResult(). """
[docs] def SDL_LoadFileAsync(file: ctypes.c_char_p, queue: LP_SDL_AsyncIOQueue, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Load all the data from a file path, asynchronously. """
[docs] def SDL_TryLockSpinlock(lock: LP_SDL_SpinLock) -> ctypes.c_bool: """ Try to lock a spin lock by setting it to a non-zero value. """
[docs] def SDL_LockSpinlock(lock: LP_SDL_SpinLock) -> None: """ Lock a spin lock by setting it to a non-zero value. """
[docs] def SDL_UnlockSpinlock(lock: LP_SDL_SpinLock) -> None: """ Unlock a spin lock by setting it to 0. """
[docs] def SDL_MemoryBarrierReleaseFunction() -> None: """ Insert a memory release barrier (function version). """
[docs] def SDL_MemoryBarrierAcquireFunction() -> None: """ Insert a memory acquire barrier (function version). """
[docs] def SDL_CompareAndSwapAtomicInt(a: LP_SDL_AtomicInt, oldval: ctypes.c_int, newval: ctypes.c_int) -> ctypes.c_bool: """ Set an atomic variable to a new value if it is currently an old value. """
[docs] def SDL_SetAtomicInt(a: LP_SDL_AtomicInt, v: ctypes.c_int) -> ctypes.c_int: """ Set an atomic variable to a value. """
[docs] def SDL_GetAtomicInt(a: LP_SDL_AtomicInt) -> ctypes.c_int: """ Get the value of an atomic variable. """
[docs] def SDL_AddAtomicInt(a: LP_SDL_AtomicInt, v: ctypes.c_int) -> ctypes.c_int: """ Add to an atomic variable. """
[docs] def SDL_CompareAndSwapAtomicU32(a: LP_SDL_AtomicU32, oldval: ctypes.c_uint32, newval: ctypes.c_uint32) -> ctypes.c_bool: """ Set an atomic variable to a new value if it is currently an old value. """
[docs] def SDL_SetAtomicU32(a: LP_SDL_AtomicU32, v: ctypes.c_uint32) -> ctypes.c_uint32: """ Set an atomic variable to a value. """
[docs] def SDL_GetAtomicU32(a: LP_SDL_AtomicU32) -> ctypes.c_uint32: """ Get the value of an atomic variable. """
[docs] def SDL_AddAtomicU32(a: LP_SDL_AtomicU32, v: ctypes.c_int) -> ctypes.c_uint32: """ Add to an atomic variable. """
[docs] def SDL_CompareAndSwapAtomicPointer(a: LP_c_void_p, oldval: ctypes.c_void_p, newval: ctypes.c_void_p) -> ctypes.c_bool: """ Set a pointer to a new value if it is currently an old value. """
[docs] def SDL_SetAtomicPointer(a: LP_c_void_p, v: ctypes.c_void_p) -> ctypes.c_void_p: """ Set a pointer to a value atomically. """
[docs] def SDL_GetAtomicPointer(a: LP_c_void_p) -> ctypes.c_void_p: """ Get the value of a pointer atomically. """
[docs] def SDL_GetGlobalProperties() -> SDL_PropertiesID: """ Get the global SDL properties. """
[docs] def SDL_CreateProperties() -> SDL_PropertiesID: """ Create a group of properties. """
[docs] def SDL_CopyProperties(src: SDL_PropertiesID, dst: SDL_PropertiesID) -> ctypes.c_bool: """ Copy a group of properties. """
[docs] def SDL_LockProperties(props: SDL_PropertiesID) -> ctypes.c_bool: """ Lock a group of properties. """
[docs] def SDL_UnlockProperties(props: SDL_PropertiesID) -> None: """ Unlock a group of properties. """
[docs] def SDL_SetPointerPropertyWithCleanup(props: SDL_PropertiesID, name: ctypes.c_char_p, value: ctypes.c_void_p, cleanup: SDL_CleanupPropertyCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Set a pointer property in a group of properties with a cleanup function that is called when the property is deleted. """
[docs] def SDL_SetPointerProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, value: ctypes.c_void_p) -> ctypes.c_bool: """ Set a pointer property in a group of properties. """
[docs] def SDL_SetStringProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, value: ctypes.c_char_p) -> ctypes.c_bool: """ Set a string property in a group of properties. """
[docs] def SDL_SetNumberProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, value: ctypes.c_int64) -> ctypes.c_bool: """ Set an integer property in a group of properties. """
[docs] def SDL_SetFloatProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, value: ctypes.c_float) -> ctypes.c_bool: """ Set a floating point property in a group of properties. """
[docs] def SDL_SetBooleanProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, value: ctypes.c_bool) -> ctypes.c_bool: """ Set a boolean property in a group of properties. """
[docs] def SDL_HasProperty(props: SDL_PropertiesID, name: ctypes.c_char_p) -> ctypes.c_bool: """ Return whether a property exists in a group of properties. """
[docs] def SDL_GetPropertyType(props: SDL_PropertiesID, name: ctypes.c_char_p) -> SDL_PropertyType: """ Get the type of a property in a group of properties. """
[docs] def SDL_GetPointerProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, default_value: ctypes.c_void_p) -> ctypes.c_void_p: """ Get a pointer property from a group of properties. """
[docs] def SDL_GetStringProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, default_value: ctypes.c_char_p) -> ctypes.c_char_p: """ Get a string property from a group of properties. """
[docs] def SDL_GetNumberProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, default_value: ctypes.c_int64) -> ctypes.c_int64: """ Get a number property from a group of properties. """
[docs] def SDL_GetFloatProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, default_value: ctypes.c_float) -> ctypes.c_float: """ Get a floating point property from a group of properties. """
[docs] def SDL_GetBooleanProperty(props: SDL_PropertiesID, name: ctypes.c_char_p, default_value: ctypes.c_bool) -> ctypes.c_bool: """ Get a boolean property from a group of properties. """
[docs] def SDL_ClearProperty(props: SDL_PropertiesID, name: ctypes.c_char_p) -> ctypes.c_bool: """ Clear a property from a group of properties. """
[docs] def SDL_EnumerateProperties(props: SDL_PropertiesID, callback: SDL_EnumeratePropertiesCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Enumerate the properties contained in a group of properties. """
[docs] def SDL_DestroyProperties(props: SDL_PropertiesID) -> None: """ Destroy a group of properties. """
[docs] def SDL_IOFromFile(file: ctypes.c_char_p, mode: ctypes.c_char_p) -> LP_SDL_IOStream: """ Use this function to create a new SDL_IOStream structure for reading from and/or writing to a named file. """
[docs] def SDL_IOFromMem(mem: ctypes.c_void_p, size: ctypes.c_size_t) -> LP_SDL_IOStream: """ Use this function to prepare a read-write memory buffer for use with SDL_IOStream. """
[docs] def SDL_IOFromConstMem(mem: ctypes.c_void_p, size: ctypes.c_size_t) -> LP_SDL_IOStream: """ Use this function to prepare a read-only memory buffer for use with SDL_IOStream. """
[docs] def SDL_IOFromDynamicMem() -> LP_SDL_IOStream: """ Use this function to create an SDL_IOStream that is backed by dynamically allocated memory. """
[docs] def SDL_OpenIO(iface: LP_SDL_IOStreamInterface, userdata: ctypes.c_void_p) -> LP_SDL_IOStream: """ Create a custom SDL_IOStream. """
[docs] def SDL_CloseIO(context: LP_SDL_IOStream) -> ctypes.c_bool: """ Close and free an allocated SDL_IOStream structure. """
[docs] def SDL_GetIOProperties(context: LP_SDL_IOStream) -> SDL_PropertiesID: """ Get the properties associated with an SDL_IOStream. """
[docs] def SDL_GetIOStatus(context: LP_SDL_IOStream) -> SDL_IOStatus: """ Query the stream status of an SDL_IOStream. """
[docs] def SDL_GetIOSize(context: LP_SDL_IOStream) -> ctypes.c_int64: """ Use this function to get the size of the data stream in an SDL_IOStream. """
[docs] def SDL_SeekIO(context: LP_SDL_IOStream, offset: ctypes.c_int64, whence: SDL_IOWhence) -> ctypes.c_int64: """ Seek within an SDL_IOStream data stream. """
[docs] def SDL_TellIO(context: LP_SDL_IOStream) -> ctypes.c_int64: """ Determine the current read/write offset in an SDL_IOStream data stream. """
[docs] def SDL_ReadIO(context: LP_SDL_IOStream, ptr: ctypes.c_void_p, size: ctypes.c_size_t) -> ctypes.c_size_t: """ Read from a data source. """
[docs] def SDL_WriteIO(context: LP_SDL_IOStream, ptr: ctypes.c_void_p, size: ctypes.c_size_t) -> ctypes.c_size_t: """ Write to an SDL_IOStream data stream. """
[docs] def SDL_IOprintf(context: LP_SDL_IOStream, fmt: ctypes.c_char_p, *args: typing.Any) -> ctypes.c_size_t: """ Print to an SDL_IOStream data stream. """
[docs] def SDL_IOvprintf(context: LP_SDL_IOStream, fmt: ctypes.c_char_p, ap: SDL_VA_LIST) -> ctypes.c_size_t: """ Print to an SDL_IOStream data stream. """
[docs] def SDL_FlushIO(context: LP_SDL_IOStream) -> ctypes.c_bool: """ Flush any buffered data in the stream. """
[docs] def SDL_LoadFile_IO(src: LP_SDL_IOStream, datasize: LP_c_size_t, closeio: ctypes.c_bool) -> ctypes.c_void_p: """ Load all the data from an SDL data stream. """
[docs] def SDL_LoadFile(file: ctypes.c_char_p, datasize: LP_c_size_t) -> ctypes.c_void_p: """ Load all the data from a file path. """
[docs] def SDL_SaveFile_IO(src: LP_SDL_IOStream, data: ctypes.c_void_p, datasize: ctypes.c_size_t, closeio: ctypes.c_bool) -> ctypes.c_bool: """ Save all the data into an SDL data stream. """
[docs] def SDL_SaveFile(file: ctypes.c_char_p, data: ctypes.c_void_p, datasize: ctypes.c_size_t) -> ctypes.c_bool: """ Save all the data into a file path. """
[docs] def SDL_ReadU8(src: LP_SDL_IOStream, value: LP_c_uint8) -> ctypes.c_bool: """ Use this function to read a byte from an SDL_IOStream. """
[docs] def SDL_ReadS8(src: LP_SDL_IOStream, value: LP_c_int8) -> ctypes.c_bool: """ Use this function to read a signed byte from an SDL_IOStream. """
[docs] def SDL_ReadU16LE(src: LP_SDL_IOStream, value: LP_c_uint16) -> ctypes.c_bool: """ Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadS16LE(src: LP_SDL_IOStream, value: LP_c_int16) -> ctypes.c_bool: """ Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadU16BE(src: LP_SDL_IOStream, value: LP_c_uint16) -> ctypes.c_bool: """ Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadS16BE(src: LP_SDL_IOStream, value: LP_c_int16) -> ctypes.c_bool: """ Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadU32LE(src: LP_SDL_IOStream, value: LP_c_uint32) -> ctypes.c_bool: """ Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadS32LE(src: LP_SDL_IOStream, value: LP_c_int32) -> ctypes.c_bool: """ Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadU32BE(src: LP_SDL_IOStream, value: LP_c_uint32) -> ctypes.c_bool: """ Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadS32BE(src: LP_SDL_IOStream, value: LP_c_int32) -> ctypes.c_bool: """ Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadU64LE(src: LP_SDL_IOStream, value: LP_c_uint64) -> ctypes.c_bool: """ Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadS64LE(src: LP_SDL_IOStream, value: LP_c_int64) -> ctypes.c_bool: """ Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadU64BE(src: LP_SDL_IOStream, value: LP_c_uint64) -> ctypes.c_bool: """ Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_ReadS64BE(src: LP_SDL_IOStream, value: LP_c_int64) -> ctypes.c_bool: """ Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format. """
[docs] def SDL_WriteU8(dst: LP_SDL_IOStream, value: ctypes.c_uint8) -> ctypes.c_bool: """ Use this function to write a byte to an SDL_IOStream. """
[docs] def SDL_WriteS8(dst: LP_SDL_IOStream, value: ctypes.c_int8) -> ctypes.c_bool: """ Use this function to write a signed byte to an SDL_IOStream. """
[docs] def SDL_WriteU16LE(dst: LP_SDL_IOStream, value: ctypes.c_uint16) -> ctypes.c_bool: """ Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data. """
[docs] def SDL_WriteS16LE(dst: LP_SDL_IOStream, value: ctypes.c_int16) -> ctypes.c_bool: """ Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data. """
[docs] def SDL_WriteU16BE(dst: LP_SDL_IOStream, value: ctypes.c_uint16) -> ctypes.c_bool: """ Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data. """
[docs] def SDL_WriteS16BE(dst: LP_SDL_IOStream, value: ctypes.c_int16) -> ctypes.c_bool: """ Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data. """
[docs] def SDL_WriteU32LE(dst: LP_SDL_IOStream, value: ctypes.c_uint32) -> ctypes.c_bool: """ Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data. """
[docs] def SDL_WriteS32LE(dst: LP_SDL_IOStream, value: ctypes.c_int32) -> ctypes.c_bool: """ Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data. """
[docs] def SDL_WriteU32BE(dst: LP_SDL_IOStream, value: ctypes.c_uint32) -> ctypes.c_bool: """ Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data. """
[docs] def SDL_WriteS32BE(dst: LP_SDL_IOStream, value: ctypes.c_int32) -> ctypes.c_bool: """ Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data. """
[docs] def SDL_WriteU64LE(dst: LP_SDL_IOStream, value: ctypes.c_uint64) -> ctypes.c_bool: """ Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data. """
[docs] def SDL_WriteS64LE(dst: LP_SDL_IOStream, value: ctypes.c_int64) -> ctypes.c_bool: """ Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data. """
[docs] def SDL_WriteU64BE(dst: LP_SDL_IOStream, value: ctypes.c_uint64) -> ctypes.c_bool: """ Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data. """
[docs] def SDL_WriteS64BE(dst: LP_SDL_IOStream, value: ctypes.c_int64) -> ctypes.c_bool: """ Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data. """
[docs] def SDL_GetNumAudioDrivers() -> ctypes.c_int: """ Use this function to get the number of built-in audio drivers. """
[docs] def SDL_GetAudioDriver(index: ctypes.c_int) -> ctypes.c_char_p: """ Use this function to get the name of a built in audio driver. """
[docs] def SDL_GetCurrentAudioDriver() -> ctypes.c_char_p: """ Get the name of the current audio driver. """
[docs] def SDL_GetAudioPlaybackDevices(count: LP_c_int) -> LP_SDL_AudioDeviceID: """ Get a list of currently-connected audio playback devices. """
[docs] def SDL_GetAudioRecordingDevices(count: LP_c_int) -> LP_SDL_AudioDeviceID: """ Get a list of currently-connected audio recording devices. """
[docs] def SDL_GetAudioDeviceName(devid: SDL_AudioDeviceID) -> ctypes.c_char_p: """ Get the human-readable name of a specific audio device. """
[docs] def SDL_GetAudioDeviceFormat(devid: SDL_AudioDeviceID, spec: LP_SDL_AudioSpec, sample_frames: LP_c_int) -> ctypes.c_bool: """ Get the current audio format of a specific audio device. """
[docs] def SDL_GetAudioDeviceChannelMap(devid: SDL_AudioDeviceID, count: LP_c_int) -> LP_c_int: """ Get the current channel map of an audio device. """
[docs] def SDL_OpenAudioDevice(devid: SDL_AudioDeviceID, spec: LP_SDL_AudioSpec) -> SDL_AudioDeviceID: """ Open a specific audio device. """
[docs] def SDL_IsAudioDevicePhysical(devid: SDL_AudioDeviceID) -> ctypes.c_bool: """ Determine if an audio device is physical (instead of logical). """
[docs] def SDL_IsAudioDevicePlayback(devid: SDL_AudioDeviceID) -> ctypes.c_bool: """ Determine if an audio device is a playback device (instead of recording). """
[docs] def SDL_PauseAudioDevice(devid: SDL_AudioDeviceID) -> ctypes.c_bool: """ Use this function to pause audio playback on a specified device. """
[docs] def SDL_ResumeAudioDevice(devid: SDL_AudioDeviceID) -> ctypes.c_bool: """ Use this function to unpause audio playback on a specified device. """
[docs] def SDL_AudioDevicePaused(devid: SDL_AudioDeviceID) -> ctypes.c_bool: """ Use this function to query if an audio device is paused. """
[docs] def SDL_GetAudioDeviceGain(devid: SDL_AudioDeviceID) -> ctypes.c_float: """ Get the gain of an audio device. """
[docs] def SDL_SetAudioDeviceGain(devid: SDL_AudioDeviceID, gain: ctypes.c_float) -> ctypes.c_bool: """ Change the gain of an audio device. """
[docs] def SDL_CloseAudioDevice(devid: SDL_AudioDeviceID) -> None: """ Close a previously-opened audio device. """
[docs] def SDL_BindAudioStreams(devid: SDL_AudioDeviceID, streams: LP_LP_SDL_AudioStream, num_streams: ctypes.c_int) -> ctypes.c_bool: """ Bind a list of audio streams to an audio device. """
[docs] def SDL_BindAudioStream(devid: SDL_AudioDeviceID, stream: LP_SDL_AudioStream) -> ctypes.c_bool: """ Bind a single audio stream to an audio device. """
[docs] def SDL_UnbindAudioStreams(streams: LP_LP_SDL_AudioStream, num_streams: ctypes.c_int) -> None: """ Unbind a list of audio streams from their audio devices. """
[docs] def SDL_UnbindAudioStream(stream: LP_SDL_AudioStream) -> None: """ Unbind a single audio stream from its audio device. """
[docs] def SDL_GetAudioStreamDevice(stream: LP_SDL_AudioStream) -> SDL_AudioDeviceID: """ Query an audio stream for its currently-bound device. """
[docs] def SDL_CreateAudioStream(src_spec: LP_SDL_AudioSpec, dst_spec: LP_SDL_AudioSpec) -> LP_SDL_AudioStream: """ Create a new audio stream. """
[docs] def SDL_GetAudioStreamProperties(stream: LP_SDL_AudioStream) -> SDL_PropertiesID: """ Get the properties associated with an audio stream. """
[docs] def SDL_GetAudioStreamFormat(stream: LP_SDL_AudioStream, src_spec: LP_SDL_AudioSpec, dst_spec: LP_SDL_AudioSpec) -> ctypes.c_bool: """ Query the current format of an audio stream. """
[docs] def SDL_SetAudioStreamFormat(stream: LP_SDL_AudioStream, src_spec: LP_SDL_AudioSpec, dst_spec: LP_SDL_AudioSpec) -> ctypes.c_bool: """ Change the input and output formats of an audio stream. """
[docs] def SDL_GetAudioStreamFrequencyRatio(stream: LP_SDL_AudioStream) -> ctypes.c_float: """ Get the frequency ratio of an audio stream. """
[docs] def SDL_SetAudioStreamFrequencyRatio(stream: LP_SDL_AudioStream, ratio: ctypes.c_float) -> ctypes.c_bool: """ Change the frequency ratio of an audio stream. """
[docs] def SDL_GetAudioStreamGain(stream: LP_SDL_AudioStream) -> ctypes.c_float: """ Get the gain of an audio stream. """
[docs] def SDL_SetAudioStreamGain(stream: LP_SDL_AudioStream, gain: ctypes.c_float) -> ctypes.c_bool: """ Change the gain of an audio stream. """
[docs] def SDL_GetAudioStreamInputChannelMap(stream: LP_SDL_AudioStream, count: LP_c_int) -> LP_c_int: """ Get the current input channel map of an audio stream. """
[docs] def SDL_GetAudioStreamOutputChannelMap(stream: LP_SDL_AudioStream, count: LP_c_int) -> LP_c_int: """ Get the current output channel map of an audio stream. """
[docs] def SDL_SetAudioStreamInputChannelMap(stream: LP_SDL_AudioStream, chmap: LP_c_int, count: ctypes.c_int) -> ctypes.c_bool: """ Set the current input channel map of an audio stream. """
[docs] def SDL_SetAudioStreamOutputChannelMap(stream: LP_SDL_AudioStream, chmap: LP_c_int, count: ctypes.c_int) -> ctypes.c_bool: """ Set the current output channel map of an audio stream. """
[docs] def SDL_PutAudioStreamData(stream: LP_SDL_AudioStream, buf: ctypes.c_void_p, len: ctypes.c_int) -> ctypes.c_bool: """ Add data to the stream. """
[docs] def SDL_PutAudioStreamDataNoCopy(stream: LP_SDL_AudioStream, buf: ctypes.c_void_p, len: ctypes.c_int, callback: SDL_AudioStreamDataCompleteCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Add external data to an audio stream without copying it. """
[docs] def SDL_PutAudioStreamPlanarData(stream: LP_SDL_AudioStream, channel_buffers: LP_c_void_p, num_channels: ctypes.c_int, num_samples: ctypes.c_int) -> ctypes.c_bool: """ Add data to the stream with each channel in a separate array. """
[docs] def SDL_GetAudioStreamData(stream: LP_SDL_AudioStream, buf: ctypes.c_void_p, len: ctypes.c_int) -> ctypes.c_int: """ Get converted/resampled data from the stream. """
[docs] def SDL_GetAudioStreamAvailable(stream: LP_SDL_AudioStream) -> ctypes.c_int: """ Get the number of converted/resampled bytes available. """
[docs] def SDL_GetAudioStreamQueued(stream: LP_SDL_AudioStream) -> ctypes.c_int: """ Get the number of bytes currently queued. """
[docs] def SDL_FlushAudioStream(stream: LP_SDL_AudioStream) -> ctypes.c_bool: """ Tell the stream that you're done sending data, and anything being buffered should be converted/resampled and made available immediately. """
[docs] def SDL_ClearAudioStream(stream: LP_SDL_AudioStream) -> ctypes.c_bool: """ Clear any pending data in the stream. """
[docs] def SDL_PauseAudioStreamDevice(stream: LP_SDL_AudioStream) -> ctypes.c_bool: """ Use this function to pause audio playback on the audio device associated with an audio stream. """
[docs] def SDL_ResumeAudioStreamDevice(stream: LP_SDL_AudioStream) -> ctypes.c_bool: """ Use this function to unpause audio playback on the audio device associated with an audio stream. """
[docs] def SDL_AudioStreamDevicePaused(stream: LP_SDL_AudioStream) -> ctypes.c_bool: """ Use this function to query if an audio device associated with a stream is paused. """
[docs] def SDL_LockAudioStream(stream: LP_SDL_AudioStream) -> ctypes.c_bool: """ Lock an audio stream for serialized access. """
[docs] def SDL_UnlockAudioStream(stream: LP_SDL_AudioStream) -> ctypes.c_bool: """ Unlock an audio stream for serialized access. """
[docs] def SDL_SetAudioStreamGetCallback(stream: LP_SDL_AudioStream, callback: SDL_AudioStreamCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Set a callback that runs when data is requested from an audio stream. """
[docs] def SDL_SetAudioStreamPutCallback(stream: LP_SDL_AudioStream, callback: SDL_AudioStreamCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Set a callback that runs when data is added to an audio stream. """
[docs] def SDL_DestroyAudioStream(stream: LP_SDL_AudioStream) -> None: """ Free an audio stream. """
[docs] def SDL_OpenAudioDeviceStream(devid: SDL_AudioDeviceID, spec: LP_SDL_AudioSpec, callback: SDL_AudioStreamCallback, userdata: ctypes.c_void_p) -> LP_SDL_AudioStream: """ Convenience function for straightforward audio init for the common case. """
[docs] def SDL_SetAudioPostmixCallback(devid: SDL_AudioDeviceID, callback: SDL_AudioPostmixCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Set a callback that fires when data is about to be fed to an audio device. """
[docs] def SDL_LoadWAV_IO(src: LP_SDL_IOStream, closeio: ctypes.c_bool, spec: LP_SDL_AudioSpec, audio_buf: LP_LP_c_uint8, audio_len: LP_c_uint32) -> ctypes.c_bool: """ Load the audio data of a WAVE file into memory. """
[docs] def SDL_LoadWAV(path: ctypes.c_char_p, spec: LP_SDL_AudioSpec, audio_buf: LP_LP_c_uint8, audio_len: LP_c_uint32) -> ctypes.c_bool: """ Loads a WAV from a file path. """
[docs] def SDL_MixAudio(dst: LP_c_uint8, src: LP_c_uint8, format: SDL_AudioFormat, len: ctypes.c_uint32, volume: ctypes.c_float) -> ctypes.c_bool: """ Mix audio data in a specified format. """
[docs] def SDL_ConvertAudioSamples(src_spec: LP_SDL_AudioSpec, src_data: LP_c_uint8, src_len: ctypes.c_int, dst_spec: LP_SDL_AudioSpec, dst_data: LP_LP_c_uint8, dst_len: LP_c_int) -> ctypes.c_bool: """ Convert some audio data of one format to another format. """
[docs] def SDL_GetAudioFormatName(format: SDL_AudioFormat) -> ctypes.c_char_p: """ Get the human readable name of an audio format. """
[docs] def SDL_GetSilenceValueForFormat(format: SDL_AudioFormat) -> ctypes.c_int: """ Get the appropriate memset value for silencing an audio format. """
[docs] def SDL_ComposeCustomBlendMode(srcColorFactor: SDL_BlendFactor, dstColorFactor: SDL_BlendFactor, colorOperation: SDL_BlendOperation, srcAlphaFactor: SDL_BlendFactor, dstAlphaFactor: SDL_BlendFactor, alphaOperation: SDL_BlendOperation) -> SDL_BlendMode: """ Compose a custom blend mode for renderers. """
[docs] def SDL_malloc(size: ctypes.c_size_t) -> ctypes.c_void_p: """ Allocate uninitialized memory. """
[docs] def SDL_calloc(nmemb: ctypes.c_size_t, size: ctypes.c_size_t) -> ctypes.c_void_p: """ Allocate a zero-initialized array. """
[docs] def SDL_realloc(mem: ctypes.c_void_p, size: ctypes.c_size_t) -> ctypes.c_void_p: """ Change the size of allocated memory. """
[docs] def SDL_free(mem: ctypes.c_void_p) -> None: """ Free allocated memory. """
[docs] def SDL_GetOriginalMemoryFunctions(malloc_func: LP_SDL_malloc_func, calloc_func: LP_SDL_calloc_func, realloc_func: LP_SDL_realloc_func, free_func: LP_SDL_free_func) -> None: """ Get the original set of SDL memory functions. """
[docs] def SDL_GetMemoryFunctions(malloc_func: LP_SDL_malloc_func, calloc_func: LP_SDL_calloc_func, realloc_func: LP_SDL_realloc_func, free_func: LP_SDL_free_func) -> None: """ Get the current set of SDL memory functions. """
[docs] def SDL_SetMemoryFunctions(malloc_func: SDL_malloc_func, calloc_func: SDL_calloc_func, realloc_func: SDL_realloc_func, free_func: SDL_free_func) -> ctypes.c_bool: """ Replace SDL's memory allocation functions with a custom set. """
[docs] def SDL_aligned_alloc(alignment: ctypes.c_size_t, size: ctypes.c_size_t) -> ctypes.c_void_p: """ Allocate memory aligned to a specific alignment. """
[docs] def SDL_aligned_free(mem: ctypes.c_void_p) -> None: """ Free memory allocated by SDL_aligned_alloc(). """
[docs] def SDL_GetNumAllocations() -> ctypes.c_int: """ Get the number of outstanding (unfreed) allocations. """
[docs] def SDL_GetEnvironment() -> LP_SDL_Environment: """ Get the process environment. """
[docs] def SDL_CreateEnvironment(populated: ctypes.c_bool) -> LP_SDL_Environment: """ Create a set of environment variables """
[docs] def SDL_GetEnvironmentVariable(env: LP_SDL_Environment, name: ctypes.c_char_p) -> ctypes.c_char_p: """ Get the value of a variable in the environment. """
[docs] def SDL_GetEnvironmentVariables(env: LP_SDL_Environment) -> LP_c_char_p: """ Get all variables in the environment. """
[docs] def SDL_SetEnvironmentVariable(env: LP_SDL_Environment, name: ctypes.c_char_p, value: ctypes.c_char_p, overwrite: ctypes.c_bool) -> ctypes.c_bool: """ Set the value of a variable in the environment. """
[docs] def SDL_UnsetEnvironmentVariable(env: LP_SDL_Environment, name: ctypes.c_char_p) -> ctypes.c_bool: """ Clear a variable from the environment. """
[docs] def SDL_DestroyEnvironment(env: LP_SDL_Environment) -> None: """ Destroy a set of environment variables. """
[docs] def SDL_getenv(name: ctypes.c_char_p) -> ctypes.c_char_p: """ Get the value of a variable in the environment. """
[docs] def SDL_getenv_unsafe(name: ctypes.c_char_p) -> ctypes.c_char_p: """ Get the value of a variable in the environment. """
[docs] def SDL_setenv_unsafe(name: ctypes.c_char_p, value: ctypes.c_char_p, overwrite: ctypes.c_int) -> ctypes.c_int: """ Set the value of a variable in the environment. """
[docs] def SDL_unsetenv_unsafe(name: ctypes.c_char_p) -> ctypes.c_int: """ Clear a variable from the environment. """
[docs] def SDL_qsort(base: ctypes.c_void_p, nmemb: ctypes.c_size_t, size: ctypes.c_size_t, compare: SDL_CompareCallback) -> None: """ Sort an array. """
[docs] def SDL_bsearch(key: ctypes.c_void_p, base: ctypes.c_void_p, nmemb: ctypes.c_size_t, size: ctypes.c_size_t, compare: SDL_CompareCallback) -> ctypes.c_void_p: """ Perform a binary search on a previously sorted array. """
[docs] def SDL_qsort_r(base: ctypes.c_void_p, nmemb: ctypes.c_size_t, size: ctypes.c_size_t, compare: SDL_CompareCallback_r, userdata: ctypes.c_void_p) -> None: """ Sort an array, passing a userdata pointer to the compare function. """
[docs] def SDL_bsearch_r(key: ctypes.c_void_p, base: ctypes.c_void_p, nmemb: ctypes.c_size_t, size: ctypes.c_size_t, compare: SDL_CompareCallback_r, userdata: ctypes.c_void_p) -> ctypes.c_void_p: """ Perform a binary search on a previously sorted array, passing a userdata pointer to the compare function. """
[docs] def SDL_abs(x: ctypes.c_int) -> ctypes.c_int: """ Compute the absolute value of `x`. """
[docs] def SDL_isalpha(x: ctypes.c_int) -> ctypes.c_int: """ Query if a character is alphabetic (a letter). """
[docs] def SDL_isalnum(x: ctypes.c_int) -> ctypes.c_int: """ Query if a character is alphabetic (a letter) or a number. """
[docs] def SDL_isblank(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is blank (a space or tab). """
[docs] def SDL_iscntrl(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is a control character. """
[docs] def SDL_isdigit(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is a numeric digit. """
[docs] def SDL_isxdigit(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is a hexadecimal digit. """
[docs] def SDL_ispunct(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is a punctuation mark. """
[docs] def SDL_isspace(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is whitespace. """
[docs] def SDL_isupper(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is upper case. """
[docs] def SDL_islower(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is lower case. """
[docs] def SDL_isprint(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is "printable". """
[docs] def SDL_isgraph(x: ctypes.c_int) -> ctypes.c_int: """ Report if a character is any "printable" except space. """
[docs] def SDL_toupper(x: ctypes.c_int) -> ctypes.c_int: """ Convert low-ASCII English letters to uppercase. """
[docs] def SDL_tolower(x: ctypes.c_int) -> ctypes.c_int: """ Convert low-ASCII English letters to lowercase. """
[docs] def SDL_crc16(crc: ctypes.c_uint16, data: ctypes.c_void_p, len: ctypes.c_size_t) -> ctypes.c_uint16: """ Calculate a CRC-16 value. """
[docs] def SDL_crc32(crc: ctypes.c_uint32, data: ctypes.c_void_p, len: ctypes.c_size_t) -> ctypes.c_uint32: """ Calculate a CRC-32 value. """
[docs] def SDL_murmur3_32(data: ctypes.c_void_p, len: ctypes.c_size_t, seed: ctypes.c_uint32) -> ctypes.c_uint32: """ Calculate a 32-bit MurmurHash3 value for a block of data. """
[docs] def SDL_memcpy(dst: ctypes.c_void_p, src: ctypes.c_void_p, len: ctypes.c_size_t) -> ctypes.c_void_p: """ Copy non-overlapping memory. """
[docs] def SDL_memmove(dst: ctypes.c_void_p, src: ctypes.c_void_p, len: ctypes.c_size_t) -> ctypes.c_void_p: """ Copy memory ranges that might overlap. """
[docs] def SDL_memset(dst: ctypes.c_void_p, c: ctypes.c_int, len: ctypes.c_size_t) -> ctypes.c_void_p: """ Initialize all bytes of buffer of memory to a specific value. """
[docs] def SDL_memset4(dst: ctypes.c_void_p, val: ctypes.c_uint32, dwords: ctypes.c_size_t) -> ctypes.c_void_p: """ Initialize all 32-bit words of buffer of memory to a specific value. """
[docs] def SDL_memcmp(s1: ctypes.c_void_p, s2: ctypes.c_void_p, len: ctypes.c_size_t) -> ctypes.c_int: """ Compare two buffers of memory. """
[docs] def SDL_wcslen(wstr: ctypes.c_wchar_p) -> ctypes.c_size_t: """ This works exactly like wcslen() but doesn't require access to a C runtime. """
[docs] def SDL_wcsnlen(wstr: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_size_t: """ This works exactly like wcsnlen() but doesn't require access to a C runtime. """
[docs] def SDL_wcslcpy(dst: ctypes.c_wchar_p, src: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_size_t: """ Copy a wide string. """
[docs] def SDL_wcslcat(dst: ctypes.c_wchar_p, src: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_size_t: """ Concatenate wide strings. """
[docs] def SDL_wcsdup(wstr: ctypes.c_wchar_p) -> ctypes.c_wchar_p: """ Allocate a copy of a wide string. """
[docs] def SDL_wcsstr(haystack: ctypes.c_wchar_p, needle: ctypes.c_wchar_p) -> ctypes.c_wchar_p: """ Search a wide string for the first instance of a specific substring. """
[docs] def SDL_wcsnstr(haystack: ctypes.c_wchar_p, needle: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_wchar_p: """ Search a wide string, up to n wide chars, for the first instance of a specific substring. """
[docs] def SDL_wcscmp(str1: ctypes.c_wchar_p, str2: ctypes.c_wchar_p) -> ctypes.c_int: """ Compare two null-terminated wide strings. """
[docs] def SDL_wcsncmp(str1: ctypes.c_wchar_p, str2: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_int: """ Compare two wide strings up to a number of wchar_t values. """
[docs] def SDL_wcscasecmp(str1: ctypes.c_wchar_p, str2: ctypes.c_wchar_p) -> ctypes.c_int: """ Compare two null-terminated wide strings, case-insensitively. """
[docs] def SDL_wcsncasecmp(str1: ctypes.c_wchar_p, str2: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_int: """ Compare two wide strings, case-insensitively, up to a number of wchar_t. """
[docs] def SDL_wcstol(str: ctypes.c_wchar_p, endp: LP_c_wchar_p, base: ctypes.c_int) -> ctypes.c_long: """ Parse a `long` from a wide string. """
[docs] def SDL_strlen(str: ctypes.c_char_p) -> ctypes.c_size_t: """ This works exactly like strlen() but doesn't require access to a C runtime. """
[docs] def SDL_strnlen(str: ctypes.c_char_p, maxlen: ctypes.c_size_t) -> ctypes.c_size_t: """ This works exactly like strnlen() but doesn't require access to a C runtime. """
[docs] def SDL_strlcpy(dst: ctypes.c_char_p, src: ctypes.c_char_p, maxlen: ctypes.c_size_t) -> ctypes.c_size_t: """ Copy a string. """
[docs] def SDL_utf8strlcpy(dst: ctypes.c_char_p, src: ctypes.c_char_p, dst_bytes: ctypes.c_size_t) -> ctypes.c_size_t: """ Copy an UTF-8 string. """
[docs] def SDL_strlcat(dst: ctypes.c_char_p, src: ctypes.c_char_p, maxlen: ctypes.c_size_t) -> ctypes.c_size_t: """ Concatenate strings. """
[docs] def SDL_strdup(str: ctypes.c_char_p) -> ctypes.c_char_p: """ Allocate a copy of a string. """
[docs] def SDL_strndup(str: ctypes.c_char_p, maxlen: ctypes.c_size_t) -> ctypes.c_char_p: """ Allocate a copy of a string, up to n characters. """
[docs] def SDL_strrev(str: ctypes.c_char_p) -> ctypes.c_char_p: """ Reverse a string's contents. """
[docs] def SDL_strupr(str: ctypes.c_char_p) -> ctypes.c_char_p: """ Convert a string to uppercase. """
[docs] def SDL_strlwr(str: ctypes.c_char_p) -> ctypes.c_char_p: """ Convert a string to lowercase. """
[docs] def SDL_strchr(str: ctypes.c_char_p, c: ctypes.c_int) -> ctypes.c_char_p: """ Search a string for the first instance of a specific byte. """
[docs] def SDL_strrchr(str: ctypes.c_char_p, c: ctypes.c_int) -> ctypes.c_char_p: """ Search a string for the last instance of a specific byte. """
[docs] def SDL_strstr(haystack: ctypes.c_char_p, needle: ctypes.c_char_p) -> ctypes.c_char_p: """ Search a string for the first instance of a specific substring. """
[docs] def SDL_strnstr(haystack: ctypes.c_char_p, needle: ctypes.c_char_p, maxlen: ctypes.c_size_t) -> ctypes.c_char_p: """ Search a string, up to n bytes, for the first instance of a specific substring. """
[docs] def SDL_strcasestr(haystack: ctypes.c_char_p, needle: ctypes.c_char_p) -> ctypes.c_char_p: """ Search a UTF-8 string for the first instance of a specific substring, case-insensitively. """
[docs] def SDL_strtok_r(str: ctypes.c_char_p, delim: ctypes.c_char_p, saveptr: LP_c_char_p) -> ctypes.c_char_p: """ This works exactly like strtok_r() but doesn't require access to a C runtime. """
[docs] def SDL_utf8strlen(str: ctypes.c_char_p) -> ctypes.c_size_t: """ Count the number of codepoints in a UTF-8 string. """
[docs] def SDL_utf8strnlen(str: ctypes.c_char_p, bytes: ctypes.c_size_t) -> ctypes.c_size_t: """ Count the number of codepoints in a UTF-8 string, up to n bytes. """
[docs] def SDL_itoa(value: ctypes.c_int, str: ctypes.c_char_p, radix: ctypes.c_int) -> ctypes.c_char_p: """ Convert an integer into a string. """
[docs] def SDL_uitoa(value: ctypes.c_uint, str: ctypes.c_char_p, radix: ctypes.c_int) -> ctypes.c_char_p: """ Convert an unsigned integer into a string. """
[docs] def SDL_ltoa(value: ctypes.c_long, str: ctypes.c_char_p, radix: ctypes.c_int) -> ctypes.c_char_p: """ Convert a long integer into a string. """
[docs] def SDL_ultoa(value: ctypes.c_ulong, str: ctypes.c_char_p, radix: ctypes.c_int) -> ctypes.c_char_p: """ Convert an unsigned long integer into a string. """
[docs] def SDL_lltoa(value: ctypes.c_longlong, str: ctypes.c_char_p, radix: ctypes.c_int) -> ctypes.c_char_p: """ Convert a long long integer into a string. """
[docs] def SDL_ulltoa(value: ctypes.c_ulonglong, str: ctypes.c_char_p, radix: ctypes.c_int) -> ctypes.c_char_p: """ Convert an unsigned long long integer into a string. """
[docs] def SDL_atoi(str: ctypes.c_char_p) -> ctypes.c_int: """ Parse an `int` from a string. """
[docs] def SDL_atof(str: ctypes.c_char_p) -> ctypes.c_double: """ Parse a `double` from a string. """
[docs] def SDL_strtol(str: ctypes.c_char_p, endp: LP_c_char_p, base: ctypes.c_int) -> ctypes.c_long: """ Parse a `long` from a string. """
[docs] def SDL_strtoul(str: ctypes.c_char_p, endp: LP_c_char_p, base: ctypes.c_int) -> ctypes.c_ulong: """ Parse an `unsigned long` from a string. """
[docs] def SDL_strtoll(str: ctypes.c_char_p, endp: LP_c_char_p, base: ctypes.c_int) -> ctypes.c_longlong: """ Parse a `long long` from a string. """
[docs] def SDL_strtoull(str: ctypes.c_char_p, endp: LP_c_char_p, base: ctypes.c_int) -> ctypes.c_ulonglong: """ Parse an `unsigned long long` from a string. """
[docs] def SDL_strtod(str: ctypes.c_char_p, endp: LP_c_char_p) -> ctypes.c_double: """ Parse a `double` from a string. """
[docs] def SDL_strcmp(str1: ctypes.c_char_p, str2: ctypes.c_char_p) -> ctypes.c_int: """ Compare two null-terminated UTF-8 strings. """
[docs] def SDL_strncmp(str1: ctypes.c_char_p, str2: ctypes.c_char_p, maxlen: ctypes.c_size_t) -> ctypes.c_int: """ Compare two UTF-8 strings up to a number of bytes. """
[docs] def SDL_strcasecmp(str1: ctypes.c_char_p, str2: ctypes.c_char_p) -> ctypes.c_int: """ Compare two null-terminated UTF-8 strings, case-insensitively. """
[docs] def SDL_strncasecmp(str1: ctypes.c_char_p, str2: ctypes.c_char_p, maxlen: ctypes.c_size_t) -> ctypes.c_int: """ Compare two UTF-8 strings, case-insensitively, up to a number of bytes. """
[docs] def SDL_StepUTF8(pstr: LP_c_char_p, pslen: LP_c_size_t) -> ctypes.c_uint32: """ Decode a UTF-8 string, one Unicode codepoint at a time. """
[docs] def SDL_StepBackUTF8(start: ctypes.c_char_p, pstr: LP_c_char_p) -> ctypes.c_uint32: """ Decode a UTF-8 string in reverse, one Unicode codepoint at a time. """
[docs] def SDL_UCS4ToUTF8(codepoint: ctypes.c_uint32, dst: ctypes.c_char_p) -> ctypes.c_char_p: """ Convert a single Unicode codepoint to UTF-8. """
[docs] def SDL_sscanf(text: ctypes.c_char_p, fmt: ctypes.c_char_p, *args: typing.Any) -> ctypes.c_int: """ This works exactly like sscanf() but doesn't require access to a C runtime. """
[docs] def SDL_vsscanf(text: ctypes.c_char_p, fmt: ctypes.c_char_p, ap: SDL_VA_LIST) -> ctypes.c_int: """ This works exactly like vsscanf() but doesn't require access to a C runtime. """
[docs] def SDL_snprintf(text: ctypes.c_char_p, maxlen: ctypes.c_size_t, fmt: ctypes.c_char_p, *args: typing.Any) -> ctypes.c_int: """ This works exactly like snprintf() but doesn't require access to a C runtime. """
[docs] def SDL_swprintf(text: ctypes.c_wchar_p, maxlen: ctypes.c_size_t, fmt: ctypes.c_wchar_p, *args: typing.Any) -> ctypes.c_int: """ This works exactly like swprintf() but doesn't require access to a C runtime. """
[docs] def SDL_vsnprintf(text: ctypes.c_char_p, maxlen: ctypes.c_size_t, fmt: ctypes.c_char_p, ap: SDL_VA_LIST) -> ctypes.c_int: """ This works exactly like vsnprintf() but doesn't require access to a C runtime. """
[docs] def SDL_vswprintf(text: ctypes.c_wchar_p, maxlen: ctypes.c_size_t, fmt: ctypes.c_wchar_p, ap: SDL_VA_LIST) -> ctypes.c_int: """ This works exactly like vswprintf() but doesn't require access to a C runtime. """
[docs] def SDL_asprintf(strp: LP_c_char_p, fmt: ctypes.c_char_p, *args: typing.Any) -> ctypes.c_int: """ This works exactly like asprintf() but doesn't require access to a C runtime. """
[docs] def SDL_vasprintf(strp: LP_c_char_p, fmt: ctypes.c_char_p, ap: SDL_VA_LIST) -> ctypes.c_int: """ This works exactly like vasprintf() but doesn't require access to a C runtime. """
[docs] def SDL_srand(seed: ctypes.c_uint64) -> None: """ Seeds the pseudo-random number generator. """
[docs] def SDL_rand(n: ctypes.c_int32) -> ctypes.c_int32: """ Generate a pseudo-random number less than n for positive n """
[docs] def SDL_randf() -> ctypes.c_float: """ Generate a uniform pseudo-random floating point number less than 1.0 """
[docs] def SDL_rand_bits() -> ctypes.c_uint32: """ Generate 32 pseudo-random bits. """
[docs] def SDL_rand_r(state: LP_c_uint64, n: ctypes.c_int32) -> ctypes.c_int32: """ Generate a pseudo-random number less than n for positive n """
[docs] def SDL_randf_r(state: LP_c_uint64) -> ctypes.c_float: """ Generate a uniform pseudo-random floating point number less than 1.0 """
[docs] def SDL_rand_bits_r(state: LP_c_uint64) -> ctypes.c_uint32: """ Generate 32 pseudo-random bits. """
[docs] def SDL_acos(x: ctypes.c_double) -> ctypes.c_double: """ Compute the arc cosine of `x`. """
[docs] def SDL_acosf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the arc cosine of `x`. """
[docs] def SDL_asin(x: ctypes.c_double) -> ctypes.c_double: """ Compute the arc sine of `x`. """
[docs] def SDL_asinf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the arc sine of `x`. """
[docs] def SDL_atan(x: ctypes.c_double) -> ctypes.c_double: """ Compute the arc tangent of `x`. """
[docs] def SDL_atanf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the arc tangent of `x`. """
[docs] def SDL_atan2(y: ctypes.c_double, x: ctypes.c_double) -> ctypes.c_double: """ Compute the arc tangent of `y / x`, using the signs of x and y to adjust the result's quadrant. """
[docs] def SDL_atan2f(y: ctypes.c_float, x: ctypes.c_float) -> ctypes.c_float: """ Compute the arc tangent of `y / x`, using the signs of x and y to adjust the result's quadrant. """
[docs] def SDL_ceil(x: ctypes.c_double) -> ctypes.c_double: """ Compute the ceiling of `x`. """
[docs] def SDL_ceilf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the ceiling of `x`. """
[docs] def SDL_copysign(x: ctypes.c_double, y: ctypes.c_double) -> ctypes.c_double: """ Copy the sign of one floating-point value to another. """
[docs] def SDL_copysignf(x: ctypes.c_float, y: ctypes.c_float) -> ctypes.c_float: """ Copy the sign of one floating-point value to another. """
[docs] def SDL_cos(x: ctypes.c_double) -> ctypes.c_double: """ Compute the cosine of `x`. """
[docs] def SDL_cosf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the cosine of `x`. """
[docs] def SDL_exp(x: ctypes.c_double) -> ctypes.c_double: """ Compute the exponential of `x`. """
[docs] def SDL_expf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the exponential of `x`. """
[docs] def SDL_fabs(x: ctypes.c_double) -> ctypes.c_double: """ Compute the absolute value of `x` """
[docs] def SDL_fabsf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the absolute value of `x` """
[docs] def SDL_floor(x: ctypes.c_double) -> ctypes.c_double: """ Compute the floor of `x`. """
[docs] def SDL_floorf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the floor of `x`. """
[docs] def SDL_trunc(x: ctypes.c_double) -> ctypes.c_double: """ Truncate `x` to an integer. """
[docs] def SDL_truncf(x: ctypes.c_float) -> ctypes.c_float: """ Truncate `x` to an integer. """
[docs] def SDL_fmod(x: ctypes.c_double, y: ctypes.c_double) -> ctypes.c_double: """ Return the floating-point remainder of `x / y` """
[docs] def SDL_fmodf(x: ctypes.c_float, y: ctypes.c_float) -> ctypes.c_float: """ Return the floating-point remainder of `x / y` """
[docs] def SDL_isinf(x: ctypes.c_double) -> ctypes.c_int: """ Return whether the value is infinity. """
[docs] def SDL_isinff(x: ctypes.c_float) -> ctypes.c_int: """ Return whether the value is infinity. """
[docs] def SDL_isnan(x: ctypes.c_double) -> ctypes.c_int: """ Return whether the value is NaN. """
[docs] def SDL_isnanf(x: ctypes.c_float) -> ctypes.c_int: """ Return whether the value is NaN. """
[docs] def SDL_log(x: ctypes.c_double) -> ctypes.c_double: """ Compute the natural logarithm of `x`. """
[docs] def SDL_logf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the natural logarithm of `x`. """
[docs] def SDL_log10(x: ctypes.c_double) -> ctypes.c_double: """ Compute the base-10 logarithm of `x`. """
[docs] def SDL_log10f(x: ctypes.c_float) -> ctypes.c_float: """ Compute the base-10 logarithm of `x`. """
[docs] def SDL_modf(x: ctypes.c_double, y: LP_c_double) -> ctypes.c_double: """ Split `x` into integer and fractional parts """
[docs] def SDL_modff(x: ctypes.c_float, y: LP_c_float) -> ctypes.c_float: """ Split `x` into integer and fractional parts """
[docs] def SDL_pow(x: ctypes.c_double, y: ctypes.c_double) -> ctypes.c_double: """ Raise `x` to the power `y` """
[docs] def SDL_powf(x: ctypes.c_float, y: ctypes.c_float) -> ctypes.c_float: """ Raise `x` to the power `y` """
[docs] def SDL_round(x: ctypes.c_double) -> ctypes.c_double: """ Round `x` to the nearest integer. """
[docs] def SDL_roundf(x: ctypes.c_float) -> ctypes.c_float: """ Round `x` to the nearest integer. """
[docs] def SDL_lround(x: ctypes.c_double) -> ctypes.c_long: """ Round `x` to the nearest integer representable as a long """
[docs] def SDL_lroundf(x: ctypes.c_float) -> ctypes.c_long: """ Round `x` to the nearest integer representable as a long """
[docs] def SDL_scalbn(x: ctypes.c_double, n: ctypes.c_int) -> ctypes.c_double: """ Scale `x` by an integer power of two. """
[docs] def SDL_scalbnf(x: ctypes.c_float, n: ctypes.c_int) -> ctypes.c_float: """ Scale `x` by an integer power of two. """
[docs] def SDL_sin(x: ctypes.c_double) -> ctypes.c_double: """ Compute the sine of `x`. """
[docs] def SDL_sinf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the sine of `x`. """
[docs] def SDL_sqrt(x: ctypes.c_double) -> ctypes.c_double: """ Compute the square root of `x`. """
[docs] def SDL_sqrtf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the square root of `x`. """
[docs] def SDL_tan(x: ctypes.c_double) -> ctypes.c_double: """ Compute the tangent of `x`. """
[docs] def SDL_tanf(x: ctypes.c_float) -> ctypes.c_float: """ Compute the tangent of `x`. """
[docs] def SDL_iconv_open(tocode: ctypes.c_char_p, fromcode: ctypes.c_char_p) -> SDL_iconv_t: """ This function allocates a context for the specified character set conversion. """
[docs] def SDL_iconv_close(cd: SDL_iconv_t) -> ctypes.c_int: """ This function frees a context used for character set conversion. """
[docs] def SDL_iconv(cd: SDL_iconv_t, inbuf: LP_c_char_p, inbytesleft: LP_c_size_t, outbuf: LP_c_char_p, outbytesleft: LP_c_size_t) -> ctypes.c_size_t: """ This function converts text between encodings, reading from and writing to a buffer. """
[docs] def SDL_iconv_string(tocode: ctypes.c_char_p, fromcode: ctypes.c_char_p, inbuf: ctypes.c_char_p, inbytesleft: ctypes.c_size_t) -> ctypes.c_char_p: """ Helper function to convert a string's encoding in one call. """
[docs] def SDL_GetPixelFormatName(format: SDL_PixelFormat) -> ctypes.c_char_p: """ Get the human readable name of a pixel format. """
[docs] def SDL_GetMasksForPixelFormat(format: SDL_PixelFormat, bpp: LP_c_int, Rmask: LP_c_uint32, Gmask: LP_c_uint32, Bmask: LP_c_uint32, Amask: LP_c_uint32) -> ctypes.c_bool: """ Convert one of the enumerated pixel formats to a bpp value and RGBA masks. """
[docs] def SDL_GetPixelFormatForMasks(bpp: ctypes.c_int, Rmask: ctypes.c_uint32, Gmask: ctypes.c_uint32, Bmask: ctypes.c_uint32, Amask: ctypes.c_uint32) -> SDL_PixelFormat: """ Convert a bpp value and RGBA masks to an enumerated pixel format. """
[docs] def SDL_GetPixelFormatDetails(format: SDL_PixelFormat) -> LP_SDL_PixelFormatDetails: """ Create an SDL_PixelFormatDetails structure corresponding to a pixel format. """
[docs] def SDL_CreatePalette(ncolors: ctypes.c_int) -> LP_SDL_Palette: """ Create a palette structure with the specified number of color entries. """
[docs] def SDL_SetPaletteColors(palette: LP_SDL_Palette, colors: LP_SDL_Color, firstcolor: ctypes.c_int, ncolors: ctypes.c_int) -> ctypes.c_bool: """ Set a range of colors in a palette. """
[docs] def SDL_DestroyPalette(palette: LP_SDL_Palette) -> None: """ Free a palette created with SDL_CreatePalette(). """
[docs] def SDL_MapRGB(format: LP_SDL_PixelFormatDetails, palette: LP_SDL_Palette, r: ctypes.c_uint8, g: ctypes.c_uint8, b: ctypes.c_uint8) -> ctypes.c_uint32: """ Map an RGB triple to an opaque pixel value for a given pixel format. """
[docs] def SDL_MapRGBA(format: LP_SDL_PixelFormatDetails, palette: LP_SDL_Palette, r: ctypes.c_uint8, g: ctypes.c_uint8, b: ctypes.c_uint8, a: ctypes.c_uint8) -> ctypes.c_uint32: """ Map an RGBA quadruple to a pixel value for a given pixel format. """
[docs] def SDL_GetRGB(pixelvalue: ctypes.c_uint32, format: LP_SDL_PixelFormatDetails, palette: LP_SDL_Palette, r: LP_c_uint8, g: LP_c_uint8, b: LP_c_uint8) -> None: """ Get RGB values from a pixel in the specified format. """
[docs] def SDL_GetRGBA(pixelvalue: ctypes.c_uint32, format: LP_SDL_PixelFormatDetails, palette: LP_SDL_Palette, r: LP_c_uint8, g: LP_c_uint8, b: LP_c_uint8, a: LP_c_uint8) -> None: """ Get RGBA values from a pixel in the specified format. """
[docs] def SDL_HasRectIntersection(A: LP_SDL_Rect, B: LP_SDL_Rect) -> ctypes.c_bool: """ Determine whether two rectangles intersect. """
[docs] def SDL_GetRectIntersection(A: LP_SDL_Rect, B: LP_SDL_Rect, result: LP_SDL_Rect) -> ctypes.c_bool: """ Calculate the intersection of two rectangles. """
[docs] def SDL_GetRectUnion(A: LP_SDL_Rect, B: LP_SDL_Rect, result: LP_SDL_Rect) -> ctypes.c_bool: """ Calculate the union of two rectangles. """
[docs] def SDL_GetRectEnclosingPoints(points: LP_SDL_Point, count: ctypes.c_int, clip: LP_SDL_Rect, result: LP_SDL_Rect) -> ctypes.c_bool: """ Calculate a minimal rectangle enclosing a set of points. """
[docs] def SDL_GetRectAndLineIntersection(rect: LP_SDL_Rect, X1: LP_c_int, Y1: LP_c_int, X2: LP_c_int, Y2: LP_c_int) -> ctypes.c_bool: """ Calculate the intersection of a rectangle and line segment. """
[docs] def SDL_HasRectIntersectionFloat(A: LP_SDL_FRect, B: LP_SDL_FRect) -> ctypes.c_bool: """ Determine whether two rectangles intersect with float precision. """
[docs] def SDL_GetRectIntersectionFloat(A: LP_SDL_FRect, B: LP_SDL_FRect, result: LP_SDL_FRect) -> ctypes.c_bool: """ Calculate the intersection of two rectangles with float precision. """
[docs] def SDL_GetRectUnionFloat(A: LP_SDL_FRect, B: LP_SDL_FRect, result: LP_SDL_FRect) -> ctypes.c_bool: """ Calculate the union of two rectangles with float precision. """
[docs] def SDL_GetRectEnclosingPointsFloat(points: LP_SDL_FPoint, count: ctypes.c_int, clip: LP_SDL_FRect, result: LP_SDL_FRect) -> ctypes.c_bool: """ Calculate a minimal rectangle enclosing a set of points with float precision. """
[docs] def SDL_GetRectAndLineIntersectionFloat(rect: LP_SDL_FRect, X1: LP_c_float, Y1: LP_c_float, X2: LP_c_float, Y2: LP_c_float) -> ctypes.c_bool: """ Calculate the intersection of a rectangle and line segment with float precision. """
[docs] def SDL_CreateSurface(width: ctypes.c_int, height: ctypes.c_int, format: SDL_PixelFormat) -> LP_SDL_Surface: """ Allocate a new surface with a specific pixel format. """
[docs] def SDL_CreateSurfaceFrom(width: ctypes.c_int, height: ctypes.c_int, format: SDL_PixelFormat, pixels: ctypes.c_void_p, pitch: ctypes.c_int) -> LP_SDL_Surface: """ Allocate a new surface with a specific pixel format and existing pixel data. """
[docs] def SDL_DestroySurface(surface: LP_SDL_Surface) -> None: """ Free a surface. """
[docs] def SDL_GetSurfaceProperties(surface: LP_SDL_Surface) -> SDL_PropertiesID: """ Get the properties associated with a surface. """
[docs] def SDL_SetSurfaceColorspace(surface: LP_SDL_Surface, colorspace: SDL_Colorspace) -> ctypes.c_bool: """ Set the colorspace used by a surface. """
[docs] def SDL_GetSurfaceColorspace(surface: LP_SDL_Surface) -> SDL_Colorspace: """ Get the colorspace used by a surface. """
[docs] def SDL_CreateSurfacePalette(surface: LP_SDL_Surface) -> LP_SDL_Palette: """ Create a palette and associate it with a surface. """
[docs] def SDL_SetSurfacePalette(surface: LP_SDL_Surface, palette: LP_SDL_Palette) -> ctypes.c_bool: """ Set the palette used by a surface. """
[docs] def SDL_GetSurfacePalette(surface: LP_SDL_Surface) -> LP_SDL_Palette: """ Get the palette used by a surface. """
[docs] def SDL_AddSurfaceAlternateImage(surface: LP_SDL_Surface, image: LP_SDL_Surface) -> ctypes.c_bool: """ Add an alternate version of a surface. """
[docs] def SDL_SurfaceHasAlternateImages(surface: LP_SDL_Surface) -> ctypes.c_bool: """ Return whether a surface has alternate versions available. """
[docs] def SDL_GetSurfaceImages(surface: LP_SDL_Surface, count: LP_c_int) -> LP_LP_SDL_Surface: """ Get an array including all versions of a surface. """
[docs] def SDL_RemoveSurfaceAlternateImages(surface: LP_SDL_Surface) -> None: """ Remove all alternate versions of a surface. """
[docs] def SDL_LockSurface(surface: LP_SDL_Surface) -> ctypes.c_bool: """ Set up a surface for directly accessing the pixels. """
[docs] def SDL_UnlockSurface(surface: LP_SDL_Surface) -> None: """ Release a surface after directly accessing the pixels. """
[docs] def SDL_LoadSurface_IO(src: LP_SDL_IOStream, closeio: ctypes.c_bool) -> LP_SDL_Surface: """ Load a BMP or PNG image from a seekable SDL data stream. """
[docs] def SDL_LoadSurface(file: ctypes.c_char_p) -> LP_SDL_Surface: """ Load a BMP or PNG image from a file. """
[docs] def SDL_LoadBMP_IO(src: LP_SDL_IOStream, closeio: ctypes.c_bool) -> LP_SDL_Surface: """ Load a BMP image from a seekable SDL data stream. """
[docs] def SDL_LoadBMP(file: ctypes.c_char_p) -> LP_SDL_Surface: """ Load a BMP image from a file. """
[docs] def SDL_SaveBMP_IO(surface: LP_SDL_Surface, dst: LP_SDL_IOStream, closeio: ctypes.c_bool) -> ctypes.c_bool: """ Save a surface to a seekable SDL data stream in BMP format. """
[docs] def SDL_SaveBMP(surface: LP_SDL_Surface, file: ctypes.c_char_p) -> ctypes.c_bool: """ Save a surface to a file in BMP format. """
[docs] def SDL_LoadPNG_IO(src: LP_SDL_IOStream, closeio: ctypes.c_bool) -> LP_SDL_Surface: """ Load a PNG image from a seekable SDL data stream. """
[docs] def SDL_LoadPNG(file: ctypes.c_char_p) -> LP_SDL_Surface: """ Load a PNG image from a file. """
[docs] def SDL_SavePNG_IO(surface: LP_SDL_Surface, dst: LP_SDL_IOStream, closeio: ctypes.c_bool) -> ctypes.c_bool: """ Save a surface to a seekable SDL data stream in PNG format. """
[docs] def SDL_SavePNG(surface: LP_SDL_Surface, file: ctypes.c_char_p) -> ctypes.c_bool: """ Save a surface to a file in PNG format. """
[docs] def SDL_SetSurfaceRLE(surface: LP_SDL_Surface, enabled: ctypes.c_bool) -> ctypes.c_bool: """ Set the RLE acceleration hint for a surface. """
[docs] def SDL_SurfaceHasRLE(surface: LP_SDL_Surface) -> ctypes.c_bool: """ Returns whether the surface is RLE enabled. """
[docs] def SDL_SetSurfaceColorKey(surface: LP_SDL_Surface, enabled: ctypes.c_bool, key: ctypes.c_uint32) -> ctypes.c_bool: """ Set the color key (transparent pixel) in a surface. """
[docs] def SDL_SurfaceHasColorKey(surface: LP_SDL_Surface) -> ctypes.c_bool: """ Returns whether the surface has a color key. """
[docs] def SDL_GetSurfaceColorKey(surface: LP_SDL_Surface, key: LP_c_uint32) -> ctypes.c_bool: """ Get the color key (transparent pixel) for a surface. """
[docs] def SDL_SetSurfaceColorMod(surface: LP_SDL_Surface, r: ctypes.c_uint8, g: ctypes.c_uint8, b: ctypes.c_uint8) -> ctypes.c_bool: """ Set an additional color value multiplied into blit operations. """
[docs] def SDL_GetSurfaceColorMod(surface: LP_SDL_Surface, r: LP_c_uint8, g: LP_c_uint8, b: LP_c_uint8) -> ctypes.c_bool: """ Get the additional color value multiplied into blit operations. """
[docs] def SDL_SetSurfaceAlphaMod(surface: LP_SDL_Surface, alpha: ctypes.c_uint8) -> ctypes.c_bool: """ Set an additional alpha value used in blit operations. """
[docs] def SDL_GetSurfaceAlphaMod(surface: LP_SDL_Surface, alpha: LP_c_uint8) -> ctypes.c_bool: """ Get the additional alpha value used in blit operations. """
[docs] def SDL_SetSurfaceBlendMode(surface: LP_SDL_Surface, blendMode: SDL_BlendMode) -> ctypes.c_bool: """ Set the blend mode used for blit operations. """
[docs] def SDL_GetSurfaceBlendMode(surface: LP_SDL_Surface, blendMode: LP_SDL_BlendMode) -> ctypes.c_bool: """ Get the blend mode used for blit operations. """
[docs] def SDL_SetSurfaceClipRect(surface: LP_SDL_Surface, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Set the clipping rectangle for a surface. """
[docs] def SDL_GetSurfaceClipRect(surface: LP_SDL_Surface, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Get the clipping rectangle for a surface. """
[docs] def SDL_FlipSurface(surface: LP_SDL_Surface, flip: SDL_FlipMode) -> ctypes.c_bool: """ Flip a surface vertically or horizontally. """
[docs] def SDL_RotateSurface(surface: LP_SDL_Surface, angle: ctypes.c_float) -> LP_SDL_Surface: """ Return a copy of a surface rotated clockwise a number of degrees. """
[docs] def SDL_DuplicateSurface(surface: LP_SDL_Surface) -> LP_SDL_Surface: """ Creates a new surface identical to the existing surface. """
[docs] def SDL_ScaleSurface(surface: LP_SDL_Surface, width: ctypes.c_int, height: ctypes.c_int, scaleMode: SDL_ScaleMode) -> LP_SDL_Surface: """ Creates a new surface identical to the existing surface, scaled to the desired size. """
[docs] def SDL_ConvertSurface(surface: LP_SDL_Surface, format: SDL_PixelFormat) -> LP_SDL_Surface: """ Copy an existing surface to a new surface of the specified format. """
[docs] def SDL_ConvertSurfaceAndColorspace(surface: LP_SDL_Surface, format: SDL_PixelFormat, palette: LP_SDL_Palette, colorspace: SDL_Colorspace, props: SDL_PropertiesID) -> LP_SDL_Surface: """ Copy an existing surface to a new surface of the specified format and colorspace. """
[docs] def SDL_ConvertPixels(width: ctypes.c_int, height: ctypes.c_int, src_format: SDL_PixelFormat, src: ctypes.c_void_p, src_pitch: ctypes.c_int, dst_format: SDL_PixelFormat, dst: ctypes.c_void_p, dst_pitch: ctypes.c_int) -> ctypes.c_bool: """ Copy a block of pixels of one format to another format. """
[docs] def SDL_ConvertPixelsAndColorspace(width: ctypes.c_int, height: ctypes.c_int, src_format: SDL_PixelFormat, src_colorspace: SDL_Colorspace, src_properties: SDL_PropertiesID, src: ctypes.c_void_p, src_pitch: ctypes.c_int, dst_format: SDL_PixelFormat, dst_colorspace: SDL_Colorspace, dst_properties: SDL_PropertiesID, dst: ctypes.c_void_p, dst_pitch: ctypes.c_int) -> ctypes.c_bool: """ Copy a block of pixels of one format and colorspace to another format and colorspace. """
[docs] def SDL_PremultiplyAlpha(width: ctypes.c_int, height: ctypes.c_int, src_format: SDL_PixelFormat, src: ctypes.c_void_p, src_pitch: ctypes.c_int, dst_format: SDL_PixelFormat, dst: ctypes.c_void_p, dst_pitch: ctypes.c_int, linear: ctypes.c_bool) -> ctypes.c_bool: """ Premultiply the alpha on a block of pixels. """
[docs] def SDL_PremultiplySurfaceAlpha(surface: LP_SDL_Surface, linear: ctypes.c_bool) -> ctypes.c_bool: """ Premultiply the alpha in a surface. """
[docs] def SDL_ClearSurface(surface: LP_SDL_Surface, r: ctypes.c_float, g: ctypes.c_float, b: ctypes.c_float, a: ctypes.c_float) -> ctypes.c_bool: """ Clear a surface with a specific color, with floating point precision. """
[docs] def SDL_FillSurfaceRect(dst: LP_SDL_Surface, rect: LP_SDL_Rect, color: ctypes.c_uint32) -> ctypes.c_bool: """ Perform a fast fill of a rectangle with a specific color. """
[docs] def SDL_FillSurfaceRects(dst: LP_SDL_Surface, rects: LP_SDL_Rect, count: ctypes.c_int, color: ctypes.c_uint32) -> ctypes.c_bool: """ Perform a fast fill of a set of rectangles with a specific color. """
[docs] def SDL_BlitSurface(src: LP_SDL_Surface, srcrect: LP_SDL_Rect, dst: LP_SDL_Surface, dstrect: LP_SDL_Rect) -> ctypes.c_bool: """ Performs a fast blit from the source surface to the destination surface with clipping. """
[docs] def SDL_BlitSurfaceUnchecked(src: LP_SDL_Surface, srcrect: LP_SDL_Rect, dst: LP_SDL_Surface, dstrect: LP_SDL_Rect) -> ctypes.c_bool: """ Perform low-level surface blitting only. """
[docs] def SDL_BlitSurfaceScaled(src: LP_SDL_Surface, srcrect: LP_SDL_Rect, dst: LP_SDL_Surface, dstrect: LP_SDL_Rect, scaleMode: SDL_ScaleMode) -> ctypes.c_bool: """ Perform a scaled blit to a destination surface, which may be of a different format. """
[docs] def SDL_BlitSurfaceUncheckedScaled(src: LP_SDL_Surface, srcrect: LP_SDL_Rect, dst: LP_SDL_Surface, dstrect: LP_SDL_Rect, scaleMode: SDL_ScaleMode) -> ctypes.c_bool: """ Perform low-level surface scaled blitting only. """
[docs] def SDL_StretchSurface(src: LP_SDL_Surface, srcrect: LP_SDL_Rect, dst: LP_SDL_Surface, dstrect: LP_SDL_Rect, scaleMode: SDL_ScaleMode) -> ctypes.c_bool: """ Perform a stretched pixel copy from one surface to another. """
[docs] def SDL_BlitSurfaceTiled(src: LP_SDL_Surface, srcrect: LP_SDL_Rect, dst: LP_SDL_Surface, dstrect: LP_SDL_Rect) -> ctypes.c_bool: """ Perform a tiled blit to a destination surface, which may be of a different format. """
[docs] def SDL_BlitSurfaceTiledWithScale(src: LP_SDL_Surface, srcrect: LP_SDL_Rect, scale: ctypes.c_float, scaleMode: SDL_ScaleMode, dst: LP_SDL_Surface, dstrect: LP_SDL_Rect) -> ctypes.c_bool: """ Perform a scaled and tiled blit to a destination surface, which may be of a different format. """
[docs] def SDL_BlitSurface9Grid(src: LP_SDL_Surface, srcrect: LP_SDL_Rect, left_width: ctypes.c_int, right_width: ctypes.c_int, top_height: ctypes.c_int, bottom_height: ctypes.c_int, scale: ctypes.c_float, scaleMode: SDL_ScaleMode, dst: LP_SDL_Surface, dstrect: LP_SDL_Rect) -> ctypes.c_bool: """ Perform a scaled blit using the 9-grid algorithm to a destination surface, which may be of a different format. """
[docs] def SDL_MapSurfaceRGB(surface: LP_SDL_Surface, r: ctypes.c_uint8, g: ctypes.c_uint8, b: ctypes.c_uint8) -> ctypes.c_uint32: """ Map an RGB triple to an opaque pixel value for a surface. """
[docs] def SDL_MapSurfaceRGBA(surface: LP_SDL_Surface, r: ctypes.c_uint8, g: ctypes.c_uint8, b: ctypes.c_uint8, a: ctypes.c_uint8) -> ctypes.c_uint32: """ Map an RGBA quadruple to a pixel value for a surface. """
[docs] def SDL_ReadSurfacePixel(surface: LP_SDL_Surface, x: ctypes.c_int, y: ctypes.c_int, r: LP_c_uint8, g: LP_c_uint8, b: LP_c_uint8, a: LP_c_uint8) -> ctypes.c_bool: """ Retrieves a single pixel from a surface. """
[docs] def SDL_ReadSurfacePixelFloat(surface: LP_SDL_Surface, x: ctypes.c_int, y: ctypes.c_int, r: LP_c_float, g: LP_c_float, b: LP_c_float, a: LP_c_float) -> ctypes.c_bool: """ Retrieves a single pixel from a surface. """
[docs] def SDL_WriteSurfacePixel(surface: LP_SDL_Surface, x: ctypes.c_int, y: ctypes.c_int, r: ctypes.c_uint8, g: ctypes.c_uint8, b: ctypes.c_uint8, a: ctypes.c_uint8) -> ctypes.c_bool: """ Writes a single pixel to a surface. """
[docs] def SDL_WriteSurfacePixelFloat(surface: LP_SDL_Surface, x: ctypes.c_int, y: ctypes.c_int, r: ctypes.c_float, g: ctypes.c_float, b: ctypes.c_float, a: ctypes.c_float) -> ctypes.c_bool: """ Writes a single pixel to a surface. """
[docs] def SDL_GetNumCameraDrivers() -> ctypes.c_int: """ Use this function to get the number of built-in camera drivers. """
[docs] def SDL_GetCameraDriver(index: ctypes.c_int) -> ctypes.c_char_p: """ Use this function to get the name of a built in camera driver. """
[docs] def SDL_GetCurrentCameraDriver() -> ctypes.c_char_p: """ Get the name of the current camera driver. """
[docs] def SDL_GetCameras(count: LP_c_int) -> LP_SDL_CameraID: """ Get a list of currently connected camera devices. """
[docs] def SDL_GetCameraSupportedFormats(instance_id: SDL_CameraID, count: LP_c_int) -> LP_LP_SDL_CameraSpec: """ Get the list of native formats/sizes a camera supports. """
[docs] def SDL_GetCameraName(instance_id: SDL_CameraID) -> ctypes.c_char_p: """ Get the human-readable device name for a camera. """
[docs] def SDL_GetCameraPosition(instance_id: SDL_CameraID) -> SDL_CameraPosition: """ Get the position of the camera in relation to the system. """
[docs] def SDL_OpenCamera(instance_id: SDL_CameraID, spec: LP_SDL_CameraSpec) -> LP_SDL_Camera: """ Open a video recording device (a "camera"). """
[docs] def SDL_GetCameraPermissionState(camera: LP_SDL_Camera) -> SDL_CameraPermissionState: """ Query if camera access has been approved by the user. """
[docs] def SDL_GetCameraID(camera: LP_SDL_Camera) -> SDL_CameraID: """ Get the instance ID of an opened camera. """
[docs] def SDL_GetCameraProperties(camera: LP_SDL_Camera) -> SDL_PropertiesID: """ Get the properties associated with an opened camera. """
[docs] def SDL_GetCameraFormat(camera: LP_SDL_Camera, spec: LP_SDL_CameraSpec) -> ctypes.c_bool: """ Get the spec that a camera is using when generating images. """
[docs] def SDL_AcquireCameraFrame(camera: LP_SDL_Camera, timestampNS: LP_c_uint64) -> LP_SDL_Surface: """ Acquire a frame. """
[docs] def SDL_ReleaseCameraFrame(camera: LP_SDL_Camera, frame: LP_SDL_Surface) -> None: """ Release a frame of video acquired from a camera. """
[docs] def SDL_CloseCamera(camera: LP_SDL_Camera) -> None: """ Use this function to shut down camera processing and close the camera device. """
[docs] def SDL_SetClipboardText(text: ctypes.c_char_p) -> ctypes.c_bool: """ Put UTF-8 text into the clipboard. """
[docs] def SDL_GetClipboardText() -> ctypes.c_char_p: """ Get UTF-8 text from the clipboard. """
[docs] def SDL_HasClipboardText() -> ctypes.c_bool: """ Query whether the clipboard exists and contains a non-empty text string. """
[docs] def SDL_SetPrimarySelectionText(text: ctypes.c_char_p) -> ctypes.c_bool: """ Put UTF-8 text into the primary selection. """
[docs] def SDL_GetPrimarySelectionText() -> ctypes.c_char_p: """ Get UTF-8 text from the primary selection. """
[docs] def SDL_HasPrimarySelectionText() -> ctypes.c_bool: """ Query whether the primary selection exists and contains a non-empty text string. """
[docs] def SDL_SetClipboardData(callback: SDL_ClipboardDataCallback, cleanup: SDL_ClipboardCleanupCallback, userdata: ctypes.c_void_p, mime_types: LP_c_char_p, num_mime_types: ctypes.c_size_t) -> ctypes.c_bool: """ Offer clipboard data to the OS. """
[docs] def SDL_ClearClipboardData() -> ctypes.c_bool: """ Clear the clipboard data. """
[docs] def SDL_GetClipboardData(mime_type: ctypes.c_char_p, size: LP_c_size_t) -> ctypes.c_void_p: """ Get the data from the clipboard for a given mime type. """
[docs] def SDL_HasClipboardData(mime_type: ctypes.c_char_p) -> ctypes.c_bool: """ Query whether there is data in the clipboard for the provided mime type. """
[docs] def SDL_GetNumLogicalCPUCores() -> ctypes.c_int: """ Get the number of logical CPU cores available. """
[docs] def SDL_GetCPUCacheLineSize() -> ctypes.c_int: """ Determine the L1 cache line size of the CPU. """
[docs] def SDL_HasAltiVec() -> ctypes.c_bool: """ Determine whether the CPU has AltiVec features. """
[docs] def SDL_HasMMX() -> ctypes.c_bool: """ Determine whether the CPU has MMX features. """
[docs] def SDL_HasSSE() -> ctypes.c_bool: """ Determine whether the CPU has SSE features. """
[docs] def SDL_HasSSE2() -> ctypes.c_bool: """ Determine whether the CPU has SSE2 features. """
[docs] def SDL_HasSSE3() -> ctypes.c_bool: """ Determine whether the CPU has SSE3 features. """
[docs] def SDL_HasSSE41() -> ctypes.c_bool: """ Determine whether the CPU has SSE4.1 features. """
[docs] def SDL_HasSSE42() -> ctypes.c_bool: """ Determine whether the CPU has SSE4.2 features. """
[docs] def SDL_HasAVX() -> ctypes.c_bool: """ Determine whether the CPU has AVX features. """
[docs] def SDL_HasAVX2() -> ctypes.c_bool: """ Determine whether the CPU has AVX2 features. """
[docs] def SDL_HasAVX512F() -> ctypes.c_bool: """ Determine whether the CPU has AVX-512F (foundation) features. """
[docs] def SDL_HasARMSIMD() -> ctypes.c_bool: """ Determine whether the CPU has ARM SIMD (ARMv6) features. """
[docs] def SDL_HasNEON() -> ctypes.c_bool: """ Determine whether the CPU has NEON (ARM SIMD) features. """
[docs] def SDL_HasLSX() -> ctypes.c_bool: """ Determine whether the CPU has LSX (LOONGARCH SIMD) features. """
[docs] def SDL_HasLASX() -> ctypes.c_bool: """ Determine whether the CPU has LASX (LOONGARCH SIMD) features. """
[docs] def SDL_GetSystemRAM() -> ctypes.c_int: """ Get the amount of RAM configured in the system. """
[docs] def SDL_GetSIMDAlignment() -> ctypes.c_size_t: """ Report the alignment this system needs for SIMD allocations. """
[docs] def SDL_GetSystemPageSize() -> ctypes.c_int: """ Report the size of a page of memory. """
[docs] def SDL_GetNumVideoDrivers() -> ctypes.c_int: """ Get the number of video drivers compiled into SDL. """
[docs] def SDL_GetVideoDriver(index: ctypes.c_int) -> ctypes.c_char_p: """ Get the name of a built in video driver. """
[docs] def SDL_GetCurrentVideoDriver() -> ctypes.c_char_p: """ Get the name of the currently initialized video driver. """
[docs] def SDL_GetSystemTheme() -> SDL_SystemTheme: """ Get the current system theme. """
[docs] def SDL_GetDisplays(count: LP_c_int) -> LP_SDL_DisplayID: """ Get a list of currently connected displays. """
[docs] def SDL_GetPrimaryDisplay() -> SDL_DisplayID: """ Return the primary display. """
[docs] def SDL_GetDisplayProperties(displayID: SDL_DisplayID) -> SDL_PropertiesID: """ Get the properties associated with a display. """
[docs] def SDL_GetDisplayName(displayID: SDL_DisplayID) -> ctypes.c_char_p: """ Get the name of a display in UTF-8 encoding. """
[docs] def SDL_GetDisplayBounds(displayID: SDL_DisplayID, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Get the desktop area represented by a display. """
[docs] def SDL_GetDisplayUsableBounds(displayID: SDL_DisplayID, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Get the usable desktop area represented by a display, in screen coordinates. """
[docs] def SDL_GetNaturalDisplayOrientation(displayID: SDL_DisplayID) -> SDL_DisplayOrientation: """ Get the orientation of a display when it is unrotated. """
[docs] def SDL_GetCurrentDisplayOrientation(displayID: SDL_DisplayID) -> SDL_DisplayOrientation: """ Get the orientation of a display. """
[docs] def SDL_GetDisplayContentScale(displayID: SDL_DisplayID) -> ctypes.c_float: """ Get the content scale of a display. """
[docs] def SDL_GetFullscreenDisplayModes(displayID: SDL_DisplayID, count: LP_c_int) -> LP_LP_SDL_DisplayMode: """ Get a list of fullscreen display modes available on a display. """
[docs] def SDL_GetClosestFullscreenDisplayMode(displayID: SDL_DisplayID, w: ctypes.c_int, h: ctypes.c_int, refresh_rate: ctypes.c_float, include_high_density_modes: ctypes.c_bool, closest: LP_SDL_DisplayMode) -> ctypes.c_bool: """ Get the closest match to the requested display mode. """
[docs] def SDL_GetDesktopDisplayMode(displayID: SDL_DisplayID) -> LP_SDL_DisplayMode: """ Get information about the desktop's display mode. """
[docs] def SDL_GetCurrentDisplayMode(displayID: SDL_DisplayID) -> LP_SDL_DisplayMode: """ Get information about the current display mode. """
[docs] def SDL_GetDisplayForPoint(point: LP_SDL_Point) -> SDL_DisplayID: """ Get the display containing a point. """
[docs] def SDL_GetDisplayForRect(rect: LP_SDL_Rect) -> SDL_DisplayID: """ Get the display primarily containing a rect. """
[docs] def SDL_GetDisplayForWindow(window: LP_SDL_Window) -> SDL_DisplayID: """ Get the display associated with a window. """
[docs] def SDL_GetWindowPixelDensity(window: LP_SDL_Window) -> ctypes.c_float: """ Get the pixel density of a window. """
[docs] def SDL_GetWindowDisplayScale(window: LP_SDL_Window) -> ctypes.c_float: """ Get the content display scale relative to a window's pixel size. """
[docs] def SDL_SetWindowFullscreenMode(window: LP_SDL_Window, mode: LP_SDL_DisplayMode) -> ctypes.c_bool: """ Set the display mode to use when a window is visible and fullscreen. """
[docs] def SDL_GetWindowFullscreenMode(window: LP_SDL_Window) -> LP_SDL_DisplayMode: """ Query the display mode to use when a window is visible at fullscreen. """
[docs] def SDL_GetWindowICCProfile(window: LP_SDL_Window, size: LP_c_size_t) -> ctypes.c_void_p: """ Get the raw ICC profile data for the screen the window is currently on. """
[docs] def SDL_GetWindowPixelFormat(window: LP_SDL_Window) -> SDL_PixelFormat: """ Get the pixel format associated with the window. """
[docs] def SDL_GetWindows(count: LP_c_int) -> LP_LP_SDL_Window: """ Get a list of valid windows. """
[docs] def SDL_CreateWindow(title: ctypes.c_char_p, w: ctypes.c_int, h: ctypes.c_int, flags: SDL_WindowFlags) -> LP_SDL_Window: """ Create a window with the specified dimensions and flags. """
[docs] def SDL_CreatePopupWindow(parent: LP_SDL_Window, offset_x: ctypes.c_int, offset_y: ctypes.c_int, w: ctypes.c_int, h: ctypes.c_int, flags: SDL_WindowFlags) -> LP_SDL_Window: """ Create a child popup window of the specified parent window. """
[docs] def SDL_CreateWindowWithProperties(props: SDL_PropertiesID) -> LP_SDL_Window: """ Create a window with the specified properties. """
[docs] def SDL_GetWindowID(window: LP_SDL_Window) -> SDL_WindowID: """ Get the numeric ID of a window. """
[docs] def SDL_GetWindowFromID(id: SDL_WindowID) -> LP_SDL_Window: """ Get a window from a stored ID. """
[docs] def SDL_GetWindowParent(window: LP_SDL_Window) -> LP_SDL_Window: """ Get parent of a window. """
[docs] def SDL_GetWindowProperties(window: LP_SDL_Window) -> SDL_PropertiesID: """ Get the properties associated with a window. """
[docs] def SDL_GetWindowFlags(window: LP_SDL_Window) -> SDL_WindowFlags: """ Get the window flags. """
[docs] def SDL_SetWindowTitle(window: LP_SDL_Window, title: ctypes.c_char_p) -> ctypes.c_bool: """ Set the title of a window. """
[docs] def SDL_GetWindowTitle(window: LP_SDL_Window) -> ctypes.c_char_p: """ Get the title of a window. """
[docs] def SDL_SetWindowIcon(window: LP_SDL_Window, icon: LP_SDL_Surface) -> ctypes.c_bool: """ Set the icon for a window. """
[docs] def SDL_SetWindowPosition(window: LP_SDL_Window, x: ctypes.c_int, y: ctypes.c_int) -> ctypes.c_bool: """ Request that the window's position be set. """
[docs] def SDL_GetWindowPosition(window: LP_SDL_Window, x: LP_c_int, y: LP_c_int) -> ctypes.c_bool: """ Get the position of a window. """
[docs] def SDL_SetWindowSize(window: LP_SDL_Window, w: ctypes.c_int, h: ctypes.c_int) -> ctypes.c_bool: """ Request that the size of a window's client area be set. """
[docs] def SDL_GetWindowSize(window: LP_SDL_Window, w: LP_c_int, h: LP_c_int) -> ctypes.c_bool: """ Get the size of a window's client area. """
[docs] def SDL_GetWindowSafeArea(window: LP_SDL_Window, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Get the safe area for this window. """
[docs] def SDL_SetWindowAspectRatio(window: LP_SDL_Window, min_aspect: ctypes.c_float, max_aspect: ctypes.c_float) -> ctypes.c_bool: """ Request that the aspect ratio of a window's client area be set. """
[docs] def SDL_GetWindowAspectRatio(window: LP_SDL_Window, min_aspect: LP_c_float, max_aspect: LP_c_float) -> ctypes.c_bool: """ Get the aspect ratio of a window's client area. """
[docs] def SDL_GetWindowBordersSize(window: LP_SDL_Window, top: LP_c_int, left: LP_c_int, bottom: LP_c_int, right: LP_c_int) -> ctypes.c_bool: """ Get the size of a window's borders (decorations) around the client area. """
[docs] def SDL_GetWindowSizeInPixels(window: LP_SDL_Window, w: LP_c_int, h: LP_c_int) -> ctypes.c_bool: """ Get the size of a window's client area, in pixels. """
[docs] def SDL_SetWindowMinimumSize(window: LP_SDL_Window, min_w: ctypes.c_int, min_h: ctypes.c_int) -> ctypes.c_bool: """ Set the minimum size of a window's client area. """
[docs] def SDL_GetWindowMinimumSize(window: LP_SDL_Window, w: LP_c_int, h: LP_c_int) -> ctypes.c_bool: """ Get the minimum size of a window's client area. """
[docs] def SDL_SetWindowMaximumSize(window: LP_SDL_Window, max_w: ctypes.c_int, max_h: ctypes.c_int) -> ctypes.c_bool: """ Set the maximum size of a window's client area. """
[docs] def SDL_GetWindowMaximumSize(window: LP_SDL_Window, w: LP_c_int, h: LP_c_int) -> ctypes.c_bool: """ Get the maximum size of a window's client area. """
[docs] def SDL_SetWindowBordered(window: LP_SDL_Window, bordered: ctypes.c_bool) -> ctypes.c_bool: """ Set the border state of a window. """
[docs] def SDL_SetWindowResizable(window: LP_SDL_Window, resizable: ctypes.c_bool) -> ctypes.c_bool: """ Set the user-resizable state of a window. """
[docs] def SDL_SetWindowAlwaysOnTop(window: LP_SDL_Window, on_top: ctypes.c_bool) -> ctypes.c_bool: """ Set the window to always be above the others. """
[docs] def SDL_SetWindowFillDocument(window: LP_SDL_Window, fill: ctypes.c_bool) -> ctypes.c_bool: """ Set the window to fill the current document space (Emscripten only). """
[docs] def SDL_ShowWindow(window: LP_SDL_Window) -> ctypes.c_bool: """ Show a window. """
[docs] def SDL_HideWindow(window: LP_SDL_Window) -> ctypes.c_bool: """ Hide a window. """
[docs] def SDL_RaiseWindow(window: LP_SDL_Window) -> ctypes.c_bool: """ Request that a window be raised above other windows and gain the input focus. """
[docs] def SDL_MaximizeWindow(window: LP_SDL_Window) -> ctypes.c_bool: """ Request that the window be made as large as possible. """
[docs] def SDL_MinimizeWindow(window: LP_SDL_Window) -> ctypes.c_bool: """ Request that the window be minimized to an iconic representation. """
[docs] def SDL_RestoreWindow(window: LP_SDL_Window) -> ctypes.c_bool: """ Request that the size and position of a minimized or maximized window be restored. """
[docs] def SDL_SetWindowFullscreen(window: LP_SDL_Window, fullscreen: ctypes.c_bool) -> ctypes.c_bool: """ Request that the window's fullscreen state be changed. """
[docs] def SDL_SyncWindow(window: LP_SDL_Window) -> ctypes.c_bool: """ Block until any pending window state is finalized. """
[docs] def SDL_WindowHasSurface(window: LP_SDL_Window) -> ctypes.c_bool: """ Return whether the window has a surface associated with it. """
[docs] def SDL_GetWindowSurface(window: LP_SDL_Window) -> LP_SDL_Surface: """ Get the SDL surface associated with the window. """
[docs] def SDL_SetWindowSurfaceVSync(window: LP_SDL_Window, vsync: ctypes.c_int) -> ctypes.c_bool: """ Toggle VSync for the window surface. """
[docs] def SDL_GetWindowSurfaceVSync(window: LP_SDL_Window, vsync: LP_c_int) -> ctypes.c_bool: """ Get VSync for the window surface. """
[docs] def SDL_UpdateWindowSurface(window: LP_SDL_Window) -> ctypes.c_bool: """ Copy the window surface to the screen. """
[docs] def SDL_UpdateWindowSurfaceRects(window: LP_SDL_Window, rects: LP_SDL_Rect, numrects: ctypes.c_int) -> ctypes.c_bool: """ Copy areas of the window surface to the screen. """
[docs] def SDL_DestroyWindowSurface(window: LP_SDL_Window) -> ctypes.c_bool: """ Destroy the surface associated with the window. """
[docs] def SDL_SetWindowKeyboardGrab(window: LP_SDL_Window, grabbed: ctypes.c_bool) -> ctypes.c_bool: """ Set a window's keyboard grab mode. """
[docs] def SDL_SetWindowMouseGrab(window: LP_SDL_Window, grabbed: ctypes.c_bool) -> ctypes.c_bool: """ Set a window's mouse grab mode. """
[docs] def SDL_GetWindowKeyboardGrab(window: LP_SDL_Window) -> ctypes.c_bool: """ Get a window's keyboard grab mode. """
[docs] def SDL_GetWindowMouseGrab(window: LP_SDL_Window) -> ctypes.c_bool: """ Get a window's mouse grab mode. """
[docs] def SDL_GetGrabbedWindow() -> LP_SDL_Window: """ Get the window that currently has an input grab enabled. """
[docs] def SDL_SetWindowMouseRect(window: LP_SDL_Window, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Confines the cursor to the specified area of a window. """
[docs] def SDL_GetWindowMouseRect(window: LP_SDL_Window) -> LP_SDL_Rect: """ Get the mouse confinement rectangle of a window. """
[docs] def SDL_SetWindowOpacity(window: LP_SDL_Window, opacity: ctypes.c_float) -> ctypes.c_bool: """ Set the opacity for a window. """
[docs] def SDL_GetWindowOpacity(window: LP_SDL_Window) -> ctypes.c_float: """ Get the opacity of a window. """
[docs] def SDL_SetWindowParent(window: LP_SDL_Window, parent: LP_SDL_Window) -> ctypes.c_bool: """ Set the window as a child of a parent window. """
[docs] def SDL_SetWindowModal(window: LP_SDL_Window, modal: ctypes.c_bool) -> ctypes.c_bool: """ Toggle the state of the window as modal. """
[docs] def SDL_SetWindowFocusable(window: LP_SDL_Window, focusable: ctypes.c_bool) -> ctypes.c_bool: """ Set whether the window may have input focus. """
[docs] def SDL_ShowWindowSystemMenu(window: LP_SDL_Window, x: ctypes.c_int, y: ctypes.c_int) -> ctypes.c_bool: """ Display the system-level window menu. """
[docs] def SDL_SetWindowHitTest(window: LP_SDL_Window, callback: SDL_HitTest, callback_data: ctypes.c_void_p) -> ctypes.c_bool: """ Provide a callback that decides if a window region has special properties. """
[docs] def SDL_SetWindowShape(window: LP_SDL_Window, shape: LP_SDL_Surface) -> ctypes.c_bool: """ Set the shape of a transparent window. """
[docs] def SDL_FlashWindow(window: LP_SDL_Window, operation: SDL_FlashOperation) -> ctypes.c_bool: """ Request a window to demand attention from the user. """
[docs] def SDL_SetWindowProgressState(window: LP_SDL_Window, state: SDL_ProgressState) -> ctypes.c_bool: """ Sets the state of the progress bar for the given window’s taskbar icon. """
[docs] def SDL_GetWindowProgressState(window: LP_SDL_Window) -> SDL_ProgressState: """ Get the state of the progress bar for the given window’s taskbar icon. """
[docs] def SDL_SetWindowProgressValue(window: LP_SDL_Window, value: ctypes.c_float) -> ctypes.c_bool: """ Sets the value of the progress bar for the given window’s taskbar icon. """
[docs] def SDL_GetWindowProgressValue(window: LP_SDL_Window) -> ctypes.c_float: """ Get the value of the progress bar for the given window’s taskbar icon. """
[docs] def SDL_DestroyWindow(window: LP_SDL_Window) -> None: """ Destroy a window. """
[docs] def SDL_ScreenSaverEnabled() -> ctypes.c_bool: """ Check whether the screensaver is currently enabled. """
[docs] def SDL_EnableScreenSaver() -> ctypes.c_bool: """ Allow the screen to be blanked by a screen saver. """
[docs] def SDL_DisableScreenSaver() -> ctypes.c_bool: """ Prevent the screen from being blanked by a screen saver. """
[docs] def SDL_GL_LoadLibrary(path: ctypes.c_char_p) -> ctypes.c_bool: """ Dynamically load an OpenGL library. """
[docs] def SDL_GL_GetProcAddress(proc: ctypes.c_char_p) -> SDL_FunctionPointer: """ Get an OpenGL function by name. """
[docs] def SDL_EGL_GetProcAddress(proc: ctypes.c_char_p) -> SDL_FunctionPointer: """ Get an EGL library function by name. """
[docs] def SDL_GL_UnloadLibrary() -> None: """ Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary(). """
[docs] def SDL_GL_ExtensionSupported(extension: ctypes.c_char_p) -> ctypes.c_bool: """ Check if an OpenGL extension is supported for the current context. """
[docs] def SDL_GL_ResetAttributes() -> None: """ Reset all previously set OpenGL context attributes to their default values. """
[docs] def SDL_GL_SetAttribute(attr: SDL_GLAttr, value: ctypes.c_int) -> ctypes.c_bool: """ Set an OpenGL window attribute before window creation. """
[docs] def SDL_GL_GetAttribute(attr: SDL_GLAttr, value: LP_c_int) -> ctypes.c_bool: """ Get the actual value for an attribute from the current context. """
[docs] def SDL_GL_CreateContext(window: LP_SDL_Window) -> SDL_GLContext: """ Create an OpenGL context for an OpenGL window, and make it current. """
[docs] def SDL_GL_MakeCurrent(window: LP_SDL_Window, context: SDL_GLContext) -> ctypes.c_bool: """ Set up an OpenGL context for rendering into an OpenGL window. """
[docs] def SDL_GL_GetCurrentWindow() -> LP_SDL_Window: """ Get the currently active OpenGL window. """
[docs] def SDL_GL_GetCurrentContext() -> SDL_GLContext: """ Get the currently active OpenGL context. """
[docs] def SDL_EGL_GetCurrentDisplay() -> SDL_EGLDisplay: """ Get the currently active EGL display. """
[docs] def SDL_EGL_GetCurrentConfig() -> SDL_EGLConfig: """ Get the currently active EGL config. """
[docs] def SDL_EGL_GetWindowSurface(window: LP_SDL_Window) -> SDL_EGLSurface: """ Get the EGL surface associated with the window. """
[docs] def SDL_EGL_SetAttributeCallbacks(platformAttribCallback: SDL_EGLAttribArrayCallback, surfaceAttribCallback: SDL_EGLIntArrayCallback, contextAttribCallback: SDL_EGLIntArrayCallback, userdata: ctypes.c_void_p) -> None: """ Sets the callbacks for defining custom EGLAttrib arrays for EGL initialization. """
[docs] def SDL_GL_SetSwapInterval(interval: ctypes.c_int) -> ctypes.c_bool: """ Set the swap interval for the current OpenGL context. """
[docs] def SDL_GL_GetSwapInterval(interval: LP_c_int) -> ctypes.c_bool: """ Get the swap interval for the current OpenGL context. """
[docs] def SDL_GL_SwapWindow(window: LP_SDL_Window) -> ctypes.c_bool: """ Update a window with OpenGL rendering. """
[docs] def SDL_GL_DestroyContext(context: SDL_GLContext) -> ctypes.c_bool: """ Delete an OpenGL context. """
[docs] def SDL_ShowOpenFileDialog(callback: SDL_DialogFileCallback, userdata: ctypes.c_void_p, window: LP_SDL_Window, filters: LP_SDL_DialogFileFilter, nfilters: ctypes.c_int, default_location: ctypes.c_char_p, allow_many: ctypes.c_bool) -> None: """ Displays a dialog that lets the user select a file on their filesystem. """
[docs] def SDL_ShowSaveFileDialog(callback: SDL_DialogFileCallback, userdata: ctypes.c_void_p, window: LP_SDL_Window, filters: LP_SDL_DialogFileFilter, nfilters: ctypes.c_int, default_location: ctypes.c_char_p) -> None: """ Displays a dialog that lets the user choose a new or existing file on their filesystem. """
[docs] def SDL_ShowOpenFolderDialog(callback: SDL_DialogFileCallback, userdata: ctypes.c_void_p, window: LP_SDL_Window, default_location: ctypes.c_char_p, allow_many: ctypes.c_bool) -> None: """ Displays a dialog that lets the user select a folder on their filesystem. """
[docs] def SDL_ShowFileDialogWithProperties(type: SDL_FileDialogType, callback: SDL_DialogFileCallback, userdata: ctypes.c_void_p, props: SDL_PropertiesID) -> None: """ Create and launch a file dialog with the specified properties. """
[docs] def SDL_SetError(fmt: ctypes.c_char_p, *args: typing.Any) -> ctypes.c_bool: """ Set the SDL error message for the current thread. """
[docs] def SDL_SetErrorV(fmt: ctypes.c_char_p, ap: SDL_VA_LIST) -> ctypes.c_bool: """ Set the SDL error message for the current thread. """
[docs] def SDL_OutOfMemory() -> ctypes.c_bool: """ Set an error indicating that memory allocation failed. """
[docs] def SDL_GetError() -> ctypes.c_char_p: """ Retrieve a message about the last error that occurred on the current thread. """
[docs] def SDL_ClearError() -> ctypes.c_bool: """ Clear any previous error message for this thread. """
[docs] def SDL_GetSensors(count: LP_c_int) -> LP_SDL_SensorID: """ Get a list of currently connected sensors. """
[docs] def SDL_GetSensorNameForID(instance_id: SDL_SensorID) -> ctypes.c_char_p: """ Get the implementation dependent name of a sensor. """
[docs] def SDL_GetSensorTypeForID(instance_id: SDL_SensorID) -> SDL_SensorType: """ Get the type of a sensor. """
[docs] def SDL_GetSensorNonPortableTypeForID(instance_id: SDL_SensorID) -> ctypes.c_int: """ Get the platform dependent type of a sensor. """
[docs] def SDL_OpenSensor(instance_id: SDL_SensorID) -> LP_SDL_Sensor: """ Open a sensor for use. """
[docs] def SDL_GetSensorFromID(instance_id: SDL_SensorID) -> LP_SDL_Sensor: """ Return the SDL_Sensor associated with an instance ID. """
[docs] def SDL_GetSensorProperties(sensor: LP_SDL_Sensor) -> SDL_PropertiesID: """ Get the properties associated with a sensor. """
[docs] def SDL_GetSensorName(sensor: LP_SDL_Sensor) -> ctypes.c_char_p: """ Get the implementation dependent name of a sensor. """
[docs] def SDL_GetSensorType(sensor: LP_SDL_Sensor) -> SDL_SensorType: """ Get the type of a sensor. """
[docs] def SDL_GetSensorNonPortableType(sensor: LP_SDL_Sensor) -> ctypes.c_int: """ Get the platform dependent type of a sensor. """
[docs] def SDL_GetSensorID(sensor: LP_SDL_Sensor) -> SDL_SensorID: """ Get the instance ID of a sensor. """
[docs] def SDL_GetSensorData(sensor: LP_SDL_Sensor, data: LP_c_float, num_values: ctypes.c_int) -> ctypes.c_bool: """ Get the current state of an opened sensor. """
[docs] def SDL_CloseSensor(sensor: LP_SDL_Sensor) -> None: """ Close a sensor previously opened with SDL_OpenSensor(). """
[docs] def SDL_UpdateSensors() -> None: """ Update the current state of the open sensors. """
[docs] def SDL_GetPowerInfo(seconds: LP_c_int, percent: LP_c_int) -> SDL_PowerState: """ Get the current power supply details. """
[docs] def SDL_GUIDToString(guid: SDL_GUID, pszGUID: ctypes.c_char_p, cbGUID: ctypes.c_int) -> None: """ Get an ASCII string representation for a given SDL_GUID. """
[docs] def SDL_StringToGUID(pchGUID: ctypes.c_char_p) -> SDL_GUID: """ Convert a GUID string into a SDL_GUID structure. """
[docs] def SDL_LockJoysticks() -> None: """ Locking for atomic access to the joystick API. """
[docs] def SDL_UnlockJoysticks() -> None: """ Unlocking for atomic access to the joystick API. """
[docs] def SDL_HasJoystick() -> ctypes.c_bool: """ Return whether a joystick is currently connected. """
[docs] def SDL_GetJoysticks(count: LP_c_int) -> LP_SDL_JoystickID: """ Get a list of currently connected joysticks. """
[docs] def SDL_GetJoystickNameForID(instance_id: SDL_JoystickID) -> ctypes.c_char_p: """ Get the implementation dependent name of a joystick. """
[docs] def SDL_GetJoystickPathForID(instance_id: SDL_JoystickID) -> ctypes.c_char_p: """ Get the implementation dependent path of a joystick. """
[docs] def SDL_GetJoystickPlayerIndexForID(instance_id: SDL_JoystickID) -> ctypes.c_int: """ Get the player index of a joystick. """
[docs] def SDL_GetJoystickGUIDForID(instance_id: SDL_JoystickID) -> SDL_GUID: """ Get the implementation-dependent GUID of a joystick. """
[docs] def SDL_GetJoystickVendorForID(instance_id: SDL_JoystickID) -> ctypes.c_uint16: """ Get the USB vendor ID of a joystick, if available. """
[docs] def SDL_GetJoystickProductForID(instance_id: SDL_JoystickID) -> ctypes.c_uint16: """ Get the USB product ID of a joystick, if available. """
[docs] def SDL_GetJoystickProductVersionForID(instance_id: SDL_JoystickID) -> ctypes.c_uint16: """ Get the product version of a joystick, if available. """
[docs] def SDL_GetJoystickTypeForID(instance_id: SDL_JoystickID) -> SDL_JoystickType: """ Get the type of a joystick, if available. """
[docs] def SDL_OpenJoystick(instance_id: SDL_JoystickID) -> LP_SDL_Joystick: """ Open a joystick for use. """
[docs] def SDL_GetJoystickFromID(instance_id: SDL_JoystickID) -> LP_SDL_Joystick: """ Get the SDL_Joystick associated with an instance ID, if it has been opened. """
[docs] def SDL_GetJoystickFromPlayerIndex(player_index: ctypes.c_int) -> LP_SDL_Joystick: """ Get the SDL_Joystick associated with a player index. """
[docs] def SDL_AttachVirtualJoystick(desc: LP_SDL_VirtualJoystickDesc) -> SDL_JoystickID: """ Attach a new virtual joystick. """
[docs] def SDL_DetachVirtualJoystick(instance_id: SDL_JoystickID) -> ctypes.c_bool: """ Detach a virtual joystick. """
[docs] def SDL_IsJoystickVirtual(instance_id: SDL_JoystickID) -> ctypes.c_bool: """ Query whether or not a joystick is virtual. """
[docs] def SDL_SetJoystickVirtualAxis(joystick: LP_SDL_Joystick, axis: ctypes.c_int, value: ctypes.c_int16) -> ctypes.c_bool: """ Set the state of an axis on an opened virtual joystick. """
[docs] def SDL_SetJoystickVirtualBall(joystick: LP_SDL_Joystick, ball: ctypes.c_int, xrel: ctypes.c_int16, yrel: ctypes.c_int16) -> ctypes.c_bool: """ Generate ball motion on an opened virtual joystick. """
[docs] def SDL_SetJoystickVirtualButton(joystick: LP_SDL_Joystick, button: ctypes.c_int, down: ctypes.c_bool) -> ctypes.c_bool: """ Set the state of a button on an opened virtual joystick. """
[docs] def SDL_SetJoystickVirtualHat(joystick: LP_SDL_Joystick, hat: ctypes.c_int, value: ctypes.c_uint8) -> ctypes.c_bool: """ Set the state of a hat on an opened virtual joystick. """
[docs] def SDL_SetJoystickVirtualTouchpad(joystick: LP_SDL_Joystick, touchpad: ctypes.c_int, finger: ctypes.c_int, down: ctypes.c_bool, x: ctypes.c_float, y: ctypes.c_float, pressure: ctypes.c_float) -> ctypes.c_bool: """ Set touchpad finger state on an opened virtual joystick. """
[docs] def SDL_SendJoystickVirtualSensorData(joystick: LP_SDL_Joystick, type: SDL_SensorType, sensor_timestamp: ctypes.c_uint64, data: LP_c_float, num_values: ctypes.c_int) -> ctypes.c_bool: """ Send a sensor update for an opened virtual joystick. """
[docs] def SDL_GetJoystickProperties(joystick: LP_SDL_Joystick) -> SDL_PropertiesID: """ Get the properties associated with a joystick. """
[docs] def SDL_GetJoystickName(joystick: LP_SDL_Joystick) -> ctypes.c_char_p: """ Get the implementation dependent name of a joystick. """
[docs] def SDL_GetJoystickPath(joystick: LP_SDL_Joystick) -> ctypes.c_char_p: """ Get the implementation dependent path of a joystick. """
[docs] def SDL_GetJoystickPlayerIndex(joystick: LP_SDL_Joystick) -> ctypes.c_int: """ Get the player index of an opened joystick. """
[docs] def SDL_SetJoystickPlayerIndex(joystick: LP_SDL_Joystick, player_index: ctypes.c_int) -> ctypes.c_bool: """ Set the player index of an opened joystick. """
[docs] def SDL_GetJoystickGUID(joystick: LP_SDL_Joystick) -> SDL_GUID: """ Get the implementation-dependent GUID for the joystick. """
[docs] def SDL_GetJoystickVendor(joystick: LP_SDL_Joystick) -> ctypes.c_uint16: """ Get the USB vendor ID of an opened joystick, if available. """
[docs] def SDL_GetJoystickProduct(joystick: LP_SDL_Joystick) -> ctypes.c_uint16: """ Get the USB product ID of an opened joystick, if available. """
[docs] def SDL_GetJoystickProductVersion(joystick: LP_SDL_Joystick) -> ctypes.c_uint16: """ Get the product version of an opened joystick, if available. """
[docs] def SDL_GetJoystickFirmwareVersion(joystick: LP_SDL_Joystick) -> ctypes.c_uint16: """ Get the firmware version of an opened joystick, if available. """
[docs] def SDL_GetJoystickSerial(joystick: LP_SDL_Joystick) -> ctypes.c_char_p: """ Get the serial number of an opened joystick, if available. """
[docs] def SDL_GetJoystickType(joystick: LP_SDL_Joystick) -> SDL_JoystickType: """ Get the type of an opened joystick. """
[docs] def SDL_GetJoystickGUIDInfo(guid: SDL_GUID, vendor: LP_c_uint16, product: LP_c_uint16, version: LP_c_uint16, crc16: LP_c_uint16) -> None: """ Get the device information encoded in a SDL_GUID structure. """
[docs] def SDL_JoystickConnected(joystick: LP_SDL_Joystick) -> ctypes.c_bool: """ Get the status of a specified joystick. """
[docs] def SDL_GetJoystickID(joystick: LP_SDL_Joystick) -> SDL_JoystickID: """ Get the instance ID of an opened joystick. """
[docs] def SDL_GetNumJoystickAxes(joystick: LP_SDL_Joystick) -> ctypes.c_int: """ Get the number of general axis controls on a joystick. """
[docs] def SDL_GetNumJoystickBalls(joystick: LP_SDL_Joystick) -> ctypes.c_int: """ Get the number of trackballs on a joystick. """
[docs] def SDL_GetNumJoystickHats(joystick: LP_SDL_Joystick) -> ctypes.c_int: """ Get the number of POV hats on a joystick. """
[docs] def SDL_GetNumJoystickButtons(joystick: LP_SDL_Joystick) -> ctypes.c_int: """ Get the number of buttons on a joystick. """
[docs] def SDL_SetJoystickEventsEnabled(enabled: ctypes.c_bool) -> None: """ Set the state of joystick event processing. """
[docs] def SDL_JoystickEventsEnabled() -> ctypes.c_bool: """ Query the state of joystick event processing. """
[docs] def SDL_UpdateJoysticks() -> None: """ Update the current state of the open joysticks. """
[docs] def SDL_GetJoystickAxis(joystick: LP_SDL_Joystick, axis: ctypes.c_int) -> ctypes.c_int16: """ Get the current state of an axis control on a joystick. """
[docs] def SDL_GetJoystickAxisInitialState(joystick: LP_SDL_Joystick, axis: ctypes.c_int, state: LP_c_int16) -> ctypes.c_bool: """ Get the initial state of an axis control on a joystick. """
[docs] def SDL_GetJoystickBall(joystick: LP_SDL_Joystick, ball: ctypes.c_int, dx: LP_c_int, dy: LP_c_int) -> ctypes.c_bool: """ Get the ball axis change since the last poll. """
[docs] def SDL_GetJoystickHat(joystick: LP_SDL_Joystick, hat: ctypes.c_int) -> ctypes.c_uint8: """ Get the current state of a POV hat on a joystick. """
[docs] def SDL_GetJoystickButton(joystick: LP_SDL_Joystick, button: ctypes.c_int) -> ctypes.c_bool: """ Get the current state of a button on a joystick. """
[docs] def SDL_RumbleJoystick(joystick: LP_SDL_Joystick, low_frequency_rumble: ctypes.c_uint16, high_frequency_rumble: ctypes.c_uint16, duration_ms: ctypes.c_uint32) -> ctypes.c_bool: """ Start a rumble effect. """
[docs] def SDL_RumbleJoystickTriggers(joystick: LP_SDL_Joystick, left_rumble: ctypes.c_uint16, right_rumble: ctypes.c_uint16, duration_ms: ctypes.c_uint32) -> ctypes.c_bool: """ Start a rumble effect in the joystick's triggers. """
[docs] def SDL_SetJoystickLED(joystick: LP_SDL_Joystick, red: ctypes.c_uint8, green: ctypes.c_uint8, blue: ctypes.c_uint8) -> ctypes.c_bool: """ Update a joystick's LED color. """
[docs] def SDL_SendJoystickEffect(joystick: LP_SDL_Joystick, data: ctypes.c_void_p, size: ctypes.c_int) -> ctypes.c_bool: """ Send a joystick specific effect packet. """
[docs] def SDL_CloseJoystick(joystick: LP_SDL_Joystick) -> None: """ Close a joystick previously opened with SDL_OpenJoystick(). """
[docs] def SDL_GetJoystickConnectionState(joystick: LP_SDL_Joystick) -> SDL_JoystickConnectionState: """ Get the connection state of a joystick. """
[docs] def SDL_GetJoystickPowerInfo(joystick: LP_SDL_Joystick, percent: LP_c_int) -> SDL_PowerState: """ Get the battery state of a joystick. """
[docs] def SDL_HasKeyboard() -> ctypes.c_bool: """ Return whether a keyboard is currently connected. """
[docs] def SDL_GetKeyboards(count: LP_c_int) -> LP_SDL_KeyboardID: """ Get a list of currently connected keyboards. """
[docs] def SDL_GetKeyboardNameForID(instance_id: SDL_KeyboardID) -> ctypes.c_char_p: """ Get the name of a keyboard. """
[docs] def SDL_GetKeyboardFocus() -> LP_SDL_Window: """ Query the window which currently has keyboard focus. """
[docs] def SDL_GetKeyboardState(numkeys: LP_c_int) -> LP_c_bool: """ Get a snapshot of the current state of the keyboard. """
[docs] def SDL_ResetKeyboard() -> None: """ Clear the state of the keyboard. """
[docs] def SDL_GetModState() -> SDL_Keymod: """ Get the current key modifier state for the keyboard. """
[docs] def SDL_SetModState(modstate: SDL_Keymod) -> None: """ Set the current key modifier state for the keyboard. """
[docs] def SDL_GetKeyFromScancode(scancode: SDL_Scancode, modstate: SDL_Keymod, key_event: ctypes.c_bool) -> SDL_Keycode: """ Get the key code corresponding to the given scancode according to the current keyboard layout. """
[docs] def SDL_GetScancodeFromKey(key: SDL_Keycode, modstate: LP_SDL_Keymod) -> SDL_Scancode: """ Get the scancode corresponding to the given key code according to the current keyboard layout. """
[docs] def SDL_SetScancodeName(scancode: SDL_Scancode, name: ctypes.c_char_p) -> ctypes.c_bool: """ Set a human-readable name for a scancode. """
[docs] def SDL_GetScancodeName(scancode: SDL_Scancode) -> ctypes.c_char_p: """ Get a human-readable name for a scancode. """
[docs] def SDL_GetScancodeFromName(name: ctypes.c_char_p) -> SDL_Scancode: """ Get a scancode from a human-readable name. """
[docs] def SDL_GetKeyName(key: SDL_Keycode) -> ctypes.c_char_p: """ Get a human-readable name for a key. """
[docs] def SDL_GetKeyFromName(name: ctypes.c_char_p) -> SDL_Keycode: """ Get a key code from a human-readable name. """
[docs] def SDL_StartTextInput(window: LP_SDL_Window) -> ctypes.c_bool: """ Start accepting Unicode text input events in a window. """
[docs] def SDL_StartTextInputWithProperties(window: LP_SDL_Window, props: SDL_PropertiesID) -> ctypes.c_bool: """ Start accepting Unicode text input events in a window, with properties describing the input. """
[docs] def SDL_TextInputActive(window: LP_SDL_Window) -> ctypes.c_bool: """ Check whether or not Unicode text input events are enabled for a window. """
[docs] def SDL_StopTextInput(window: LP_SDL_Window) -> ctypes.c_bool: """ Stop receiving any text input events in a window. """
[docs] def SDL_ClearComposition(window: LP_SDL_Window) -> ctypes.c_bool: """ Dismiss the composition window/IME without disabling the subsystem. """
[docs] def SDL_SetTextInputArea(window: LP_SDL_Window, rect: LP_SDL_Rect, cursor: ctypes.c_int) -> ctypes.c_bool: """ Set the area used to type Unicode text input. """
[docs] def SDL_GetTextInputArea(window: LP_SDL_Window, rect: LP_SDL_Rect, cursor: LP_c_int) -> ctypes.c_bool: """ Get the area used to type Unicode text input. """
[docs] def SDL_HasScreenKeyboardSupport() -> ctypes.c_bool: """ Check whether the platform has screen keyboard support. """
[docs] def SDL_ScreenKeyboardShown(window: LP_SDL_Window) -> ctypes.c_bool: """ Check whether the screen keyboard is shown for given window. """
[docs] def SDL_HasMouse() -> ctypes.c_bool: """ Return whether a mouse is currently connected. """
[docs] def SDL_GetMice(count: LP_c_int) -> LP_SDL_MouseID: """ Get a list of currently connected mice. """
[docs] def SDL_GetMouseNameForID(instance_id: SDL_MouseID) -> ctypes.c_char_p: """ Get the name of a mouse. """
[docs] def SDL_GetMouseFocus() -> LP_SDL_Window: """ Get the window which currently has mouse focus. """
[docs] def SDL_GetMouseState(x: LP_c_float, y: LP_c_float) -> SDL_MouseButtonFlags: """ Query SDL's cache for the synchronous mouse button state and the window-relative SDL-cursor position. """
[docs] def SDL_GetGlobalMouseState(x: LP_c_float, y: LP_c_float) -> SDL_MouseButtonFlags: """ Query the platform for the asynchronous mouse button state and the desktop-relative platform-cursor position. """
[docs] def SDL_GetRelativeMouseState(x: LP_c_float, y: LP_c_float) -> SDL_MouseButtonFlags: """ Query SDL's cache for the synchronous mouse button state and accumulated mouse delta since last call. """
[docs] def SDL_WarpMouseInWindow(window: LP_SDL_Window, x: ctypes.c_float, y: ctypes.c_float) -> None: """ Move the mouse cursor to the given position within the window. """
[docs] def SDL_WarpMouseGlobal(x: ctypes.c_float, y: ctypes.c_float) -> ctypes.c_bool: """ Move the mouse to the given position in global screen space. """
[docs] def SDL_SetRelativeMouseTransform(callback: SDL_MouseMotionTransformCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Set a user-defined function by which to transform relative mouse inputs. """
[docs] def SDL_SetWindowRelativeMouseMode(window: LP_SDL_Window, enabled: ctypes.c_bool) -> ctypes.c_bool: """ Set relative mouse mode for a window. """
[docs] def SDL_GetWindowRelativeMouseMode(window: LP_SDL_Window) -> ctypes.c_bool: """ Query whether relative mouse mode is enabled for a window. """
[docs] def SDL_CaptureMouse(enabled: ctypes.c_bool) -> ctypes.c_bool: """ Capture the mouse and to track input outside an SDL window. """
[docs] def SDL_CreateCursor(data: LP_c_uint8, mask: LP_c_uint8, w: ctypes.c_int, h: ctypes.c_int, hot_x: ctypes.c_int, hot_y: ctypes.c_int) -> LP_SDL_Cursor: """ Create a cursor using the specified bitmap data and mask (in MSB format). """
[docs] def SDL_CreateColorCursor(surface: LP_SDL_Surface, hot_x: ctypes.c_int, hot_y: ctypes.c_int) -> LP_SDL_Cursor: """ Create a color cursor. """
[docs] def SDL_CreateAnimatedCursor(frames: LP_SDL_CursorFrameInfo, frame_count: ctypes.c_int, hot_x: ctypes.c_int, hot_y: ctypes.c_int) -> LP_SDL_Cursor: """ Create an animated color cursor. """
[docs] def SDL_CreateSystemCursor(id: SDL_SystemCursor) -> LP_SDL_Cursor: """ Create a system cursor. """
[docs] def SDL_SetCursor(cursor: LP_SDL_Cursor) -> ctypes.c_bool: """ Set the active cursor. """
[docs] def SDL_GetCursor() -> LP_SDL_Cursor: """ Get the active cursor. """
[docs] def SDL_GetDefaultCursor() -> LP_SDL_Cursor: """ Get the default cursor. """
[docs] def SDL_DestroyCursor(cursor: LP_SDL_Cursor) -> None: """ Free a previously-created cursor. """
[docs] def SDL_ShowCursor() -> ctypes.c_bool: """ Show the cursor. """
[docs] def SDL_HideCursor() -> ctypes.c_bool: """ Hide the cursor. """
[docs] def SDL_CursorVisible() -> ctypes.c_bool: """ Return whether the cursor is currently being shown. """
[docs] def SDL_GetTouchDevices(count: LP_c_int) -> LP_SDL_TouchID: """ Get a list of registered touch devices. """
[docs] def SDL_GetTouchDeviceName(touchID: SDL_TouchID) -> ctypes.c_char_p: """ Get the touch device name as reported from the driver. """
[docs] def SDL_GetTouchDeviceType(touchID: SDL_TouchID) -> SDL_TouchDeviceType: """ Get the type of the given touch device. """
[docs] def SDL_GetTouchFingers(touchID: SDL_TouchID, count: LP_c_int) -> LP_LP_SDL_Finger: """ Get a list of active fingers for a given touch device. """
[docs] def SDL_GetPenDeviceType(instance_id: SDL_PenID) -> SDL_PenDeviceType: """ Get the device type of the given pen. """
[docs] def SDL_PumpEvents() -> None: """ Pump the event loop, gathering events from the input devices. """
[docs] def SDL_PeepEvents(events: LP_SDL_Event, numevents: ctypes.c_int, action: SDL_EventAction, minType: ctypes.c_uint32, maxType: ctypes.c_uint32) -> ctypes.c_int: """ Check the event queue for messages and optionally return them. """
[docs] def SDL_HasEvent(type: ctypes.c_uint32) -> ctypes.c_bool: """ Check for the existence of a certain event type in the event queue. """
[docs] def SDL_HasEvents(minType: ctypes.c_uint32, maxType: ctypes.c_uint32) -> ctypes.c_bool: """ Check for the existence of certain event types in the event queue. """
[docs] def SDL_FlushEvent(type: ctypes.c_uint32) -> None: """ Clear events of a specific type from the event queue. """
[docs] def SDL_FlushEvents(minType: ctypes.c_uint32, maxType: ctypes.c_uint32) -> None: """ Clear events of a range of types from the event queue. """
[docs] def SDL_PollEvent(event: LP_SDL_Event) -> ctypes.c_bool: """ Poll for currently pending events. """
[docs] def SDL_WaitEvent(event: LP_SDL_Event) -> ctypes.c_bool: """ Wait indefinitely for the next available event. """
[docs] def SDL_WaitEventTimeout(event: LP_SDL_Event, timeoutMS: ctypes.c_int32) -> ctypes.c_bool: """ Wait until the specified timeout (in milliseconds) for the next available event. """
[docs] def SDL_PushEvent(event: LP_SDL_Event) -> ctypes.c_bool: """ Add an event to the event queue. """
[docs] def SDL_SetEventFilter(filter: SDL_EventFilter, userdata: ctypes.c_void_p) -> None: """ Set up a filter to process all events before they are added to the internal event queue. """
[docs] def SDL_GetEventFilter(filter: LP_SDL_EventFilter, userdata: LP_c_void_p) -> ctypes.c_bool: """ Query the current event filter. """
[docs] def SDL_AddEventWatch(filter: SDL_EventFilter, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Add a callback to be triggered when an event is added to the event queue. """
[docs] def SDL_RemoveEventWatch(filter: SDL_EventFilter, userdata: ctypes.c_void_p) -> None: """ Remove an event watch callback added with SDL_AddEventWatch(). """
[docs] def SDL_FilterEvents(filter: SDL_EventFilter, userdata: ctypes.c_void_p) -> None: """ Run a specific filter function on the current event queue, removing any events for which the filter returns false. """
[docs] def SDL_SetEventEnabled(type: ctypes.c_uint32, enabled: ctypes.c_bool) -> None: """ Set the state of processing events by type. """
[docs] def SDL_EventEnabled(type: ctypes.c_uint32) -> ctypes.c_bool: """ Query the state of processing events by type. """
[docs] def SDL_RegisterEvents(numevents: ctypes.c_int) -> ctypes.c_uint32: """ Allocate a set of user-defined events, and return the beginning event number for that set of events. """
[docs] def SDL_GetWindowFromEvent(event: LP_SDL_Event) -> LP_SDL_Window: """ Get window associated with an event. """
[docs] def SDL_GetEventDescription(event: LP_SDL_Event, buf: ctypes.c_char_p, buflen: ctypes.c_int) -> ctypes.c_int: """ Generate an English description of an event. """
[docs] def SDL_GetBasePath() -> ctypes.c_char_p: """ Get the directory where the application was run from. """
[docs] def SDL_GetPrefPath(org: ctypes.c_char_p, app: ctypes.c_char_p) -> ctypes.c_char_p: """ Get the user-and-app-specific path where files can be written. """
[docs] def SDL_GetUserFolder(folder: SDL_Folder) -> ctypes.c_char_p: """ Finds the most suitable user folder for a specific purpose. """
[docs] def SDL_CreateDirectory(path: ctypes.c_char_p) -> ctypes.c_bool: """ Create a directory, and any missing parent directories. """
[docs] def SDL_EnumerateDirectory(path: ctypes.c_char_p, callback: SDL_EnumerateDirectoryCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Enumerate a directory through a callback function. """
[docs] def SDL_RemovePath(path: ctypes.c_char_p) -> ctypes.c_bool: """ Remove a file or an empty directory. """
[docs] def SDL_RenamePath(oldpath: ctypes.c_char_p, newpath: ctypes.c_char_p) -> ctypes.c_bool: """ Rename a file or directory. """
[docs] def SDL_CopyFile(oldpath: ctypes.c_char_p, newpath: ctypes.c_char_p) -> ctypes.c_bool: """ Copy a file. """
[docs] def SDL_GetPathInfo(path: ctypes.c_char_p, info: LP_SDL_PathInfo) -> ctypes.c_bool: """ Get information about a filesystem path. """
[docs] def SDL_GlobDirectory(path: ctypes.c_char_p, pattern: ctypes.c_char_p, flags: SDL_GlobFlags, count: LP_c_int) -> LP_c_char_p: """ Enumerate a directory tree, filtered by pattern, and return a list. """
[docs] def SDL_GetCurrentDirectory() -> ctypes.c_char_p: """ Get what the system believes is the "current working directory." """
[docs] def SDL_AddGamepadMapping(mapping: ctypes.c_char_p) -> ctypes.c_int: """ Add support for gamepads that SDL is unaware of or change the binding of an existing gamepad. """
[docs] def SDL_AddGamepadMappingsFromIO(src: LP_SDL_IOStream, closeio: ctypes.c_bool) -> ctypes.c_int: """ Load a set of gamepad mappings from an SDL_IOStream. """
[docs] def SDL_AddGamepadMappingsFromFile(file: ctypes.c_char_p) -> ctypes.c_int: """ Load a set of gamepad mappings from a file. """
[docs] def SDL_ReloadGamepadMappings() -> ctypes.c_bool: """ Reinitialize the SDL mapping database to its initial state. """
[docs] def SDL_GetGamepadMappings(count: LP_c_int) -> LP_c_char_p: """ Get the current gamepad mappings. """
[docs] def SDL_GetGamepadMappingForGUID(guid: SDL_GUID) -> ctypes.c_char_p: """ Get the gamepad mapping string for a given GUID. """
[docs] def SDL_GetGamepadMapping(gamepad: LP_SDL_Gamepad) -> ctypes.c_char_p: """ Get the current mapping of a gamepad. """
[docs] def SDL_SetGamepadMapping(instance_id: SDL_JoystickID, mapping: ctypes.c_char_p) -> ctypes.c_bool: """ Set the current mapping of a joystick or gamepad. """
[docs] def SDL_HasGamepad() -> ctypes.c_bool: """ Return whether a gamepad is currently connected. """
[docs] def SDL_GetGamepads(count: LP_c_int) -> LP_SDL_JoystickID: """ Get a list of currently connected gamepads. """
[docs] def SDL_IsGamepad(instance_id: SDL_JoystickID) -> ctypes.c_bool: """ Check if the given joystick is supported by the gamepad interface. """
[docs] def SDL_GetGamepadNameForID(instance_id: SDL_JoystickID) -> ctypes.c_char_p: """ Get the implementation dependent name of a gamepad. """
[docs] def SDL_GetGamepadPathForID(instance_id: SDL_JoystickID) -> ctypes.c_char_p: """ Get the implementation dependent path of a gamepad. """
[docs] def SDL_GetGamepadPlayerIndexForID(instance_id: SDL_JoystickID) -> ctypes.c_int: """ Get the player index of a gamepad. """
[docs] def SDL_GetGamepadGUIDForID(instance_id: SDL_JoystickID) -> SDL_GUID: """ Get the implementation-dependent GUID of a gamepad. """
[docs] def SDL_GetGamepadVendorForID(instance_id: SDL_JoystickID) -> ctypes.c_uint16: """ Get the USB vendor ID of a gamepad, if available. """
[docs] def SDL_GetGamepadProductForID(instance_id: SDL_JoystickID) -> ctypes.c_uint16: """ Get the USB product ID of a gamepad, if available. """
[docs] def SDL_GetGamepadProductVersionForID(instance_id: SDL_JoystickID) -> ctypes.c_uint16: """ Get the product version of a gamepad, if available. """
[docs] def SDL_GetGamepadTypeForID(instance_id: SDL_JoystickID) -> SDL_GamepadType: """ Get the type of a gamepad. """
[docs] def SDL_GetRealGamepadTypeForID(instance_id: SDL_JoystickID) -> SDL_GamepadType: """ Get the type of a gamepad, ignoring any mapping override. """
[docs] def SDL_GetGamepadMappingForID(instance_id: SDL_JoystickID) -> ctypes.c_char_p: """ Get the mapping of a gamepad. """
[docs] def SDL_OpenGamepad(instance_id: SDL_JoystickID) -> LP_SDL_Gamepad: """ Open a gamepad for use. """
[docs] def SDL_GetGamepadFromID(instance_id: SDL_JoystickID) -> LP_SDL_Gamepad: """ Get the SDL_Gamepad associated with a joystick instance ID, if it has been opened. """
[docs] def SDL_GetGamepadFromPlayerIndex(player_index: ctypes.c_int) -> LP_SDL_Gamepad: """ Get the SDL_Gamepad associated with a player index. """
[docs] def SDL_GetGamepadProperties(gamepad: LP_SDL_Gamepad) -> SDL_PropertiesID: """ Get the properties associated with an opened gamepad. """
[docs] def SDL_GetGamepadID(gamepad: LP_SDL_Gamepad) -> SDL_JoystickID: """ Get the instance ID of an opened gamepad. """
[docs] def SDL_GetGamepadName(gamepad: LP_SDL_Gamepad) -> ctypes.c_char_p: """ Get the implementation-dependent name for an opened gamepad. """
[docs] def SDL_GetGamepadPath(gamepad: LP_SDL_Gamepad) -> ctypes.c_char_p: """ Get the implementation-dependent path for an opened gamepad. """
[docs] def SDL_GetGamepadType(gamepad: LP_SDL_Gamepad) -> SDL_GamepadType: """ Get the type of an opened gamepad. """
[docs] def SDL_GetRealGamepadType(gamepad: LP_SDL_Gamepad) -> SDL_GamepadType: """ Get the type of an opened gamepad, ignoring any mapping override. """
[docs] def SDL_GetGamepadPlayerIndex(gamepad: LP_SDL_Gamepad) -> ctypes.c_int: """ Get the player index of an opened gamepad. """
[docs] def SDL_SetGamepadPlayerIndex(gamepad: LP_SDL_Gamepad, player_index: ctypes.c_int) -> ctypes.c_bool: """ Set the player index of an opened gamepad. """
[docs] def SDL_GetGamepadVendor(gamepad: LP_SDL_Gamepad) -> ctypes.c_uint16: """ Get the USB vendor ID of an opened gamepad, if available. """
[docs] def SDL_GetGamepadProduct(gamepad: LP_SDL_Gamepad) -> ctypes.c_uint16: """ Get the USB product ID of an opened gamepad, if available. """
[docs] def SDL_GetGamepadProductVersion(gamepad: LP_SDL_Gamepad) -> ctypes.c_uint16: """ Get the product version of an opened gamepad, if available. """
[docs] def SDL_GetGamepadFirmwareVersion(gamepad: LP_SDL_Gamepad) -> ctypes.c_uint16: """ Get the firmware version of an opened gamepad, if available. """
[docs] def SDL_GetGamepadSerial(gamepad: LP_SDL_Gamepad) -> ctypes.c_char_p: """ Get the serial number of an opened gamepad, if available. """
[docs] def SDL_GetGamepadSteamHandle(gamepad: LP_SDL_Gamepad) -> ctypes.c_uint64: """ Get the Steam Input handle of an opened gamepad, if available. """
[docs] def SDL_GetGamepadConnectionState(gamepad: LP_SDL_Gamepad) -> SDL_JoystickConnectionState: """ Get the connection state of a gamepad. """
[docs] def SDL_GetGamepadPowerInfo(gamepad: LP_SDL_Gamepad, percent: LP_c_int) -> SDL_PowerState: """ Get the battery state of a gamepad. """
[docs] def SDL_GamepadConnected(gamepad: LP_SDL_Gamepad) -> ctypes.c_bool: """ Check if a gamepad has been opened and is currently connected. """
[docs] def SDL_GetGamepadJoystick(gamepad: LP_SDL_Gamepad) -> LP_SDL_Joystick: """ Get the underlying joystick from a gamepad. """
[docs] def SDL_SetGamepadEventsEnabled(enabled: ctypes.c_bool) -> None: """ Set the state of gamepad event processing. """
[docs] def SDL_GamepadEventsEnabled() -> ctypes.c_bool: """ Query the state of gamepad event processing. """
[docs] def SDL_GetGamepadBindings(gamepad: LP_SDL_Gamepad, count: LP_c_int) -> LP_LP_SDL_GamepadBinding: """ Get the SDL joystick layer bindings for a gamepad. """
[docs] def SDL_UpdateGamepads() -> None: """ Manually pump gamepad updates if not using the loop. """
[docs] def SDL_GetGamepadTypeFromString(str: ctypes.c_char_p) -> SDL_GamepadType: """ Convert a string into SDL_GamepadType enum. """
[docs] def SDL_GetGamepadStringForType(type: SDL_GamepadType) -> ctypes.c_char_p: """ Convert from an SDL_GamepadType enum to a string. """
[docs] def SDL_GetGamepadAxisFromString(str: ctypes.c_char_p) -> SDL_GamepadAxis: """ Convert a string into SDL_GamepadAxis enum. """
[docs] def SDL_GetGamepadStringForAxis(axis: SDL_GamepadAxis) -> ctypes.c_char_p: """ Convert from an SDL_GamepadAxis enum to a string. """
[docs] def SDL_GamepadHasAxis(gamepad: LP_SDL_Gamepad, axis: SDL_GamepadAxis) -> ctypes.c_bool: """ Query whether a gamepad has a given axis. """
[docs] def SDL_GetGamepadAxis(gamepad: LP_SDL_Gamepad, axis: SDL_GamepadAxis) -> ctypes.c_int16: """ Get the current state of an axis control on a gamepad. """
[docs] def SDL_GetGamepadButtonFromString(str: ctypes.c_char_p) -> SDL_GamepadButton: """ Convert a string into an SDL_GamepadButton enum. """
[docs] def SDL_GetGamepadStringForButton(button: SDL_GamepadButton) -> ctypes.c_char_p: """ Convert from an SDL_GamepadButton enum to a string. """
[docs] def SDL_GamepadHasButton(gamepad: LP_SDL_Gamepad, button: SDL_GamepadButton) -> ctypes.c_bool: """ Query whether a gamepad has a given button. """
[docs] def SDL_GetGamepadButton(gamepad: LP_SDL_Gamepad, button: SDL_GamepadButton) -> ctypes.c_bool: """ Get the current state of a button on a gamepad. """
[docs] def SDL_GetGamepadButtonLabelForType(type: SDL_GamepadType, button: SDL_GamepadButton) -> SDL_GamepadButtonLabel: """ Get the label of a button on a gamepad. """
[docs] def SDL_GetGamepadButtonLabel(gamepad: LP_SDL_Gamepad, button: SDL_GamepadButton) -> SDL_GamepadButtonLabel: """ Get the label of a button on a gamepad. """
[docs] def SDL_GetNumGamepadTouchpads(gamepad: LP_SDL_Gamepad) -> ctypes.c_int: """ Get the number of touchpads on a gamepad. """
[docs] def SDL_GetNumGamepadTouchpadFingers(gamepad: LP_SDL_Gamepad, touchpad: ctypes.c_int) -> ctypes.c_int: """ Get the number of supported simultaneous fingers on a touchpad on a game gamepad. """
[docs] def SDL_GetGamepadTouchpadFinger(gamepad: LP_SDL_Gamepad, touchpad: ctypes.c_int, finger: ctypes.c_int, down: LP_c_bool, x: LP_c_float, y: LP_c_float, pressure: LP_c_float) -> ctypes.c_bool: """ Get the current state of a finger on a touchpad on a gamepad. """
[docs] def SDL_GamepadHasSensor(gamepad: LP_SDL_Gamepad, type: SDL_SensorType) -> ctypes.c_bool: """ Return whether a gamepad has a particular sensor. """
[docs] def SDL_SetGamepadSensorEnabled(gamepad: LP_SDL_Gamepad, type: SDL_SensorType, enabled: ctypes.c_bool) -> ctypes.c_bool: """ Set whether data reporting for a gamepad sensor is enabled. """
[docs] def SDL_GamepadSensorEnabled(gamepad: LP_SDL_Gamepad, type: SDL_SensorType) -> ctypes.c_bool: """ Query whether sensor data reporting is enabled for a gamepad. """
[docs] def SDL_GetGamepadSensorDataRate(gamepad: LP_SDL_Gamepad, type: SDL_SensorType) -> ctypes.c_float: """ Get the data rate (number of events per second) of a gamepad sensor. """
[docs] def SDL_GetGamepadSensorData(gamepad: LP_SDL_Gamepad, type: SDL_SensorType, data: LP_c_float, num_values: ctypes.c_int) -> ctypes.c_bool: """ Get the current state of a gamepad sensor. """
[docs] def SDL_RumbleGamepad(gamepad: LP_SDL_Gamepad, low_frequency_rumble: ctypes.c_uint16, high_frequency_rumble: ctypes.c_uint16, duration_ms: ctypes.c_uint32) -> ctypes.c_bool: """ Start a rumble effect on a gamepad. """
[docs] def SDL_RumbleGamepadTriggers(gamepad: LP_SDL_Gamepad, left_rumble: ctypes.c_uint16, right_rumble: ctypes.c_uint16, duration_ms: ctypes.c_uint32) -> ctypes.c_bool: """ Start a rumble effect in the gamepad's triggers. """
[docs] def SDL_SetGamepadLED(gamepad: LP_SDL_Gamepad, red: ctypes.c_uint8, green: ctypes.c_uint8, blue: ctypes.c_uint8) -> ctypes.c_bool: """ Update a gamepad's LED color. """
[docs] def SDL_SendGamepadEffect(gamepad: LP_SDL_Gamepad, data: ctypes.c_void_p, size: ctypes.c_int) -> ctypes.c_bool: """ Send a gamepad specific effect packet. """
[docs] def SDL_CloseGamepad(gamepad: LP_SDL_Gamepad) -> None: """ Close a gamepad previously opened with SDL_OpenGamepad(). """
[docs] def SDL_GetGamepadAppleSFSymbolsNameForButton(gamepad: LP_SDL_Gamepad, button: SDL_GamepadButton) -> ctypes.c_char_p: """ Return the sfSymbolsName for a given button on a gamepad on Apple platforms. """
[docs] def SDL_GetGamepadAppleSFSymbolsNameForAxis(gamepad: LP_SDL_Gamepad, axis: SDL_GamepadAxis) -> ctypes.c_char_p: """ Return the sfSymbolsName for a given axis on a gamepad on Apple platforms. """
[docs] def SDL_GPUSupportsShaderFormats(format_flags: SDL_GPUShaderFormat, name: ctypes.c_char_p) -> ctypes.c_bool: """ Checks for GPU runtime support. """
[docs] def SDL_GPUSupportsProperties(props: SDL_PropertiesID) -> ctypes.c_bool: """ Checks for GPU runtime support. """
[docs] def SDL_CreateGPUDevice(format_flags: SDL_GPUShaderFormat, debug_mode: ctypes.c_bool, name: ctypes.c_char_p) -> LP_SDL_GPUDevice: """ Creates a GPU context. """
[docs] def SDL_CreateGPUDeviceWithProperties(props: SDL_PropertiesID) -> LP_SDL_GPUDevice: """ Creates a GPU context. """
[docs] def SDL_DestroyGPUDevice(device: LP_SDL_GPUDevice) -> None: """ Destroys a GPU context previously returned by SDL_CreateGPUDevice. """
[docs] def SDL_GetNumGPUDrivers() -> ctypes.c_int: """ Get the number of GPU drivers compiled into SDL. """
[docs] def SDL_GetGPUDriver(index: ctypes.c_int) -> ctypes.c_char_p: """ Get the name of a built in GPU driver. """
[docs] def SDL_GetGPUDeviceDriver(device: LP_SDL_GPUDevice) -> ctypes.c_char_p: """ Returns the name of the backend used to create this GPU context. """
[docs] def SDL_GetGPUShaderFormats(device: LP_SDL_GPUDevice) -> SDL_GPUShaderFormat: """ Returns the supported shader formats for this GPU context. """
[docs] def SDL_GetGPUDeviceProperties(device: LP_SDL_GPUDevice) -> SDL_PropertiesID: """ Get the properties associated with a GPU device. """
[docs] def SDL_CreateGPUComputePipeline(device: LP_SDL_GPUDevice, createinfo: LP_SDL_GPUComputePipelineCreateInfo) -> LP_SDL_GPUComputePipeline: """ Creates a pipeline object to be used in a compute workflow. """
[docs] def SDL_CreateGPUGraphicsPipeline(device: LP_SDL_GPUDevice, createinfo: LP_SDL_GPUGraphicsPipelineCreateInfo) -> LP_SDL_GPUGraphicsPipeline: """ Creates a pipeline object to be used in a graphics workflow. """
[docs] def SDL_CreateGPUSampler(device: LP_SDL_GPUDevice, createinfo: LP_SDL_GPUSamplerCreateInfo) -> LP_SDL_GPUSampler: """ Creates a sampler object to be used when binding textures in a graphics workflow. """
[docs] def SDL_CreateGPUShader(device: LP_SDL_GPUDevice, createinfo: LP_SDL_GPUShaderCreateInfo) -> LP_SDL_GPUShader: """ Creates a shader to be used when creating a graphics pipeline. """
[docs] def SDL_CreateGPUTexture(device: LP_SDL_GPUDevice, createinfo: LP_SDL_GPUTextureCreateInfo) -> LP_SDL_GPUTexture: """ Creates a texture object to be used in graphics or compute workflows. """
[docs] def SDL_CreateGPUBuffer(device: LP_SDL_GPUDevice, createinfo: LP_SDL_GPUBufferCreateInfo) -> LP_SDL_GPUBuffer: """ Creates a buffer object to be used in graphics or compute workflows. """
[docs] def SDL_CreateGPUTransferBuffer(device: LP_SDL_GPUDevice, createinfo: LP_SDL_GPUTransferBufferCreateInfo) -> LP_SDL_GPUTransferBuffer: """ Creates a transfer buffer to be used when uploading to or downloading from graphics resources. """
[docs] def SDL_SetGPUBufferName(device: LP_SDL_GPUDevice, buffer: LP_SDL_GPUBuffer, text: ctypes.c_char_p) -> None: """ Sets an arbitrary string constant to label a buffer. """
[docs] def SDL_SetGPUTextureName(device: LP_SDL_GPUDevice, texture: LP_SDL_GPUTexture, text: ctypes.c_char_p) -> None: """ Sets an arbitrary string constant to label a texture. """
[docs] def SDL_InsertGPUDebugLabel(command_buffer: LP_SDL_GPUCommandBuffer, text: ctypes.c_char_p) -> None: """ Inserts an arbitrary string label into the command buffer callstream. """
[docs] def SDL_PushGPUDebugGroup(command_buffer: LP_SDL_GPUCommandBuffer, name: ctypes.c_char_p) -> None: """ Begins a debug group with an arbitrary name. """
[docs] def SDL_PopGPUDebugGroup(command_buffer: LP_SDL_GPUCommandBuffer) -> None: """ Ends the most-recently pushed debug group. """
[docs] def SDL_ReleaseGPUTexture(device: LP_SDL_GPUDevice, texture: LP_SDL_GPUTexture) -> None: """ Frees the given texture as soon as it is safe to do so. """
[docs] def SDL_ReleaseGPUSampler(device: LP_SDL_GPUDevice, sampler: LP_SDL_GPUSampler) -> None: """ Frees the given sampler as soon as it is safe to do so. """
[docs] def SDL_ReleaseGPUBuffer(device: LP_SDL_GPUDevice, buffer: LP_SDL_GPUBuffer) -> None: """ Frees the given buffer as soon as it is safe to do so. """
[docs] def SDL_ReleaseGPUTransferBuffer(device: LP_SDL_GPUDevice, transfer_buffer: LP_SDL_GPUTransferBuffer) -> None: """ Frees the given transfer buffer as soon as it is safe to do so. """
[docs] def SDL_ReleaseGPUComputePipeline(device: LP_SDL_GPUDevice, compute_pipeline: LP_SDL_GPUComputePipeline) -> None: """ Frees the given compute pipeline as soon as it is safe to do so. """
[docs] def SDL_ReleaseGPUShader(device: LP_SDL_GPUDevice, shader: LP_SDL_GPUShader) -> None: """ Frees the given shader as soon as it is safe to do so. """
[docs] def SDL_ReleaseGPUGraphicsPipeline(device: LP_SDL_GPUDevice, graphics_pipeline: LP_SDL_GPUGraphicsPipeline) -> None: """ Frees the given graphics pipeline as soon as it is safe to do so. """
[docs] def SDL_AcquireGPUCommandBuffer(device: LP_SDL_GPUDevice) -> LP_SDL_GPUCommandBuffer: """ Acquire a command buffer. """
[docs] def SDL_PushGPUVertexUniformData(command_buffer: LP_SDL_GPUCommandBuffer, slot_index: ctypes.c_uint32, data: ctypes.c_void_p, length: ctypes.c_uint32) -> None: """ Pushes data to a vertex uniform slot on the command buffer. """
[docs] def SDL_PushGPUFragmentUniformData(command_buffer: LP_SDL_GPUCommandBuffer, slot_index: ctypes.c_uint32, data: ctypes.c_void_p, length: ctypes.c_uint32) -> None: """ Pushes data to a fragment uniform slot on the command buffer. """
[docs] def SDL_PushGPUComputeUniformData(command_buffer: LP_SDL_GPUCommandBuffer, slot_index: ctypes.c_uint32, data: ctypes.c_void_p, length: ctypes.c_uint32) -> None: """ Pushes data to a uniform slot on the command buffer. """
[docs] def SDL_BeginGPURenderPass(command_buffer: LP_SDL_GPUCommandBuffer, color_target_infos: LP_SDL_GPUColorTargetInfo, num_color_targets: ctypes.c_uint32, depth_stencil_target_info: LP_SDL_GPUDepthStencilTargetInfo) -> LP_SDL_GPURenderPass: """ Begins a render pass on a command buffer. """
[docs] def SDL_BindGPUGraphicsPipeline(render_pass: LP_SDL_GPURenderPass, graphics_pipeline: LP_SDL_GPUGraphicsPipeline) -> None: """ Binds a graphics pipeline on a render pass to be used in rendering. """
[docs] def SDL_SetGPUViewport(render_pass: LP_SDL_GPURenderPass, viewport: LP_SDL_GPUViewport) -> None: """ Sets the current viewport state on a command buffer. """
[docs] def SDL_SetGPUScissor(render_pass: LP_SDL_GPURenderPass, scissor: LP_SDL_Rect) -> None: """ Sets the current scissor state on a command buffer. """
[docs] def SDL_SetGPUBlendConstants(render_pass: LP_SDL_GPURenderPass, blend_constants: SDL_FColor) -> None: """ Sets the current blend constants on a command buffer. """
[docs] def SDL_SetGPUStencilReference(render_pass: LP_SDL_GPURenderPass, reference: ctypes.c_uint8) -> None: """ Sets the current stencil reference value on a command buffer. """
[docs] def SDL_BindGPUVertexBuffers(render_pass: LP_SDL_GPURenderPass, first_slot: ctypes.c_uint32, bindings: LP_SDL_GPUBufferBinding, num_bindings: ctypes.c_uint32) -> None: """ Binds vertex buffers on a command buffer for use with subsequent draw calls. """
[docs] def SDL_BindGPUIndexBuffer(render_pass: LP_SDL_GPURenderPass, binding: LP_SDL_GPUBufferBinding, index_element_size: SDL_GPUIndexElementSize) -> None: """ Binds an index buffer on a command buffer for use with subsequent draw calls. """
[docs] def SDL_BindGPUVertexSamplers(render_pass: LP_SDL_GPURenderPass, first_slot: ctypes.c_uint32, texture_sampler_bindings: LP_SDL_GPUTextureSamplerBinding, num_bindings: ctypes.c_uint32) -> None: """ Binds texture-sampler pairs for use on the vertex shader. """
[docs] def SDL_BindGPUVertexStorageTextures(render_pass: LP_SDL_GPURenderPass, first_slot: ctypes.c_uint32, storage_textures: LP_LP_SDL_GPUTexture, num_bindings: ctypes.c_uint32) -> None: """ Binds storage textures for use on the vertex shader. """
[docs] def SDL_BindGPUVertexStorageBuffers(render_pass: LP_SDL_GPURenderPass, first_slot: ctypes.c_uint32, storage_buffers: LP_LP_SDL_GPUBuffer, num_bindings: ctypes.c_uint32) -> None: """ Binds storage buffers for use on the vertex shader. """
[docs] def SDL_BindGPUFragmentSamplers(render_pass: LP_SDL_GPURenderPass, first_slot: ctypes.c_uint32, texture_sampler_bindings: LP_SDL_GPUTextureSamplerBinding, num_bindings: ctypes.c_uint32) -> None: """ Binds texture-sampler pairs for use on the fragment shader. """
[docs] def SDL_BindGPUFragmentStorageTextures(render_pass: LP_SDL_GPURenderPass, first_slot: ctypes.c_uint32, storage_textures: LP_LP_SDL_GPUTexture, num_bindings: ctypes.c_uint32) -> None: """ Binds storage textures for use on the fragment shader. """
[docs] def SDL_BindGPUFragmentStorageBuffers(render_pass: LP_SDL_GPURenderPass, first_slot: ctypes.c_uint32, storage_buffers: LP_LP_SDL_GPUBuffer, num_bindings: ctypes.c_uint32) -> None: """ Binds storage buffers for use on the fragment shader. """
[docs] def SDL_DrawGPUIndexedPrimitives(render_pass: LP_SDL_GPURenderPass, num_indices: ctypes.c_uint32, num_instances: ctypes.c_uint32, first_index: ctypes.c_uint32, vertex_offset: ctypes.c_int32, first_instance: ctypes.c_uint32) -> None: """ Draws data using bound graphics state with an index buffer and instancing enabled. """
[docs] def SDL_DrawGPUPrimitives(render_pass: LP_SDL_GPURenderPass, num_vertices: ctypes.c_uint32, num_instances: ctypes.c_uint32, first_vertex: ctypes.c_uint32, first_instance: ctypes.c_uint32) -> None: """ Draws data using bound graphics state. """
[docs] def SDL_DrawGPUPrimitivesIndirect(render_pass: LP_SDL_GPURenderPass, buffer: LP_SDL_GPUBuffer, offset: ctypes.c_uint32, draw_count: ctypes.c_uint32) -> None: """ Draws data using bound graphics state and with draw parameters set from a buffer. """
[docs] def SDL_DrawGPUIndexedPrimitivesIndirect(render_pass: LP_SDL_GPURenderPass, buffer: LP_SDL_GPUBuffer, offset: ctypes.c_uint32, draw_count: ctypes.c_uint32) -> None: """ Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer. """
[docs] def SDL_EndGPURenderPass(render_pass: LP_SDL_GPURenderPass) -> None: """ Ends the given render pass. """
[docs] def SDL_BeginGPUComputePass(command_buffer: LP_SDL_GPUCommandBuffer, storage_texture_bindings: LP_SDL_GPUStorageTextureReadWriteBinding, num_storage_texture_bindings: ctypes.c_uint32, storage_buffer_bindings: LP_SDL_GPUStorageBufferReadWriteBinding, num_storage_buffer_bindings: ctypes.c_uint32) -> LP_SDL_GPUComputePass: """ Begins a compute pass on a command buffer. """
[docs] def SDL_BindGPUComputePipeline(compute_pass: LP_SDL_GPUComputePass, compute_pipeline: LP_SDL_GPUComputePipeline) -> None: """ Binds a compute pipeline on a command buffer for use in compute dispatch. """
[docs] def SDL_BindGPUComputeSamplers(compute_pass: LP_SDL_GPUComputePass, first_slot: ctypes.c_uint32, texture_sampler_bindings: LP_SDL_GPUTextureSamplerBinding, num_bindings: ctypes.c_uint32) -> None: """ Binds texture-sampler pairs for use on the compute shader. """
[docs] def SDL_BindGPUComputeStorageTextures(compute_pass: LP_SDL_GPUComputePass, first_slot: ctypes.c_uint32, storage_textures: LP_LP_SDL_GPUTexture, num_bindings: ctypes.c_uint32) -> None: """ Binds storage textures as readonly for use on the compute pipeline. """
[docs] def SDL_BindGPUComputeStorageBuffers(compute_pass: LP_SDL_GPUComputePass, first_slot: ctypes.c_uint32, storage_buffers: LP_LP_SDL_GPUBuffer, num_bindings: ctypes.c_uint32) -> None: """ Binds storage buffers as readonly for use on the compute pipeline. """
[docs] def SDL_DispatchGPUCompute(compute_pass: LP_SDL_GPUComputePass, groupcount_x: ctypes.c_uint32, groupcount_y: ctypes.c_uint32, groupcount_z: ctypes.c_uint32) -> None: """ Dispatches compute work. """
[docs] def SDL_DispatchGPUComputeIndirect(compute_pass: LP_SDL_GPUComputePass, buffer: LP_SDL_GPUBuffer, offset: ctypes.c_uint32) -> None: """ Dispatches compute work with parameters set from a buffer. """
[docs] def SDL_EndGPUComputePass(compute_pass: LP_SDL_GPUComputePass) -> None: """ Ends the current compute pass. """
[docs] def SDL_MapGPUTransferBuffer(device: LP_SDL_GPUDevice, transfer_buffer: LP_SDL_GPUTransferBuffer, cycle: ctypes.c_bool) -> ctypes.c_void_p: """ Maps a transfer buffer into application address space. """
[docs] def SDL_UnmapGPUTransferBuffer(device: LP_SDL_GPUDevice, transfer_buffer: LP_SDL_GPUTransferBuffer) -> None: """ Unmaps a previously mapped transfer buffer. """
[docs] def SDL_BeginGPUCopyPass(command_buffer: LP_SDL_GPUCommandBuffer) -> LP_SDL_GPUCopyPass: """ Begins a copy pass on a command buffer. """
[docs] def SDL_UploadToGPUTexture(copy_pass: LP_SDL_GPUCopyPass, source: LP_SDL_GPUTextureTransferInfo, destination: LP_SDL_GPUTextureRegion, cycle: ctypes.c_bool) -> None: """ Uploads data from a transfer buffer to a texture. """
[docs] def SDL_UploadToGPUBuffer(copy_pass: LP_SDL_GPUCopyPass, source: LP_SDL_GPUTransferBufferLocation, destination: LP_SDL_GPUBufferRegion, cycle: ctypes.c_bool) -> None: """ Uploads data from a transfer buffer to a buffer. """
[docs] def SDL_CopyGPUTextureToTexture(copy_pass: LP_SDL_GPUCopyPass, source: LP_SDL_GPUTextureLocation, destination: LP_SDL_GPUTextureLocation, w: ctypes.c_uint32, h: ctypes.c_uint32, d: ctypes.c_uint32, cycle: ctypes.c_bool) -> None: """ Performs a texture-to-texture copy. """
[docs] def SDL_CopyGPUBufferToBuffer(copy_pass: LP_SDL_GPUCopyPass, source: LP_SDL_GPUBufferLocation, destination: LP_SDL_GPUBufferLocation, size: ctypes.c_uint32, cycle: ctypes.c_bool) -> None: """ Performs a buffer-to-buffer copy. """
[docs] def SDL_DownloadFromGPUTexture(copy_pass: LP_SDL_GPUCopyPass, source: LP_SDL_GPUTextureRegion, destination: LP_SDL_GPUTextureTransferInfo) -> None: """ Copies data from a texture to a transfer buffer on the GPU timeline. """
[docs] def SDL_DownloadFromGPUBuffer(copy_pass: LP_SDL_GPUCopyPass, source: LP_SDL_GPUBufferRegion, destination: LP_SDL_GPUTransferBufferLocation) -> None: """ Copies data from a buffer to a transfer buffer on the GPU timeline. """
[docs] def SDL_EndGPUCopyPass(copy_pass: LP_SDL_GPUCopyPass) -> None: """ Ends the current copy pass. """
[docs] def SDL_GenerateMipmapsForGPUTexture(command_buffer: LP_SDL_GPUCommandBuffer, texture: LP_SDL_GPUTexture) -> None: """ Generates mipmaps for the given texture. """
[docs] def SDL_BlitGPUTexture(command_buffer: LP_SDL_GPUCommandBuffer, info: LP_SDL_GPUBlitInfo) -> None: """ Blits from a source texture region to a destination texture region. """
[docs] def SDL_WindowSupportsGPUSwapchainComposition(device: LP_SDL_GPUDevice, window: LP_SDL_Window, swapchain_composition: SDL_GPUSwapchainComposition) -> ctypes.c_bool: """ Determines whether a swapchain composition is supported by the window. """
[docs] def SDL_WindowSupportsGPUPresentMode(device: LP_SDL_GPUDevice, window: LP_SDL_Window, present_mode: SDL_GPUPresentMode) -> ctypes.c_bool: """ Determines whether a presentation mode is supported by the window. """
[docs] def SDL_ClaimWindowForGPUDevice(device: LP_SDL_GPUDevice, window: LP_SDL_Window) -> ctypes.c_bool: """ Claims a window, creating a swapchain structure for it. """
[docs] def SDL_ReleaseWindowFromGPUDevice(device: LP_SDL_GPUDevice, window: LP_SDL_Window) -> None: """ Unclaims a window, destroying its swapchain structure. """
[docs] def SDL_SetGPUSwapchainParameters(device: LP_SDL_GPUDevice, window: LP_SDL_Window, swapchain_composition: SDL_GPUSwapchainComposition, present_mode: SDL_GPUPresentMode) -> ctypes.c_bool: """ Changes the swapchain parameters for the given claimed window. """
[docs] def SDL_SetGPUAllowedFramesInFlight(device: LP_SDL_GPUDevice, allowed_frames_in_flight: ctypes.c_uint32) -> ctypes.c_bool: """ Configures the maximum allowed number of frames in flight. """
[docs] def SDL_GetGPUSwapchainTextureFormat(device: LP_SDL_GPUDevice, window: LP_SDL_Window) -> SDL_GPUTextureFormat: """ Obtains the texture format of the swapchain for the given window. """
[docs] def SDL_AcquireGPUSwapchainTexture(command_buffer: LP_SDL_GPUCommandBuffer, window: LP_SDL_Window, swapchain_texture: LP_LP_SDL_GPUTexture, swapchain_texture_width: LP_c_uint32, swapchain_texture_height: LP_c_uint32) -> ctypes.c_bool: """ Acquire a texture to use in presentation. """
[docs] def SDL_WaitForGPUSwapchain(device: LP_SDL_GPUDevice, window: LP_SDL_Window) -> ctypes.c_bool: """ Blocks the thread until a swapchain texture is available to be acquired. """
[docs] def SDL_WaitAndAcquireGPUSwapchainTexture(command_buffer: LP_SDL_GPUCommandBuffer, window: LP_SDL_Window, swapchain_texture: LP_LP_SDL_GPUTexture, swapchain_texture_width: LP_c_uint32, swapchain_texture_height: LP_c_uint32) -> ctypes.c_bool: """ Blocks the thread until a swapchain texture is available to be acquired, and then acquires it. """
[docs] def SDL_SubmitGPUCommandBuffer(command_buffer: LP_SDL_GPUCommandBuffer) -> ctypes.c_bool: """ Submits a command buffer so its commands can be processed on the GPU. """
[docs] def SDL_SubmitGPUCommandBufferAndAcquireFence(command_buffer: LP_SDL_GPUCommandBuffer) -> LP_SDL_GPUFence: """ Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated with the command buffer. """
[docs] def SDL_CancelGPUCommandBuffer(command_buffer: LP_SDL_GPUCommandBuffer) -> ctypes.c_bool: """ Cancels a command buffer. """
[docs] def SDL_WaitForGPUIdle(device: LP_SDL_GPUDevice) -> ctypes.c_bool: """ Blocks the thread until the GPU is completely idle. """
[docs] def SDL_WaitForGPUFences(device: LP_SDL_GPUDevice, wait_all: ctypes.c_bool, fences: LP_LP_SDL_GPUFence, num_fences: ctypes.c_uint32) -> ctypes.c_bool: """ Blocks the thread until the given fences are signaled. """
[docs] def SDL_QueryGPUFence(device: LP_SDL_GPUDevice, fence: LP_SDL_GPUFence) -> ctypes.c_bool: """ Checks the status of a fence. """
[docs] def SDL_ReleaseGPUFence(device: LP_SDL_GPUDevice, fence: LP_SDL_GPUFence) -> None: """ Releases a fence obtained from SDL_SubmitGPUCommandBufferAndAcquireFence. """
[docs] def SDL_GPUTextureFormatTexelBlockSize(format: SDL_GPUTextureFormat) -> ctypes.c_uint32: """ Obtains the texel block size for a texture format. """
[docs] def SDL_GPUTextureSupportsFormat(device: LP_SDL_GPUDevice, format: SDL_GPUTextureFormat, type: SDL_GPUTextureType, usage: SDL_GPUTextureUsageFlags) -> ctypes.c_bool: """ Determines whether a texture format is supported for a given type and usage. """
[docs] def SDL_GPUTextureSupportsSampleCount(device: LP_SDL_GPUDevice, format: SDL_GPUTextureFormat, sample_count: SDL_GPUSampleCount) -> ctypes.c_bool: """ Determines if a sample count for a texture format is supported. """
[docs] def SDL_CalculateGPUTextureFormatSize(format: SDL_GPUTextureFormat, width: ctypes.c_uint32, height: ctypes.c_uint32, depth_or_layer_count: ctypes.c_uint32) -> ctypes.c_uint32: """ Calculate the size in bytes of a texture format with dimensions. """
[docs] def SDL_GetPixelFormatFromGPUTextureFormat(format: SDL_GPUTextureFormat) -> SDL_PixelFormat: """ Get the SDL pixel format corresponding to a GPU texture format. """
[docs] def SDL_GetGPUTextureFormatFromPixelFormat(format: SDL_PixelFormat) -> SDL_GPUTextureFormat: """ Get the GPU texture format corresponding to an SDL pixel format. """
[docs] def SDL_GetHaptics(count: LP_c_int) -> LP_SDL_HapticID: """ Get a list of currently connected haptic devices. """
[docs] def SDL_GetHapticNameForID(instance_id: SDL_HapticID) -> ctypes.c_char_p: """ Get the implementation dependent name of a haptic device. """
[docs] def SDL_OpenHaptic(instance_id: SDL_HapticID) -> LP_SDL_Haptic: """ Open a haptic device for use. """
[docs] def SDL_GetHapticFromID(instance_id: SDL_HapticID) -> LP_SDL_Haptic: """ Get the SDL_Haptic associated with an instance ID, if it has been opened. """
[docs] def SDL_GetHapticID(haptic: LP_SDL_Haptic) -> SDL_HapticID: """ Get the instance ID of an opened haptic device. """
[docs] def SDL_GetHapticName(haptic: LP_SDL_Haptic) -> ctypes.c_char_p: """ Get the implementation dependent name of a haptic device. """
[docs] def SDL_IsMouseHaptic() -> ctypes.c_bool: """ Query whether or not the current mouse has haptic capabilities. """
[docs] def SDL_OpenHapticFromMouse() -> LP_SDL_Haptic: """ Try to open a haptic device from the current mouse. """
[docs] def SDL_IsJoystickHaptic(joystick: LP_SDL_Joystick) -> ctypes.c_bool: """ Query if a joystick has haptic features. """
[docs] def SDL_OpenHapticFromJoystick(joystick: LP_SDL_Joystick) -> LP_SDL_Haptic: """ Open a haptic device for use from a joystick device. """
[docs] def SDL_CloseHaptic(haptic: LP_SDL_Haptic) -> None: """ Close a haptic device previously opened with SDL_OpenHaptic(). """
[docs] def SDL_GetMaxHapticEffects(haptic: LP_SDL_Haptic) -> ctypes.c_int: """ Get the number of effects a haptic device can store. """
[docs] def SDL_GetMaxHapticEffectsPlaying(haptic: LP_SDL_Haptic) -> ctypes.c_int: """ Get the number of effects a haptic device can play at the same time. """
[docs] def SDL_GetHapticFeatures(haptic: LP_SDL_Haptic) -> ctypes.c_uint32: """ Get the haptic device's supported features in bitwise manner. """
[docs] def SDL_GetNumHapticAxes(haptic: LP_SDL_Haptic) -> ctypes.c_int: """ Get the number of haptic axes the device has. """
[docs] def SDL_HapticEffectSupported(haptic: LP_SDL_Haptic, effect: LP_SDL_HapticEffect) -> ctypes.c_bool: """ Check to see if an effect is supported by a haptic device. """
[docs] def SDL_CreateHapticEffect(haptic: LP_SDL_Haptic, effect: LP_SDL_HapticEffect) -> SDL_HapticEffectID: """ Create a new haptic effect on a specified device. """
[docs] def SDL_UpdateHapticEffect(haptic: LP_SDL_Haptic, effect: SDL_HapticEffectID, data: LP_SDL_HapticEffect) -> ctypes.c_bool: """ Update the properties of an effect. """
[docs] def SDL_RunHapticEffect(haptic: LP_SDL_Haptic, effect: SDL_HapticEffectID, iterations: ctypes.c_uint32) -> ctypes.c_bool: """ Run the haptic effect on its associated haptic device. """
[docs] def SDL_StopHapticEffect(haptic: LP_SDL_Haptic, effect: SDL_HapticEffectID) -> ctypes.c_bool: """ Stop the haptic effect on its associated haptic device. """
[docs] def SDL_DestroyHapticEffect(haptic: LP_SDL_Haptic, effect: SDL_HapticEffectID) -> None: """ Destroy a haptic effect on the device. """
[docs] def SDL_GetHapticEffectStatus(haptic: LP_SDL_Haptic, effect: SDL_HapticEffectID) -> ctypes.c_bool: """ Get the status of the current effect on the specified haptic device. """
[docs] def SDL_SetHapticGain(haptic: LP_SDL_Haptic, gain: ctypes.c_int) -> ctypes.c_bool: """ Set the global gain of the specified haptic device. """
[docs] def SDL_SetHapticAutocenter(haptic: LP_SDL_Haptic, autocenter: ctypes.c_int) -> ctypes.c_bool: """ Set the global autocenter of the device. """
[docs] def SDL_PauseHaptic(haptic: LP_SDL_Haptic) -> ctypes.c_bool: """ Pause a haptic device. """
[docs] def SDL_ResumeHaptic(haptic: LP_SDL_Haptic) -> ctypes.c_bool: """ Resume a haptic device. """
[docs] def SDL_StopHapticEffects(haptic: LP_SDL_Haptic) -> ctypes.c_bool: """ Stop all the currently playing effects on a haptic device. """
[docs] def SDL_HapticRumbleSupported(haptic: LP_SDL_Haptic) -> ctypes.c_bool: """ Check whether rumble is supported on a haptic device. """
[docs] def SDL_InitHapticRumble(haptic: LP_SDL_Haptic) -> ctypes.c_bool: """ Initialize a haptic device for simple rumble playback. """
[docs] def SDL_PlayHapticRumble(haptic: LP_SDL_Haptic, strength: ctypes.c_float, length: ctypes.c_uint32) -> ctypes.c_bool: """ Run a simple rumble effect on a haptic device. """
[docs] def SDL_StopHapticRumble(haptic: LP_SDL_Haptic) -> ctypes.c_bool: """ Stop the simple rumble on a haptic device. """
[docs] def SDL_hid_init() -> ctypes.c_int: """ Initialize the HIDAPI library. """
[docs] def SDL_hid_exit() -> ctypes.c_int: """ Finalize the HIDAPI library. """
[docs] def SDL_hid_device_change_count() -> ctypes.c_uint32: """ Check to see if devices may have been added or removed. """
[docs] def SDL_hid_enumerate(vendor_id: ctypes.c_ushort, product_id: ctypes.c_ushort) -> LP_SDL_hid_device_info: """ Enumerate the HID Devices. """
[docs] def SDL_hid_free_enumeration(devs: LP_SDL_hid_device_info) -> None: """ Free an enumeration linked list. """
[docs] def SDL_hid_open(vendor_id: ctypes.c_ushort, product_id: ctypes.c_ushort, serial_number: ctypes.c_wchar_p) -> LP_SDL_hid_device: """ Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number. """
[docs] def SDL_hid_open_path(path: ctypes.c_char_p) -> LP_SDL_hid_device: """ Open a HID device by its path name. """
[docs] def SDL_hid_get_properties(dev: LP_SDL_hid_device) -> SDL_PropertiesID: """ Get the properties associated with an SDL_hid_device. """
[docs] def SDL_hid_write(dev: LP_SDL_hid_device, data: LP_c_ubyte, length: ctypes.c_size_t) -> ctypes.c_int: """ Write an Output report to a HID device. """
[docs] def SDL_hid_read_timeout(dev: LP_SDL_hid_device, data: LP_c_ubyte, length: ctypes.c_size_t, milliseconds: ctypes.c_int) -> ctypes.c_int: """ Read an Input report from a HID device with timeout. """
[docs] def SDL_hid_read(dev: LP_SDL_hid_device, data: LP_c_ubyte, length: ctypes.c_size_t) -> ctypes.c_int: """ Read an Input report from a HID device. """
[docs] def SDL_hid_set_nonblocking(dev: LP_SDL_hid_device, nonblock: ctypes.c_int) -> ctypes.c_int: """ Set the device handle to be non-blocking. """
[docs] def SDL_hid_send_feature_report(dev: LP_SDL_hid_device, data: LP_c_ubyte, length: ctypes.c_size_t) -> ctypes.c_int: """ Send a Feature report to the device. """
[docs] def SDL_hid_get_feature_report(dev: LP_SDL_hid_device, data: LP_c_ubyte, length: ctypes.c_size_t) -> ctypes.c_int: """ Get a feature report from a HID device. """
[docs] def SDL_hid_get_input_report(dev: LP_SDL_hid_device, data: LP_c_ubyte, length: ctypes.c_size_t) -> ctypes.c_int: """ Get an input report from a HID device. """
[docs] def SDL_hid_close(dev: LP_SDL_hid_device) -> ctypes.c_int: """ Close a HID device. """
[docs] def SDL_hid_get_manufacturer_string(dev: LP_SDL_hid_device, string: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_int: """ Get The Manufacturer String from a HID device. """
[docs] def SDL_hid_get_product_string(dev: LP_SDL_hid_device, string: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_int: """ Get The Product String from a HID device. """
[docs] def SDL_hid_get_serial_number_string(dev: LP_SDL_hid_device, string: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_int: """ Get The Serial Number String from a HID device. """
[docs] def SDL_hid_get_indexed_string(dev: LP_SDL_hid_device, string_index: ctypes.c_int, string: ctypes.c_wchar_p, maxlen: ctypes.c_size_t) -> ctypes.c_int: """ Get a string from a HID device, based on its string index. """
[docs] def SDL_hid_get_device_info(dev: LP_SDL_hid_device) -> LP_SDL_hid_device_info: """ Get the device info from a HID device. """
[docs] def SDL_hid_get_report_descriptor(dev: LP_SDL_hid_device, buf: LP_c_ubyte, buf_size: ctypes.c_size_t) -> ctypes.c_int: """ Get a report descriptor from a HID device. """
[docs] def SDL_hid_ble_scan(active: ctypes.c_bool) -> None: """ Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers. """
[docs] def SDL_SetHintWithPriority(name: ctypes.c_char_p, value: ctypes.c_char_p, priority: SDL_HintPriority) -> ctypes.c_bool: """ Set a hint with a specific priority. """
[docs] def SDL_SetHint(name: ctypes.c_char_p, value: ctypes.c_char_p) -> ctypes.c_bool: """ Set a hint with normal priority. """
[docs] def SDL_ResetHint(name: ctypes.c_char_p) -> ctypes.c_bool: """ Reset a hint to the default value. """
[docs] def SDL_ResetHints() -> None: """ Reset all hints to the default values. """
[docs] def SDL_GetHint(name: ctypes.c_char_p) -> ctypes.c_char_p: """ Get the value of a hint. """
[docs] def SDL_GetHintBoolean(name: ctypes.c_char_p, default_value: ctypes.c_bool) -> ctypes.c_bool: """ Get the boolean value of a hint variable. """
[docs] def SDL_AddHintCallback(name: ctypes.c_char_p, callback: SDL_HintCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Add a function to watch a particular hint. """
[docs] def SDL_RemoveHintCallback(name: ctypes.c_char_p, callback: SDL_HintCallback, userdata: ctypes.c_void_p) -> None: """ Remove a function watching a particular hint. """
[docs] def SDL_GetNumRenderDrivers() -> ctypes.c_int: """ Get the number of 2D rendering drivers available for the current display. """
[docs] def SDL_GetRenderDriver(index: ctypes.c_int) -> ctypes.c_char_p: """ Use this function to get the name of a built in 2D rendering driver. """
[docs] def SDL_CreateWindowAndRenderer(title: ctypes.c_char_p, width: ctypes.c_int, height: ctypes.c_int, window_flags: SDL_WindowFlags, window: LP_LP_SDL_Window, renderer: LP_LP_SDL_Renderer) -> ctypes.c_bool: """ Create a window and default renderer. """
[docs] def SDL_CreateRenderer(window: LP_SDL_Window, name: ctypes.c_char_p) -> LP_SDL_Renderer: """ Create a 2D rendering context for a window. """
[docs] def SDL_CreateRendererWithProperties(props: SDL_PropertiesID) -> LP_SDL_Renderer: """ Create a 2D rendering context for a window, with the specified properties. """
[docs] def SDL_CreateGPURenderer(device: LP_SDL_GPUDevice, window: LP_SDL_Window) -> LP_SDL_Renderer: """ Create a 2D GPU rendering context. """
[docs] def SDL_GetGPURendererDevice(renderer: LP_SDL_Renderer) -> LP_SDL_GPUDevice: """ Return the GPU device used by a renderer. """
[docs] def SDL_CreateSoftwareRenderer(surface: LP_SDL_Surface) -> LP_SDL_Renderer: """ Create a 2D software rendering context for a surface. """
[docs] def SDL_GetRenderer(window: LP_SDL_Window) -> LP_SDL_Renderer: """ Get the renderer associated with a window. """
[docs] def SDL_GetRenderWindow(renderer: LP_SDL_Renderer) -> LP_SDL_Window: """ Get the window associated with a renderer. """
[docs] def SDL_GetRendererName(renderer: LP_SDL_Renderer) -> ctypes.c_char_p: """ Get the name of a renderer. """
[docs] def SDL_GetRendererProperties(renderer: LP_SDL_Renderer) -> SDL_PropertiesID: """ Get the properties associated with a renderer. """
[docs] def SDL_GetRenderOutputSize(renderer: LP_SDL_Renderer, w: LP_c_int, h: LP_c_int) -> ctypes.c_bool: """ Get the output size in pixels of a rendering context. """
[docs] def SDL_GetCurrentRenderOutputSize(renderer: LP_SDL_Renderer, w: LP_c_int, h: LP_c_int) -> ctypes.c_bool: """ Get the current output size in pixels of a rendering context. """
[docs] def SDL_CreateTexture(renderer: LP_SDL_Renderer, format: SDL_PixelFormat, access: SDL_TextureAccess, w: ctypes.c_int, h: ctypes.c_int) -> LP_SDL_Texture: """ Create a texture for a rendering context. """
[docs] def SDL_CreateTextureFromSurface(renderer: LP_SDL_Renderer, surface: LP_SDL_Surface) -> LP_SDL_Texture: """ Create a texture from an existing surface. """
[docs] def SDL_CreateTextureWithProperties(renderer: LP_SDL_Renderer, props: SDL_PropertiesID) -> LP_SDL_Texture: """ Create a texture for a rendering context with the specified properties. """
[docs] def SDL_GetTextureProperties(texture: LP_SDL_Texture) -> SDL_PropertiesID: """ Get the properties associated with a texture. """
[docs] def SDL_GetRendererFromTexture(texture: LP_SDL_Texture) -> LP_SDL_Renderer: """ Get the renderer that created an SDL_Texture. """
[docs] def SDL_GetTextureSize(texture: LP_SDL_Texture, w: LP_c_float, h: LP_c_float) -> ctypes.c_bool: """ Get the size of a texture, as floating point values. """
[docs] def SDL_SetTexturePalette(texture: LP_SDL_Texture, palette: LP_SDL_Palette) -> ctypes.c_bool: """ Set the palette used by a texture. """
[docs] def SDL_GetTexturePalette(texture: LP_SDL_Texture) -> LP_SDL_Palette: """ Get the palette used by a texture. """
[docs] def SDL_SetTextureColorMod(texture: LP_SDL_Texture, r: ctypes.c_uint8, g: ctypes.c_uint8, b: ctypes.c_uint8) -> ctypes.c_bool: """ Set an additional color value multiplied into render copy operations. """
[docs] def SDL_SetTextureColorModFloat(texture: LP_SDL_Texture, r: ctypes.c_float, g: ctypes.c_float, b: ctypes.c_float) -> ctypes.c_bool: """ Set an additional color value multiplied into render copy operations. """
[docs] def SDL_GetTextureColorMod(texture: LP_SDL_Texture, r: LP_c_uint8, g: LP_c_uint8, b: LP_c_uint8) -> ctypes.c_bool: """ Get the additional color value multiplied into render copy operations. """
[docs] def SDL_GetTextureColorModFloat(texture: LP_SDL_Texture, r: LP_c_float, g: LP_c_float, b: LP_c_float) -> ctypes.c_bool: """ Get the additional color value multiplied into render copy operations. """
[docs] def SDL_SetTextureAlphaMod(texture: LP_SDL_Texture, alpha: ctypes.c_uint8) -> ctypes.c_bool: """ Set an additional alpha value multiplied into render copy operations. """
[docs] def SDL_SetTextureAlphaModFloat(texture: LP_SDL_Texture, alpha: ctypes.c_float) -> ctypes.c_bool: """ Set an additional alpha value multiplied into render copy operations. """
[docs] def SDL_GetTextureAlphaMod(texture: LP_SDL_Texture, alpha: LP_c_uint8) -> ctypes.c_bool: """ Get the additional alpha value multiplied into render copy operations. """
[docs] def SDL_GetTextureAlphaModFloat(texture: LP_SDL_Texture, alpha: LP_c_float) -> ctypes.c_bool: """ Get the additional alpha value multiplied into render copy operations. """
[docs] def SDL_SetTextureBlendMode(texture: LP_SDL_Texture, blendMode: SDL_BlendMode) -> ctypes.c_bool: """ Set the blend mode for a texture, used by SDL_RenderTexture(). """
[docs] def SDL_GetTextureBlendMode(texture: LP_SDL_Texture, blendMode: LP_SDL_BlendMode) -> ctypes.c_bool: """ Get the blend mode used for texture copy operations. """
[docs] def SDL_SetTextureScaleMode(texture: LP_SDL_Texture, scaleMode: SDL_ScaleMode) -> ctypes.c_bool: """ Set the scale mode used for texture scale operations. """
[docs] def SDL_GetTextureScaleMode(texture: LP_SDL_Texture, scaleMode: LP_SDL_ScaleMode) -> ctypes.c_bool: """ Get the scale mode used for texture scale operations. """
[docs] def SDL_UpdateTexture(texture: LP_SDL_Texture, rect: LP_SDL_Rect, pixels: ctypes.c_void_p, pitch: ctypes.c_int) -> ctypes.c_bool: """ Update the given texture rectangle with new pixel data. """
[docs] def SDL_UpdateYUVTexture(texture: LP_SDL_Texture, rect: LP_SDL_Rect, Yplane: LP_c_uint8, Ypitch: ctypes.c_int, Uplane: LP_c_uint8, Upitch: ctypes.c_int, Vplane: LP_c_uint8, Vpitch: ctypes.c_int) -> ctypes.c_bool: """ Update a rectangle within a planar YV12 or IYUV texture with new pixel data. """
[docs] def SDL_UpdateNVTexture(texture: LP_SDL_Texture, rect: LP_SDL_Rect, Yplane: LP_c_uint8, Ypitch: ctypes.c_int, UVplane: LP_c_uint8, UVpitch: ctypes.c_int) -> ctypes.c_bool: """ Update a rectangle within a planar NV12 or NV21 texture with new pixels. """
[docs] def SDL_LockTexture(texture: LP_SDL_Texture, rect: LP_SDL_Rect, pixels: LP_c_void_p, pitch: LP_c_int) -> ctypes.c_bool: """ Lock a portion of the texture for write-only pixel access. """
[docs] def SDL_LockTextureToSurface(texture: LP_SDL_Texture, rect: LP_SDL_Rect, surface: LP_LP_SDL_Surface) -> ctypes.c_bool: """ Lock a portion of the texture for write-only pixel access, and expose it as a SDL surface. """
[docs] def SDL_UnlockTexture(texture: LP_SDL_Texture) -> None: """ Unlock a texture, uploading the changes to video memory, if needed. """
[docs] def SDL_SetRenderTarget(renderer: LP_SDL_Renderer, texture: LP_SDL_Texture) -> ctypes.c_bool: """ Set a texture as the current rendering target. """
[docs] def SDL_GetRenderTarget(renderer: LP_SDL_Renderer) -> LP_SDL_Texture: """ Get the current render target. """
[docs] def SDL_SetRenderLogicalPresentation(renderer: LP_SDL_Renderer, w: ctypes.c_int, h: ctypes.c_int, mode: SDL_RendererLogicalPresentation) -> ctypes.c_bool: """ Set a device-independent resolution and presentation mode for rendering. """
[docs] def SDL_GetRenderLogicalPresentation(renderer: LP_SDL_Renderer, w: LP_c_int, h: LP_c_int, mode: LP_SDL_RendererLogicalPresentation) -> ctypes.c_bool: """ Get device independent resolution and presentation mode for rendering. """
[docs] def SDL_GetRenderLogicalPresentationRect(renderer: LP_SDL_Renderer, rect: LP_SDL_FRect) -> ctypes.c_bool: """ Get the final presentation rectangle for rendering. """
[docs] def SDL_RenderCoordinatesFromWindow(renderer: LP_SDL_Renderer, window_x: ctypes.c_float, window_y: ctypes.c_float, x: LP_c_float, y: LP_c_float) -> ctypes.c_bool: """ Get a point in render coordinates when given a point in window coordinates. """
[docs] def SDL_RenderCoordinatesToWindow(renderer: LP_SDL_Renderer, x: ctypes.c_float, y: ctypes.c_float, window_x: LP_c_float, window_y: LP_c_float) -> ctypes.c_bool: """ Get a point in window coordinates when given a point in render coordinates. """
[docs] def SDL_ConvertEventToRenderCoordinates(renderer: LP_SDL_Renderer, event: LP_SDL_Event) -> ctypes.c_bool: """ Convert the coordinates in an event to render coordinates. """
[docs] def SDL_SetRenderViewport(renderer: LP_SDL_Renderer, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Set the drawing area for rendering on the current target. """
[docs] def SDL_GetRenderViewport(renderer: LP_SDL_Renderer, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Get the drawing area for the current target. """
[docs] def SDL_RenderViewportSet(renderer: LP_SDL_Renderer) -> ctypes.c_bool: """ Return whether an explicit rectangle was set as the viewport. """
[docs] def SDL_GetRenderSafeArea(renderer: LP_SDL_Renderer, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Get the safe area for rendering within the current viewport. """
[docs] def SDL_SetRenderClipRect(renderer: LP_SDL_Renderer, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Set the clip rectangle for rendering on the specified target. """
[docs] def SDL_GetRenderClipRect(renderer: LP_SDL_Renderer, rect: LP_SDL_Rect) -> ctypes.c_bool: """ Get the clip rectangle for the current target. """
[docs] def SDL_RenderClipEnabled(renderer: LP_SDL_Renderer) -> ctypes.c_bool: """ Get whether clipping is enabled on the given render target. """
[docs] def SDL_SetRenderScale(renderer: LP_SDL_Renderer, scaleX: ctypes.c_float, scaleY: ctypes.c_float) -> ctypes.c_bool: """ Set the drawing scale for rendering on the current target. """
[docs] def SDL_GetRenderScale(renderer: LP_SDL_Renderer, scaleX: LP_c_float, scaleY: LP_c_float) -> ctypes.c_bool: """ Get the drawing scale for the current target. """
[docs] def SDL_SetRenderDrawColor(renderer: LP_SDL_Renderer, r: ctypes.c_uint8, g: ctypes.c_uint8, b: ctypes.c_uint8, a: ctypes.c_uint8) -> ctypes.c_bool: """ Set the color used for drawing operations. """
[docs] def SDL_SetRenderDrawColorFloat(renderer: LP_SDL_Renderer, r: ctypes.c_float, g: ctypes.c_float, b: ctypes.c_float, a: ctypes.c_float) -> ctypes.c_bool: """ Set the color used for drawing operations (Rect, Line and Clear). """
[docs] def SDL_GetRenderDrawColor(renderer: LP_SDL_Renderer, r: LP_c_uint8, g: LP_c_uint8, b: LP_c_uint8, a: LP_c_uint8) -> ctypes.c_bool: """ Get the color used for drawing operations (Rect, Line and Clear). """
[docs] def SDL_GetRenderDrawColorFloat(renderer: LP_SDL_Renderer, r: LP_c_float, g: LP_c_float, b: LP_c_float, a: LP_c_float) -> ctypes.c_bool: """ Get the color used for drawing operations (Rect, Line and Clear). """
[docs] def SDL_SetRenderColorScale(renderer: LP_SDL_Renderer, scale: ctypes.c_float) -> ctypes.c_bool: """ Set the color scale used for render operations. """
[docs] def SDL_GetRenderColorScale(renderer: LP_SDL_Renderer, scale: LP_c_float) -> ctypes.c_bool: """ Get the color scale used for render operations. """
[docs] def SDL_SetRenderDrawBlendMode(renderer: LP_SDL_Renderer, blendMode: SDL_BlendMode) -> ctypes.c_bool: """ Set the blend mode used for drawing operations (Fill and Line). """
[docs] def SDL_GetRenderDrawBlendMode(renderer: LP_SDL_Renderer, blendMode: LP_SDL_BlendMode) -> ctypes.c_bool: """ Get the blend mode used for drawing operations. """
[docs] def SDL_RenderClear(renderer: LP_SDL_Renderer) -> ctypes.c_bool: """ Clear the current rendering target with the drawing color. """
[docs] def SDL_RenderPoint(renderer: LP_SDL_Renderer, x: ctypes.c_float, y: ctypes.c_float) -> ctypes.c_bool: """ Draw a point on the current rendering target at subpixel precision. """
[docs] def SDL_RenderPoints(renderer: LP_SDL_Renderer, points: LP_SDL_FPoint, count: ctypes.c_int) -> ctypes.c_bool: """ Draw multiple points on the current rendering target at subpixel precision. """
[docs] def SDL_RenderLine(renderer: LP_SDL_Renderer, x1: ctypes.c_float, y1: ctypes.c_float, x2: ctypes.c_float, y2: ctypes.c_float) -> ctypes.c_bool: """ Draw a line on the current rendering target at subpixel precision. """
[docs] def SDL_RenderLines(renderer: LP_SDL_Renderer, points: LP_SDL_FPoint, count: ctypes.c_int) -> ctypes.c_bool: """ Draw a series of connected lines on the current rendering target at subpixel precision. """
[docs] def SDL_RenderRect(renderer: LP_SDL_Renderer, rect: LP_SDL_FRect) -> ctypes.c_bool: """ Draw a rectangle on the current rendering target at subpixel precision. """
[docs] def SDL_RenderRects(renderer: LP_SDL_Renderer, rects: LP_SDL_FRect, count: ctypes.c_int) -> ctypes.c_bool: """ Draw some number of rectangles on the current rendering target at subpixel precision. """
[docs] def SDL_RenderFillRect(renderer: LP_SDL_Renderer, rect: LP_SDL_FRect) -> ctypes.c_bool: """ Fill a rectangle on the current rendering target with the drawing color at subpixel precision. """
[docs] def SDL_RenderFillRects(renderer: LP_SDL_Renderer, rects: LP_SDL_FRect, count: ctypes.c_int) -> ctypes.c_bool: """ Fill some number of rectangles on the current rendering target with the drawing color at subpixel precision. """
[docs] def SDL_RenderTexture(renderer: LP_SDL_Renderer, texture: LP_SDL_Texture, srcrect: LP_SDL_FRect, dstrect: LP_SDL_FRect) -> ctypes.c_bool: """ Copy a portion of the texture to the current rendering target at subpixel precision. """
[docs] def SDL_RenderTextureRotated(renderer: LP_SDL_Renderer, texture: LP_SDL_Texture, srcrect: LP_SDL_FRect, dstrect: LP_SDL_FRect, angle: ctypes.c_double, center: LP_SDL_FPoint, flip: SDL_FlipMode) -> ctypes.c_bool: """ Copy a portion of the source texture to the current rendering target, with rotation and flipping, at subpixel precision. """
[docs] def SDL_RenderTextureAffine(renderer: LP_SDL_Renderer, texture: LP_SDL_Texture, srcrect: LP_SDL_FRect, origin: LP_SDL_FPoint, right: LP_SDL_FPoint, down: LP_SDL_FPoint) -> ctypes.c_bool: """ Copy a portion of the source texture to the current rendering target, with affine transform, at subpixel precision. """
[docs] def SDL_RenderTextureTiled(renderer: LP_SDL_Renderer, texture: LP_SDL_Texture, srcrect: LP_SDL_FRect, scale: ctypes.c_float, dstrect: LP_SDL_FRect) -> ctypes.c_bool: """ Tile a portion of the texture to the current rendering target at subpixel precision. """
[docs] def SDL_RenderTexture9Grid(renderer: LP_SDL_Renderer, texture: LP_SDL_Texture, srcrect: LP_SDL_FRect, left_width: ctypes.c_float, right_width: ctypes.c_float, top_height: ctypes.c_float, bottom_height: ctypes.c_float, scale: ctypes.c_float, dstrect: LP_SDL_FRect) -> ctypes.c_bool: """ Perform a scaled copy using the 9-grid algorithm to the current rendering target at subpixel precision. """
[docs] def SDL_RenderTexture9GridTiled(renderer: LP_SDL_Renderer, texture: LP_SDL_Texture, srcrect: LP_SDL_FRect, left_width: ctypes.c_float, right_width: ctypes.c_float, top_height: ctypes.c_float, bottom_height: ctypes.c_float, scale: ctypes.c_float, dstrect: LP_SDL_FRect, tileScale: ctypes.c_float) -> ctypes.c_bool: """ Perform a scaled copy using the 9-grid algorithm to the current rendering target at subpixel precision. """
[docs] def SDL_RenderGeometry(renderer: LP_SDL_Renderer, texture: LP_SDL_Texture, vertices: LP_SDL_Vertex, num_vertices: ctypes.c_int, indices: LP_c_int, num_indices: ctypes.c_int) -> ctypes.c_bool: """ Render a list of triangles, optionally using a texture and indices into the vertex array. """
[docs] def SDL_RenderGeometryRaw(renderer: LP_SDL_Renderer, texture: LP_SDL_Texture, xy: LP_c_float, xy_stride: ctypes.c_int, color: LP_SDL_FColor, color_stride: ctypes.c_int, uv: LP_c_float, uv_stride: ctypes.c_int, num_vertices: ctypes.c_int, indices: ctypes.c_void_p, num_indices: ctypes.c_int, size_indices: ctypes.c_int) -> ctypes.c_bool: """ Render a list of triangles, optionally using a texture and indices into the vertex arrays. """
[docs] def SDL_SetRenderTextureAddressMode(renderer: LP_SDL_Renderer, u_mode: SDL_TextureAddressMode, v_mode: SDL_TextureAddressMode) -> ctypes.c_bool: """ Set the texture addressing mode used in SDL_RenderGeometry(). """
[docs] def SDL_GetRenderTextureAddressMode(renderer: LP_SDL_Renderer, u_mode: LP_SDL_TextureAddressMode, v_mode: LP_SDL_TextureAddressMode) -> ctypes.c_bool: """ Get the texture addressing mode used in SDL_RenderGeometry(). """
[docs] def SDL_RenderReadPixels(renderer: LP_SDL_Renderer, rect: LP_SDL_Rect) -> LP_SDL_Surface: """ Read pixels from the current rendering target. """
[docs] def SDL_RenderPresent(renderer: LP_SDL_Renderer) -> ctypes.c_bool: """ Update the screen with any rendering performed since the previous call. """
[docs] def SDL_DestroyTexture(texture: LP_SDL_Texture) -> None: """ Destroy the specified texture. """
[docs] def SDL_DestroyRenderer(renderer: LP_SDL_Renderer) -> None: """ Destroy the rendering context for a window and free all associated textures. """
[docs] def SDL_FlushRenderer(renderer: LP_SDL_Renderer) -> ctypes.c_bool: """ Force the rendering context to flush any pending commands and state. """
[docs] def SDL_GetRenderMetalLayer(renderer: LP_SDL_Renderer) -> ctypes.c_void_p: """ Get the CAMetalLayer associated with the given Metal renderer. """
[docs] def SDL_GetRenderMetalCommandEncoder(renderer: LP_SDL_Renderer) -> ctypes.c_void_p: """ Get the Metal command encoder for the current frame. """
[docs] def SDL_AddVulkanRenderSemaphores(renderer: LP_SDL_Renderer, wait_stage_mask: ctypes.c_uint32, wait_semaphore: ctypes.c_int64, signal_semaphore: ctypes.c_int64) -> ctypes.c_bool: """ Add a set of synchronization semaphores for the current frame. """
[docs] def SDL_SetRenderVSync(renderer: LP_SDL_Renderer, vsync: ctypes.c_int) -> ctypes.c_bool: """ Toggle VSync of the given renderer. """
[docs] def SDL_GetRenderVSync(renderer: LP_SDL_Renderer, vsync: LP_c_int) -> ctypes.c_bool: """ Get VSync of the given renderer. """
[docs] def SDL_RenderDebugText(renderer: LP_SDL_Renderer, x: ctypes.c_float, y: ctypes.c_float, str: ctypes.c_char_p) -> ctypes.c_bool: """ Draw debug text to an SDL_Renderer. """
[docs] def SDL_RenderDebugTextFormat(renderer: LP_SDL_Renderer, x: ctypes.c_float, y: ctypes.c_float, fmt: ctypes.c_char_p, *args: typing.Any) -> ctypes.c_bool: """ Draw debug text to an SDL_Renderer. """
[docs] def SDL_SetDefaultTextureScaleMode(renderer: LP_SDL_Renderer, scale_mode: SDL_ScaleMode) -> ctypes.c_bool: """ Set default scale mode for new textures for given renderer. """
[docs] def SDL_GetDefaultTextureScaleMode(renderer: LP_SDL_Renderer, scale_mode: LP_SDL_ScaleMode) -> ctypes.c_bool: """ Get default texture scale mode of the given renderer. """
[docs] def SDL_CreateGPURenderState(renderer: LP_SDL_Renderer, createinfo: LP_SDL_GPURenderStateCreateInfo) -> LP_SDL_GPURenderState: """ Create custom GPU render state. """
[docs] def SDL_SetGPURenderStateFragmentUniforms(state: LP_SDL_GPURenderState, slot_index: ctypes.c_uint32, data: ctypes.c_void_p, length: ctypes.c_uint32) -> ctypes.c_bool: """ Set fragment shader uniform variables in a custom GPU render state. """
[docs] def SDL_SetGPURenderState(renderer: LP_SDL_Renderer, state: LP_SDL_GPURenderState) -> ctypes.c_bool: """ Set custom GPU render state. """
[docs] def SDL_DestroyGPURenderState(state: LP_SDL_GPURenderState) -> None: """ Destroy custom GPU render state. """
[docs] def SDL_GetVersion() -> ctypes.c_int: """ Get the version of SDL that is linked against your program. """
[docs] def SDL_GetRevision() -> ctypes.c_char_p: """ Get the code revision of the SDL library that is linked against your program. """
[docs] def SDL_Init(flags: SDL_InitFlags) -> ctypes.c_bool: """ Initialize the SDL library. """
[docs] def SDL_InitSubSystem(flags: SDL_InitFlags) -> ctypes.c_bool: """ Compatibility function to initialize the SDL library. """
[docs] def SDL_QuitSubSystem(flags: SDL_InitFlags) -> None: """ Shut down specific SDL subsystems. """
[docs] def SDL_WasInit(flags: SDL_InitFlags) -> SDL_InitFlags: """ Get a mask of the specified subsystems which are currently initialized. """
[docs] def SDL_Quit() -> None: """ Clean up all initialized subsystems. """
[docs] def SDL_IsMainThread() -> ctypes.c_bool: """ Return whether this is the main thread. """
[docs] def SDL_RunOnMainThread(callback: SDL_MainThreadCallback, userdata: ctypes.c_void_p, wait_complete: ctypes.c_bool) -> ctypes.c_bool: """ Call a function on the main thread during event processing. """
[docs] def SDL_SetAppMetadata(appname: ctypes.c_char_p, appversion: ctypes.c_char_p, appidentifier: ctypes.c_char_p) -> ctypes.c_bool: """ Specify basic metadata about your app. """
[docs] def SDL_SetAppMetadataProperty(name: ctypes.c_char_p, value: ctypes.c_char_p) -> ctypes.c_bool: """ Specify metadata about your app through a set of properties. """
[docs] def SDL_GetAppMetadataProperty(name: ctypes.c_char_p) -> ctypes.c_char_p: """ Get metadata about your app. """
[docs] def SDL_LoadObject(sofile: ctypes.c_char_p) -> LP_SDL_SharedObject: """ Dynamically load a shared object. """
[docs] def SDL_LoadFunction(handle: LP_SDL_SharedObject, name: ctypes.c_char_p) -> SDL_FunctionPointer: """ Look up the address of the named function in a shared object. """
[docs] def SDL_UnloadObject(handle: LP_SDL_SharedObject) -> None: """ Unload a shared object from memory. """
[docs] def SDL_GetPreferredLocales(count: LP_c_int) -> LP_LP_SDL_Locale: """ Report the user's preferred locale. """
[docs] def SDL_SetLogPriorities(priority: SDL_LogPriority) -> None: """ Set the priority of all log categories. """
[docs] def SDL_SetLogPriority(category: ctypes.c_int, priority: SDL_LogPriority) -> None: """ Set the priority of a particular log category. """
[docs] def SDL_GetLogPriority(category: ctypes.c_int) -> SDL_LogPriority: """ Get the priority of a particular log category. """
[docs] def SDL_ResetLogPriorities() -> None: """ Reset all priorities to default. """
[docs] def SDL_SetLogPriorityPrefix(priority: SDL_LogPriority, prefix: ctypes.c_char_p) -> ctypes.c_bool: """ Set the text prepended to log messages of a given priority. """
[docs] def SDL_Log(fmt: ctypes.c_char_p, *args: typing.Any) -> None: """ Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO. """
[docs] def SDL_LogTrace(category: ctypes.c_int, fmt: ctypes.c_char_p, *args: typing.Any) -> None: """ Log a message with SDL_LOG_PRIORITY_TRACE. """
[docs] def SDL_LogVerbose(category: ctypes.c_int, fmt: ctypes.c_char_p, *args: typing.Any) -> None: """ Log a message with SDL_LOG_PRIORITY_VERBOSE. """
[docs] def SDL_LogDebug(category: ctypes.c_int, fmt: ctypes.c_char_p, *args: typing.Any) -> None: """ Log a message with SDL_LOG_PRIORITY_DEBUG. """
[docs] def SDL_LogInfo(category: ctypes.c_int, fmt: ctypes.c_char_p, *args: typing.Any) -> None: """ Log a message with SDL_LOG_PRIORITY_INFO. """
[docs] def SDL_LogWarn(category: ctypes.c_int, fmt: ctypes.c_char_p, *args: typing.Any) -> None: """ Log a message with SDL_LOG_PRIORITY_WARN. """
[docs] def SDL_LogError(category: ctypes.c_int, fmt: ctypes.c_char_p, *args: typing.Any) -> None: """ Log a message with SDL_LOG_PRIORITY_ERROR. """
[docs] def SDL_LogCritical(category: ctypes.c_int, fmt: ctypes.c_char_p, *args: typing.Any) -> None: """ Log a message with SDL_LOG_PRIORITY_CRITICAL. """
[docs] def SDL_LogMessage(category: ctypes.c_int, priority: SDL_LogPriority, fmt: ctypes.c_char_p, *args: typing.Any) -> None: """ Log a message with the specified category and priority. """
[docs] def SDL_LogMessageV(category: ctypes.c_int, priority: SDL_LogPriority, fmt: ctypes.c_char_p, ap: SDL_VA_LIST) -> None: """ Log a message with the specified category and priority. """
[docs] def SDL_GetDefaultLogOutputFunction() -> SDL_LogOutputFunction: """ Get the default log output function. """
[docs] def SDL_GetLogOutputFunction(callback: LP_SDL_LogOutputFunction, userdata: LP_c_void_p) -> None: """ Get the current log output function. """
[docs] def SDL_SetLogOutputFunction(callback: SDL_LogOutputFunction, userdata: ctypes.c_void_p) -> None: """ Replace the default log output function with one of your own. """
[docs] def SDL_SetMainReady() -> None: """ Circumvent failure of SDL_Init() when not using SDL_main() as an entry point. """
[docs] def SDL_RunApp(argc: ctypes.c_int, argv: LP_c_char_p, mainFunction: SDL_main_func, reserved: ctypes.c_void_p) -> ctypes.c_int: """ Initializes and launches an SDL application, by doing platform-specific initialization before calling your mainFunction and cleanups after it returns, if that is needed for a specific platform, otherwise it just calls mainFunction. """
[docs] def SDL_EnterAppMainCallbacks(argc: ctypes.c_int, argv: LP_c_char_p, appinit: SDL_AppInit_func, appiter: SDL_AppIterate_func, appevent: SDL_AppEvent_func, appquit: SDL_AppQuit_func) -> ctypes.c_int: """ An entry point for SDL's use in SDL_MAIN_USE_CALLBACKS. """
[docs] def SDL_RegisterApp(name: ctypes.c_char_p, style: ctypes.c_uint32, hInst: ctypes.c_void_p) -> ctypes.c_bool: """ Register a win32 window class for SDL's use. """
[docs] def SDL_UnregisterApp() -> None: """ Deregister the win32 window class from an SDL_RegisterApp call. """
[docs] def SDL_ShowMessageBox(messageboxdata: LP_SDL_MessageBoxData, buttonid: LP_c_int) -> ctypes.c_bool: """ Create a modal message box. """
[docs] def SDL_ShowSimpleMessageBox(flags: SDL_MessageBoxFlags, title: ctypes.c_char_p, message: ctypes.c_char_p, window: LP_SDL_Window) -> ctypes.c_bool: """ Display a simple modal message box. """
[docs] def SDL_Metal_CreateView(window: LP_SDL_Window) -> SDL_MetalView: """ Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window. """
[docs] def SDL_Metal_DestroyView(view: SDL_MetalView) -> None: """ Destroy an existing SDL_MetalView object. """
[docs] def SDL_Metal_GetLayer(view: SDL_MetalView) -> ctypes.c_void_p: """ Get a pointer to the backing CAMetalLayer for the given view. """
[docs] def SDL_OpenURL(url: ctypes.c_char_p) -> ctypes.c_bool: """ Open a URL/URI in the browser or other appropriate external application. """
[docs] def SDL_CreateThreadRuntime(_0: SDL_ThreadFunction, _1: ctypes.c_char_p, _2: ctypes.c_void_p, _3: SDL_FunctionPointer, _4: SDL_FunctionPointer) -> LP_SDL_Thread: ...
[docs] def SDL_CreateThreadWithPropertiesRuntime(_0: SDL_PropertiesID, _1: SDL_FunctionPointer, _2: SDL_FunctionPointer) -> LP_SDL_Thread: ...
[docs] def SDL_GetThreadName(thread: LP_SDL_Thread) -> ctypes.c_char_p: """ Get the thread name as it was specified in SDL_CreateThread(). """
[docs] def SDL_GetCurrentThreadID() -> SDL_ThreadID: """ Get the thread identifier for the current thread. """
[docs] def SDL_GetThreadID(thread: LP_SDL_Thread) -> SDL_ThreadID: """ Get the thread identifier for the specified thread. """
[docs] def SDL_SetCurrentThreadPriority(priority: SDL_ThreadPriority) -> ctypes.c_bool: """ Set the priority for the current thread. """
[docs] def SDL_WaitThread(thread: LP_SDL_Thread, status: LP_c_int) -> None: """ Wait for a thread to finish. """
[docs] def SDL_GetThreadState(thread: LP_SDL_Thread) -> SDL_ThreadState: """ Get the current state of a thread. """
[docs] def SDL_DetachThread(thread: LP_SDL_Thread) -> None: """ Let a thread clean up on exit without intervention. """
[docs] def SDL_GetTLS(id: LP_SDL_TLSID) -> ctypes.c_void_p: """ Get the current thread's value associated with a thread local storage ID. """
[docs] def SDL_SetTLS(id: LP_SDL_TLSID, value: ctypes.c_void_p, destructor: SDL_TLSDestructorCallback) -> ctypes.c_bool: """ Set the current thread's value associated with a thread local storage ID. """
[docs] def SDL_CleanupTLS() -> None: """ Cleanup all TLS data for this thread. """
[docs] def SDL_CreateMutex() -> LP_SDL_Mutex: """ Create a new mutex. """
[docs] def SDL_LockMutex(mutex: LP_SDL_Mutex) -> None: """ Lock the mutex. """
[docs] def SDL_TryLockMutex(mutex: LP_SDL_Mutex) -> ctypes.c_bool: """ Try to lock a mutex without blocking. """
[docs] def SDL_UnlockMutex(mutex: LP_SDL_Mutex) -> None: """ Unlock the mutex. """
[docs] def SDL_DestroyMutex(mutex: LP_SDL_Mutex) -> None: """ Destroy a mutex created with SDL_CreateMutex(). """
[docs] def SDL_CreateRWLock() -> LP_SDL_RWLock: """ Create a new read/write lock. """
[docs] def SDL_LockRWLockForReading(rwlock: LP_SDL_RWLock) -> None: """ Lock the read/write lock for read only operations. """
[docs] def SDL_LockRWLockForWriting(rwlock: LP_SDL_RWLock) -> None: """ Lock the read/write lock for write operations. """
[docs] def SDL_TryLockRWLockForReading(rwlock: LP_SDL_RWLock) -> ctypes.c_bool: """ Try to lock a read/write lock for reading without blocking. """
[docs] def SDL_TryLockRWLockForWriting(rwlock: LP_SDL_RWLock) -> ctypes.c_bool: """ Try to lock a read/write lock for writing without blocking. """
[docs] def SDL_UnlockRWLock(rwlock: LP_SDL_RWLock) -> None: """ Unlock the read/write lock. """
[docs] def SDL_DestroyRWLock(rwlock: LP_SDL_RWLock) -> None: """ Destroy a read/write lock created with SDL_CreateRWLock(). """
[docs] def SDL_CreateSemaphore(initial_value: ctypes.c_uint32) -> LP_SDL_Semaphore: """ Create a semaphore. """
[docs] def SDL_DestroySemaphore(sem: LP_SDL_Semaphore) -> None: """ Destroy a semaphore. """
[docs] def SDL_WaitSemaphore(sem: LP_SDL_Semaphore) -> None: """ Wait until a semaphore has a positive value and then decrements it. """
[docs] def SDL_TryWaitSemaphore(sem: LP_SDL_Semaphore) -> ctypes.c_bool: """ See if a semaphore has a positive value and decrement it if it does. """
[docs] def SDL_WaitSemaphoreTimeout(sem: LP_SDL_Semaphore, timeoutMS: ctypes.c_int32) -> ctypes.c_bool: """ Wait until a semaphore has a positive value and then decrements it. """
[docs] def SDL_SignalSemaphore(sem: LP_SDL_Semaphore) -> None: """ Atomically increment a semaphore's value and wake waiting threads. """
[docs] def SDL_GetSemaphoreValue(sem: LP_SDL_Semaphore) -> ctypes.c_uint32: """ Get the current value of a semaphore. """
[docs] def SDL_CreateCondition() -> LP_SDL_Condition: """ Create a condition variable. """
[docs] def SDL_DestroyCondition(cond: LP_SDL_Condition) -> None: """ Destroy a condition variable. """
[docs] def SDL_SignalCondition(cond: LP_SDL_Condition) -> None: """ Restart one of the threads that are waiting on the condition variable. """
[docs] def SDL_BroadcastCondition(cond: LP_SDL_Condition) -> None: """ Restart all threads that are waiting on the condition variable. """
[docs] def SDL_WaitCondition(cond: LP_SDL_Condition, mutex: LP_SDL_Mutex) -> None: """ Wait until a condition variable is signaled. """
[docs] def SDL_WaitConditionTimeout(cond: LP_SDL_Condition, mutex: LP_SDL_Mutex, timeoutMS: ctypes.c_int32) -> ctypes.c_bool: """ Wait until a condition variable is signaled or a certain time has passed. """
[docs] def SDL_ShouldInit(state: LP_SDL_InitState) -> ctypes.c_bool: """ Return whether initialization should be done. """
[docs] def SDL_ShouldQuit(state: LP_SDL_InitState) -> ctypes.c_bool: """ Return whether cleanup should be done. """
[docs] def SDL_SetInitialized(state: LP_SDL_InitState, initialized: ctypes.c_bool) -> None: """ Finish an initialization state transition. """
[docs] def SDL_GetPlatform() -> ctypes.c_char_p: """ Get the name of the platform. """
[docs] def SDL_CreateProcess(args: LP_c_char_p, pipe_stdio: ctypes.c_bool) -> LP_SDL_Process: """ Create a new process. """
[docs] def SDL_CreateProcessWithProperties(props: SDL_PropertiesID) -> LP_SDL_Process: """ Create a new process with the specified properties. """
[docs] def SDL_GetProcessProperties(process: LP_SDL_Process) -> SDL_PropertiesID: """ Get the properties associated with a process. """
[docs] def SDL_ReadProcess(process: LP_SDL_Process, datasize: LP_c_size_t, exitcode: LP_c_int) -> ctypes.c_void_p: """ Read all the output from a process. """
[docs] def SDL_GetProcessInput(process: LP_SDL_Process) -> LP_SDL_IOStream: """ Get the SDL_IOStream associated with process standard input. """
[docs] def SDL_GetProcessOutput(process: LP_SDL_Process) -> LP_SDL_IOStream: """ Get the SDL_IOStream associated with process standard output. """
[docs] def SDL_KillProcess(process: LP_SDL_Process, force: ctypes.c_bool) -> ctypes.c_bool: """ Stop a process. """
[docs] def SDL_WaitProcess(process: LP_SDL_Process, block: ctypes.c_bool, exitcode: LP_c_int) -> ctypes.c_bool: """ Wait for a process to finish. """
[docs] def SDL_DestroyProcess(process: LP_SDL_Process) -> None: """ Destroy a previously created process object. """
[docs] def SDL_OpenTitleStorage(override: ctypes.c_char_p, props: SDL_PropertiesID) -> LP_SDL_Storage: """ Opens up a read-only container for the application's filesystem. """
[docs] def SDL_OpenUserStorage(org: ctypes.c_char_p, app: ctypes.c_char_p, props: SDL_PropertiesID) -> LP_SDL_Storage: """ Opens up a container for a user's unique read/write filesystem. """
[docs] def SDL_OpenFileStorage(path: ctypes.c_char_p) -> LP_SDL_Storage: """ Opens up a container for local filesystem storage. """
[docs] def SDL_OpenStorage(iface: LP_SDL_StorageInterface, userdata: ctypes.c_void_p) -> LP_SDL_Storage: """ Opens up a container using a client-provided storage interface. """
[docs] def SDL_CloseStorage(storage: LP_SDL_Storage) -> ctypes.c_bool: """ Closes and frees a storage container. """
[docs] def SDL_StorageReady(storage: LP_SDL_Storage) -> ctypes.c_bool: """ Checks if the storage container is ready to use. """
[docs] def SDL_GetStorageFileSize(storage: LP_SDL_Storage, path: ctypes.c_char_p, length: LP_c_uint64) -> ctypes.c_bool: """ Query the size of a file within a storage container. """
[docs] def SDL_ReadStorageFile(storage: LP_SDL_Storage, path: ctypes.c_char_p, destination: ctypes.c_void_p, length: ctypes.c_uint64) -> ctypes.c_bool: """ Synchronously read a file from a storage container into a client-provided buffer. """
[docs] def SDL_WriteStorageFile(storage: LP_SDL_Storage, path: ctypes.c_char_p, source: ctypes.c_void_p, length: ctypes.c_uint64) -> ctypes.c_bool: """ Synchronously write a file from client memory into a storage container. """
[docs] def SDL_CreateStorageDirectory(storage: LP_SDL_Storage, path: ctypes.c_char_p) -> ctypes.c_bool: """ Create a directory in a writable storage container. """
[docs] def SDL_EnumerateStorageDirectory(storage: LP_SDL_Storage, path: ctypes.c_char_p, callback: SDL_EnumerateDirectoryCallback, userdata: ctypes.c_void_p) -> ctypes.c_bool: """ Enumerate a directory in a storage container through a callback function. """
[docs] def SDL_RemoveStoragePath(storage: LP_SDL_Storage, path: ctypes.c_char_p) -> ctypes.c_bool: """ Remove a file or an empty directory in a writable storage container. """
[docs] def SDL_RenameStoragePath(storage: LP_SDL_Storage, oldpath: ctypes.c_char_p, newpath: ctypes.c_char_p) -> ctypes.c_bool: """ Rename a file or directory in a writable storage container. """
[docs] def SDL_CopyStorageFile(storage: LP_SDL_Storage, oldpath: ctypes.c_char_p, newpath: ctypes.c_char_p) -> ctypes.c_bool: """ Copy a file in a writable storage container. """
[docs] def SDL_GetStoragePathInfo(storage: LP_SDL_Storage, path: ctypes.c_char_p, info: LP_SDL_PathInfo) -> ctypes.c_bool: """ Get information about a filesystem path in a storage container. """
[docs] def SDL_GetStorageSpaceRemaining(storage: LP_SDL_Storage) -> ctypes.c_uint64: """ Queries the remaining space in a storage container. """
[docs] def SDL_GlobStorageDirectory(storage: LP_SDL_Storage, path: ctypes.c_char_p, pattern: ctypes.c_char_p, flags: SDL_GlobFlags, count: LP_c_int) -> LP_c_char_p: """ Enumerate a directory tree, filtered by pattern, and return a list. """
[docs] def SDL_SetWindowsMessageHook(callback: SDL_WindowsMessageHook, userdata: ctypes.c_void_p) -> None: """ Set a callback for every Windows message, run before TranslateMessage(). """
[docs] def SDL_GetDirect3D9AdapterIndex(displayID: SDL_DisplayID) -> ctypes.c_int: """ Get the D3D9 adapter index that matches the specified display. """
[docs] def SDL_GetDXGIOutputInfo(displayID: SDL_DisplayID, adapterIndex: LP_c_int, outputIndex: LP_c_int) -> ctypes.c_bool: """ Get the DXGI Adapter and Output indices for the specified display. """
[docs] def SDL_SetX11EventHook(callback: SDL_X11EventHook, userdata: ctypes.c_void_p) -> None: """ Set a callback for every X11 event. """
[docs] def SDL_SetLinuxThreadPriority(threadID: ctypes.c_int64, priority: ctypes.c_int) -> ctypes.c_bool: """ Sets the UNIX nice value for a thread. """
[docs] def SDL_SetLinuxThreadPriorityAndPolicy(threadID: ctypes.c_int64, sdlPriority: ctypes.c_int, schedPolicy: ctypes.c_int) -> ctypes.c_bool: """ Sets the priority (not nice level) and scheduling policy for a thread. """
[docs] def SDL_IsTablet() -> ctypes.c_bool: """ Query if the current device is a tablet. """
[docs] def SDL_IsTV() -> ctypes.c_bool: """ Query if the current device is a TV. """
[docs] def SDL_GetSandbox() -> SDL_Sandbox: """ Get the application sandbox environment, if any. """
[docs] def SDL_OnApplicationWillTerminate() -> None: """ Let iOS apps with external event handling report onApplicationWillTerminate. """
[docs] def SDL_OnApplicationDidReceiveMemoryWarning() -> None: """ Let iOS apps with external event handling report onApplicationDidReceiveMemoryWarning. """
[docs] def SDL_OnApplicationWillEnterBackground() -> None: """ Let iOS apps with external event handling report onApplicationWillResignActive. """
[docs] def SDL_OnApplicationDidEnterBackground() -> None: """ Let iOS apps with external event handling report onApplicationDidEnterBackground. """
[docs] def SDL_OnApplicationWillEnterForeground() -> None: """ Let iOS apps with external event handling report onApplicationWillEnterForeground. """
[docs] def SDL_OnApplicationDidEnterForeground() -> None: """ Let iOS apps with external event handling report onApplicationDidBecomeActive. """
[docs] def SDL_GetDateTimeLocalePreferences(dateFormat: LP_SDL_DateFormat, timeFormat: LP_SDL_TimeFormat) -> ctypes.c_bool: """ Gets the current preferred date and time format for the system locale. """
[docs] def SDL_GetCurrentTime(ticks: LP_SDL_Time) -> ctypes.c_bool: """ Gets the current value of the system realtime clock in nanoseconds since Jan 1, 1970 in Universal Coordinated Time (UTC). """
[docs] def SDL_TimeToDateTime(ticks: SDL_Time, dt: LP_SDL_DateTime, localTime: ctypes.c_bool) -> ctypes.c_bool: """ Converts an SDL_Time in nanoseconds since the epoch to a calendar time in the SDL_DateTime format. """
[docs] def SDL_DateTimeToTime(dt: LP_SDL_DateTime, ticks: LP_SDL_Time) -> ctypes.c_bool: """ Converts a calendar time to an SDL_Time in nanoseconds since the epoch. """
[docs] def SDL_TimeToWindows(ticks: SDL_Time, dwLowDateTime: LP_c_uint32, dwHighDateTime: LP_c_uint32) -> None: """ Converts an SDL time into a Windows FILETIME (100-nanosecond intervals since January 1, 1601). """
[docs] def SDL_TimeFromWindows(dwLowDateTime: ctypes.c_uint32, dwHighDateTime: ctypes.c_uint32) -> SDL_Time: """ Converts a Windows FILETIME (100-nanosecond intervals since January 1, 1601) to an SDL time. """
[docs] def SDL_GetDaysInMonth(year: ctypes.c_int, month: ctypes.c_int) -> ctypes.c_int: """ Get the number of days in a month for a given year. """
[docs] def SDL_GetDayOfYear(year: ctypes.c_int, month: ctypes.c_int, day: ctypes.c_int) -> ctypes.c_int: """ Get the day of year for a calendar date. """
[docs] def SDL_GetDayOfWeek(year: ctypes.c_int, month: ctypes.c_int, day: ctypes.c_int) -> ctypes.c_int: """ Get the day of week for a calendar date. """
[docs] def SDL_GetTicks() -> ctypes.c_uint64: """ Get the number of milliseconds that have elapsed since the SDL library initialization. """
[docs] def SDL_GetTicksNS() -> ctypes.c_uint64: """ Get the number of nanoseconds since SDL library initialization. """
[docs] def SDL_GetPerformanceCounter() -> ctypes.c_uint64: """ Get the current value of the high resolution counter. """
[docs] def SDL_GetPerformanceFrequency() -> ctypes.c_uint64: """ Get the count per second of the high resolution counter. """
[docs] def SDL_Delay(ms: ctypes.c_uint32) -> None: """ Wait a specified number of milliseconds before returning. """
[docs] def SDL_DelayNS(ns: ctypes.c_uint64) -> None: """ Wait a specified number of nanoseconds before returning. """
[docs] def SDL_DelayPrecise(ns: ctypes.c_uint64) -> None: """ Wait a specified number of nanoseconds before returning. """
[docs] def SDL_AddTimer(interval: ctypes.c_uint32, callback: SDL_TimerCallback, userdata: ctypes.c_void_p) -> SDL_TimerID: """ Call a callback function at a future time. """
[docs] def SDL_AddTimerNS(interval: ctypes.c_uint64, callback: SDL_NSTimerCallback, userdata: ctypes.c_void_p) -> SDL_TimerID: """ Call a callback function at a future time. """
[docs] def SDL_RemoveTimer(id: SDL_TimerID) -> ctypes.c_bool: """ Remove a timer created with SDL_AddTimer(). """
[docs] def SDL_CreateTray(icon: LP_SDL_Surface, tooltip: ctypes.c_char_p) -> LP_SDL_Tray: """ Create an icon to be placed in the operating system's tray, or equivalent. """
[docs] def SDL_SetTrayIcon(tray: LP_SDL_Tray, icon: LP_SDL_Surface) -> None: """ Updates the system tray icon's icon. """
[docs] def SDL_SetTrayTooltip(tray: LP_SDL_Tray, tooltip: ctypes.c_char_p) -> None: """ Updates the system tray icon's tooltip. """
[docs] def SDL_CreateTrayMenu(tray: LP_SDL_Tray) -> LP_SDL_TrayMenu: """ Create a menu for a system tray. """
[docs] def SDL_CreateTraySubmenu(entry: LP_SDL_TrayEntry) -> LP_SDL_TrayMenu: """ Create a submenu for a system tray entry. """
[docs] def SDL_GetTrayMenu(tray: LP_SDL_Tray) -> LP_SDL_TrayMenu: """ Gets a previously created tray menu. """
[docs] def SDL_GetTraySubmenu(entry: LP_SDL_TrayEntry) -> LP_SDL_TrayMenu: """ Gets a previously created tray entry submenu. """
[docs] def SDL_GetTrayEntries(menu: LP_SDL_TrayMenu, count: LP_c_int) -> LP_LP_SDL_TrayEntry: """ Returns a list of entries in the menu, in order. """
[docs] def SDL_RemoveTrayEntry(entry: LP_SDL_TrayEntry) -> None: """ Removes a tray entry. """
[docs] def SDL_InsertTrayEntryAt(menu: LP_SDL_TrayMenu, pos: ctypes.c_int, label: ctypes.c_char_p, flags: SDL_TrayEntryFlags) -> LP_SDL_TrayEntry: """ Insert a tray entry at a given position. """
[docs] def SDL_SetTrayEntryLabel(entry: LP_SDL_TrayEntry, label: ctypes.c_char_p) -> None: """ Sets the label of an entry. """
[docs] def SDL_GetTrayEntryLabel(entry: LP_SDL_TrayEntry) -> ctypes.c_char_p: """ Gets the label of an entry. """
[docs] def SDL_SetTrayEntryChecked(entry: LP_SDL_TrayEntry, checked: ctypes.c_bool) -> None: """ Sets whether or not an entry is checked. """
[docs] def SDL_GetTrayEntryChecked(entry: LP_SDL_TrayEntry) -> ctypes.c_bool: """ Gets whether or not an entry is checked. """
[docs] def SDL_SetTrayEntryEnabled(entry: LP_SDL_TrayEntry, enabled: ctypes.c_bool) -> None: """ Sets whether or not an entry is enabled. """
[docs] def SDL_GetTrayEntryEnabled(entry: LP_SDL_TrayEntry) -> ctypes.c_bool: """ Gets whether or not an entry is enabled. """
[docs] def SDL_SetTrayEntryCallback(entry: LP_SDL_TrayEntry, callback: SDL_TrayCallback, userdata: ctypes.c_void_p) -> None: """ Sets a callback to be invoked when the entry is selected. """
[docs] def SDL_ClickTrayEntry(entry: LP_SDL_TrayEntry) -> None: """ Simulate a click on a tray entry. """
[docs] def SDL_DestroyTray(tray: LP_SDL_Tray) -> None: """ Destroys a tray object. """
[docs] def SDL_GetTrayEntryParent(entry: LP_SDL_TrayEntry) -> LP_SDL_TrayMenu: """ Gets the menu containing a certain tray entry. """
[docs] def SDL_GetTrayMenuParentEntry(menu: LP_SDL_TrayMenu) -> LP_SDL_TrayEntry: """ Gets the entry for which the menu is a submenu, if the current menu is a submenu. """
[docs] def SDL_GetTrayMenuParentTray(menu: LP_SDL_TrayMenu) -> LP_SDL_Tray: """ Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu. """
[docs] def SDL_UpdateTrays() -> None: """ Update the trays. """
[docs] def SDL_Vulkan_LoadLibrary(path: ctypes.c_char_p) -> ctypes.c_bool: """ Dynamically load the Vulkan loader library. """
[docs] def SDL_Vulkan_GetVkGetInstanceProcAddr() -> SDL_FunctionPointer: """ Get the address of the `vkGetInstanceProcAddr` function. """
[docs] def SDL_Vulkan_UnloadLibrary() -> None: """ Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary(). """
[docs] def SDL_Vulkan_GetInstanceExtensions(count: LP_c_uint32) -> LP_c_char_p: """ Get the Vulkan instance extensions needed for vkCreateInstance. """
[docs] def SDL_Vulkan_CreateSurface(window: LP_SDL_Window, instance: VkInstance, allocator: LP_VkAllocationCallbacks, surface: LP_VkSurfaceKHR) -> ctypes.c_bool: """ Create a Vulkan rendering surface for a window. """
[docs] def SDL_Vulkan_DestroySurface(instance: VkInstance, surface: VkSurfaceKHR, allocator: LP_VkAllocationCallbacks) -> None: """ Destroy the Vulkan rendering surface of a window. """
[docs] def SDL_Vulkan_GetPresentationSupport(instance: VkInstance, physicalDevice: VkPhysicalDevice, queueFamilyIndex: ctypes.c_uint32) -> ctypes.c_bool: """ Query support for presentation via a given physical device and queue family. """