Class SDL3

java.lang.Object
club.doki7.sdl3.SDL3
All Implemented Interfaces:
SDL3Constants

public final class SDL3 extends Object implements SDL3Constants
  • Field Details

    • SEGMENT$SDL_malloc

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_malloc
    • SEGMENT$SDL_calloc

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_calloc
    • SEGMENT$SDL_realloc

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_realloc
    • SEGMENT$SDL_free

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_free
    • SEGMENT$SDL_GetOriginalMemoryFunctions

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetOriginalMemoryFunctions
    • SEGMENT$SDL_GetMemoryFunctions

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetMemoryFunctions
    • SEGMENT$SDL_SetMemoryFunctions

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetMemoryFunctions
    • SEGMENT$SDL_aligned_alloc

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_aligned_alloc
    • SEGMENT$SDL_aligned_free

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_aligned_free
    • SEGMENT$SDL_GetNumAllocations

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumAllocations
    • SEGMENT$SDL_GetEnvironment

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetEnvironment
    • SEGMENT$SDL_CreateEnvironment

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateEnvironment
    • SEGMENT$SDL_GetEnvironmentVariable

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetEnvironmentVariable
    • SEGMENT$SDL_GetEnvironmentVariables

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetEnvironmentVariables
    • SEGMENT$SDL_SetEnvironmentVariable

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetEnvironmentVariable
    • SEGMENT$SDL_UnsetEnvironmentVariable

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnsetEnvironmentVariable
    • SEGMENT$SDL_DestroyEnvironment

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyEnvironment
    • SEGMENT$SDL_getenv

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_getenv
    • SEGMENT$SDL_getenv_unsafe

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_getenv_unsafe
    • SEGMENT$SDL_setenv_unsafe

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_setenv_unsafe
    • SEGMENT$SDL_unsetenv_unsafe

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_unsetenv_unsafe
    • SEGMENT$SDL_qsort

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_qsort
    • SEGMENT$SDL_bsearch

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_bsearch
    • SEGMENT$SDL_qsort_r

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_qsort_r
    • SEGMENT$SDL_bsearch_r

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_bsearch_r
    • SEGMENT$SDL_abs

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_abs
    • SEGMENT$SDL_isalpha

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isalpha
    • SEGMENT$SDL_isalnum

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isalnum
    • SEGMENT$SDL_isblank

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isblank
    • SEGMENT$SDL_iscntrl

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_iscntrl
    • SEGMENT$SDL_isdigit

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isdigit
    • SEGMENT$SDL_isxdigit

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isxdigit
    • SEGMENT$SDL_ispunct

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ispunct
    • SEGMENT$SDL_isspace

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isspace
    • SEGMENT$SDL_isupper

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isupper
    • SEGMENT$SDL_islower

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_islower
    • SEGMENT$SDL_isprint

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isprint
    • SEGMENT$SDL_isgraph

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isgraph
    • SEGMENT$SDL_toupper

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_toupper
    • SEGMENT$SDL_tolower

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_tolower
    • SEGMENT$SDL_crc16

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_crc16
    • SEGMENT$SDL_crc32

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_crc32
    • SEGMENT$SDL_murmur3_32

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_murmur3_32
    • SEGMENT$SDL_memcpy

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_memcpy
    • SEGMENT$SDL_memmove

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_memmove
    • SEGMENT$SDL_memset

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_memset
    • SEGMENT$SDL_memset4

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_memset4
    • SEGMENT$SDL_memcmp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_memcmp
    • SEGMENT$SDL_wcslen

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcslen
    • SEGMENT$SDL_wcsnlen

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcsnlen
    • SEGMENT$SDL_wcslcpy

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcslcpy
    • SEGMENT$SDL_wcslcat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcslcat
    • SEGMENT$SDL_wcsdup

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcsdup
    • SEGMENT$SDL_wcsstr

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcsstr
    • SEGMENT$SDL_wcsnstr

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcsnstr
    • SEGMENT$SDL_wcscmp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcscmp
    • SEGMENT$SDL_wcsncmp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcsncmp
    • SEGMENT$SDL_wcscasecmp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcscasecmp
    • SEGMENT$SDL_wcsncasecmp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcsncasecmp
    • SEGMENT$SDL_wcstol

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_wcstol
    • SEGMENT$SDL_strlen

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strlen
    • SEGMENT$SDL_strnlen

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strnlen
    • SEGMENT$SDL_strlcpy

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strlcpy
    • SEGMENT$SDL_utf8strlcpy

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_utf8strlcpy
    • SEGMENT$SDL_strlcat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strlcat
    • SEGMENT$SDL_strdup

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strdup
    • SEGMENT$SDL_strndup

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strndup
    • SEGMENT$SDL_strrev

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strrev
    • SEGMENT$SDL_strupr

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strupr
    • SEGMENT$SDL_strlwr

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strlwr
    • SEGMENT$SDL_strchr

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strchr
    • SEGMENT$SDL_strrchr

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strrchr
    • SEGMENT$SDL_strstr

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strstr
    • SEGMENT$SDL_strnstr

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strnstr
    • SEGMENT$SDL_strcasestr

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strcasestr
    • SEGMENT$SDL_strtok_r

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strtok_r
    • SEGMENT$SDL_utf8strlen

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_utf8strlen
    • SEGMENT$SDL_utf8strnlen

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_utf8strnlen
    • SEGMENT$SDL_itoa

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_itoa
    • SEGMENT$SDL_uitoa

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_uitoa
    • SEGMENT$SDL_ltoa

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ltoa
    • SEGMENT$SDL_ultoa

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ultoa
    • SEGMENT$SDL_lltoa

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_lltoa
    • SEGMENT$SDL_ulltoa

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ulltoa
    • SEGMENT$SDL_atoi

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_atoi
    • SEGMENT$SDL_atof

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_atof
    • SEGMENT$SDL_strtol

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strtol
    • SEGMENT$SDL_strtoul

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strtoul
    • SEGMENT$SDL_strtoll

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strtoll
    • SEGMENT$SDL_strtoull

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strtoull
    • SEGMENT$SDL_strtod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strtod
    • SEGMENT$SDL_strcmp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strcmp
    • SEGMENT$SDL_strncmp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strncmp
    • SEGMENT$SDL_strcasecmp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strcasecmp
    • SEGMENT$SDL_strncasecmp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strncasecmp
    • SEGMENT$SDL_strpbrk

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_strpbrk
    • SEGMENT$SDL_StepUTF8

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StepUTF8
    • SEGMENT$SDL_StepBackUTF8

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StepBackUTF8
    • SEGMENT$SDL_UCS4ToUTF8

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UCS4ToUTF8
    • SEGMENT$SDL_srand

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_srand
    • SEGMENT$SDL_rand

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_rand
    • SEGMENT$SDL_randf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_randf
    • SEGMENT$SDL_rand_bits

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_rand_bits
    • SEGMENT$SDL_rand_r

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_rand_r
    • SEGMENT$SDL_randf_r

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_randf_r
    • SEGMENT$SDL_rand_bits_r

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_rand_bits_r
    • SEGMENT$SDL_acos

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_acos
    • SEGMENT$SDL_acosf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_acosf
    • SEGMENT$SDL_asin

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_asin
    • SEGMENT$SDL_asinf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_asinf
    • SEGMENT$SDL_atan

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_atan
    • SEGMENT$SDL_atanf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_atanf
    • SEGMENT$SDL_atan2

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_atan2
    • SEGMENT$SDL_atan2f

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_atan2f
    • SEGMENT$SDL_ceil

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ceil
    • SEGMENT$SDL_ceilf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ceilf
    • SEGMENT$SDL_copysign

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_copysign
    • SEGMENT$SDL_copysignf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_copysignf
    • SEGMENT$SDL_cos

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_cos
    • SEGMENT$SDL_cosf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_cosf
    • SEGMENT$SDL_exp

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_exp
    • SEGMENT$SDL_expf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_expf
    • SEGMENT$SDL_fabs

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_fabs
    • SEGMENT$SDL_fabsf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_fabsf
    • SEGMENT$SDL_floor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_floor
    • SEGMENT$SDL_floorf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_floorf
    • SEGMENT$SDL_trunc

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_trunc
    • SEGMENT$SDL_truncf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_truncf
    • SEGMENT$SDL_fmod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_fmod
    • SEGMENT$SDL_fmodf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_fmodf
    • SEGMENT$SDL_isinf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isinf
    • SEGMENT$SDL_isinff

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isinff
    • SEGMENT$SDL_isnan

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isnan
    • SEGMENT$SDL_isnanf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_isnanf
    • SEGMENT$SDL_log

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_log
    • SEGMENT$SDL_logf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_logf
    • SEGMENT$SDL_log10

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_log10
    • SEGMENT$SDL_log10f

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_log10f
    • SEGMENT$SDL_modf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_modf
    • SEGMENT$SDL_modff

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_modff
    • SEGMENT$SDL_pow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_pow
    • SEGMENT$SDL_powf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_powf
    • SEGMENT$SDL_round

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_round
    • SEGMENT$SDL_roundf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_roundf
    • SEGMENT$SDL_lround

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_lround
    • SEGMENT$SDL_lroundf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_lroundf
    • SEGMENT$SDL_scalbn

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_scalbn
    • SEGMENT$SDL_scalbnf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_scalbnf
    • SEGMENT$SDL_sin

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_sin
    • SEGMENT$SDL_sinf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_sinf
    • SEGMENT$SDL_sqrt

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_sqrt
    • SEGMENT$SDL_sqrtf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_sqrtf
    • SEGMENT$SDL_tan

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_tan
    • SEGMENT$SDL_tanf

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_tanf
    • SEGMENT$SDL_iconv_open

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_iconv_open
    • SEGMENT$SDL_iconv_close

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_iconv_close
    • SEGMENT$SDL_iconv

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_iconv
    • SEGMENT$SDL_iconv_string

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_iconv_string
    • SEGMENT$SDL_AsyncIOFromFile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AsyncIOFromFile
    • SEGMENT$SDL_GetAsyncIOSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAsyncIOSize
    • SEGMENT$SDL_ReadAsyncIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadAsyncIO
    • SEGMENT$SDL_WriteAsyncIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteAsyncIO
    • SEGMENT$SDL_CloseAsyncIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CloseAsyncIO
    • SEGMENT$SDL_CreateAsyncIOQueue

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateAsyncIOQueue
    • SEGMENT$SDL_DestroyAsyncIOQueue

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyAsyncIOQueue
    • SEGMENT$SDL_GetAsyncIOResult

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAsyncIOResult
    • SEGMENT$SDL_WaitAsyncIOResult

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitAsyncIOResult
    • SEGMENT$SDL_SignalAsyncIOQueue

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SignalAsyncIOQueue
    • SEGMENT$SDL_LoadFileAsync

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LoadFileAsync
    • SEGMENT$SDL_TryLockSpinlock

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TryLockSpinlock
    • SEGMENT$SDL_LockSpinlock

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockSpinlock
    • SEGMENT$SDL_UnlockSpinlock

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnlockSpinlock
    • SEGMENT$SDL_MemoryBarrierReleaseFunction

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MemoryBarrierReleaseFunction
    • SEGMENT$SDL_MemoryBarrierAcquireFunction

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MemoryBarrierAcquireFunction
    • SEGMENT$SDL_CompareAndSwapAtomicInt

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CompareAndSwapAtomicInt
    • SEGMENT$SDL_SetAtomicInt

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAtomicInt
    • SEGMENT$SDL_GetAtomicInt

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAtomicInt
    • SEGMENT$SDL_AddAtomicInt

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddAtomicInt
    • SEGMENT$SDL_CompareAndSwapAtomicU32

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CompareAndSwapAtomicU32
    • SEGMENT$SDL_SetAtomicU32

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAtomicU32
    • SEGMENT$SDL_GetAtomicU32

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAtomicU32
    • SEGMENT$SDL_CompareAndSwapAtomicPointer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CompareAndSwapAtomicPointer
    • SEGMENT$SDL_SetAtomicPointer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAtomicPointer
    • SEGMENT$SDL_GetAtomicPointer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAtomicPointer
    • SEGMENT$SDL_GetNumAudioDrivers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumAudioDrivers
    • SEGMENT$SDL_GetAudioDriver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioDriver
    • SEGMENT$SDL_GetCurrentAudioDriver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCurrentAudioDriver
    • SEGMENT$SDL_GetAudioPlaybackDevices

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioPlaybackDevices
    • SEGMENT$SDL_GetAudioRecordingDevices

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioRecordingDevices
    • SEGMENT$SDL_GetAudioDeviceName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioDeviceName
    • SEGMENT$SDL_GetAudioDeviceFormat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioDeviceFormat
    • SEGMENT$SDL_GetAudioDeviceChannelMap

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioDeviceChannelMap
    • SEGMENT$SDL_OpenAudioDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenAudioDevice
    • SEGMENT$SDL_IsAudioDevicePhysical

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsAudioDevicePhysical
    • SEGMENT$SDL_IsAudioDevicePlayback

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsAudioDevicePlayback
    • SEGMENT$SDL_PauseAudioDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PauseAudioDevice
    • SEGMENT$SDL_ResumeAudioDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ResumeAudioDevice
    • SEGMENT$SDL_AudioDevicePaused

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AudioDevicePaused
    • SEGMENT$SDL_GetAudioDeviceGain

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioDeviceGain
    • SEGMENT$SDL_SetAudioDeviceGain

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAudioDeviceGain
    • SEGMENT$SDL_CloseAudioDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CloseAudioDevice
    • SEGMENT$SDL_BindAudioStreams

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindAudioStreams
    • SEGMENT$SDL_BindAudioStream

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindAudioStream
    • SEGMENT$SDL_UnbindAudioStreams

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnbindAudioStreams
    • SEGMENT$SDL_UnbindAudioStream

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnbindAudioStream
    • SEGMENT$SDL_GetAudioStreamDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamDevice
    • SEGMENT$SDL_CreateAudioStream

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateAudioStream
    • SEGMENT$SDL_GetAudioStreamProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamProperties
    • SEGMENT$SDL_GetAudioStreamFormat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamFormat
    • SEGMENT$SDL_SetAudioStreamFormat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAudioStreamFormat
    • SEGMENT$SDL_GetAudioStreamFrequencyRatio

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamFrequencyRatio
    • SEGMENT$SDL_SetAudioStreamFrequencyRatio

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAudioStreamFrequencyRatio
    • SEGMENT$SDL_GetAudioStreamGain

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamGain
    • SEGMENT$SDL_SetAudioStreamGain

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAudioStreamGain
    • SEGMENT$SDL_GetAudioStreamInputChannelMap

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamInputChannelMap
    • SEGMENT$SDL_GetAudioStreamOutputChannelMap

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamOutputChannelMap
    • SEGMENT$SDL_SetAudioStreamInputChannelMap

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAudioStreamInputChannelMap
    • SEGMENT$SDL_SetAudioStreamOutputChannelMap

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAudioStreamOutputChannelMap
    • SEGMENT$SDL_PutAudioStreamData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PutAudioStreamData
    • SEGMENT$SDL_GetAudioStreamData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamData
    • SEGMENT$SDL_GetAudioStreamAvailable

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamAvailable
    • SEGMENT$SDL_GetAudioStreamQueued

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioStreamQueued
    • SEGMENT$SDL_FlushAudioStream

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FlushAudioStream
    • SEGMENT$SDL_ClearAudioStream

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ClearAudioStream
    • SEGMENT$SDL_PauseAudioStreamDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PauseAudioStreamDevice
    • SEGMENT$SDL_ResumeAudioStreamDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ResumeAudioStreamDevice
    • SEGMENT$SDL_AudioStreamDevicePaused

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AudioStreamDevicePaused
    • SEGMENT$SDL_LockAudioStream

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockAudioStream
    • SEGMENT$SDL_UnlockAudioStream

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnlockAudioStream
    • SEGMENT$SDL_SetAudioStreamGetCallback

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAudioStreamGetCallback
    • SEGMENT$SDL_SetAudioStreamPutCallback

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAudioStreamPutCallback
    • SEGMENT$SDL_DestroyAudioStream

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyAudioStream
    • SEGMENT$SDL_OpenAudioDeviceStream

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenAudioDeviceStream
    • SEGMENT$SDL_SetAudioPostmixCallback

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAudioPostmixCallback
    • SEGMENT$SDL_LoadWAV_IO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LoadWAV_IO
    • SEGMENT$SDL_LoadWAV

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LoadWAV
    • SEGMENT$SDL_MixAudio

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MixAudio
    • SEGMENT$SDL_ConvertAudioSamples

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ConvertAudioSamples
    • SEGMENT$SDL_GetAudioFormatName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAudioFormatName
    • SEGMENT$SDL_GetSilenceValueForFormat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSilenceValueForFormat
    • SEGMENT$SDL_ComposeCustomBlendMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ComposeCustomBlendMode
    • SEGMENT$SDL_GetNumCameraDrivers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumCameraDrivers
    • SEGMENT$SDL_GetCameraDriver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCameraDriver
    • SEGMENT$SDL_GetCurrentCameraDriver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCurrentCameraDriver
    • SEGMENT$SDL_GetCameras

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCameras
    • SEGMENT$SDL_GetCameraSupportedFormats

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCameraSupportedFormats
    • SEGMENT$SDL_GetCameraName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCameraName
    • SEGMENT$SDL_GetCameraPosition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCameraPosition
    • SEGMENT$SDL_OpenCamera

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenCamera
    • SEGMENT$SDL_GetCameraPermissionState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCameraPermissionState
    • SEGMENT$SDL_GetCameraID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCameraID
    • SEGMENT$SDL_GetCameraProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCameraProperties
    • SEGMENT$SDL_GetCameraFormat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCameraFormat
    • SEGMENT$SDL_AcquireCameraFrame

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AcquireCameraFrame
    • SEGMENT$SDL_ReleaseCameraFrame

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseCameraFrame
    • SEGMENT$SDL_CloseCamera

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CloseCamera
    • SEGMENT$SDL_SetClipboardText

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetClipboardText
    • SEGMENT$SDL_GetClipboardText

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetClipboardText
    • SEGMENT$SDL_HasClipboardText

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasClipboardText
    • SEGMENT$SDL_SetPrimarySelectionText

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetPrimarySelectionText
    • SEGMENT$SDL_GetPrimarySelectionText

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPrimarySelectionText
    • SEGMENT$SDL_HasPrimarySelectionText

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasPrimarySelectionText
    • SEGMENT$SDL_SetClipboardData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetClipboardData
    • SEGMENT$SDL_ClearClipboardData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ClearClipboardData
    • SEGMENT$SDL_GetClipboardData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetClipboardData
    • SEGMENT$SDL_HasClipboardData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasClipboardData
    • SEGMENT$SDL_GetClipboardMimeTypes

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetClipboardMimeTypes
    • SEGMENT$SDL_GetNumLogicalCPUCores

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumLogicalCPUCores
    • SEGMENT$SDL_GetCPUCacheLineSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCPUCacheLineSize
    • SEGMENT$SDL_HasAltiVec

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasAltiVec
    • SEGMENT$SDL_HasMMX

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasMMX
    • SEGMENT$SDL_HasSSE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasSSE
    • SEGMENT$SDL_HasSSE2

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasSSE2
    • SEGMENT$SDL_HasSSE3

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasSSE3
    • SEGMENT$SDL_HasSSE41

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasSSE41
    • SEGMENT$SDL_HasSSE42

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasSSE42
    • SEGMENT$SDL_HasAVX

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasAVX
    • SEGMENT$SDL_HasAVX2

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasAVX2
    • SEGMENT$SDL_HasAVX512F

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasAVX512F
    • SEGMENT$SDL_HasARMSIMD

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasARMSIMD
    • SEGMENT$SDL_HasNEON

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasNEON
    • SEGMENT$SDL_HasLSX

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasLSX
    • SEGMENT$SDL_HasLASX

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasLASX
    • SEGMENT$SDL_GetSystemRAM

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSystemRAM
    • SEGMENT$SDL_GetSIMDAlignment

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSIMDAlignment
    • SEGMENT$SDL_ShowOpenFileDialog

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowOpenFileDialog
    • SEGMENT$SDL_ShowSaveFileDialog

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowSaveFileDialog
    • SEGMENT$SDL_ShowOpenFolderDialog

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowOpenFolderDialog
    • SEGMENT$SDL_ShowFileDialogWithProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowFileDialogWithProperties
    • SEGMENT$SDL_OutOfMemory

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OutOfMemory
    • SEGMENT$SDL_GetError

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetError
    • SEGMENT$SDL_ClearError

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ClearError
    • SEGMENT$SDL_PumpEvents

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PumpEvents
    • SEGMENT$SDL_PeepEvents

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PeepEvents
    • SEGMENT$SDL_HasEvent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasEvent
    • SEGMENT$SDL_HasEvents

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasEvents
    • SEGMENT$SDL_FlushEvent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FlushEvent
    • SEGMENT$SDL_FlushEvents

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FlushEvents
    • SEGMENT$SDL_PollEvent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PollEvent
    • SEGMENT$SDL_WaitEvent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitEvent
    • SEGMENT$SDL_WaitEventTimeout

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitEventTimeout
    • SEGMENT$SDL_PushEvent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PushEvent
    • SEGMENT$SDL_SetEventFilter

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetEventFilter
    • SEGMENT$SDL_GetEventFilter

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetEventFilter
    • SEGMENT$SDL_AddEventWatch

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddEventWatch
    • SEGMENT$SDL_RemoveEventWatch

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RemoveEventWatch
    • SEGMENT$SDL_FilterEvents

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FilterEvents
    • SEGMENT$SDL_SetEventEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetEventEnabled
    • SEGMENT$SDL_EventEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EventEnabled
    • SEGMENT$SDL_RegisterEvents

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RegisterEvents
    • SEGMENT$SDL_GetWindowFromEvent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowFromEvent
    • SEGMENT$SDL_GetBasePath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetBasePath
    • SEGMENT$SDL_GetPrefPath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPrefPath
    • SEGMENT$SDL_GetUserFolder

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetUserFolder
    • SEGMENT$SDL_CreateDirectory

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateDirectory
    • SEGMENT$SDL_EnumerateDirectory

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EnumerateDirectory
    • SEGMENT$SDL_RemovePath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RemovePath
    • SEGMENT$SDL_RenamePath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenamePath
    • SEGMENT$SDL_CopyFile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CopyFile
    • SEGMENT$SDL_GetPathInfo

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPathInfo
    • SEGMENT$SDL_GlobDirectory

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GlobDirectory
    • SEGMENT$SDL_GetCurrentDirectory

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCurrentDirectory
    • SEGMENT$SDL_AddGamepadMapping

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddGamepadMapping
    • SEGMENT$SDL_AddGamepadMappingsFromIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddGamepadMappingsFromIO
    • SEGMENT$SDL_AddGamepadMappingsFromFile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddGamepadMappingsFromFile
    • SEGMENT$SDL_ReloadGamepadMappings

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReloadGamepadMappings
    • SEGMENT$SDL_GetGamepadMappings

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadMappings
    • SEGMENT$SDL_GetGamepadMappingForGUID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadMappingForGUID
    • SEGMENT$SDL_GetGamepadMapping

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadMapping
    • SEGMENT$SDL_SetGamepadMapping

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGamepadMapping
    • SEGMENT$SDL_HasGamepad

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasGamepad
    • SEGMENT$SDL_GetGamepads

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepads
    • SEGMENT$SDL_IsGamepad

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsGamepad
    • SEGMENT$SDL_GetGamepadNameForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadNameForID
    • SEGMENT$SDL_GetGamepadPathForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadPathForID
    • SEGMENT$SDL_GetGamepadPlayerIndexForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadPlayerIndexForID
    • SEGMENT$SDL_GetGamepadGUIDForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadGUIDForID
    • SEGMENT$SDL_GetGamepadVendorForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadVendorForID
    • SEGMENT$SDL_GetGamepadProductForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadProductForID
    • SEGMENT$SDL_GetGamepadProductVersionForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadProductVersionForID
    • SEGMENT$SDL_GetGamepadTypeForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadTypeForID
    • SEGMENT$SDL_GetRealGamepadTypeForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRealGamepadTypeForID
    • SEGMENT$SDL_GetGamepadMappingForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadMappingForID
    • SEGMENT$SDL_OpenGamepad

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenGamepad
    • SEGMENT$SDL_GetGamepadFromID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadFromID
    • SEGMENT$SDL_GetGamepadFromPlayerIndex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadFromPlayerIndex
    • SEGMENT$SDL_GetGamepadProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadProperties
    • SEGMENT$SDL_GetGamepadID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadID
    • SEGMENT$SDL_GetGamepadName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadName
    • SEGMENT$SDL_GetGamepadPath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadPath
    • SEGMENT$SDL_GetGamepadType

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadType
    • SEGMENT$SDL_GetRealGamepadType

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRealGamepadType
    • SEGMENT$SDL_GetGamepadPlayerIndex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadPlayerIndex
    • SEGMENT$SDL_SetGamepadPlayerIndex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGamepadPlayerIndex
    • SEGMENT$SDL_GetGamepadVendor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadVendor
    • SEGMENT$SDL_GetGamepadProduct

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadProduct
    • SEGMENT$SDL_GetGamepadProductVersion

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadProductVersion
    • SEGMENT$SDL_GetGamepadFirmwareVersion

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadFirmwareVersion
    • SEGMENT$SDL_GetGamepadSerial

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadSerial
    • SEGMENT$SDL_GetGamepadSteamHandle

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadSteamHandle
    • SEGMENT$SDL_GetGamepadConnectionState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadConnectionState
    • SEGMENT$SDL_GetGamepadPowerInfo

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadPowerInfo
    • SEGMENT$SDL_GamepadConnected

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GamepadConnected
    • SEGMENT$SDL_GetGamepadJoystick

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadJoystick
    • SEGMENT$SDL_SetGamepadEventsEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGamepadEventsEnabled
    • SEGMENT$SDL_GamepadEventsEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GamepadEventsEnabled
    • SEGMENT$SDL_GetGamepadBindings

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadBindings
    • SEGMENT$SDL_UpdateGamepads

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateGamepads
    • SEGMENT$SDL_GetGamepadTypeFromString

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadTypeFromString
    • SEGMENT$SDL_GetGamepadStringForType

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadStringForType
    • SEGMENT$SDL_GetGamepadAxisFromString

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadAxisFromString
    • SEGMENT$SDL_GetGamepadStringForAxis

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadStringForAxis
    • SEGMENT$SDL_GamepadHasAxis

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GamepadHasAxis
    • SEGMENT$SDL_GetGamepadAxis

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadAxis
    • SEGMENT$SDL_GetGamepadButtonFromString

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadButtonFromString
    • SEGMENT$SDL_GetGamepadStringForButton

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadStringForButton
    • SEGMENT$SDL_GamepadHasButton

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GamepadHasButton
    • SEGMENT$SDL_GetGamepadButton

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadButton
    • SEGMENT$SDL_GetGamepadButtonLabelForType

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadButtonLabelForType
    • SEGMENT$SDL_GetGamepadButtonLabel

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadButtonLabel
    • SEGMENT$SDL_GetNumGamepadTouchpads

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumGamepadTouchpads
    • SEGMENT$SDL_GetNumGamepadTouchpadFingers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumGamepadTouchpadFingers
    • SEGMENT$SDL_GetGamepadTouchpadFinger

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadTouchpadFinger
    • SEGMENT$SDL_GamepadHasSensor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GamepadHasSensor
    • SEGMENT$SDL_SetGamepadSensorEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGamepadSensorEnabled
    • SEGMENT$SDL_GamepadSensorEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GamepadSensorEnabled
    • SEGMENT$SDL_GetGamepadSensorDataRate

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadSensorDataRate
    • SEGMENT$SDL_GetGamepadSensorData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadSensorData
    • SEGMENT$SDL_RumbleGamepad

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RumbleGamepad
    • SEGMENT$SDL_RumbleGamepadTriggers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RumbleGamepadTriggers
    • SEGMENT$SDL_SetGamepadLED

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGamepadLED
    • SEGMENT$SDL_SendGamepadEffect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SendGamepadEffect
    • SEGMENT$SDL_CloseGamepad

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CloseGamepad
    • SEGMENT$SDL_GetGamepadAppleSFSymbolsNameForButton

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadAppleSFSymbolsNameForButton
    • SEGMENT$SDL_GetGamepadAppleSFSymbolsNameForAxis

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGamepadAppleSFSymbolsNameForAxis
    • SEGMENT$SDL_GPUSupportsShaderFormats

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GPUSupportsShaderFormats
    • SEGMENT$SDL_GPUSupportsProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GPUSupportsProperties
    • SEGMENT$SDL_CreateGPUDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateGPUDevice
    • SEGMENT$SDL_CreateGPUDeviceWithProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateGPUDeviceWithProperties
    • SEGMENT$SDL_DestroyGPUDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyGPUDevice
    • SEGMENT$SDL_GetNumGPUDrivers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumGPUDrivers
    • SEGMENT$SDL_GetGPUDriver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGPUDriver
    • SEGMENT$SDL_GetGPUDeviceDriver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGPUDeviceDriver
    • SEGMENT$SDL_GetGPUShaderFormats

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGPUShaderFormats
    • SEGMENT$SDL_CreateGPUComputePipeline

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateGPUComputePipeline
    • SEGMENT$SDL_CreateGPUGraphicsPipeline

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateGPUGraphicsPipeline
    • SEGMENT$SDL_CreateGPUSampler

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateGPUSampler
    • SEGMENT$SDL_CreateGPUShader

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateGPUShader
    • SEGMENT$SDL_CreateGPUTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateGPUTexture
    • SEGMENT$SDL_CreateGPUBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateGPUBuffer
    • SEGMENT$SDL_CreateGPUTransferBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateGPUTransferBuffer
    • SEGMENT$SDL_SetGPUBufferName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGPUBufferName
    • SEGMENT$SDL_SetGPUTextureName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGPUTextureName
    • SEGMENT$SDL_InsertGPUDebugLabel

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_InsertGPUDebugLabel
    • SEGMENT$SDL_PushGPUDebugGroup

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PushGPUDebugGroup
    • SEGMENT$SDL_PopGPUDebugGroup

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PopGPUDebugGroup
    • SEGMENT$SDL_ReleaseGPUTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseGPUTexture
    • SEGMENT$SDL_ReleaseGPUSampler

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseGPUSampler
    • SEGMENT$SDL_ReleaseGPUBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseGPUBuffer
    • SEGMENT$SDL_ReleaseGPUTransferBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseGPUTransferBuffer
    • SEGMENT$SDL_ReleaseGPUComputePipeline

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseGPUComputePipeline
    • SEGMENT$SDL_ReleaseGPUShader

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseGPUShader
    • SEGMENT$SDL_ReleaseGPUGraphicsPipeline

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseGPUGraphicsPipeline
    • SEGMENT$SDL_AcquireGPUCommandBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AcquireGPUCommandBuffer
    • SEGMENT$SDL_PushGPUVertexUniformData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PushGPUVertexUniformData
    • SEGMENT$SDL_PushGPUFragmentUniformData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PushGPUFragmentUniformData
    • SEGMENT$SDL_PushGPUComputeUniformData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PushGPUComputeUniformData
    • SEGMENT$SDL_BeginGPURenderPass

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BeginGPURenderPass
    • SEGMENT$SDL_BindGPUGraphicsPipeline

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUGraphicsPipeline
    • SEGMENT$SDL_SetGPUViewport

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGPUViewport
    • SEGMENT$SDL_SetGPUScissor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGPUScissor
    • SEGMENT$SDL_SetGPUBlendConstants

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGPUBlendConstants
    • SEGMENT$SDL_SetGPUStencilReference

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGPUStencilReference
    • SEGMENT$SDL_BindGPUVertexBuffers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUVertexBuffers
    • SEGMENT$SDL_BindGPUIndexBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUIndexBuffer
    • SEGMENT$SDL_BindGPUVertexSamplers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUVertexSamplers
    • SEGMENT$SDL_BindGPUVertexStorageTextures

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUVertexStorageTextures
    • SEGMENT$SDL_BindGPUVertexStorageBuffers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUVertexStorageBuffers
    • SEGMENT$SDL_BindGPUFragmentSamplers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUFragmentSamplers
    • SEGMENT$SDL_BindGPUFragmentStorageTextures

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUFragmentStorageTextures
    • SEGMENT$SDL_BindGPUFragmentStorageBuffers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUFragmentStorageBuffers
    • SEGMENT$SDL_DrawGPUIndexedPrimitives

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DrawGPUIndexedPrimitives
    • SEGMENT$SDL_DrawGPUPrimitives

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DrawGPUPrimitives
    • SEGMENT$SDL_DrawGPUPrimitivesIndirect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DrawGPUPrimitivesIndirect
    • SEGMENT$SDL_DrawGPUIndexedPrimitivesIndirect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DrawGPUIndexedPrimitivesIndirect
    • SEGMENT$SDL_EndGPURenderPass

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EndGPURenderPass
    • SEGMENT$SDL_BeginGPUComputePass

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BeginGPUComputePass
    • SEGMENT$SDL_BindGPUComputePipeline

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUComputePipeline
    • SEGMENT$SDL_BindGPUComputeSamplers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUComputeSamplers
    • SEGMENT$SDL_BindGPUComputeStorageTextures

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUComputeStorageTextures
    • SEGMENT$SDL_BindGPUComputeStorageBuffers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BindGPUComputeStorageBuffers
    • SEGMENT$SDL_DispatchGPUCompute

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DispatchGPUCompute
    • SEGMENT$SDL_DispatchGPUComputeIndirect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DispatchGPUComputeIndirect
    • SEGMENT$SDL_EndGPUComputePass

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EndGPUComputePass
    • SEGMENT$SDL_MapGPUTransferBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MapGPUTransferBuffer
    • SEGMENT$SDL_UnmapGPUTransferBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnmapGPUTransferBuffer
    • SEGMENT$SDL_BeginGPUCopyPass

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BeginGPUCopyPass
    • SEGMENT$SDL_UploadToGPUTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UploadToGPUTexture
    • SEGMENT$SDL_UploadToGPUBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UploadToGPUBuffer
    • SEGMENT$SDL_CopyGPUTextureToTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CopyGPUTextureToTexture
    • SEGMENT$SDL_CopyGPUBufferToBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CopyGPUBufferToBuffer
    • SEGMENT$SDL_DownloadFromGPUTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DownloadFromGPUTexture
    • SEGMENT$SDL_DownloadFromGPUBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DownloadFromGPUBuffer
    • SEGMENT$SDL_EndGPUCopyPass

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EndGPUCopyPass
    • SEGMENT$SDL_GenerateMipmapsForGPUTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GenerateMipmapsForGPUTexture
    • SEGMENT$SDL_BlitGPUTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BlitGPUTexture
    • SEGMENT$SDL_WindowSupportsGPUSwapchainComposition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WindowSupportsGPUSwapchainComposition
    • SEGMENT$SDL_WindowSupportsGPUPresentMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WindowSupportsGPUPresentMode
    • SEGMENT$SDL_ClaimWindowForGPUDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ClaimWindowForGPUDevice
    • SEGMENT$SDL_ReleaseWindowFromGPUDevice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseWindowFromGPUDevice
    • SEGMENT$SDL_SetGPUSwapchainParameters

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGPUSwapchainParameters
    • SEGMENT$SDL_SetGPUAllowedFramesInFlight

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetGPUAllowedFramesInFlight
    • SEGMENT$SDL_GetGPUSwapchainTextureFormat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGPUSwapchainTextureFormat
    • SEGMENT$SDL_AcquireGPUSwapchainTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AcquireGPUSwapchainTexture
    • SEGMENT$SDL_WaitForGPUSwapchain

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitForGPUSwapchain
    • SEGMENT$SDL_WaitAndAcquireGPUSwapchainTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitAndAcquireGPUSwapchainTexture
    • SEGMENT$SDL_SubmitGPUCommandBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SubmitGPUCommandBuffer
    • SEGMENT$SDL_SubmitGPUCommandBufferAndAcquireFence

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SubmitGPUCommandBufferAndAcquireFence
    • SEGMENT$SDL_CancelGPUCommandBuffer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CancelGPUCommandBuffer
    • SEGMENT$SDL_WaitForGPUIdle

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitForGPUIdle
    • SEGMENT$SDL_WaitForGPUFences

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitForGPUFences
    • SEGMENT$SDL_QueryGPUFence

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_QueryGPUFence
    • SEGMENT$SDL_ReleaseGPUFence

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReleaseGPUFence
    • SEGMENT$SDL_GPUTextureFormatTexelBlockSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GPUTextureFormatTexelBlockSize
    • SEGMENT$SDL_GPUTextureSupportsFormat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GPUTextureSupportsFormat
    • SEGMENT$SDL_GPUTextureSupportsSampleCount

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GPUTextureSupportsSampleCount
    • SEGMENT$SDL_CalculateGPUTextureFormatSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CalculateGPUTextureFormatSize
    • SEGMENT$SDL_GDKSuspendGPU

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GDKSuspendGPU
    • SEGMENT$SDL_GDKResumeGPU

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GDKResumeGPU
    • SEGMENT$SDL_GUIDToString

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GUIDToString
    • SEGMENT$SDL_StringToGUID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StringToGUID
    • SEGMENT$SDL_GetHaptics

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetHaptics
    • SEGMENT$SDL_GetHapticNameForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetHapticNameForID
    • SEGMENT$SDL_OpenHaptic

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenHaptic
    • SEGMENT$SDL_GetHapticFromID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetHapticFromID
    • SEGMENT$SDL_GetHapticID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetHapticID
    • SEGMENT$SDL_GetHapticName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetHapticName
    • SEGMENT$SDL_IsMouseHaptic

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsMouseHaptic
    • SEGMENT$SDL_OpenHapticFromMouse

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenHapticFromMouse
    • SEGMENT$SDL_IsJoystickHaptic

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsJoystickHaptic
    • SEGMENT$SDL_OpenHapticFromJoystick

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenHapticFromJoystick
    • SEGMENT$SDL_CloseHaptic

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CloseHaptic
    • SEGMENT$SDL_GetMaxHapticEffects

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetMaxHapticEffects
    • SEGMENT$SDL_GetMaxHapticEffectsPlaying

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetMaxHapticEffectsPlaying
    • SEGMENT$SDL_GetHapticFeatures

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetHapticFeatures
    • SEGMENT$SDL_GetNumHapticAxes

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumHapticAxes
    • SEGMENT$SDL_HapticEffectSupported

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HapticEffectSupported
    • SEGMENT$SDL_CreateHapticEffect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateHapticEffect
    • SEGMENT$SDL_UpdateHapticEffect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateHapticEffect
    • SEGMENT$SDL_RunHapticEffect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RunHapticEffect
    • SEGMENT$SDL_StopHapticEffect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StopHapticEffect
    • SEGMENT$SDL_DestroyHapticEffect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyHapticEffect
    • SEGMENT$SDL_GetHapticEffectStatus

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetHapticEffectStatus
    • SEGMENT$SDL_SetHapticGain

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetHapticGain
    • SEGMENT$SDL_SetHapticAutocenter

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetHapticAutocenter
    • SEGMENT$SDL_PauseHaptic

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PauseHaptic
    • SEGMENT$SDL_ResumeHaptic

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ResumeHaptic
    • SEGMENT$SDL_StopHapticEffects

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StopHapticEffects
    • SEGMENT$SDL_HapticRumbleSupported

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HapticRumbleSupported
    • SEGMENT$SDL_InitHapticRumble

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_InitHapticRumble
    • SEGMENT$SDL_PlayHapticRumble

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PlayHapticRumble
    • SEGMENT$SDL_StopHapticRumble

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StopHapticRumble
    • SEGMENT$SDL_hid_init

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_init
    • SEGMENT$SDL_hid_exit

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_exit
    • SEGMENT$SDL_hid_device_change_count

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_device_change_count
    • SEGMENT$SDL_hid_enumerate

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_enumerate
    • SEGMENT$SDL_hid_free_enumeration

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_free_enumeration
    • SEGMENT$SDL_hid_open

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_open
    • SEGMENT$SDL_hid_open_path

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_open_path
    • SEGMENT$SDL_hid_write

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_write
    • SEGMENT$SDL_hid_read_timeout

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_read_timeout
    • SEGMENT$SDL_hid_read

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_read
    • SEGMENT$SDL_hid_set_nonblocking

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_set_nonblocking
    • SEGMENT$SDL_hid_send_feature_report

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_send_feature_report
    • SEGMENT$SDL_hid_get_feature_report

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_get_feature_report
    • SEGMENT$SDL_hid_get_input_report

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_get_input_report
    • SEGMENT$SDL_hid_close

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_close
    • SEGMENT$SDL_hid_get_manufacturer_string

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_get_manufacturer_string
    • SEGMENT$SDL_hid_get_product_string

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_get_product_string
    • SEGMENT$SDL_hid_get_serial_number_string

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_get_serial_number_string
    • SEGMENT$SDL_hid_get_indexed_string

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_get_indexed_string
    • SEGMENT$SDL_hid_get_device_info

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_get_device_info
    • SEGMENT$SDL_hid_get_report_descriptor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_get_report_descriptor
    • SEGMENT$SDL_hid_ble_scan

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_hid_ble_scan
    • SEGMENT$SDL_SetHintWithPriority

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetHintWithPriority
    • SEGMENT$SDL_SetHint

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetHint
    • SEGMENT$SDL_ResetHint

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ResetHint
    • SEGMENT$SDL_ResetHints

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ResetHints
    • SEGMENT$SDL_GetHint

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetHint
    • SEGMENT$SDL_GetHintBoolean

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetHintBoolean
    • SEGMENT$SDL_AddHintCallback

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddHintCallback
    • SEGMENT$SDL_RemoveHintCallback

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RemoveHintCallback
    • SEGMENT$SDL_Init

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_Init
    • SEGMENT$SDL_InitSubSystem

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_InitSubSystem
    • SEGMENT$SDL_QuitSubSystem

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_QuitSubSystem
    • SEGMENT$SDL_WasInit

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WasInit
    • SEGMENT$SDL_Quit

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_Quit
    • SEGMENT$SDL_IsMainThread

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsMainThread
    • SEGMENT$SDL_RunOnMainThread

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RunOnMainThread
    • SEGMENT$SDL_SetAppMetadata

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAppMetadata
    • SEGMENT$SDL_SetAppMetadataProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetAppMetadataProperty
    • SEGMENT$SDL_GetAppMetadataProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAppMetadataProperty
    • SEGMENT$SDL_IOFromFile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IOFromFile
    • SEGMENT$SDL_IOFromMem

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IOFromMem
    • SEGMENT$SDL_IOFromConstMem

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IOFromConstMem
    • SEGMENT$SDL_IOFromDynamicMem

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IOFromDynamicMem
    • SEGMENT$SDL_OpenIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenIO
    • SEGMENT$SDL_CloseIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CloseIO
    • SEGMENT$SDL_GetIOProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetIOProperties
    • SEGMENT$SDL_GetIOStatus

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetIOStatus
    • SEGMENT$SDL_GetIOSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetIOSize
    • SEGMENT$SDL_SeekIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SeekIO
    • SEGMENT$SDL_TellIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TellIO
    • SEGMENT$SDL_ReadIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadIO
    • SEGMENT$SDL_WriteIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteIO
    • SEGMENT$SDL_FlushIO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FlushIO
    • SEGMENT$SDL_LoadFile_IO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LoadFile_IO
    • SEGMENT$SDL_LoadFile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LoadFile
    • SEGMENT$SDL_SaveFile_IO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SaveFile_IO
    • SEGMENT$SDL_SaveFile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SaveFile
    • SEGMENT$SDL_ReadU8

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadU8
    • SEGMENT$SDL_ReadS8

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadS8
    • SEGMENT$SDL_ReadU16LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadU16LE
    • SEGMENT$SDL_ReadS16LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadS16LE
    • SEGMENT$SDL_ReadU16BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadU16BE
    • SEGMENT$SDL_ReadS16BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadS16BE
    • SEGMENT$SDL_ReadU32LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadU32LE
    • SEGMENT$SDL_ReadS32LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadS32LE
    • SEGMENT$SDL_ReadU32BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadU32BE
    • SEGMENT$SDL_ReadS32BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadS32BE
    • SEGMENT$SDL_ReadU64LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadU64LE
    • SEGMENT$SDL_ReadS64LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadS64LE
    • SEGMENT$SDL_ReadU64BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadU64BE
    • SEGMENT$SDL_ReadS64BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadS64BE
    • SEGMENT$SDL_WriteU8

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteU8
    • SEGMENT$SDL_WriteS8

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteS8
    • SEGMENT$SDL_WriteU16LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteU16LE
    • SEGMENT$SDL_WriteS16LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteS16LE
    • SEGMENT$SDL_WriteU16BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteU16BE
    • SEGMENT$SDL_WriteS16BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteS16BE
    • SEGMENT$SDL_WriteU32LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteU32LE
    • SEGMENT$SDL_WriteS32LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteS32LE
    • SEGMENT$SDL_WriteU32BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteU32BE
    • SEGMENT$SDL_WriteS32BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteS32BE
    • SEGMENT$SDL_WriteU64LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteU64LE
    • SEGMENT$SDL_WriteS64LE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteS64LE
    • SEGMENT$SDL_WriteU64BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteU64BE
    • SEGMENT$SDL_WriteS64BE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteS64BE
    • SEGMENT$SDL_LockJoysticks

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockJoysticks
    • SEGMENT$SDL_UnlockJoysticks

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnlockJoysticks
    • SEGMENT$SDL_HasJoystick

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasJoystick
    • SEGMENT$SDL_GetJoysticks

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoysticks
    • SEGMENT$SDL_GetJoystickNameForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickNameForID
    • SEGMENT$SDL_GetJoystickPathForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickPathForID
    • SEGMENT$SDL_GetJoystickPlayerIndexForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickPlayerIndexForID
    • SEGMENT$SDL_GetJoystickGUIDForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickGUIDForID
    • SEGMENT$SDL_GetJoystickVendorForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickVendorForID
    • SEGMENT$SDL_GetJoystickProductForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickProductForID
    • SEGMENT$SDL_GetJoystickProductVersionForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickProductVersionForID
    • SEGMENT$SDL_GetJoystickTypeForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickTypeForID
    • SEGMENT$SDL_OpenJoystick

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenJoystick
    • SEGMENT$SDL_GetJoystickFromID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickFromID
    • SEGMENT$SDL_GetJoystickFromPlayerIndex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickFromPlayerIndex
    • SEGMENT$SDL_AttachVirtualJoystick

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AttachVirtualJoystick
    • SEGMENT$SDL_DetachVirtualJoystick

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DetachVirtualJoystick
    • SEGMENT$SDL_IsJoystickVirtual

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsJoystickVirtual
    • SEGMENT$SDL_SetJoystickVirtualAxis

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetJoystickVirtualAxis
    • SEGMENT$SDL_SetJoystickVirtualBall

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetJoystickVirtualBall
    • SEGMENT$SDL_SetJoystickVirtualButton

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetJoystickVirtualButton
    • SEGMENT$SDL_SetJoystickVirtualHat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetJoystickVirtualHat
    • SEGMENT$SDL_SetJoystickVirtualTouchpad

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetJoystickVirtualTouchpad
    • SEGMENT$SDL_SendJoystickVirtualSensorData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SendJoystickVirtualSensorData
    • SEGMENT$SDL_GetJoystickProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickProperties
    • SEGMENT$SDL_GetJoystickName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickName
    • SEGMENT$SDL_GetJoystickPath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickPath
    • SEGMENT$SDL_GetJoystickPlayerIndex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickPlayerIndex
    • SEGMENT$SDL_SetJoystickPlayerIndex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetJoystickPlayerIndex
    • SEGMENT$SDL_GetJoystickGUID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickGUID
    • SEGMENT$SDL_GetJoystickVendor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickVendor
    • SEGMENT$SDL_GetJoystickProduct

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickProduct
    • SEGMENT$SDL_GetJoystickProductVersion

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickProductVersion
    • SEGMENT$SDL_GetJoystickFirmwareVersion

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickFirmwareVersion
    • SEGMENT$SDL_GetJoystickSerial

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickSerial
    • SEGMENT$SDL_GetJoystickType

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickType
    • SEGMENT$SDL_GetJoystickGUIDInfo

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickGUIDInfo
    • SEGMENT$SDL_JoystickConnected

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_JoystickConnected
    • SEGMENT$SDL_GetJoystickID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickID
    • SEGMENT$SDL_GetNumJoystickAxes

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumJoystickAxes
    • SEGMENT$SDL_GetNumJoystickBalls

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumJoystickBalls
    • SEGMENT$SDL_GetNumJoystickHats

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumJoystickHats
    • SEGMENT$SDL_GetNumJoystickButtons

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumJoystickButtons
    • SEGMENT$SDL_SetJoystickEventsEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetJoystickEventsEnabled
    • SEGMENT$SDL_JoystickEventsEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_JoystickEventsEnabled
    • SEGMENT$SDL_UpdateJoysticks

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateJoysticks
    • SEGMENT$SDL_GetJoystickAxis

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickAxis
    • SEGMENT$SDL_GetJoystickAxisInitialState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickAxisInitialState
    • SEGMENT$SDL_GetJoystickBall

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickBall
    • SEGMENT$SDL_GetJoystickHat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickHat
    • SEGMENT$SDL_GetJoystickButton

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickButton
    • SEGMENT$SDL_RumbleJoystick

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RumbleJoystick
    • SEGMENT$SDL_RumbleJoystickTriggers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RumbleJoystickTriggers
    • SEGMENT$SDL_SetJoystickLED

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetJoystickLED
    • SEGMENT$SDL_SendJoystickEffect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SendJoystickEffect
    • SEGMENT$SDL_CloseJoystick

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CloseJoystick
    • SEGMENT$SDL_GetJoystickConnectionState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickConnectionState
    • SEGMENT$SDL_GetJoystickPowerInfo

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetJoystickPowerInfo
    • SEGMENT$SDL_HasKeyboard

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasKeyboard
    • SEGMENT$SDL_GetKeyboards

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetKeyboards
    • SEGMENT$SDL_GetKeyboardNameForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetKeyboardNameForID
    • SEGMENT$SDL_GetKeyboardFocus

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetKeyboardFocus
    • SEGMENT$SDL_GetKeyboardState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetKeyboardState
    • SEGMENT$SDL_ResetKeyboard

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ResetKeyboard
    • SEGMENT$SDL_GetModState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetModState
    • SEGMENT$SDL_SetModState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetModState
    • SEGMENT$SDL_GetKeyFromScancode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetKeyFromScancode
    • SEGMENT$SDL_GetScancodeFromKey

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetScancodeFromKey
    • SEGMENT$SDL_SetScancodeName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetScancodeName
    • SEGMENT$SDL_GetScancodeName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetScancodeName
    • SEGMENT$SDL_GetScancodeFromName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetScancodeFromName
    • SEGMENT$SDL_GetKeyName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetKeyName
    • SEGMENT$SDL_GetKeyFromName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetKeyFromName
    • SEGMENT$SDL_StartTextInput

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StartTextInput
    • SEGMENT$SDL_StartTextInputWithProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StartTextInputWithProperties
    • SEGMENT$SDL_TextInputActive

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TextInputActive
    • SEGMENT$SDL_StopTextInput

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StopTextInput
    • SEGMENT$SDL_ClearComposition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ClearComposition
    • SEGMENT$SDL_SetTextInputArea

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTextInputArea
    • SEGMENT$SDL_GetTextInputArea

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTextInputArea
    • SEGMENT$SDL_HasScreenKeyboardSupport

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasScreenKeyboardSupport
    • SEGMENT$SDL_ScreenKeyboardShown

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ScreenKeyboardShown
    • SEGMENT$SDL_LoadObject

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LoadObject
    • SEGMENT$SDL_LoadFunction

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LoadFunction
    • SEGMENT$SDL_UnloadObject

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnloadObject
    • SEGMENT$SDL_GetPreferredLocales

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPreferredLocales
    • SEGMENT$SDL_SetLogPriorities

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetLogPriorities
    • SEGMENT$SDL_SetLogPriority

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetLogPriority
    • SEGMENT$SDL_GetLogPriority

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetLogPriority
    • SEGMENT$SDL_ResetLogPriorities

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ResetLogPriorities
    • SEGMENT$SDL_SetLogPriorityPrefix

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetLogPriorityPrefix
    • SEGMENT$SDL_GetDefaultLogOutputFunction

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDefaultLogOutputFunction
    • SEGMENT$SDL_GetLogOutputFunction

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetLogOutputFunction
    • SEGMENT$SDL_SetLogOutputFunction

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetLogOutputFunction
    • SEGMENT$SDL_ShowMessageBox

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowMessageBox
    • SEGMENT$SDL_ShowSimpleMessageBox

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowSimpleMessageBox
    • SEGMENT$SDL_Metal_CreateView

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_Metal_CreateView
    • SEGMENT$SDL_Metal_DestroyView

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_Metal_DestroyView
    • SEGMENT$SDL_Metal_GetLayer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_Metal_GetLayer
    • SEGMENT$SDL_OpenURL

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenURL
    • SEGMENT$SDL_HasMouse

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasMouse
    • SEGMENT$SDL_GetMice

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetMice
    • SEGMENT$SDL_GetMouseNameForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetMouseNameForID
    • SEGMENT$SDL_GetMouseFocus

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetMouseFocus
    • SEGMENT$SDL_GetMouseState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetMouseState
    • SEGMENT$SDL_GetGlobalMouseState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGlobalMouseState
    • SEGMENT$SDL_GetRelativeMouseState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRelativeMouseState
    • SEGMENT$SDL_WarpMouseInWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WarpMouseInWindow
    • SEGMENT$SDL_WarpMouseGlobal

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WarpMouseGlobal
    • SEGMENT$SDL_SetWindowRelativeMouseMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowRelativeMouseMode
    • SEGMENT$SDL_GetWindowRelativeMouseMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowRelativeMouseMode
    • SEGMENT$SDL_CaptureMouse

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CaptureMouse
    • SEGMENT$SDL_CreateCursor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateCursor
    • SEGMENT$SDL_CreateColorCursor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateColorCursor
    • SEGMENT$SDL_CreateSystemCursor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateSystemCursor
    • SEGMENT$SDL_SetCursor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetCursor
    • SEGMENT$SDL_GetCursor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCursor
    • SEGMENT$SDL_GetDefaultCursor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDefaultCursor
    • SEGMENT$SDL_DestroyCursor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyCursor
    • SEGMENT$SDL_ShowCursor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowCursor
    • SEGMENT$SDL_HideCursor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HideCursor
    • SEGMENT$SDL_CursorVisible

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CursorVisible
    • SEGMENT$SDL_CreateMutex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateMutex
    • SEGMENT$SDL_LockMutex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockMutex
    • SEGMENT$SDL_TryLockMutex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TryLockMutex
    • SEGMENT$SDL_UnlockMutex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnlockMutex
    • SEGMENT$SDL_DestroyMutex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyMutex
    • SEGMENT$SDL_CreateRWLock

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateRWLock
    • SEGMENT$SDL_LockRWLockForReading

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockRWLockForReading
    • SEGMENT$SDL_LockRWLockForWriting

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockRWLockForWriting
    • SEGMENT$SDL_TryLockRWLockForReading

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TryLockRWLockForReading
    • SEGMENT$SDL_TryLockRWLockForWriting

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TryLockRWLockForWriting
    • SEGMENT$SDL_UnlockRWLock

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnlockRWLock
    • SEGMENT$SDL_DestroyRWLock

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyRWLock
    • SEGMENT$SDL_CreateSemaphore

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateSemaphore
    • SEGMENT$SDL_DestroySemaphore

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroySemaphore
    • SEGMENT$SDL_WaitSemaphore

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitSemaphore
    • SEGMENT$SDL_TryWaitSemaphore

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TryWaitSemaphore
    • SEGMENT$SDL_WaitSemaphoreTimeout

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitSemaphoreTimeout
    • SEGMENT$SDL_SignalSemaphore

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SignalSemaphore
    • SEGMENT$SDL_GetSemaphoreValue

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSemaphoreValue
    • SEGMENT$SDL_CreateCondition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateCondition
    • SEGMENT$SDL_DestroyCondition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyCondition
    • SEGMENT$SDL_SignalCondition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SignalCondition
    • SEGMENT$SDL_BroadcastCondition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BroadcastCondition
    • SEGMENT$SDL_WaitCondition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitCondition
    • SEGMENT$SDL_WaitConditionTimeout

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitConditionTimeout
    • SEGMENT$SDL_ShouldInit

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShouldInit
    • SEGMENT$SDL_ShouldQuit

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShouldQuit
    • SEGMENT$SDL_SetInitialized

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetInitialized
    • SEGMENT$SDL_GetPixelFormatName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPixelFormatName
    • SEGMENT$SDL_GetMasksForPixelFormat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetMasksForPixelFormat
    • SEGMENT$SDL_GetPixelFormatForMasks

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPixelFormatForMasks
    • SEGMENT$SDL_GetPixelFormatDetails

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPixelFormatDetails
    • SEGMENT$SDL_CreatePalette

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreatePalette
    • SEGMENT$SDL_SetPaletteColors

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetPaletteColors
    • SEGMENT$SDL_DestroyPalette

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyPalette
    • SEGMENT$SDL_MapRGB

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MapRGB
    • SEGMENT$SDL_MapRGBA

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MapRGBA
    • SEGMENT$SDL_GetRGB

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRGB
    • SEGMENT$SDL_GetRGBA

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRGBA
    • SEGMENT$SDL_GetPlatform

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPlatform
    • SEGMENT$SDL_GetPowerInfo

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPowerInfo
    • SEGMENT$SDL_CreateProcess

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateProcess
    • SEGMENT$SDL_CreateProcessWithProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateProcessWithProperties
    • SEGMENT$SDL_GetProcessProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetProcessProperties
    • SEGMENT$SDL_ReadProcess

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadProcess
    • SEGMENT$SDL_GetProcessInput

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetProcessInput
    • SEGMENT$SDL_GetProcessOutput

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetProcessOutput
    • SEGMENT$SDL_KillProcess

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_KillProcess
    • SEGMENT$SDL_WaitProcess

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitProcess
    • SEGMENT$SDL_DestroyProcess

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyProcess
    • SEGMENT$SDL_GetGlobalProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGlobalProperties
    • SEGMENT$SDL_CreateProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateProperties
    • SEGMENT$SDL_CopyProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CopyProperties
    • SEGMENT$SDL_LockProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockProperties
    • SEGMENT$SDL_UnlockProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnlockProperties
    • SEGMENT$SDL_SetPointerPropertyWithCleanup

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetPointerPropertyWithCleanup
    • SEGMENT$SDL_SetPointerProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetPointerProperty
    • SEGMENT$SDL_SetStringProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetStringProperty
    • SEGMENT$SDL_SetNumberProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetNumberProperty
    • SEGMENT$SDL_SetFloatProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetFloatProperty
    • SEGMENT$SDL_SetBooleanProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetBooleanProperty
    • SEGMENT$SDL_HasProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasProperty
    • SEGMENT$SDL_GetPropertyType

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPropertyType
    • SEGMENT$SDL_GetPointerProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPointerProperty
    • SEGMENT$SDL_GetStringProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetStringProperty
    • SEGMENT$SDL_GetNumberProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumberProperty
    • SEGMENT$SDL_GetFloatProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetFloatProperty
    • SEGMENT$SDL_GetBooleanProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetBooleanProperty
    • SEGMENT$SDL_ClearProperty

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ClearProperty
    • SEGMENT$SDL_EnumerateProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EnumerateProperties
    • SEGMENT$SDL_DestroyProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyProperties
    • SEGMENT$SDL_HasRectIntersection

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasRectIntersection
    • SEGMENT$SDL_GetRectIntersection

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRectIntersection
    • SEGMENT$SDL_GetRectUnion

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRectUnion
    • SEGMENT$SDL_GetRectEnclosingPoints

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRectEnclosingPoints
    • SEGMENT$SDL_GetRectAndLineIntersection

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRectAndLineIntersection
    • SEGMENT$SDL_HasRectIntersectionFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HasRectIntersectionFloat
    • SEGMENT$SDL_GetRectIntersectionFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRectIntersectionFloat
    • SEGMENT$SDL_GetRectUnionFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRectUnionFloat
    • SEGMENT$SDL_GetRectEnclosingPointsFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRectEnclosingPointsFloat
    • SEGMENT$SDL_GetRectAndLineIntersectionFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRectAndLineIntersectionFloat
    • SEGMENT$SDL_GetNumRenderDrivers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumRenderDrivers
    • SEGMENT$SDL_GetRenderDriver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderDriver
    • SEGMENT$SDL_CreateWindowAndRenderer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateWindowAndRenderer
    • SEGMENT$SDL_CreateRenderer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateRenderer
    • SEGMENT$SDL_CreateRendererWithProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateRendererWithProperties
    • SEGMENT$SDL_CreateSoftwareRenderer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateSoftwareRenderer
    • SEGMENT$SDL_GetRenderer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderer
    • SEGMENT$SDL_GetRenderWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderWindow
    • SEGMENT$SDL_GetRendererName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRendererName
    • SEGMENT$SDL_GetRendererProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRendererProperties
    • SEGMENT$SDL_GetRenderOutputSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderOutputSize
    • SEGMENT$SDL_GetCurrentRenderOutputSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCurrentRenderOutputSize
    • SEGMENT$SDL_CreateTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateTexture
    • SEGMENT$SDL_CreateTextureFromSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateTextureFromSurface
    • SEGMENT$SDL_CreateTextureWithProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateTextureWithProperties
    • SEGMENT$SDL_GetTextureProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTextureProperties
    • SEGMENT$SDL_GetRendererFromTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRendererFromTexture
    • SEGMENT$SDL_GetTextureSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTextureSize
    • SEGMENT$SDL_SetTextureColorMod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTextureColorMod
    • SEGMENT$SDL_SetTextureColorModFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTextureColorModFloat
    • SEGMENT$SDL_GetTextureColorMod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTextureColorMod
    • SEGMENT$SDL_GetTextureColorModFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTextureColorModFloat
    • SEGMENT$SDL_SetTextureAlphaMod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTextureAlphaMod
    • SEGMENT$SDL_SetTextureAlphaModFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTextureAlphaModFloat
    • SEGMENT$SDL_GetTextureAlphaMod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTextureAlphaMod
    • SEGMENT$SDL_GetTextureAlphaModFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTextureAlphaModFloat
    • SEGMENT$SDL_SetTextureBlendMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTextureBlendMode
    • SEGMENT$SDL_GetTextureBlendMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTextureBlendMode
    • SEGMENT$SDL_SetTextureScaleMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTextureScaleMode
    • SEGMENT$SDL_GetTextureScaleMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTextureScaleMode
    • SEGMENT$SDL_UpdateTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateTexture
    • SEGMENT$SDL_UpdateYUVTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateYUVTexture
    • SEGMENT$SDL_UpdateNVTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateNVTexture
    • SEGMENT$SDL_LockTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockTexture
    • SEGMENT$SDL_LockTextureToSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockTextureToSurface
    • SEGMENT$SDL_UnlockTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnlockTexture
    • SEGMENT$SDL_SetRenderTarget

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderTarget
    • SEGMENT$SDL_GetRenderTarget

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderTarget
    • SEGMENT$SDL_SetRenderLogicalPresentation

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderLogicalPresentation
    • SEGMENT$SDL_GetRenderLogicalPresentation

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderLogicalPresentation
    • SEGMENT$SDL_GetRenderLogicalPresentationRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderLogicalPresentationRect
    • SEGMENT$SDL_RenderCoordinatesFromWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderCoordinatesFromWindow
    • SEGMENT$SDL_RenderCoordinatesToWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderCoordinatesToWindow
    • SEGMENT$SDL_ConvertEventToRenderCoordinates

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ConvertEventToRenderCoordinates
    • SEGMENT$SDL_SetRenderViewport

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderViewport
    • SEGMENT$SDL_GetRenderViewport

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderViewport
    • SEGMENT$SDL_RenderViewportSet

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderViewportSet
    • SEGMENT$SDL_GetRenderSafeArea

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderSafeArea
    • SEGMENT$SDL_SetRenderClipRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderClipRect
    • SEGMENT$SDL_GetRenderClipRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderClipRect
    • SEGMENT$SDL_RenderClipEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderClipEnabled
    • SEGMENT$SDL_SetRenderScale

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderScale
    • SEGMENT$SDL_GetRenderScale

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderScale
    • SEGMENT$SDL_SetRenderDrawColor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderDrawColor
    • SEGMENT$SDL_SetRenderDrawColorFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderDrawColorFloat
    • SEGMENT$SDL_GetRenderDrawColor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderDrawColor
    • SEGMENT$SDL_GetRenderDrawColorFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderDrawColorFloat
    • SEGMENT$SDL_SetRenderColorScale

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderColorScale
    • SEGMENT$SDL_GetRenderColorScale

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderColorScale
    • SEGMENT$SDL_SetRenderDrawBlendMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderDrawBlendMode
    • SEGMENT$SDL_GetRenderDrawBlendMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderDrawBlendMode
    • SEGMENT$SDL_RenderClear

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderClear
    • SEGMENT$SDL_RenderPoint

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderPoint
    • SEGMENT$SDL_RenderPoints

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderPoints
    • SEGMENT$SDL_RenderLine

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderLine
    • SEGMENT$SDL_RenderLines

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderLines
    • SEGMENT$SDL_RenderRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderRect
    • SEGMENT$SDL_RenderRects

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderRects
    • SEGMENT$SDL_RenderFillRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderFillRect
    • SEGMENT$SDL_RenderFillRects

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderFillRects
    • SEGMENT$SDL_RenderTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderTexture
    • SEGMENT$SDL_RenderTextureRotated

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderTextureRotated
    • SEGMENT$SDL_RenderTextureAffine

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderTextureAffine
    • SEGMENT$SDL_RenderTextureTiled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderTextureTiled
    • SEGMENT$SDL_RenderTexture9Grid

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderTexture9Grid
    • SEGMENT$SDL_RenderGeometry

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderGeometry
    • SEGMENT$SDL_RenderGeometryRaw

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderGeometryRaw
    • SEGMENT$SDL_RenderReadPixels

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderReadPixels
    • SEGMENT$SDL_RenderPresent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderPresent
    • SEGMENT$SDL_DestroyTexture

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyTexture
    • SEGMENT$SDL_DestroyRenderer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyRenderer
    • SEGMENT$SDL_FlushRenderer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FlushRenderer
    • SEGMENT$SDL_GetRenderMetalLayer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderMetalLayer
    • SEGMENT$SDL_GetRenderMetalCommandEncoder

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderMetalCommandEncoder
    • SEGMENT$SDL_AddVulkanRenderSemaphores

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddVulkanRenderSemaphores
    • SEGMENT$SDL_SetRenderVSync

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetRenderVSync
    • SEGMENT$SDL_GetRenderVSync

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRenderVSync
    • SEGMENT$SDL_RenderDebugText

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenderDebugText
    • SEGMENT$SDL_GetSensors

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensors
    • SEGMENT$SDL_GetSensorNameForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorNameForID
    • SEGMENT$SDL_GetSensorTypeForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorTypeForID
    • SEGMENT$SDL_GetSensorNonPortableTypeForID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorNonPortableTypeForID
    • SEGMENT$SDL_OpenSensor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenSensor
    • SEGMENT$SDL_GetSensorFromID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorFromID
    • SEGMENT$SDL_GetSensorProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorProperties
    • SEGMENT$SDL_GetSensorName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorName
    • SEGMENT$SDL_GetSensorType

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorType
    • SEGMENT$SDL_GetSensorNonPortableType

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorNonPortableType
    • SEGMENT$SDL_GetSensorID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorID
    • SEGMENT$SDL_GetSensorData

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSensorData
    • SEGMENT$SDL_CloseSensor

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CloseSensor
    • SEGMENT$SDL_UpdateSensors

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateSensors
    • SEGMENT$SDL_OpenTitleStorage

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenTitleStorage
    • SEGMENT$SDL_OpenUserStorage

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenUserStorage
    • SEGMENT$SDL_OpenFileStorage

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenFileStorage
    • SEGMENT$SDL_OpenStorage

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OpenStorage
    • SEGMENT$SDL_CloseStorage

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CloseStorage
    • SEGMENT$SDL_StorageReady

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StorageReady
    • SEGMENT$SDL_GetStorageFileSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetStorageFileSize
    • SEGMENT$SDL_ReadStorageFile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadStorageFile
    • SEGMENT$SDL_WriteStorageFile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteStorageFile
    • SEGMENT$SDL_CreateStorageDirectory

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateStorageDirectory
    • SEGMENT$SDL_EnumerateStorageDirectory

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EnumerateStorageDirectory
    • SEGMENT$SDL_RemoveStoragePath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RemoveStoragePath
    • SEGMENT$SDL_RenameStoragePath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RenameStoragePath
    • SEGMENT$SDL_CopyStorageFile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CopyStorageFile
    • SEGMENT$SDL_GetStoragePathInfo

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetStoragePathInfo
    • SEGMENT$SDL_GetStorageSpaceRemaining

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetStorageSpaceRemaining
    • SEGMENT$SDL_GlobStorageDirectory

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GlobStorageDirectory
    • SEGMENT$SDL_CreateSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateSurface
    • SEGMENT$SDL_CreateSurfaceFrom

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateSurfaceFrom
    • SEGMENT$SDL_DestroySurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroySurface
    • SEGMENT$SDL_GetSurfaceProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSurfaceProperties
    • SEGMENT$SDL_SetSurfaceColorspace

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetSurfaceColorspace
    • SEGMENT$SDL_GetSurfaceColorspace

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSurfaceColorspace
    • SEGMENT$SDL_CreateSurfacePalette

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateSurfacePalette
    • SEGMENT$SDL_SetSurfacePalette

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetSurfacePalette
    • SEGMENT$SDL_GetSurfacePalette

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSurfacePalette
    • SEGMENT$SDL_AddSurfaceAlternateImage

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddSurfaceAlternateImage
    • SEGMENT$SDL_SurfaceHasAlternateImages

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SurfaceHasAlternateImages
    • SEGMENT$SDL_GetSurfaceImages

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSurfaceImages
    • SEGMENT$SDL_RemoveSurfaceAlternateImages

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RemoveSurfaceAlternateImages
    • SEGMENT$SDL_LockSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LockSurface
    • SEGMENT$SDL_UnlockSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UnlockSurface
    • SEGMENT$SDL_LoadBMP_IO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LoadBMP_IO
    • SEGMENT$SDL_LoadBMP

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_LoadBMP
    • SEGMENT$SDL_SaveBMP_IO

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SaveBMP_IO
    • SEGMENT$SDL_SaveBMP

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SaveBMP
    • SEGMENT$SDL_SetSurfaceRLE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetSurfaceRLE
    • SEGMENT$SDL_SurfaceHasRLE

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SurfaceHasRLE
    • SEGMENT$SDL_SetSurfaceColorKey

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetSurfaceColorKey
    • SEGMENT$SDL_SurfaceHasColorKey

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SurfaceHasColorKey
    • SEGMENT$SDL_GetSurfaceColorKey

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSurfaceColorKey
    • SEGMENT$SDL_SetSurfaceColorMod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetSurfaceColorMod
    • SEGMENT$SDL_GetSurfaceColorMod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSurfaceColorMod
    • SEGMENT$SDL_SetSurfaceAlphaMod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetSurfaceAlphaMod
    • SEGMENT$SDL_GetSurfaceAlphaMod

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSurfaceAlphaMod
    • SEGMENT$SDL_SetSurfaceBlendMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetSurfaceBlendMode
    • SEGMENT$SDL_GetSurfaceBlendMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSurfaceBlendMode
    • SEGMENT$SDL_SetSurfaceClipRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetSurfaceClipRect
    • SEGMENT$SDL_GetSurfaceClipRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSurfaceClipRect
    • SEGMENT$SDL_FlipSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FlipSurface
    • SEGMENT$SDL_DuplicateSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DuplicateSurface
    • SEGMENT$SDL_ScaleSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ScaleSurface
    • SEGMENT$SDL_ConvertSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ConvertSurface
    • SEGMENT$SDL_ConvertSurfaceAndColorspace

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ConvertSurfaceAndColorspace
    • SEGMENT$SDL_ConvertPixels

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ConvertPixels
    • SEGMENT$SDL_ConvertPixelsAndColorspace

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ConvertPixelsAndColorspace
    • SEGMENT$SDL_PremultiplyAlpha

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PremultiplyAlpha
    • SEGMENT$SDL_PremultiplySurfaceAlpha

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_PremultiplySurfaceAlpha
    • SEGMENT$SDL_ClearSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ClearSurface
    • SEGMENT$SDL_FillSurfaceRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FillSurfaceRect
    • SEGMENT$SDL_FillSurfaceRects

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FillSurfaceRects
    • SEGMENT$SDL_BlitSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BlitSurface
    • SEGMENT$SDL_BlitSurfaceUnchecked

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BlitSurfaceUnchecked
    • SEGMENT$SDL_BlitSurfaceScaled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BlitSurfaceScaled
    • SEGMENT$SDL_BlitSurfaceUncheckedScaled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BlitSurfaceUncheckedScaled
    • SEGMENT$SDL_StretchSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_StretchSurface
    • SEGMENT$SDL_BlitSurfaceTiled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BlitSurfaceTiled
    • SEGMENT$SDL_BlitSurfaceTiledWithScale

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BlitSurfaceTiledWithScale
    • SEGMENT$SDL_BlitSurface9Grid

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_BlitSurface9Grid
    • SEGMENT$SDL_MapSurfaceRGB

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MapSurfaceRGB
    • SEGMENT$SDL_MapSurfaceRGBA

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MapSurfaceRGBA
    • SEGMENT$SDL_ReadSurfacePixel

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadSurfacePixel
    • SEGMENT$SDL_ReadSurfacePixelFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ReadSurfacePixelFloat
    • SEGMENT$SDL_WriteSurfacePixel

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteSurfacePixel
    • SEGMENT$SDL_WriteSurfacePixelFloat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WriteSurfacePixelFloat
    • SEGMENT$SDL_SetWindowsMessageHook

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowsMessageHook
    • SEGMENT$SDL_GetDirect3D9AdapterIndex

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDirect3D9AdapterIndex
    • SEGMENT$SDL_GetDXGIOutputInfo

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDXGIOutputInfo
    • SEGMENT$SDL_SetX11EventHook

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetX11EventHook
    • SEGMENT$SDL_SetLinuxThreadPriority

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetLinuxThreadPriority
    • SEGMENT$SDL_SetLinuxThreadPriorityAndPolicy

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetLinuxThreadPriorityAndPolicy
    • SEGMENT$SDL_SetiOSAnimationCallback

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetiOSAnimationCallback
    • SEGMENT$SDL_SetiOSEventPump

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetiOSEventPump
    • SEGMENT$SDL_GetAndroidJNIEnv

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAndroidJNIEnv
    • SEGMENT$SDL_GetAndroidActivity

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAndroidActivity
    • SEGMENT$SDL_GetAndroidSDKVersion

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAndroidSDKVersion
    • SEGMENT$SDL_IsChromebook

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsChromebook
    • SEGMENT$SDL_IsDeXMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsDeXMode
    • SEGMENT$SDL_SendAndroidBackButton

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SendAndroidBackButton
    • SEGMENT$SDL_GetAndroidInternalStoragePath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAndroidInternalStoragePath
    • SEGMENT$SDL_GetAndroidExternalStorageState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAndroidExternalStorageState
    • SEGMENT$SDL_GetAndroidExternalStoragePath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAndroidExternalStoragePath
    • SEGMENT$SDL_GetAndroidCachePath

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetAndroidCachePath
    • SEGMENT$SDL_RequestAndroidPermission

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RequestAndroidPermission
    • SEGMENT$SDL_ShowAndroidToast

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowAndroidToast
    • SEGMENT$SDL_SendAndroidMessage

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SendAndroidMessage
    • SEGMENT$SDL_IsTablet

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsTablet
    • SEGMENT$SDL_IsTV

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_IsTV
    • SEGMENT$SDL_GetSandbox

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSandbox
    • SEGMENT$SDL_OnApplicationWillTerminate

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OnApplicationWillTerminate
    • SEGMENT$SDL_OnApplicationDidReceiveMemoryWarning

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OnApplicationDidReceiveMemoryWarning
    • SEGMENT$SDL_OnApplicationWillEnterBackground

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OnApplicationWillEnterBackground
    • SEGMENT$SDL_OnApplicationDidEnterBackground

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OnApplicationDidEnterBackground
    • SEGMENT$SDL_OnApplicationWillEnterForeground

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OnApplicationWillEnterForeground
    • SEGMENT$SDL_OnApplicationDidEnterForeground

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OnApplicationDidEnterForeground
    • SEGMENT$SDL_OnApplicationDidChangeStatusBarOrientation

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_OnApplicationDidChangeStatusBarOrientation
    • SEGMENT$SDL_GetGDKTaskQueue

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGDKTaskQueue
    • SEGMENT$SDL_GetGDKDefaultUser

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGDKDefaultUser
    • SEGMENT$SDL_CreateThread

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateThread
    • SEGMENT$SDL_CreateThreadWithProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateThreadWithProperties
    • SEGMENT$SDL_CreateThreadRuntime

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateThreadRuntime
    • SEGMENT$SDL_CreateThreadWithPropertiesRuntime

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateThreadWithPropertiesRuntime
    • SEGMENT$SDL_GetThreadName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetThreadName
    • SEGMENT$SDL_GetCurrentThreadID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCurrentThreadID
    • SEGMENT$SDL_GetThreadID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetThreadID
    • SEGMENT$SDL_SetCurrentThreadPriority

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetCurrentThreadPriority
    • SEGMENT$SDL_WaitThread

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WaitThread
    • SEGMENT$SDL_GetThreadState

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetThreadState
    • SEGMENT$SDL_DetachThread

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DetachThread
    • SEGMENT$SDL_GetTLS

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTLS
    • SEGMENT$SDL_SetTLS

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTLS
    • SEGMENT$SDL_CleanupTLS

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CleanupTLS
    • SEGMENT$SDL_GetDateTimeLocalePreferences

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDateTimeLocalePreferences
    • SEGMENT$SDL_GetCurrentTime

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCurrentTime
    • SEGMENT$SDL_TimeToDateTime

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TimeToDateTime
    • SEGMENT$SDL_DateTimeToTime

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DateTimeToTime
    • SEGMENT$SDL_TimeToWindows

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TimeToWindows
    • SEGMENT$SDL_TimeFromWindows

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_TimeFromWindows
    • SEGMENT$SDL_GetDaysInMonth

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDaysInMonth
    • SEGMENT$SDL_GetDayOfYear

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDayOfYear
    • SEGMENT$SDL_GetDayOfWeek

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDayOfWeek
    • SEGMENT$SDL_GetTicks

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTicks
    • SEGMENT$SDL_GetTicksNS

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTicksNS
    • SEGMENT$SDL_GetPerformanceCounter

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPerformanceCounter
    • SEGMENT$SDL_GetPerformanceFrequency

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPerformanceFrequency
    • SEGMENT$SDL_Delay

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_Delay
    • SEGMENT$SDL_DelayNS

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DelayNS
    • SEGMENT$SDL_DelayPrecise

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DelayPrecise
    • SEGMENT$SDL_AddTimer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddTimer
    • SEGMENT$SDL_AddTimerNS

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_AddTimerNS
    • SEGMENT$SDL_RemoveTimer

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RemoveTimer
    • SEGMENT$SDL_CreateTray

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateTray
    • SEGMENT$SDL_SetTrayIcon

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTrayIcon
    • SEGMENT$SDL_SetTrayTooltip

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTrayTooltip
    • SEGMENT$SDL_CreateTrayMenu

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateTrayMenu
    • SEGMENT$SDL_CreateTraySubmenu

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateTraySubmenu
    • SEGMENT$SDL_GetTrayMenu

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTrayMenu
    • SEGMENT$SDL_GetTraySubmenu

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTraySubmenu
    • SEGMENT$SDL_GetTrayEntries

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTrayEntries
    • SEGMENT$SDL_RemoveTrayEntry

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RemoveTrayEntry
    • SEGMENT$SDL_InsertTrayEntryAt

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_InsertTrayEntryAt
    • SEGMENT$SDL_SetTrayEntryLabel

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTrayEntryLabel
    • SEGMENT$SDL_GetTrayEntryLabel

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTrayEntryLabel
    • SEGMENT$SDL_SetTrayEntryChecked

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTrayEntryChecked
    • SEGMENT$SDL_GetTrayEntryChecked

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTrayEntryChecked
    • SEGMENT$SDL_SetTrayEntryEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTrayEntryEnabled
    • SEGMENT$SDL_GetTrayEntryEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTrayEntryEnabled
    • SEGMENT$SDL_SetTrayEntryCallback

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetTrayEntryCallback
    • SEGMENT$SDL_ClickTrayEntry

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ClickTrayEntry
    • SEGMENT$SDL_DestroyTray

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyTray
    • SEGMENT$SDL_GetTrayEntryParent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTrayEntryParent
    • SEGMENT$SDL_GetTrayMenuParentEntry

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTrayMenuParentEntry
    • SEGMENT$SDL_GetTrayMenuParentTray

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTrayMenuParentTray
    • SEGMENT$SDL_UpdateTrays

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateTrays
    • SEGMENT$SDL_GetTouchDevices

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTouchDevices
    • SEGMENT$SDL_GetTouchDeviceName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTouchDeviceName
    • SEGMENT$SDL_GetTouchDeviceType

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTouchDeviceType
    • SEGMENT$SDL_GetTouchFingers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetTouchFingers
    • SEGMENT$SDL_GetVersion

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetVersion
    • SEGMENT$SDL_GetRevision

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetRevision
    • SEGMENT$SDL_GetNumVideoDrivers

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNumVideoDrivers
    • SEGMENT$SDL_GetVideoDriver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetVideoDriver
    • SEGMENT$SDL_GetCurrentVideoDriver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCurrentVideoDriver
    • SEGMENT$SDL_GetSystemTheme

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetSystemTheme
    • SEGMENT$SDL_GetDisplays

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDisplays
    • SEGMENT$SDL_GetPrimaryDisplay

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetPrimaryDisplay
    • SEGMENT$SDL_GetDisplayProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDisplayProperties
    • SEGMENT$SDL_GetDisplayName

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDisplayName
    • SEGMENT$SDL_GetDisplayBounds

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDisplayBounds
    • SEGMENT$SDL_GetDisplayUsableBounds

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDisplayUsableBounds
    • SEGMENT$SDL_GetNaturalDisplayOrientation

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetNaturalDisplayOrientation
    • SEGMENT$SDL_GetCurrentDisplayOrientation

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCurrentDisplayOrientation
    • SEGMENT$SDL_GetDisplayContentScale

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDisplayContentScale
    • SEGMENT$SDL_GetFullscreenDisplayModes

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetFullscreenDisplayModes
    • SEGMENT$SDL_GetClosestFullscreenDisplayMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetClosestFullscreenDisplayMode
    • SEGMENT$SDL_GetDesktopDisplayMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDesktopDisplayMode
    • SEGMENT$SDL_GetCurrentDisplayMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetCurrentDisplayMode
    • SEGMENT$SDL_GetDisplayForPoint

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDisplayForPoint
    • SEGMENT$SDL_GetDisplayForRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDisplayForRect
    • SEGMENT$SDL_GetDisplayForWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetDisplayForWindow
    • SEGMENT$SDL_GetWindowPixelDensity

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowPixelDensity
    • SEGMENT$SDL_GetWindowDisplayScale

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowDisplayScale
    • SEGMENT$SDL_SetWindowFullscreenMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowFullscreenMode
    • SEGMENT$SDL_GetWindowFullscreenMode

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowFullscreenMode
    • SEGMENT$SDL_GetWindowICCProfile

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowICCProfile
    • SEGMENT$SDL_GetWindowPixelFormat

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowPixelFormat
    • SEGMENT$SDL_GetWindows

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindows
    • SEGMENT$SDL_CreateWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateWindow
    • SEGMENT$SDL_CreatePopupWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreatePopupWindow
    • SEGMENT$SDL_CreateWindowWithProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_CreateWindowWithProperties
    • SEGMENT$SDL_GetWindowID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowID
    • SEGMENT$SDL_GetWindowFromID

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowFromID
    • SEGMENT$SDL_GetWindowParent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowParent
    • SEGMENT$SDL_GetWindowProperties

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowProperties
    • SEGMENT$SDL_GetWindowFlags

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowFlags
    • SEGMENT$SDL_SetWindowTitle

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowTitle
    • SEGMENT$SDL_GetWindowTitle

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowTitle
    • SEGMENT$SDL_SetWindowIcon

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowIcon
    • SEGMENT$SDL_SetWindowPosition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowPosition
    • SEGMENT$SDL_GetWindowPosition

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowPosition
    • SEGMENT$SDL_SetWindowSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowSize
    • SEGMENT$SDL_GetWindowSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowSize
    • SEGMENT$SDL_GetWindowSafeArea

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowSafeArea
    • SEGMENT$SDL_SetWindowAspectRatio

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowAspectRatio
    • SEGMENT$SDL_GetWindowAspectRatio

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowAspectRatio
    • SEGMENT$SDL_GetWindowBordersSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowBordersSize
    • SEGMENT$SDL_GetWindowSizeInPixels

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowSizeInPixels
    • SEGMENT$SDL_SetWindowMinimumSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowMinimumSize
    • SEGMENT$SDL_GetWindowMinimumSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowMinimumSize
    • SEGMENT$SDL_SetWindowMaximumSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowMaximumSize
    • SEGMENT$SDL_GetWindowMaximumSize

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowMaximumSize
    • SEGMENT$SDL_SetWindowBordered

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowBordered
    • SEGMENT$SDL_SetWindowResizable

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowResizable
    • SEGMENT$SDL_SetWindowAlwaysOnTop

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowAlwaysOnTop
    • SEGMENT$SDL_ShowWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowWindow
    • SEGMENT$SDL_HideWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_HideWindow
    • SEGMENT$SDL_RaiseWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RaiseWindow
    • SEGMENT$SDL_MaximizeWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MaximizeWindow
    • SEGMENT$SDL_MinimizeWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_MinimizeWindow
    • SEGMENT$SDL_RestoreWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_RestoreWindow
    • SEGMENT$SDL_SetWindowFullscreen

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowFullscreen
    • SEGMENT$SDL_SyncWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SyncWindow
    • SEGMENT$SDL_WindowHasSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_WindowHasSurface
    • SEGMENT$SDL_GetWindowSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowSurface
    • SEGMENT$SDL_SetWindowSurfaceVSync

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowSurfaceVSync
    • SEGMENT$SDL_GetWindowSurfaceVSync

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowSurfaceVSync
    • SEGMENT$SDL_UpdateWindowSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateWindowSurface
    • SEGMENT$SDL_UpdateWindowSurfaceRects

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_UpdateWindowSurfaceRects
    • SEGMENT$SDL_DestroyWindowSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyWindowSurface
    • SEGMENT$SDL_SetWindowKeyboardGrab

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowKeyboardGrab
    • SEGMENT$SDL_SetWindowMouseGrab

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowMouseGrab
    • SEGMENT$SDL_GetWindowKeyboardGrab

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowKeyboardGrab
    • SEGMENT$SDL_GetWindowMouseGrab

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowMouseGrab
    • SEGMENT$SDL_GetGrabbedWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetGrabbedWindow
    • SEGMENT$SDL_SetWindowMouseRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowMouseRect
    • SEGMENT$SDL_GetWindowMouseRect

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowMouseRect
    • SEGMENT$SDL_SetWindowOpacity

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowOpacity
    • SEGMENT$SDL_GetWindowOpacity

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GetWindowOpacity
    • SEGMENT$SDL_SetWindowParent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowParent
    • SEGMENT$SDL_SetWindowModal

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowModal
    • SEGMENT$SDL_SetWindowFocusable

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowFocusable
    • SEGMENT$SDL_ShowWindowSystemMenu

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ShowWindowSystemMenu
    • SEGMENT$SDL_SetWindowHitTest

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowHitTest
    • SEGMENT$SDL_SetWindowShape

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_SetWindowShape
    • SEGMENT$SDL_FlashWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_FlashWindow
    • SEGMENT$SDL_DestroyWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DestroyWindow
    • SEGMENT$SDL_ScreenSaverEnabled

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_ScreenSaverEnabled
    • SEGMENT$SDL_EnableScreenSaver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EnableScreenSaver
    • SEGMENT$SDL_DisableScreenSaver

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_DisableScreenSaver
    • SEGMENT$SDL_GL_LoadLibrary

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_LoadLibrary
    • SEGMENT$SDL_GL_GetProcAddress

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_GetProcAddress
    • SEGMENT$SDL_EGL_GetProcAddress

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EGL_GetProcAddress
    • SEGMENT$SDL_GL_UnloadLibrary

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_UnloadLibrary
    • SEGMENT$SDL_GL_ExtensionSupported

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_ExtensionSupported
    • SEGMENT$SDL_GL_ResetAttributes

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_ResetAttributes
    • SEGMENT$SDL_GL_SetAttribute

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_SetAttribute
    • SEGMENT$SDL_GL_GetAttribute

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_GetAttribute
    • SEGMENT$SDL_GL_CreateContext

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_CreateContext
    • SEGMENT$SDL_GL_MakeCurrent

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_MakeCurrent
    • SEGMENT$SDL_GL_GetCurrentWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_GetCurrentWindow
    • SEGMENT$SDL_GL_GetCurrentContext

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_GetCurrentContext
    • SEGMENT$SDL_EGL_GetCurrentDisplay

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EGL_GetCurrentDisplay
    • SEGMENT$SDL_EGL_GetCurrentConfig

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EGL_GetCurrentConfig
    • SEGMENT$SDL_EGL_GetWindowSurface

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EGL_GetWindowSurface
    • SEGMENT$SDL_EGL_SetAttributeCallbacks

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_EGL_SetAttributeCallbacks
    • SEGMENT$SDL_GL_SetSwapInterval

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_SetSwapInterval
    • SEGMENT$SDL_GL_GetSwapInterval

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_GetSwapInterval
    • SEGMENT$SDL_GL_SwapWindow

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_SwapWindow
    • SEGMENT$SDL_GL_DestroyContext

      @Nullable public final @Nullable MemorySegment SEGMENT$SDL_GL_DestroyContext
    • HANDLE$SDL_malloc

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_malloc
    • HANDLE$SDL_calloc

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_calloc
    • HANDLE$SDL_realloc

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_realloc
    • HANDLE$SDL_free

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_free
    • HANDLE$SDL_GetOriginalMemoryFunctions

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetOriginalMemoryFunctions
    • HANDLE$SDL_GetMemoryFunctions

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetMemoryFunctions
    • HANDLE$SDL_SetMemoryFunctions

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetMemoryFunctions
    • HANDLE$SDL_aligned_alloc

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_aligned_alloc
    • HANDLE$SDL_aligned_free

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_aligned_free
    • HANDLE$SDL_GetNumAllocations

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumAllocations
    • HANDLE$SDL_GetEnvironment

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetEnvironment
    • HANDLE$SDL_CreateEnvironment

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateEnvironment
    • HANDLE$SDL_GetEnvironmentVariable

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetEnvironmentVariable
    • HANDLE$SDL_GetEnvironmentVariables

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetEnvironmentVariables
    • HANDLE$SDL_SetEnvironmentVariable

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetEnvironmentVariable
    • HANDLE$SDL_UnsetEnvironmentVariable

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnsetEnvironmentVariable
    • HANDLE$SDL_DestroyEnvironment

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyEnvironment
    • HANDLE$SDL_getenv

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_getenv
    • HANDLE$SDL_getenv_unsafe

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_getenv_unsafe
    • HANDLE$SDL_setenv_unsafe

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_setenv_unsafe
    • HANDLE$SDL_unsetenv_unsafe

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_unsetenv_unsafe
    • HANDLE$SDL_qsort

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_qsort
    • HANDLE$SDL_bsearch

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_bsearch
    • HANDLE$SDL_qsort_r

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_qsort_r
    • HANDLE$SDL_bsearch_r

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_bsearch_r
    • HANDLE$SDL_abs

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_abs
    • HANDLE$SDL_isalpha

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isalpha
    • HANDLE$SDL_isalnum

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isalnum
    • HANDLE$SDL_isblank

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isblank
    • HANDLE$SDL_iscntrl

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_iscntrl
    • HANDLE$SDL_isdigit

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isdigit
    • HANDLE$SDL_isxdigit

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isxdigit
    • HANDLE$SDL_ispunct

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ispunct
    • HANDLE$SDL_isspace

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isspace
    • HANDLE$SDL_isupper

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isupper
    • HANDLE$SDL_islower

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_islower
    • HANDLE$SDL_isprint

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isprint
    • HANDLE$SDL_isgraph

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isgraph
    • HANDLE$SDL_toupper

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_toupper
    • HANDLE$SDL_tolower

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_tolower
    • HANDLE$SDL_crc16

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_crc16
    • HANDLE$SDL_crc32

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_crc32
    • HANDLE$SDL_murmur3_32

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_murmur3_32
    • HANDLE$SDL_memcpy

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_memcpy
    • HANDLE$SDL_memmove

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_memmove
    • HANDLE$SDL_memset

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_memset
    • HANDLE$SDL_memset4

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_memset4
    • HANDLE$SDL_memcmp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_memcmp
    • HANDLE$SDL_wcslen

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcslen
    • HANDLE$SDL_wcsnlen

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcsnlen
    • HANDLE$SDL_wcslcpy

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcslcpy
    • HANDLE$SDL_wcslcat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcslcat
    • HANDLE$SDL_wcsdup

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcsdup
    • HANDLE$SDL_wcsstr

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcsstr
    • HANDLE$SDL_wcsnstr

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcsnstr
    • HANDLE$SDL_wcscmp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcscmp
    • HANDLE$SDL_wcsncmp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcsncmp
    • HANDLE$SDL_wcscasecmp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcscasecmp
    • HANDLE$SDL_wcsncasecmp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcsncasecmp
    • HANDLE$SDL_wcstol

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_wcstol
    • HANDLE$SDL_strlen

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strlen
    • HANDLE$SDL_strnlen

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strnlen
    • HANDLE$SDL_strlcpy

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strlcpy
    • HANDLE$SDL_utf8strlcpy

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_utf8strlcpy
    • HANDLE$SDL_strlcat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strlcat
    • HANDLE$SDL_strdup

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strdup
    • HANDLE$SDL_strndup

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strndup
    • HANDLE$SDL_strrev

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strrev
    • HANDLE$SDL_strupr

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strupr
    • HANDLE$SDL_strlwr

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strlwr
    • HANDLE$SDL_strchr

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strchr
    • HANDLE$SDL_strrchr

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strrchr
    • HANDLE$SDL_strstr

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strstr
    • HANDLE$SDL_strnstr

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strnstr
    • HANDLE$SDL_strcasestr

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strcasestr
    • HANDLE$SDL_strtok_r

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strtok_r
    • HANDLE$SDL_utf8strlen

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_utf8strlen
    • HANDLE$SDL_utf8strnlen

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_utf8strnlen
    • HANDLE$SDL_itoa

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_itoa
    • HANDLE$SDL_uitoa

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_uitoa
    • HANDLE$SDL_ltoa

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ltoa
    • HANDLE$SDL_ultoa

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ultoa
    • HANDLE$SDL_lltoa

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_lltoa
    • HANDLE$SDL_ulltoa

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ulltoa
    • HANDLE$SDL_atoi

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_atoi
    • HANDLE$SDL_atof

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_atof
    • HANDLE$SDL_strtol

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strtol
    • HANDLE$SDL_strtoul

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strtoul
    • HANDLE$SDL_strtoll

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strtoll
    • HANDLE$SDL_strtoull

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strtoull
    • HANDLE$SDL_strtod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strtod
    • HANDLE$SDL_strcmp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strcmp
    • HANDLE$SDL_strncmp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strncmp
    • HANDLE$SDL_strcasecmp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strcasecmp
    • HANDLE$SDL_strncasecmp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strncasecmp
    • HANDLE$SDL_strpbrk

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_strpbrk
    • HANDLE$SDL_StepUTF8

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StepUTF8
    • HANDLE$SDL_StepBackUTF8

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StepBackUTF8
    • HANDLE$SDL_UCS4ToUTF8

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UCS4ToUTF8
    • HANDLE$SDL_srand

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_srand
    • HANDLE$SDL_rand

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_rand
    • HANDLE$SDL_randf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_randf
    • HANDLE$SDL_rand_bits

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_rand_bits
    • HANDLE$SDL_rand_r

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_rand_r
    • HANDLE$SDL_randf_r

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_randf_r
    • HANDLE$SDL_rand_bits_r

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_rand_bits_r
    • HANDLE$SDL_acos

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_acos
    • HANDLE$SDL_acosf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_acosf
    • HANDLE$SDL_asin

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_asin
    • HANDLE$SDL_asinf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_asinf
    • HANDLE$SDL_atan

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_atan
    • HANDLE$SDL_atanf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_atanf
    • HANDLE$SDL_atan2

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_atan2
    • HANDLE$SDL_atan2f

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_atan2f
    • HANDLE$SDL_ceil

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ceil
    • HANDLE$SDL_ceilf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ceilf
    • HANDLE$SDL_copysign

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_copysign
    • HANDLE$SDL_copysignf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_copysignf
    • HANDLE$SDL_cos

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_cos
    • HANDLE$SDL_cosf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_cosf
    • HANDLE$SDL_exp

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_exp
    • HANDLE$SDL_expf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_expf
    • HANDLE$SDL_fabs

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_fabs
    • HANDLE$SDL_fabsf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_fabsf
    • HANDLE$SDL_floor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_floor
    • HANDLE$SDL_floorf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_floorf
    • HANDLE$SDL_trunc

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_trunc
    • HANDLE$SDL_truncf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_truncf
    • HANDLE$SDL_fmod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_fmod
    • HANDLE$SDL_fmodf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_fmodf
    • HANDLE$SDL_isinf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isinf
    • HANDLE$SDL_isinff

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isinff
    • HANDLE$SDL_isnan

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isnan
    • HANDLE$SDL_isnanf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_isnanf
    • HANDLE$SDL_log

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_log
    • HANDLE$SDL_logf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_logf
    • HANDLE$SDL_log10

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_log10
    • HANDLE$SDL_log10f

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_log10f
    • HANDLE$SDL_modf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_modf
    • HANDLE$SDL_modff

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_modff
    • HANDLE$SDL_pow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_pow
    • HANDLE$SDL_powf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_powf
    • HANDLE$SDL_round

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_round
    • HANDLE$SDL_roundf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_roundf
    • HANDLE$SDL_lround

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_lround
    • HANDLE$SDL_lroundf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_lroundf
    • HANDLE$SDL_scalbn

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_scalbn
    • HANDLE$SDL_scalbnf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_scalbnf
    • HANDLE$SDL_sin

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_sin
    • HANDLE$SDL_sinf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_sinf
    • HANDLE$SDL_sqrt

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_sqrt
    • HANDLE$SDL_sqrtf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_sqrtf
    • HANDLE$SDL_tan

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_tan
    • HANDLE$SDL_tanf

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_tanf
    • HANDLE$SDL_iconv_open

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_iconv_open
    • HANDLE$SDL_iconv_close

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_iconv_close
    • HANDLE$SDL_iconv

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_iconv
    • HANDLE$SDL_iconv_string

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_iconv_string
    • HANDLE$SDL_AsyncIOFromFile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AsyncIOFromFile
    • HANDLE$SDL_GetAsyncIOSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAsyncIOSize
    • HANDLE$SDL_ReadAsyncIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadAsyncIO
    • HANDLE$SDL_WriteAsyncIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteAsyncIO
    • HANDLE$SDL_CloseAsyncIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CloseAsyncIO
    • HANDLE$SDL_CreateAsyncIOQueue

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateAsyncIOQueue
    • HANDLE$SDL_DestroyAsyncIOQueue

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyAsyncIOQueue
    • HANDLE$SDL_GetAsyncIOResult

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAsyncIOResult
    • HANDLE$SDL_WaitAsyncIOResult

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitAsyncIOResult
    • HANDLE$SDL_SignalAsyncIOQueue

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SignalAsyncIOQueue
    • HANDLE$SDL_LoadFileAsync

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LoadFileAsync
    • HANDLE$SDL_TryLockSpinlock

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TryLockSpinlock
    • HANDLE$SDL_LockSpinlock

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockSpinlock
    • HANDLE$SDL_UnlockSpinlock

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnlockSpinlock
    • HANDLE$SDL_MemoryBarrierReleaseFunction

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MemoryBarrierReleaseFunction
    • HANDLE$SDL_MemoryBarrierAcquireFunction

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MemoryBarrierAcquireFunction
    • HANDLE$SDL_CompareAndSwapAtomicInt

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CompareAndSwapAtomicInt
    • HANDLE$SDL_SetAtomicInt

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAtomicInt
    • HANDLE$SDL_GetAtomicInt

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAtomicInt
    • HANDLE$SDL_AddAtomicInt

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddAtomicInt
    • HANDLE$SDL_CompareAndSwapAtomicU32

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CompareAndSwapAtomicU32
    • HANDLE$SDL_SetAtomicU32

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAtomicU32
    • HANDLE$SDL_GetAtomicU32

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAtomicU32
    • HANDLE$SDL_CompareAndSwapAtomicPointer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CompareAndSwapAtomicPointer
    • HANDLE$SDL_SetAtomicPointer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAtomicPointer
    • HANDLE$SDL_GetAtomicPointer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAtomicPointer
    • HANDLE$SDL_GetNumAudioDrivers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumAudioDrivers
    • HANDLE$SDL_GetAudioDriver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioDriver
    • HANDLE$SDL_GetCurrentAudioDriver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCurrentAudioDriver
    • HANDLE$SDL_GetAudioPlaybackDevices

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioPlaybackDevices
    • HANDLE$SDL_GetAudioRecordingDevices

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioRecordingDevices
    • HANDLE$SDL_GetAudioDeviceName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioDeviceName
    • HANDLE$SDL_GetAudioDeviceFormat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioDeviceFormat
    • HANDLE$SDL_GetAudioDeviceChannelMap

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioDeviceChannelMap
    • HANDLE$SDL_OpenAudioDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenAudioDevice
    • HANDLE$SDL_IsAudioDevicePhysical

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsAudioDevicePhysical
    • HANDLE$SDL_IsAudioDevicePlayback

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsAudioDevicePlayback
    • HANDLE$SDL_PauseAudioDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PauseAudioDevice
    • HANDLE$SDL_ResumeAudioDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ResumeAudioDevice
    • HANDLE$SDL_AudioDevicePaused

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AudioDevicePaused
    • HANDLE$SDL_GetAudioDeviceGain

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioDeviceGain
    • HANDLE$SDL_SetAudioDeviceGain

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAudioDeviceGain
    • HANDLE$SDL_CloseAudioDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CloseAudioDevice
    • HANDLE$SDL_BindAudioStreams

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindAudioStreams
    • HANDLE$SDL_BindAudioStream

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindAudioStream
    • HANDLE$SDL_UnbindAudioStreams

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnbindAudioStreams
    • HANDLE$SDL_UnbindAudioStream

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnbindAudioStream
    • HANDLE$SDL_GetAudioStreamDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamDevice
    • HANDLE$SDL_CreateAudioStream

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateAudioStream
    • HANDLE$SDL_GetAudioStreamProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamProperties
    • HANDLE$SDL_GetAudioStreamFormat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamFormat
    • HANDLE$SDL_SetAudioStreamFormat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAudioStreamFormat
    • HANDLE$SDL_GetAudioStreamFrequencyRatio

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamFrequencyRatio
    • HANDLE$SDL_SetAudioStreamFrequencyRatio

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAudioStreamFrequencyRatio
    • HANDLE$SDL_GetAudioStreamGain

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamGain
    • HANDLE$SDL_SetAudioStreamGain

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAudioStreamGain
    • HANDLE$SDL_GetAudioStreamInputChannelMap

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamInputChannelMap
    • HANDLE$SDL_GetAudioStreamOutputChannelMap

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamOutputChannelMap
    • HANDLE$SDL_SetAudioStreamInputChannelMap

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAudioStreamInputChannelMap
    • HANDLE$SDL_SetAudioStreamOutputChannelMap

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAudioStreamOutputChannelMap
    • HANDLE$SDL_PutAudioStreamData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PutAudioStreamData
    • HANDLE$SDL_GetAudioStreamData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamData
    • HANDLE$SDL_GetAudioStreamAvailable

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamAvailable
    • HANDLE$SDL_GetAudioStreamQueued

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioStreamQueued
    • HANDLE$SDL_FlushAudioStream

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FlushAudioStream
    • HANDLE$SDL_ClearAudioStream

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ClearAudioStream
    • HANDLE$SDL_PauseAudioStreamDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PauseAudioStreamDevice
    • HANDLE$SDL_ResumeAudioStreamDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ResumeAudioStreamDevice
    • HANDLE$SDL_AudioStreamDevicePaused

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AudioStreamDevicePaused
    • HANDLE$SDL_LockAudioStream

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockAudioStream
    • HANDLE$SDL_UnlockAudioStream

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnlockAudioStream
    • HANDLE$SDL_SetAudioStreamGetCallback

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAudioStreamGetCallback
    • HANDLE$SDL_SetAudioStreamPutCallback

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAudioStreamPutCallback
    • HANDLE$SDL_DestroyAudioStream

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyAudioStream
    • HANDLE$SDL_OpenAudioDeviceStream

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenAudioDeviceStream
    • HANDLE$SDL_SetAudioPostmixCallback

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAudioPostmixCallback
    • HANDLE$SDL_LoadWAV_IO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LoadWAV_IO
    • HANDLE$SDL_LoadWAV

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LoadWAV
    • HANDLE$SDL_MixAudio

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MixAudio
    • HANDLE$SDL_ConvertAudioSamples

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ConvertAudioSamples
    • HANDLE$SDL_GetAudioFormatName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAudioFormatName
    • HANDLE$SDL_GetSilenceValueForFormat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSilenceValueForFormat
    • HANDLE$SDL_ComposeCustomBlendMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ComposeCustomBlendMode
    • HANDLE$SDL_GetNumCameraDrivers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumCameraDrivers
    • HANDLE$SDL_GetCameraDriver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCameraDriver
    • HANDLE$SDL_GetCurrentCameraDriver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCurrentCameraDriver
    • HANDLE$SDL_GetCameras

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCameras
    • HANDLE$SDL_GetCameraSupportedFormats

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCameraSupportedFormats
    • HANDLE$SDL_GetCameraName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCameraName
    • HANDLE$SDL_GetCameraPosition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCameraPosition
    • HANDLE$SDL_OpenCamera

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenCamera
    • HANDLE$SDL_GetCameraPermissionState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCameraPermissionState
    • HANDLE$SDL_GetCameraID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCameraID
    • HANDLE$SDL_GetCameraProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCameraProperties
    • HANDLE$SDL_GetCameraFormat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCameraFormat
    • HANDLE$SDL_AcquireCameraFrame

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AcquireCameraFrame
    • HANDLE$SDL_ReleaseCameraFrame

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseCameraFrame
    • HANDLE$SDL_CloseCamera

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CloseCamera
    • HANDLE$SDL_SetClipboardText

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetClipboardText
    • HANDLE$SDL_GetClipboardText

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetClipboardText
    • HANDLE$SDL_HasClipboardText

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasClipboardText
    • HANDLE$SDL_SetPrimarySelectionText

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetPrimarySelectionText
    • HANDLE$SDL_GetPrimarySelectionText

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPrimarySelectionText
    • HANDLE$SDL_HasPrimarySelectionText

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasPrimarySelectionText
    • HANDLE$SDL_SetClipboardData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetClipboardData
    • HANDLE$SDL_ClearClipboardData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ClearClipboardData
    • HANDLE$SDL_GetClipboardData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetClipboardData
    • HANDLE$SDL_HasClipboardData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasClipboardData
    • HANDLE$SDL_GetClipboardMimeTypes

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetClipboardMimeTypes
    • HANDLE$SDL_GetNumLogicalCPUCores

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumLogicalCPUCores
    • HANDLE$SDL_GetCPUCacheLineSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCPUCacheLineSize
    • HANDLE$SDL_HasAltiVec

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasAltiVec
    • HANDLE$SDL_HasMMX

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasMMX
    • HANDLE$SDL_HasSSE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasSSE
    • HANDLE$SDL_HasSSE2

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasSSE2
    • HANDLE$SDL_HasSSE3

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasSSE3
    • HANDLE$SDL_HasSSE41

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasSSE41
    • HANDLE$SDL_HasSSE42

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasSSE42
    • HANDLE$SDL_HasAVX

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasAVX
    • HANDLE$SDL_HasAVX2

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasAVX2
    • HANDLE$SDL_HasAVX512F

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasAVX512F
    • HANDLE$SDL_HasARMSIMD

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasARMSIMD
    • HANDLE$SDL_HasNEON

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasNEON
    • HANDLE$SDL_HasLSX

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasLSX
    • HANDLE$SDL_HasLASX

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasLASX
    • HANDLE$SDL_GetSystemRAM

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSystemRAM
    • HANDLE$SDL_GetSIMDAlignment

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSIMDAlignment
    • HANDLE$SDL_ShowOpenFileDialog

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowOpenFileDialog
    • HANDLE$SDL_ShowSaveFileDialog

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowSaveFileDialog
    • HANDLE$SDL_ShowOpenFolderDialog

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowOpenFolderDialog
    • HANDLE$SDL_ShowFileDialogWithProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowFileDialogWithProperties
    • HANDLE$SDL_OutOfMemory

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OutOfMemory
    • HANDLE$SDL_GetError

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetError
    • HANDLE$SDL_ClearError

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ClearError
    • HANDLE$SDL_PumpEvents

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PumpEvents
    • HANDLE$SDL_PeepEvents

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PeepEvents
    • HANDLE$SDL_HasEvent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasEvent
    • HANDLE$SDL_HasEvents

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasEvents
    • HANDLE$SDL_FlushEvent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FlushEvent
    • HANDLE$SDL_FlushEvents

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FlushEvents
    • HANDLE$SDL_PollEvent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PollEvent
    • HANDLE$SDL_WaitEvent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitEvent
    • HANDLE$SDL_WaitEventTimeout

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitEventTimeout
    • HANDLE$SDL_PushEvent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PushEvent
    • HANDLE$SDL_SetEventFilter

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetEventFilter
    • HANDLE$SDL_GetEventFilter

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetEventFilter
    • HANDLE$SDL_AddEventWatch

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddEventWatch
    • HANDLE$SDL_RemoveEventWatch

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RemoveEventWatch
    • HANDLE$SDL_FilterEvents

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FilterEvents
    • HANDLE$SDL_SetEventEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetEventEnabled
    • HANDLE$SDL_EventEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EventEnabled
    • HANDLE$SDL_RegisterEvents

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RegisterEvents
    • HANDLE$SDL_GetWindowFromEvent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowFromEvent
    • HANDLE$SDL_GetBasePath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetBasePath
    • HANDLE$SDL_GetPrefPath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPrefPath
    • HANDLE$SDL_GetUserFolder

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetUserFolder
    • HANDLE$SDL_CreateDirectory

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateDirectory
    • HANDLE$SDL_EnumerateDirectory

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EnumerateDirectory
    • HANDLE$SDL_RemovePath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RemovePath
    • HANDLE$SDL_RenamePath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenamePath
    • HANDLE$SDL_CopyFile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CopyFile
    • HANDLE$SDL_GetPathInfo

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPathInfo
    • HANDLE$SDL_GlobDirectory

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GlobDirectory
    • HANDLE$SDL_GetCurrentDirectory

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCurrentDirectory
    • HANDLE$SDL_AddGamepadMapping

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddGamepadMapping
    • HANDLE$SDL_AddGamepadMappingsFromIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddGamepadMappingsFromIO
    • HANDLE$SDL_AddGamepadMappingsFromFile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddGamepadMappingsFromFile
    • HANDLE$SDL_ReloadGamepadMappings

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReloadGamepadMappings
    • HANDLE$SDL_GetGamepadMappings

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadMappings
    • HANDLE$SDL_GetGamepadMappingForGUID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadMappingForGUID
    • HANDLE$SDL_GetGamepadMapping

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadMapping
    • HANDLE$SDL_SetGamepadMapping

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGamepadMapping
    • HANDLE$SDL_HasGamepad

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasGamepad
    • HANDLE$SDL_GetGamepads

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepads
    • HANDLE$SDL_IsGamepad

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsGamepad
    • HANDLE$SDL_GetGamepadNameForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadNameForID
    • HANDLE$SDL_GetGamepadPathForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadPathForID
    • HANDLE$SDL_GetGamepadPlayerIndexForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadPlayerIndexForID
    • HANDLE$SDL_GetGamepadGUIDForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadGUIDForID
    • HANDLE$SDL_GetGamepadVendorForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadVendorForID
    • HANDLE$SDL_GetGamepadProductForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadProductForID
    • HANDLE$SDL_GetGamepadProductVersionForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadProductVersionForID
    • HANDLE$SDL_GetGamepadTypeForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadTypeForID
    • HANDLE$SDL_GetRealGamepadTypeForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRealGamepadTypeForID
    • HANDLE$SDL_GetGamepadMappingForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadMappingForID
    • HANDLE$SDL_OpenGamepad

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenGamepad
    • HANDLE$SDL_GetGamepadFromID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadFromID
    • HANDLE$SDL_GetGamepadFromPlayerIndex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadFromPlayerIndex
    • HANDLE$SDL_GetGamepadProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadProperties
    • HANDLE$SDL_GetGamepadID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadID
    • HANDLE$SDL_GetGamepadName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadName
    • HANDLE$SDL_GetGamepadPath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadPath
    • HANDLE$SDL_GetGamepadType

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadType
    • HANDLE$SDL_GetRealGamepadType

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRealGamepadType
    • HANDLE$SDL_GetGamepadPlayerIndex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadPlayerIndex
    • HANDLE$SDL_SetGamepadPlayerIndex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGamepadPlayerIndex
    • HANDLE$SDL_GetGamepadVendor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadVendor
    • HANDLE$SDL_GetGamepadProduct

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadProduct
    • HANDLE$SDL_GetGamepadProductVersion

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadProductVersion
    • HANDLE$SDL_GetGamepadFirmwareVersion

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadFirmwareVersion
    • HANDLE$SDL_GetGamepadSerial

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadSerial
    • HANDLE$SDL_GetGamepadSteamHandle

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadSteamHandle
    • HANDLE$SDL_GetGamepadConnectionState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadConnectionState
    • HANDLE$SDL_GetGamepadPowerInfo

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadPowerInfo
    • HANDLE$SDL_GamepadConnected

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GamepadConnected
    • HANDLE$SDL_GetGamepadJoystick

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadJoystick
    • HANDLE$SDL_SetGamepadEventsEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGamepadEventsEnabled
    • HANDLE$SDL_GamepadEventsEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GamepadEventsEnabled
    • HANDLE$SDL_GetGamepadBindings

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadBindings
    • HANDLE$SDL_UpdateGamepads

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateGamepads
    • HANDLE$SDL_GetGamepadTypeFromString

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadTypeFromString
    • HANDLE$SDL_GetGamepadStringForType

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadStringForType
    • HANDLE$SDL_GetGamepadAxisFromString

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadAxisFromString
    • HANDLE$SDL_GetGamepadStringForAxis

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadStringForAxis
    • HANDLE$SDL_GamepadHasAxis

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GamepadHasAxis
    • HANDLE$SDL_GetGamepadAxis

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadAxis
    • HANDLE$SDL_GetGamepadButtonFromString

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadButtonFromString
    • HANDLE$SDL_GetGamepadStringForButton

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadStringForButton
    • HANDLE$SDL_GamepadHasButton

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GamepadHasButton
    • HANDLE$SDL_GetGamepadButton

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadButton
    • HANDLE$SDL_GetGamepadButtonLabelForType

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadButtonLabelForType
    • HANDLE$SDL_GetGamepadButtonLabel

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadButtonLabel
    • HANDLE$SDL_GetNumGamepadTouchpads

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumGamepadTouchpads
    • HANDLE$SDL_GetNumGamepadTouchpadFingers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumGamepadTouchpadFingers
    • HANDLE$SDL_GetGamepadTouchpadFinger

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadTouchpadFinger
    • HANDLE$SDL_GamepadHasSensor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GamepadHasSensor
    • HANDLE$SDL_SetGamepadSensorEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGamepadSensorEnabled
    • HANDLE$SDL_GamepadSensorEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GamepadSensorEnabled
    • HANDLE$SDL_GetGamepadSensorDataRate

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadSensorDataRate
    • HANDLE$SDL_GetGamepadSensorData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadSensorData
    • HANDLE$SDL_RumbleGamepad

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RumbleGamepad
    • HANDLE$SDL_RumbleGamepadTriggers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RumbleGamepadTriggers
    • HANDLE$SDL_SetGamepadLED

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGamepadLED
    • HANDLE$SDL_SendGamepadEffect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SendGamepadEffect
    • HANDLE$SDL_CloseGamepad

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CloseGamepad
    • HANDLE$SDL_GetGamepadAppleSFSymbolsNameForButton

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadAppleSFSymbolsNameForButton
    • HANDLE$SDL_GetGamepadAppleSFSymbolsNameForAxis

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGamepadAppleSFSymbolsNameForAxis
    • HANDLE$SDL_GPUSupportsShaderFormats

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GPUSupportsShaderFormats
    • HANDLE$SDL_GPUSupportsProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GPUSupportsProperties
    • HANDLE$SDL_CreateGPUDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateGPUDevice
    • HANDLE$SDL_CreateGPUDeviceWithProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateGPUDeviceWithProperties
    • HANDLE$SDL_DestroyGPUDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyGPUDevice
    • HANDLE$SDL_GetNumGPUDrivers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumGPUDrivers
    • HANDLE$SDL_GetGPUDriver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGPUDriver
    • HANDLE$SDL_GetGPUDeviceDriver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGPUDeviceDriver
    • HANDLE$SDL_GetGPUShaderFormats

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGPUShaderFormats
    • HANDLE$SDL_CreateGPUComputePipeline

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateGPUComputePipeline
    • HANDLE$SDL_CreateGPUGraphicsPipeline

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateGPUGraphicsPipeline
    • HANDLE$SDL_CreateGPUSampler

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateGPUSampler
    • HANDLE$SDL_CreateGPUShader

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateGPUShader
    • HANDLE$SDL_CreateGPUTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateGPUTexture
    • HANDLE$SDL_CreateGPUBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateGPUBuffer
    • HANDLE$SDL_CreateGPUTransferBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateGPUTransferBuffer
    • HANDLE$SDL_SetGPUBufferName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGPUBufferName
    • HANDLE$SDL_SetGPUTextureName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGPUTextureName
    • HANDLE$SDL_InsertGPUDebugLabel

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_InsertGPUDebugLabel
    • HANDLE$SDL_PushGPUDebugGroup

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PushGPUDebugGroup
    • HANDLE$SDL_PopGPUDebugGroup

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PopGPUDebugGroup
    • HANDLE$SDL_ReleaseGPUTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseGPUTexture
    • HANDLE$SDL_ReleaseGPUSampler

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseGPUSampler
    • HANDLE$SDL_ReleaseGPUBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseGPUBuffer
    • HANDLE$SDL_ReleaseGPUTransferBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseGPUTransferBuffer
    • HANDLE$SDL_ReleaseGPUComputePipeline

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseGPUComputePipeline
    • HANDLE$SDL_ReleaseGPUShader

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseGPUShader
    • HANDLE$SDL_ReleaseGPUGraphicsPipeline

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseGPUGraphicsPipeline
    • HANDLE$SDL_AcquireGPUCommandBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AcquireGPUCommandBuffer
    • HANDLE$SDL_PushGPUVertexUniformData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PushGPUVertexUniformData
    • HANDLE$SDL_PushGPUFragmentUniformData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PushGPUFragmentUniformData
    • HANDLE$SDL_PushGPUComputeUniformData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PushGPUComputeUniformData
    • HANDLE$SDL_BeginGPURenderPass

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BeginGPURenderPass
    • HANDLE$SDL_BindGPUGraphicsPipeline

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUGraphicsPipeline
    • HANDLE$SDL_SetGPUViewport

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGPUViewport
    • HANDLE$SDL_SetGPUScissor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGPUScissor
    • HANDLE$SDL_SetGPUBlendConstants

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGPUBlendConstants
    • HANDLE$SDL_SetGPUStencilReference

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGPUStencilReference
    • HANDLE$SDL_BindGPUVertexBuffers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUVertexBuffers
    • HANDLE$SDL_BindGPUIndexBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUIndexBuffer
    • HANDLE$SDL_BindGPUVertexSamplers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUVertexSamplers
    • HANDLE$SDL_BindGPUVertexStorageTextures

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUVertexStorageTextures
    • HANDLE$SDL_BindGPUVertexStorageBuffers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUVertexStorageBuffers
    • HANDLE$SDL_BindGPUFragmentSamplers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUFragmentSamplers
    • HANDLE$SDL_BindGPUFragmentStorageTextures

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUFragmentStorageTextures
    • HANDLE$SDL_BindGPUFragmentStorageBuffers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUFragmentStorageBuffers
    • HANDLE$SDL_DrawGPUIndexedPrimitives

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DrawGPUIndexedPrimitives
    • HANDLE$SDL_DrawGPUPrimitives

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DrawGPUPrimitives
    • HANDLE$SDL_DrawGPUPrimitivesIndirect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DrawGPUPrimitivesIndirect
    • HANDLE$SDL_DrawGPUIndexedPrimitivesIndirect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DrawGPUIndexedPrimitivesIndirect
    • HANDLE$SDL_EndGPURenderPass

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EndGPURenderPass
    • HANDLE$SDL_BeginGPUComputePass

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BeginGPUComputePass
    • HANDLE$SDL_BindGPUComputePipeline

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUComputePipeline
    • HANDLE$SDL_BindGPUComputeSamplers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUComputeSamplers
    • HANDLE$SDL_BindGPUComputeStorageTextures

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUComputeStorageTextures
    • HANDLE$SDL_BindGPUComputeStorageBuffers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BindGPUComputeStorageBuffers
    • HANDLE$SDL_DispatchGPUCompute

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DispatchGPUCompute
    • HANDLE$SDL_DispatchGPUComputeIndirect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DispatchGPUComputeIndirect
    • HANDLE$SDL_EndGPUComputePass

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EndGPUComputePass
    • HANDLE$SDL_MapGPUTransferBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MapGPUTransferBuffer
    • HANDLE$SDL_UnmapGPUTransferBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnmapGPUTransferBuffer
    • HANDLE$SDL_BeginGPUCopyPass

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BeginGPUCopyPass
    • HANDLE$SDL_UploadToGPUTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UploadToGPUTexture
    • HANDLE$SDL_UploadToGPUBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UploadToGPUBuffer
    • HANDLE$SDL_CopyGPUTextureToTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CopyGPUTextureToTexture
    • HANDLE$SDL_CopyGPUBufferToBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CopyGPUBufferToBuffer
    • HANDLE$SDL_DownloadFromGPUTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DownloadFromGPUTexture
    • HANDLE$SDL_DownloadFromGPUBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DownloadFromGPUBuffer
    • HANDLE$SDL_EndGPUCopyPass

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EndGPUCopyPass
    • HANDLE$SDL_GenerateMipmapsForGPUTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GenerateMipmapsForGPUTexture
    • HANDLE$SDL_BlitGPUTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BlitGPUTexture
    • HANDLE$SDL_WindowSupportsGPUSwapchainComposition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WindowSupportsGPUSwapchainComposition
    • HANDLE$SDL_WindowSupportsGPUPresentMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WindowSupportsGPUPresentMode
    • HANDLE$SDL_ClaimWindowForGPUDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ClaimWindowForGPUDevice
    • HANDLE$SDL_ReleaseWindowFromGPUDevice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseWindowFromGPUDevice
    • HANDLE$SDL_SetGPUSwapchainParameters

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGPUSwapchainParameters
    • HANDLE$SDL_SetGPUAllowedFramesInFlight

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetGPUAllowedFramesInFlight
    • HANDLE$SDL_GetGPUSwapchainTextureFormat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGPUSwapchainTextureFormat
    • HANDLE$SDL_AcquireGPUSwapchainTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AcquireGPUSwapchainTexture
    • HANDLE$SDL_WaitForGPUSwapchain

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitForGPUSwapchain
    • HANDLE$SDL_WaitAndAcquireGPUSwapchainTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitAndAcquireGPUSwapchainTexture
    • HANDLE$SDL_SubmitGPUCommandBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SubmitGPUCommandBuffer
    • HANDLE$SDL_SubmitGPUCommandBufferAndAcquireFence

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SubmitGPUCommandBufferAndAcquireFence
    • HANDLE$SDL_CancelGPUCommandBuffer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CancelGPUCommandBuffer
    • HANDLE$SDL_WaitForGPUIdle

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitForGPUIdle
    • HANDLE$SDL_WaitForGPUFences

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitForGPUFences
    • HANDLE$SDL_QueryGPUFence

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_QueryGPUFence
    • HANDLE$SDL_ReleaseGPUFence

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReleaseGPUFence
    • HANDLE$SDL_GPUTextureFormatTexelBlockSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GPUTextureFormatTexelBlockSize
    • HANDLE$SDL_GPUTextureSupportsFormat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GPUTextureSupportsFormat
    • HANDLE$SDL_GPUTextureSupportsSampleCount

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GPUTextureSupportsSampleCount
    • HANDLE$SDL_CalculateGPUTextureFormatSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CalculateGPUTextureFormatSize
    • HANDLE$SDL_GDKSuspendGPU

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GDKSuspendGPU
    • HANDLE$SDL_GDKResumeGPU

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GDKResumeGPU
    • HANDLE$SDL_GUIDToString

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GUIDToString
    • HANDLE$SDL_StringToGUID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StringToGUID
    • HANDLE$SDL_GetHaptics

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetHaptics
    • HANDLE$SDL_GetHapticNameForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetHapticNameForID
    • HANDLE$SDL_OpenHaptic

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenHaptic
    • HANDLE$SDL_GetHapticFromID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetHapticFromID
    • HANDLE$SDL_GetHapticID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetHapticID
    • HANDLE$SDL_GetHapticName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetHapticName
    • HANDLE$SDL_IsMouseHaptic

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsMouseHaptic
    • HANDLE$SDL_OpenHapticFromMouse

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenHapticFromMouse
    • HANDLE$SDL_IsJoystickHaptic

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsJoystickHaptic
    • HANDLE$SDL_OpenHapticFromJoystick

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenHapticFromJoystick
    • HANDLE$SDL_CloseHaptic

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CloseHaptic
    • HANDLE$SDL_GetMaxHapticEffects

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetMaxHapticEffects
    • HANDLE$SDL_GetMaxHapticEffectsPlaying

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetMaxHapticEffectsPlaying
    • HANDLE$SDL_GetHapticFeatures

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetHapticFeatures
    • HANDLE$SDL_GetNumHapticAxes

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumHapticAxes
    • HANDLE$SDL_HapticEffectSupported

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HapticEffectSupported
    • HANDLE$SDL_CreateHapticEffect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateHapticEffect
    • HANDLE$SDL_UpdateHapticEffect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateHapticEffect
    • HANDLE$SDL_RunHapticEffect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RunHapticEffect
    • HANDLE$SDL_StopHapticEffect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StopHapticEffect
    • HANDLE$SDL_DestroyHapticEffect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyHapticEffect
    • HANDLE$SDL_GetHapticEffectStatus

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetHapticEffectStatus
    • HANDLE$SDL_SetHapticGain

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetHapticGain
    • HANDLE$SDL_SetHapticAutocenter

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetHapticAutocenter
    • HANDLE$SDL_PauseHaptic

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PauseHaptic
    • HANDLE$SDL_ResumeHaptic

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ResumeHaptic
    • HANDLE$SDL_StopHapticEffects

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StopHapticEffects
    • HANDLE$SDL_HapticRumbleSupported

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HapticRumbleSupported
    • HANDLE$SDL_InitHapticRumble

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_InitHapticRumble
    • HANDLE$SDL_PlayHapticRumble

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PlayHapticRumble
    • HANDLE$SDL_StopHapticRumble

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StopHapticRumble
    • HANDLE$SDL_hid_init

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_init
    • HANDLE$SDL_hid_exit

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_exit
    • HANDLE$SDL_hid_device_change_count

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_device_change_count
    • HANDLE$SDL_hid_enumerate

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_enumerate
    • HANDLE$SDL_hid_free_enumeration

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_free_enumeration
    • HANDLE$SDL_hid_open

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_open
    • HANDLE$SDL_hid_open_path

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_open_path
    • HANDLE$SDL_hid_write

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_write
    • HANDLE$SDL_hid_read_timeout

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_read_timeout
    • HANDLE$SDL_hid_read

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_read
    • HANDLE$SDL_hid_set_nonblocking

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_set_nonblocking
    • HANDLE$SDL_hid_send_feature_report

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_send_feature_report
    • HANDLE$SDL_hid_get_feature_report

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_get_feature_report
    • HANDLE$SDL_hid_get_input_report

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_get_input_report
    • HANDLE$SDL_hid_close

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_close
    • HANDLE$SDL_hid_get_manufacturer_string

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_get_manufacturer_string
    • HANDLE$SDL_hid_get_product_string

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_get_product_string
    • HANDLE$SDL_hid_get_serial_number_string

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_get_serial_number_string
    • HANDLE$SDL_hid_get_indexed_string

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_get_indexed_string
    • HANDLE$SDL_hid_get_device_info

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_get_device_info
    • HANDLE$SDL_hid_get_report_descriptor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_get_report_descriptor
    • HANDLE$SDL_hid_ble_scan

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_hid_ble_scan
    • HANDLE$SDL_SetHintWithPriority

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetHintWithPriority
    • HANDLE$SDL_SetHint

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetHint
    • HANDLE$SDL_ResetHint

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ResetHint
    • HANDLE$SDL_ResetHints

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ResetHints
    • HANDLE$SDL_GetHint

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetHint
    • HANDLE$SDL_GetHintBoolean

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetHintBoolean
    • HANDLE$SDL_AddHintCallback

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddHintCallback
    • HANDLE$SDL_RemoveHintCallback

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RemoveHintCallback
    • HANDLE$SDL_Init

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_Init
    • HANDLE$SDL_InitSubSystem

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_InitSubSystem
    • HANDLE$SDL_QuitSubSystem

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_QuitSubSystem
    • HANDLE$SDL_WasInit

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WasInit
    • HANDLE$SDL_Quit

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_Quit
    • HANDLE$SDL_IsMainThread

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsMainThread
    • HANDLE$SDL_RunOnMainThread

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RunOnMainThread
    • HANDLE$SDL_SetAppMetadata

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAppMetadata
    • HANDLE$SDL_SetAppMetadataProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetAppMetadataProperty
    • HANDLE$SDL_GetAppMetadataProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAppMetadataProperty
    • HANDLE$SDL_IOFromFile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IOFromFile
    • HANDLE$SDL_IOFromMem

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IOFromMem
    • HANDLE$SDL_IOFromConstMem

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IOFromConstMem
    • HANDLE$SDL_IOFromDynamicMem

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IOFromDynamicMem
    • HANDLE$SDL_OpenIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenIO
    • HANDLE$SDL_CloseIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CloseIO
    • HANDLE$SDL_GetIOProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetIOProperties
    • HANDLE$SDL_GetIOStatus

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetIOStatus
    • HANDLE$SDL_GetIOSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetIOSize
    • HANDLE$SDL_SeekIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SeekIO
    • HANDLE$SDL_TellIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TellIO
    • HANDLE$SDL_ReadIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadIO
    • HANDLE$SDL_WriteIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteIO
    • HANDLE$SDL_FlushIO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FlushIO
    • HANDLE$SDL_LoadFile_IO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LoadFile_IO
    • HANDLE$SDL_LoadFile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LoadFile
    • HANDLE$SDL_SaveFile_IO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SaveFile_IO
    • HANDLE$SDL_SaveFile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SaveFile
    • HANDLE$SDL_ReadU8

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadU8
    • HANDLE$SDL_ReadS8

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadS8
    • HANDLE$SDL_ReadU16LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadU16LE
    • HANDLE$SDL_ReadS16LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadS16LE
    • HANDLE$SDL_ReadU16BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadU16BE
    • HANDLE$SDL_ReadS16BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadS16BE
    • HANDLE$SDL_ReadU32LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadU32LE
    • HANDLE$SDL_ReadS32LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadS32LE
    • HANDLE$SDL_ReadU32BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadU32BE
    • HANDLE$SDL_ReadS32BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadS32BE
    • HANDLE$SDL_ReadU64LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadU64LE
    • HANDLE$SDL_ReadS64LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadS64LE
    • HANDLE$SDL_ReadU64BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadU64BE
    • HANDLE$SDL_ReadS64BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadS64BE
    • HANDLE$SDL_WriteU8

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteU8
    • HANDLE$SDL_WriteS8

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteS8
    • HANDLE$SDL_WriteU16LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteU16LE
    • HANDLE$SDL_WriteS16LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteS16LE
    • HANDLE$SDL_WriteU16BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteU16BE
    • HANDLE$SDL_WriteS16BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteS16BE
    • HANDLE$SDL_WriteU32LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteU32LE
    • HANDLE$SDL_WriteS32LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteS32LE
    • HANDLE$SDL_WriteU32BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteU32BE
    • HANDLE$SDL_WriteS32BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteS32BE
    • HANDLE$SDL_WriteU64LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteU64LE
    • HANDLE$SDL_WriteS64LE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteS64LE
    • HANDLE$SDL_WriteU64BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteU64BE
    • HANDLE$SDL_WriteS64BE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteS64BE
    • HANDLE$SDL_LockJoysticks

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockJoysticks
    • HANDLE$SDL_UnlockJoysticks

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnlockJoysticks
    • HANDLE$SDL_HasJoystick

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasJoystick
    • HANDLE$SDL_GetJoysticks

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoysticks
    • HANDLE$SDL_GetJoystickNameForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickNameForID
    • HANDLE$SDL_GetJoystickPathForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickPathForID
    • HANDLE$SDL_GetJoystickPlayerIndexForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickPlayerIndexForID
    • HANDLE$SDL_GetJoystickGUIDForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickGUIDForID
    • HANDLE$SDL_GetJoystickVendorForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickVendorForID
    • HANDLE$SDL_GetJoystickProductForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickProductForID
    • HANDLE$SDL_GetJoystickProductVersionForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickProductVersionForID
    • HANDLE$SDL_GetJoystickTypeForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickTypeForID
    • HANDLE$SDL_OpenJoystick

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenJoystick
    • HANDLE$SDL_GetJoystickFromID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickFromID
    • HANDLE$SDL_GetJoystickFromPlayerIndex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickFromPlayerIndex
    • HANDLE$SDL_AttachVirtualJoystick

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AttachVirtualJoystick
    • HANDLE$SDL_DetachVirtualJoystick

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DetachVirtualJoystick
    • HANDLE$SDL_IsJoystickVirtual

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsJoystickVirtual
    • HANDLE$SDL_SetJoystickVirtualAxis

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetJoystickVirtualAxis
    • HANDLE$SDL_SetJoystickVirtualBall

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetJoystickVirtualBall
    • HANDLE$SDL_SetJoystickVirtualButton

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetJoystickVirtualButton
    • HANDLE$SDL_SetJoystickVirtualHat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetJoystickVirtualHat
    • HANDLE$SDL_SetJoystickVirtualTouchpad

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetJoystickVirtualTouchpad
    • HANDLE$SDL_SendJoystickVirtualSensorData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SendJoystickVirtualSensorData
    • HANDLE$SDL_GetJoystickProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickProperties
    • HANDLE$SDL_GetJoystickName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickName
    • HANDLE$SDL_GetJoystickPath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickPath
    • HANDLE$SDL_GetJoystickPlayerIndex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickPlayerIndex
    • HANDLE$SDL_SetJoystickPlayerIndex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetJoystickPlayerIndex
    • HANDLE$SDL_GetJoystickGUID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickGUID
    • HANDLE$SDL_GetJoystickVendor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickVendor
    • HANDLE$SDL_GetJoystickProduct

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickProduct
    • HANDLE$SDL_GetJoystickProductVersion

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickProductVersion
    • HANDLE$SDL_GetJoystickFirmwareVersion

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickFirmwareVersion
    • HANDLE$SDL_GetJoystickSerial

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickSerial
    • HANDLE$SDL_GetJoystickType

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickType
    • HANDLE$SDL_GetJoystickGUIDInfo

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickGUIDInfo
    • HANDLE$SDL_JoystickConnected

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_JoystickConnected
    • HANDLE$SDL_GetJoystickID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickID
    • HANDLE$SDL_GetNumJoystickAxes

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumJoystickAxes
    • HANDLE$SDL_GetNumJoystickBalls

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumJoystickBalls
    • HANDLE$SDL_GetNumJoystickHats

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumJoystickHats
    • HANDLE$SDL_GetNumJoystickButtons

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumJoystickButtons
    • HANDLE$SDL_SetJoystickEventsEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetJoystickEventsEnabled
    • HANDLE$SDL_JoystickEventsEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_JoystickEventsEnabled
    • HANDLE$SDL_UpdateJoysticks

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateJoysticks
    • HANDLE$SDL_GetJoystickAxis

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickAxis
    • HANDLE$SDL_GetJoystickAxisInitialState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickAxisInitialState
    • HANDLE$SDL_GetJoystickBall

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickBall
    • HANDLE$SDL_GetJoystickHat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickHat
    • HANDLE$SDL_GetJoystickButton

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickButton
    • HANDLE$SDL_RumbleJoystick

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RumbleJoystick
    • HANDLE$SDL_RumbleJoystickTriggers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RumbleJoystickTriggers
    • HANDLE$SDL_SetJoystickLED

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetJoystickLED
    • HANDLE$SDL_SendJoystickEffect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SendJoystickEffect
    • HANDLE$SDL_CloseJoystick

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CloseJoystick
    • HANDLE$SDL_GetJoystickConnectionState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickConnectionState
    • HANDLE$SDL_GetJoystickPowerInfo

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetJoystickPowerInfo
    • HANDLE$SDL_HasKeyboard

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasKeyboard
    • HANDLE$SDL_GetKeyboards

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetKeyboards
    • HANDLE$SDL_GetKeyboardNameForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetKeyboardNameForID
    • HANDLE$SDL_GetKeyboardFocus

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetKeyboardFocus
    • HANDLE$SDL_GetKeyboardState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetKeyboardState
    • HANDLE$SDL_ResetKeyboard

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ResetKeyboard
    • HANDLE$SDL_GetModState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetModState
    • HANDLE$SDL_SetModState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetModState
    • HANDLE$SDL_GetKeyFromScancode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetKeyFromScancode
    • HANDLE$SDL_GetScancodeFromKey

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetScancodeFromKey
    • HANDLE$SDL_SetScancodeName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetScancodeName
    • HANDLE$SDL_GetScancodeName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetScancodeName
    • HANDLE$SDL_GetScancodeFromName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetScancodeFromName
    • HANDLE$SDL_GetKeyName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetKeyName
    • HANDLE$SDL_GetKeyFromName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetKeyFromName
    • HANDLE$SDL_StartTextInput

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StartTextInput
    • HANDLE$SDL_StartTextInputWithProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StartTextInputWithProperties
    • HANDLE$SDL_TextInputActive

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TextInputActive
    • HANDLE$SDL_StopTextInput

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StopTextInput
    • HANDLE$SDL_ClearComposition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ClearComposition
    • HANDLE$SDL_SetTextInputArea

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTextInputArea
    • HANDLE$SDL_GetTextInputArea

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTextInputArea
    • HANDLE$SDL_HasScreenKeyboardSupport

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasScreenKeyboardSupport
    • HANDLE$SDL_ScreenKeyboardShown

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ScreenKeyboardShown
    • HANDLE$SDL_LoadObject

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LoadObject
    • HANDLE$SDL_LoadFunction

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LoadFunction
    • HANDLE$SDL_UnloadObject

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnloadObject
    • HANDLE$SDL_GetPreferredLocales

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPreferredLocales
    • HANDLE$SDL_SetLogPriorities

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetLogPriorities
    • HANDLE$SDL_SetLogPriority

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetLogPriority
    • HANDLE$SDL_GetLogPriority

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetLogPriority
    • HANDLE$SDL_ResetLogPriorities

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ResetLogPriorities
    • HANDLE$SDL_SetLogPriorityPrefix

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetLogPriorityPrefix
    • HANDLE$SDL_GetDefaultLogOutputFunction

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDefaultLogOutputFunction
    • HANDLE$SDL_GetLogOutputFunction

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetLogOutputFunction
    • HANDLE$SDL_SetLogOutputFunction

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetLogOutputFunction
    • HANDLE$SDL_ShowMessageBox

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowMessageBox
    • HANDLE$SDL_ShowSimpleMessageBox

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowSimpleMessageBox
    • HANDLE$SDL_Metal_CreateView

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_Metal_CreateView
    • HANDLE$SDL_Metal_DestroyView

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_Metal_DestroyView
    • HANDLE$SDL_Metal_GetLayer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_Metal_GetLayer
    • HANDLE$SDL_OpenURL

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenURL
    • HANDLE$SDL_HasMouse

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasMouse
    • HANDLE$SDL_GetMice

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetMice
    • HANDLE$SDL_GetMouseNameForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetMouseNameForID
    • HANDLE$SDL_GetMouseFocus

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetMouseFocus
    • HANDLE$SDL_GetMouseState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetMouseState
    • HANDLE$SDL_GetGlobalMouseState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGlobalMouseState
    • HANDLE$SDL_GetRelativeMouseState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRelativeMouseState
    • HANDLE$SDL_WarpMouseInWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WarpMouseInWindow
    • HANDLE$SDL_WarpMouseGlobal

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WarpMouseGlobal
    • HANDLE$SDL_SetWindowRelativeMouseMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowRelativeMouseMode
    • HANDLE$SDL_GetWindowRelativeMouseMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowRelativeMouseMode
    • HANDLE$SDL_CaptureMouse

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CaptureMouse
    • HANDLE$SDL_CreateCursor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateCursor
    • HANDLE$SDL_CreateColorCursor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateColorCursor
    • HANDLE$SDL_CreateSystemCursor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateSystemCursor
    • HANDLE$SDL_SetCursor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetCursor
    • HANDLE$SDL_GetCursor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCursor
    • HANDLE$SDL_GetDefaultCursor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDefaultCursor
    • HANDLE$SDL_DestroyCursor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyCursor
    • HANDLE$SDL_ShowCursor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowCursor
    • HANDLE$SDL_HideCursor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HideCursor
    • HANDLE$SDL_CursorVisible

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CursorVisible
    • HANDLE$SDL_CreateMutex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateMutex
    • HANDLE$SDL_LockMutex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockMutex
    • HANDLE$SDL_TryLockMutex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TryLockMutex
    • HANDLE$SDL_UnlockMutex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnlockMutex
    • HANDLE$SDL_DestroyMutex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyMutex
    • HANDLE$SDL_CreateRWLock

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateRWLock
    • HANDLE$SDL_LockRWLockForReading

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockRWLockForReading
    • HANDLE$SDL_LockRWLockForWriting

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockRWLockForWriting
    • HANDLE$SDL_TryLockRWLockForReading

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TryLockRWLockForReading
    • HANDLE$SDL_TryLockRWLockForWriting

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TryLockRWLockForWriting
    • HANDLE$SDL_UnlockRWLock

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnlockRWLock
    • HANDLE$SDL_DestroyRWLock

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyRWLock
    • HANDLE$SDL_CreateSemaphore

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateSemaphore
    • HANDLE$SDL_DestroySemaphore

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroySemaphore
    • HANDLE$SDL_WaitSemaphore

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitSemaphore
    • HANDLE$SDL_TryWaitSemaphore

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TryWaitSemaphore
    • HANDLE$SDL_WaitSemaphoreTimeout

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitSemaphoreTimeout
    • HANDLE$SDL_SignalSemaphore

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SignalSemaphore
    • HANDLE$SDL_GetSemaphoreValue

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSemaphoreValue
    • HANDLE$SDL_CreateCondition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateCondition
    • HANDLE$SDL_DestroyCondition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyCondition
    • HANDLE$SDL_SignalCondition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SignalCondition
    • HANDLE$SDL_BroadcastCondition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BroadcastCondition
    • HANDLE$SDL_WaitCondition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitCondition
    • HANDLE$SDL_WaitConditionTimeout

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitConditionTimeout
    • HANDLE$SDL_ShouldInit

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShouldInit
    • HANDLE$SDL_ShouldQuit

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShouldQuit
    • HANDLE$SDL_SetInitialized

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetInitialized
    • HANDLE$SDL_GetPixelFormatName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPixelFormatName
    • HANDLE$SDL_GetMasksForPixelFormat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetMasksForPixelFormat
    • HANDLE$SDL_GetPixelFormatForMasks

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPixelFormatForMasks
    • HANDLE$SDL_GetPixelFormatDetails

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPixelFormatDetails
    • HANDLE$SDL_CreatePalette

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreatePalette
    • HANDLE$SDL_SetPaletteColors

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetPaletteColors
    • HANDLE$SDL_DestroyPalette

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyPalette
    • HANDLE$SDL_MapRGB

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MapRGB
    • HANDLE$SDL_MapRGBA

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MapRGBA
    • HANDLE$SDL_GetRGB

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRGB
    • HANDLE$SDL_GetRGBA

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRGBA
    • HANDLE$SDL_GetPlatform

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPlatform
    • HANDLE$SDL_GetPowerInfo

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPowerInfo
    • HANDLE$SDL_CreateProcess

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateProcess
    • HANDLE$SDL_CreateProcessWithProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateProcessWithProperties
    • HANDLE$SDL_GetProcessProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetProcessProperties
    • HANDLE$SDL_ReadProcess

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadProcess
    • HANDLE$SDL_GetProcessInput

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetProcessInput
    • HANDLE$SDL_GetProcessOutput

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetProcessOutput
    • HANDLE$SDL_KillProcess

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_KillProcess
    • HANDLE$SDL_WaitProcess

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitProcess
    • HANDLE$SDL_DestroyProcess

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyProcess
    • HANDLE$SDL_GetGlobalProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGlobalProperties
    • HANDLE$SDL_CreateProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateProperties
    • HANDLE$SDL_CopyProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CopyProperties
    • HANDLE$SDL_LockProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockProperties
    • HANDLE$SDL_UnlockProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnlockProperties
    • HANDLE$SDL_SetPointerPropertyWithCleanup

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetPointerPropertyWithCleanup
    • HANDLE$SDL_SetPointerProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetPointerProperty
    • HANDLE$SDL_SetStringProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetStringProperty
    • HANDLE$SDL_SetNumberProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetNumberProperty
    • HANDLE$SDL_SetFloatProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetFloatProperty
    • HANDLE$SDL_SetBooleanProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetBooleanProperty
    • HANDLE$SDL_HasProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasProperty
    • HANDLE$SDL_GetPropertyType

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPropertyType
    • HANDLE$SDL_GetPointerProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPointerProperty
    • HANDLE$SDL_GetStringProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetStringProperty
    • HANDLE$SDL_GetNumberProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumberProperty
    • HANDLE$SDL_GetFloatProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetFloatProperty
    • HANDLE$SDL_GetBooleanProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetBooleanProperty
    • HANDLE$SDL_ClearProperty

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ClearProperty
    • HANDLE$SDL_EnumerateProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EnumerateProperties
    • HANDLE$SDL_DestroyProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyProperties
    • HANDLE$SDL_HasRectIntersection

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasRectIntersection
    • HANDLE$SDL_GetRectIntersection

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRectIntersection
    • HANDLE$SDL_GetRectUnion

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRectUnion
    • HANDLE$SDL_GetRectEnclosingPoints

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRectEnclosingPoints
    • HANDLE$SDL_GetRectAndLineIntersection

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRectAndLineIntersection
    • HANDLE$SDL_HasRectIntersectionFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HasRectIntersectionFloat
    • HANDLE$SDL_GetRectIntersectionFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRectIntersectionFloat
    • HANDLE$SDL_GetRectUnionFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRectUnionFloat
    • HANDLE$SDL_GetRectEnclosingPointsFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRectEnclosingPointsFloat
    • HANDLE$SDL_GetRectAndLineIntersectionFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRectAndLineIntersectionFloat
    • HANDLE$SDL_GetNumRenderDrivers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumRenderDrivers
    • HANDLE$SDL_GetRenderDriver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderDriver
    • HANDLE$SDL_CreateWindowAndRenderer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateWindowAndRenderer
    • HANDLE$SDL_CreateRenderer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateRenderer
    • HANDLE$SDL_CreateRendererWithProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateRendererWithProperties
    • HANDLE$SDL_CreateSoftwareRenderer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateSoftwareRenderer
    • HANDLE$SDL_GetRenderer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderer
    • HANDLE$SDL_GetRenderWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderWindow
    • HANDLE$SDL_GetRendererName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRendererName
    • HANDLE$SDL_GetRendererProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRendererProperties
    • HANDLE$SDL_GetRenderOutputSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderOutputSize
    • HANDLE$SDL_GetCurrentRenderOutputSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCurrentRenderOutputSize
    • HANDLE$SDL_CreateTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateTexture
    • HANDLE$SDL_CreateTextureFromSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateTextureFromSurface
    • HANDLE$SDL_CreateTextureWithProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateTextureWithProperties
    • HANDLE$SDL_GetTextureProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTextureProperties
    • HANDLE$SDL_GetRendererFromTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRendererFromTexture
    • HANDLE$SDL_GetTextureSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTextureSize
    • HANDLE$SDL_SetTextureColorMod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTextureColorMod
    • HANDLE$SDL_SetTextureColorModFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTextureColorModFloat
    • HANDLE$SDL_GetTextureColorMod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTextureColorMod
    • HANDLE$SDL_GetTextureColorModFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTextureColorModFloat
    • HANDLE$SDL_SetTextureAlphaMod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTextureAlphaMod
    • HANDLE$SDL_SetTextureAlphaModFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTextureAlphaModFloat
    • HANDLE$SDL_GetTextureAlphaMod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTextureAlphaMod
    • HANDLE$SDL_GetTextureAlphaModFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTextureAlphaModFloat
    • HANDLE$SDL_SetTextureBlendMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTextureBlendMode
    • HANDLE$SDL_GetTextureBlendMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTextureBlendMode
    • HANDLE$SDL_SetTextureScaleMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTextureScaleMode
    • HANDLE$SDL_GetTextureScaleMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTextureScaleMode
    • HANDLE$SDL_UpdateTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateTexture
    • HANDLE$SDL_UpdateYUVTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateYUVTexture
    • HANDLE$SDL_UpdateNVTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateNVTexture
    • HANDLE$SDL_LockTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockTexture
    • HANDLE$SDL_LockTextureToSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockTextureToSurface
    • HANDLE$SDL_UnlockTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnlockTexture
    • HANDLE$SDL_SetRenderTarget

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderTarget
    • HANDLE$SDL_GetRenderTarget

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderTarget
    • HANDLE$SDL_SetRenderLogicalPresentation

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderLogicalPresentation
    • HANDLE$SDL_GetRenderLogicalPresentation

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderLogicalPresentation
    • HANDLE$SDL_GetRenderLogicalPresentationRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderLogicalPresentationRect
    • HANDLE$SDL_RenderCoordinatesFromWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderCoordinatesFromWindow
    • HANDLE$SDL_RenderCoordinatesToWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderCoordinatesToWindow
    • HANDLE$SDL_ConvertEventToRenderCoordinates

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ConvertEventToRenderCoordinates
    • HANDLE$SDL_SetRenderViewport

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderViewport
    • HANDLE$SDL_GetRenderViewport

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderViewport
    • HANDLE$SDL_RenderViewportSet

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderViewportSet
    • HANDLE$SDL_GetRenderSafeArea

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderSafeArea
    • HANDLE$SDL_SetRenderClipRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderClipRect
    • HANDLE$SDL_GetRenderClipRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderClipRect
    • HANDLE$SDL_RenderClipEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderClipEnabled
    • HANDLE$SDL_SetRenderScale

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderScale
    • HANDLE$SDL_GetRenderScale

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderScale
    • HANDLE$SDL_SetRenderDrawColor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderDrawColor
    • HANDLE$SDL_SetRenderDrawColorFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderDrawColorFloat
    • HANDLE$SDL_GetRenderDrawColor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderDrawColor
    • HANDLE$SDL_GetRenderDrawColorFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderDrawColorFloat
    • HANDLE$SDL_SetRenderColorScale

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderColorScale
    • HANDLE$SDL_GetRenderColorScale

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderColorScale
    • HANDLE$SDL_SetRenderDrawBlendMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderDrawBlendMode
    • HANDLE$SDL_GetRenderDrawBlendMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderDrawBlendMode
    • HANDLE$SDL_RenderClear

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderClear
    • HANDLE$SDL_RenderPoint

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderPoint
    • HANDLE$SDL_RenderPoints

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderPoints
    • HANDLE$SDL_RenderLine

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderLine
    • HANDLE$SDL_RenderLines

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderLines
    • HANDLE$SDL_RenderRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderRect
    • HANDLE$SDL_RenderRects

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderRects
    • HANDLE$SDL_RenderFillRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderFillRect
    • HANDLE$SDL_RenderFillRects

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderFillRects
    • HANDLE$SDL_RenderTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderTexture
    • HANDLE$SDL_RenderTextureRotated

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderTextureRotated
    • HANDLE$SDL_RenderTextureAffine

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderTextureAffine
    • HANDLE$SDL_RenderTextureTiled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderTextureTiled
    • HANDLE$SDL_RenderTexture9Grid

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderTexture9Grid
    • HANDLE$SDL_RenderGeometry

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderGeometry
    • HANDLE$SDL_RenderGeometryRaw

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderGeometryRaw
    • HANDLE$SDL_RenderReadPixels

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderReadPixels
    • HANDLE$SDL_RenderPresent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderPresent
    • HANDLE$SDL_DestroyTexture

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyTexture
    • HANDLE$SDL_DestroyRenderer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyRenderer
    • HANDLE$SDL_FlushRenderer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FlushRenderer
    • HANDLE$SDL_GetRenderMetalLayer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderMetalLayer
    • HANDLE$SDL_GetRenderMetalCommandEncoder

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderMetalCommandEncoder
    • HANDLE$SDL_AddVulkanRenderSemaphores

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddVulkanRenderSemaphores
    • HANDLE$SDL_SetRenderVSync

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetRenderVSync
    • HANDLE$SDL_GetRenderVSync

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRenderVSync
    • HANDLE$SDL_RenderDebugText

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenderDebugText
    • HANDLE$SDL_GetSensors

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensors
    • HANDLE$SDL_GetSensorNameForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorNameForID
    • HANDLE$SDL_GetSensorTypeForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorTypeForID
    • HANDLE$SDL_GetSensorNonPortableTypeForID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorNonPortableTypeForID
    • HANDLE$SDL_OpenSensor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenSensor
    • HANDLE$SDL_GetSensorFromID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorFromID
    • HANDLE$SDL_GetSensorProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorProperties
    • HANDLE$SDL_GetSensorName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorName
    • HANDLE$SDL_GetSensorType

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorType
    • HANDLE$SDL_GetSensorNonPortableType

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorNonPortableType
    • HANDLE$SDL_GetSensorID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorID
    • HANDLE$SDL_GetSensorData

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSensorData
    • HANDLE$SDL_CloseSensor

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CloseSensor
    • HANDLE$SDL_UpdateSensors

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateSensors
    • HANDLE$SDL_OpenTitleStorage

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenTitleStorage
    • HANDLE$SDL_OpenUserStorage

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenUserStorage
    • HANDLE$SDL_OpenFileStorage

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenFileStorage
    • HANDLE$SDL_OpenStorage

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OpenStorage
    • HANDLE$SDL_CloseStorage

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CloseStorage
    • HANDLE$SDL_StorageReady

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StorageReady
    • HANDLE$SDL_GetStorageFileSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetStorageFileSize
    • HANDLE$SDL_ReadStorageFile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadStorageFile
    • HANDLE$SDL_WriteStorageFile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteStorageFile
    • HANDLE$SDL_CreateStorageDirectory

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateStorageDirectory
    • HANDLE$SDL_EnumerateStorageDirectory

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EnumerateStorageDirectory
    • HANDLE$SDL_RemoveStoragePath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RemoveStoragePath
    • HANDLE$SDL_RenameStoragePath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RenameStoragePath
    • HANDLE$SDL_CopyStorageFile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CopyStorageFile
    • HANDLE$SDL_GetStoragePathInfo

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetStoragePathInfo
    • HANDLE$SDL_GetStorageSpaceRemaining

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetStorageSpaceRemaining
    • HANDLE$SDL_GlobStorageDirectory

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GlobStorageDirectory
    • HANDLE$SDL_CreateSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateSurface
    • HANDLE$SDL_CreateSurfaceFrom

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateSurfaceFrom
    • HANDLE$SDL_DestroySurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroySurface
    • HANDLE$SDL_GetSurfaceProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSurfaceProperties
    • HANDLE$SDL_SetSurfaceColorspace

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetSurfaceColorspace
    • HANDLE$SDL_GetSurfaceColorspace

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSurfaceColorspace
    • HANDLE$SDL_CreateSurfacePalette

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateSurfacePalette
    • HANDLE$SDL_SetSurfacePalette

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetSurfacePalette
    • HANDLE$SDL_GetSurfacePalette

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSurfacePalette
    • HANDLE$SDL_AddSurfaceAlternateImage

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddSurfaceAlternateImage
    • HANDLE$SDL_SurfaceHasAlternateImages

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SurfaceHasAlternateImages
    • HANDLE$SDL_GetSurfaceImages

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSurfaceImages
    • HANDLE$SDL_RemoveSurfaceAlternateImages

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RemoveSurfaceAlternateImages
    • HANDLE$SDL_LockSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LockSurface
    • HANDLE$SDL_UnlockSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UnlockSurface
    • HANDLE$SDL_LoadBMP_IO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LoadBMP_IO
    • HANDLE$SDL_LoadBMP

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_LoadBMP
    • HANDLE$SDL_SaveBMP_IO

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SaveBMP_IO
    • HANDLE$SDL_SaveBMP

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SaveBMP
    • HANDLE$SDL_SetSurfaceRLE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetSurfaceRLE
    • HANDLE$SDL_SurfaceHasRLE

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SurfaceHasRLE
    • HANDLE$SDL_SetSurfaceColorKey

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetSurfaceColorKey
    • HANDLE$SDL_SurfaceHasColorKey

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SurfaceHasColorKey
    • HANDLE$SDL_GetSurfaceColorKey

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSurfaceColorKey
    • HANDLE$SDL_SetSurfaceColorMod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetSurfaceColorMod
    • HANDLE$SDL_GetSurfaceColorMod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSurfaceColorMod
    • HANDLE$SDL_SetSurfaceAlphaMod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetSurfaceAlphaMod
    • HANDLE$SDL_GetSurfaceAlphaMod

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSurfaceAlphaMod
    • HANDLE$SDL_SetSurfaceBlendMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetSurfaceBlendMode
    • HANDLE$SDL_GetSurfaceBlendMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSurfaceBlendMode
    • HANDLE$SDL_SetSurfaceClipRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetSurfaceClipRect
    • HANDLE$SDL_GetSurfaceClipRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSurfaceClipRect
    • HANDLE$SDL_FlipSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FlipSurface
    • HANDLE$SDL_DuplicateSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DuplicateSurface
    • HANDLE$SDL_ScaleSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ScaleSurface
    • HANDLE$SDL_ConvertSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ConvertSurface
    • HANDLE$SDL_ConvertSurfaceAndColorspace

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ConvertSurfaceAndColorspace
    • HANDLE$SDL_ConvertPixels

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ConvertPixels
    • HANDLE$SDL_ConvertPixelsAndColorspace

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ConvertPixelsAndColorspace
    • HANDLE$SDL_PremultiplyAlpha

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PremultiplyAlpha
    • HANDLE$SDL_PremultiplySurfaceAlpha

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_PremultiplySurfaceAlpha
    • HANDLE$SDL_ClearSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ClearSurface
    • HANDLE$SDL_FillSurfaceRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FillSurfaceRect
    • HANDLE$SDL_FillSurfaceRects

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FillSurfaceRects
    • HANDLE$SDL_BlitSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BlitSurface
    • HANDLE$SDL_BlitSurfaceUnchecked

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BlitSurfaceUnchecked
    • HANDLE$SDL_BlitSurfaceScaled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BlitSurfaceScaled
    • HANDLE$SDL_BlitSurfaceUncheckedScaled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BlitSurfaceUncheckedScaled
    • HANDLE$SDL_StretchSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_StretchSurface
    • HANDLE$SDL_BlitSurfaceTiled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BlitSurfaceTiled
    • HANDLE$SDL_BlitSurfaceTiledWithScale

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BlitSurfaceTiledWithScale
    • HANDLE$SDL_BlitSurface9Grid

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_BlitSurface9Grid
    • HANDLE$SDL_MapSurfaceRGB

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MapSurfaceRGB
    • HANDLE$SDL_MapSurfaceRGBA

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MapSurfaceRGBA
    • HANDLE$SDL_ReadSurfacePixel

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadSurfacePixel
    • HANDLE$SDL_ReadSurfacePixelFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ReadSurfacePixelFloat
    • HANDLE$SDL_WriteSurfacePixel

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteSurfacePixel
    • HANDLE$SDL_WriteSurfacePixelFloat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WriteSurfacePixelFloat
    • HANDLE$SDL_SetWindowsMessageHook

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowsMessageHook
    • HANDLE$SDL_GetDirect3D9AdapterIndex

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDirect3D9AdapterIndex
    • HANDLE$SDL_GetDXGIOutputInfo

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDXGIOutputInfo
    • HANDLE$SDL_SetX11EventHook

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetX11EventHook
    • HANDLE$SDL_SetLinuxThreadPriority

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetLinuxThreadPriority
    • HANDLE$SDL_SetLinuxThreadPriorityAndPolicy

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetLinuxThreadPriorityAndPolicy
    • HANDLE$SDL_SetiOSAnimationCallback

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetiOSAnimationCallback
    • HANDLE$SDL_SetiOSEventPump

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetiOSEventPump
    • HANDLE$SDL_GetAndroidJNIEnv

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAndroidJNIEnv
    • HANDLE$SDL_GetAndroidActivity

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAndroidActivity
    • HANDLE$SDL_GetAndroidSDKVersion

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAndroidSDKVersion
    • HANDLE$SDL_IsChromebook

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsChromebook
    • HANDLE$SDL_IsDeXMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsDeXMode
    • HANDLE$SDL_SendAndroidBackButton

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SendAndroidBackButton
    • HANDLE$SDL_GetAndroidInternalStoragePath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAndroidInternalStoragePath
    • HANDLE$SDL_GetAndroidExternalStorageState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAndroidExternalStorageState
    • HANDLE$SDL_GetAndroidExternalStoragePath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAndroidExternalStoragePath
    • HANDLE$SDL_GetAndroidCachePath

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetAndroidCachePath
    • HANDLE$SDL_RequestAndroidPermission

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RequestAndroidPermission
    • HANDLE$SDL_ShowAndroidToast

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowAndroidToast
    • HANDLE$SDL_SendAndroidMessage

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SendAndroidMessage
    • HANDLE$SDL_IsTablet

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsTablet
    • HANDLE$SDL_IsTV

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_IsTV
    • HANDLE$SDL_GetSandbox

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSandbox
    • HANDLE$SDL_OnApplicationWillTerminate

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OnApplicationWillTerminate
    • HANDLE$SDL_OnApplicationDidReceiveMemoryWarning

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OnApplicationDidReceiveMemoryWarning
    • HANDLE$SDL_OnApplicationWillEnterBackground

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OnApplicationWillEnterBackground
    • HANDLE$SDL_OnApplicationDidEnterBackground

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OnApplicationDidEnterBackground
    • HANDLE$SDL_OnApplicationWillEnterForeground

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OnApplicationWillEnterForeground
    • HANDLE$SDL_OnApplicationDidEnterForeground

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OnApplicationDidEnterForeground
    • HANDLE$SDL_OnApplicationDidChangeStatusBarOrientation

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_OnApplicationDidChangeStatusBarOrientation
    • HANDLE$SDL_GetGDKTaskQueue

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGDKTaskQueue
    • HANDLE$SDL_GetGDKDefaultUser

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGDKDefaultUser
    • HANDLE$SDL_CreateThread

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateThread
    • HANDLE$SDL_CreateThreadWithProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateThreadWithProperties
    • HANDLE$SDL_CreateThreadRuntime

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateThreadRuntime
    • HANDLE$SDL_CreateThreadWithPropertiesRuntime

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateThreadWithPropertiesRuntime
    • HANDLE$SDL_GetThreadName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetThreadName
    • HANDLE$SDL_GetCurrentThreadID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCurrentThreadID
    • HANDLE$SDL_GetThreadID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetThreadID
    • HANDLE$SDL_SetCurrentThreadPriority

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetCurrentThreadPriority
    • HANDLE$SDL_WaitThread

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WaitThread
    • HANDLE$SDL_GetThreadState

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetThreadState
    • HANDLE$SDL_DetachThread

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DetachThread
    • HANDLE$SDL_GetTLS

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTLS
    • HANDLE$SDL_SetTLS

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTLS
    • HANDLE$SDL_CleanupTLS

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CleanupTLS
    • HANDLE$SDL_GetDateTimeLocalePreferences

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDateTimeLocalePreferences
    • HANDLE$SDL_GetCurrentTime

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCurrentTime
    • HANDLE$SDL_TimeToDateTime

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TimeToDateTime
    • HANDLE$SDL_DateTimeToTime

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DateTimeToTime
    • HANDLE$SDL_TimeToWindows

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TimeToWindows
    • HANDLE$SDL_TimeFromWindows

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_TimeFromWindows
    • HANDLE$SDL_GetDaysInMonth

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDaysInMonth
    • HANDLE$SDL_GetDayOfYear

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDayOfYear
    • HANDLE$SDL_GetDayOfWeek

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDayOfWeek
    • HANDLE$SDL_GetTicks

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTicks
    • HANDLE$SDL_GetTicksNS

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTicksNS
    • HANDLE$SDL_GetPerformanceCounter

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPerformanceCounter
    • HANDLE$SDL_GetPerformanceFrequency

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPerformanceFrequency
    • HANDLE$SDL_Delay

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_Delay
    • HANDLE$SDL_DelayNS

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DelayNS
    • HANDLE$SDL_DelayPrecise

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DelayPrecise
    • HANDLE$SDL_AddTimer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddTimer
    • HANDLE$SDL_AddTimerNS

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_AddTimerNS
    • HANDLE$SDL_RemoveTimer

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RemoveTimer
    • HANDLE$SDL_CreateTray

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateTray
    • HANDLE$SDL_SetTrayIcon

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTrayIcon
    • HANDLE$SDL_SetTrayTooltip

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTrayTooltip
    • HANDLE$SDL_CreateTrayMenu

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateTrayMenu
    • HANDLE$SDL_CreateTraySubmenu

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateTraySubmenu
    • HANDLE$SDL_GetTrayMenu

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTrayMenu
    • HANDLE$SDL_GetTraySubmenu

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTraySubmenu
    • HANDLE$SDL_GetTrayEntries

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTrayEntries
    • HANDLE$SDL_RemoveTrayEntry

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RemoveTrayEntry
    • HANDLE$SDL_InsertTrayEntryAt

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_InsertTrayEntryAt
    • HANDLE$SDL_SetTrayEntryLabel

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTrayEntryLabel
    • HANDLE$SDL_GetTrayEntryLabel

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTrayEntryLabel
    • HANDLE$SDL_SetTrayEntryChecked

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTrayEntryChecked
    • HANDLE$SDL_GetTrayEntryChecked

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTrayEntryChecked
    • HANDLE$SDL_SetTrayEntryEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTrayEntryEnabled
    • HANDLE$SDL_GetTrayEntryEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTrayEntryEnabled
    • HANDLE$SDL_SetTrayEntryCallback

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetTrayEntryCallback
    • HANDLE$SDL_ClickTrayEntry

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ClickTrayEntry
    • HANDLE$SDL_DestroyTray

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyTray
    • HANDLE$SDL_GetTrayEntryParent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTrayEntryParent
    • HANDLE$SDL_GetTrayMenuParentEntry

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTrayMenuParentEntry
    • HANDLE$SDL_GetTrayMenuParentTray

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTrayMenuParentTray
    • HANDLE$SDL_UpdateTrays

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateTrays
    • HANDLE$SDL_GetTouchDevices

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTouchDevices
    • HANDLE$SDL_GetTouchDeviceName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTouchDeviceName
    • HANDLE$SDL_GetTouchDeviceType

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTouchDeviceType
    • HANDLE$SDL_GetTouchFingers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetTouchFingers
    • HANDLE$SDL_GetVersion

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetVersion
    • HANDLE$SDL_GetRevision

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetRevision
    • HANDLE$SDL_GetNumVideoDrivers

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNumVideoDrivers
    • HANDLE$SDL_GetVideoDriver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetVideoDriver
    • HANDLE$SDL_GetCurrentVideoDriver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCurrentVideoDriver
    • HANDLE$SDL_GetSystemTheme

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetSystemTheme
    • HANDLE$SDL_GetDisplays

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDisplays
    • HANDLE$SDL_GetPrimaryDisplay

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetPrimaryDisplay
    • HANDLE$SDL_GetDisplayProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDisplayProperties
    • HANDLE$SDL_GetDisplayName

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDisplayName
    • HANDLE$SDL_GetDisplayBounds

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDisplayBounds
    • HANDLE$SDL_GetDisplayUsableBounds

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDisplayUsableBounds
    • HANDLE$SDL_GetNaturalDisplayOrientation

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetNaturalDisplayOrientation
    • HANDLE$SDL_GetCurrentDisplayOrientation

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCurrentDisplayOrientation
    • HANDLE$SDL_GetDisplayContentScale

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDisplayContentScale
    • HANDLE$SDL_GetFullscreenDisplayModes

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetFullscreenDisplayModes
    • HANDLE$SDL_GetClosestFullscreenDisplayMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetClosestFullscreenDisplayMode
    • HANDLE$SDL_GetDesktopDisplayMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDesktopDisplayMode
    • HANDLE$SDL_GetCurrentDisplayMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetCurrentDisplayMode
    • HANDLE$SDL_GetDisplayForPoint

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDisplayForPoint
    • HANDLE$SDL_GetDisplayForRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDisplayForRect
    • HANDLE$SDL_GetDisplayForWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetDisplayForWindow
    • HANDLE$SDL_GetWindowPixelDensity

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowPixelDensity
    • HANDLE$SDL_GetWindowDisplayScale

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowDisplayScale
    • HANDLE$SDL_SetWindowFullscreenMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowFullscreenMode
    • HANDLE$SDL_GetWindowFullscreenMode

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowFullscreenMode
    • HANDLE$SDL_GetWindowICCProfile

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowICCProfile
    • HANDLE$SDL_GetWindowPixelFormat

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowPixelFormat
    • HANDLE$SDL_GetWindows

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindows
    • HANDLE$SDL_CreateWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateWindow
    • HANDLE$SDL_CreatePopupWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreatePopupWindow
    • HANDLE$SDL_CreateWindowWithProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_CreateWindowWithProperties
    • HANDLE$SDL_GetWindowID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowID
    • HANDLE$SDL_GetWindowFromID

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowFromID
    • HANDLE$SDL_GetWindowParent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowParent
    • HANDLE$SDL_GetWindowProperties

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowProperties
    • HANDLE$SDL_GetWindowFlags

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowFlags
    • HANDLE$SDL_SetWindowTitle

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowTitle
    • HANDLE$SDL_GetWindowTitle

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowTitle
    • HANDLE$SDL_SetWindowIcon

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowIcon
    • HANDLE$SDL_SetWindowPosition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowPosition
    • HANDLE$SDL_GetWindowPosition

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowPosition
    • HANDLE$SDL_SetWindowSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowSize
    • HANDLE$SDL_GetWindowSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowSize
    • HANDLE$SDL_GetWindowSafeArea

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowSafeArea
    • HANDLE$SDL_SetWindowAspectRatio

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowAspectRatio
    • HANDLE$SDL_GetWindowAspectRatio

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowAspectRatio
    • HANDLE$SDL_GetWindowBordersSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowBordersSize
    • HANDLE$SDL_GetWindowSizeInPixels

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowSizeInPixels
    • HANDLE$SDL_SetWindowMinimumSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowMinimumSize
    • HANDLE$SDL_GetWindowMinimumSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowMinimumSize
    • HANDLE$SDL_SetWindowMaximumSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowMaximumSize
    • HANDLE$SDL_GetWindowMaximumSize

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowMaximumSize
    • HANDLE$SDL_SetWindowBordered

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowBordered
    • HANDLE$SDL_SetWindowResizable

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowResizable
    • HANDLE$SDL_SetWindowAlwaysOnTop

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowAlwaysOnTop
    • HANDLE$SDL_ShowWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowWindow
    • HANDLE$SDL_HideWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_HideWindow
    • HANDLE$SDL_RaiseWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RaiseWindow
    • HANDLE$SDL_MaximizeWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MaximizeWindow
    • HANDLE$SDL_MinimizeWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_MinimizeWindow
    • HANDLE$SDL_RestoreWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_RestoreWindow
    • HANDLE$SDL_SetWindowFullscreen

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowFullscreen
    • HANDLE$SDL_SyncWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SyncWindow
    • HANDLE$SDL_WindowHasSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_WindowHasSurface
    • HANDLE$SDL_GetWindowSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowSurface
    • HANDLE$SDL_SetWindowSurfaceVSync

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowSurfaceVSync
    • HANDLE$SDL_GetWindowSurfaceVSync

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowSurfaceVSync
    • HANDLE$SDL_UpdateWindowSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateWindowSurface
    • HANDLE$SDL_UpdateWindowSurfaceRects

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_UpdateWindowSurfaceRects
    • HANDLE$SDL_DestroyWindowSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyWindowSurface
    • HANDLE$SDL_SetWindowKeyboardGrab

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowKeyboardGrab
    • HANDLE$SDL_SetWindowMouseGrab

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowMouseGrab
    • HANDLE$SDL_GetWindowKeyboardGrab

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowKeyboardGrab
    • HANDLE$SDL_GetWindowMouseGrab

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowMouseGrab
    • HANDLE$SDL_GetGrabbedWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetGrabbedWindow
    • HANDLE$SDL_SetWindowMouseRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowMouseRect
    • HANDLE$SDL_GetWindowMouseRect

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowMouseRect
    • HANDLE$SDL_SetWindowOpacity

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowOpacity
    • HANDLE$SDL_GetWindowOpacity

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GetWindowOpacity
    • HANDLE$SDL_SetWindowParent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowParent
    • HANDLE$SDL_SetWindowModal

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowModal
    • HANDLE$SDL_SetWindowFocusable

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowFocusable
    • HANDLE$SDL_ShowWindowSystemMenu

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ShowWindowSystemMenu
    • HANDLE$SDL_SetWindowHitTest

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowHitTest
    • HANDLE$SDL_SetWindowShape

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_SetWindowShape
    • HANDLE$SDL_FlashWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_FlashWindow
    • HANDLE$SDL_DestroyWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DestroyWindow
    • HANDLE$SDL_ScreenSaverEnabled

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_ScreenSaverEnabled
    • HANDLE$SDL_EnableScreenSaver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EnableScreenSaver
    • HANDLE$SDL_DisableScreenSaver

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_DisableScreenSaver
    • HANDLE$SDL_GL_LoadLibrary

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_LoadLibrary
    • HANDLE$SDL_GL_GetProcAddress

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_GetProcAddress
    • HANDLE$SDL_EGL_GetProcAddress

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EGL_GetProcAddress
    • HANDLE$SDL_GL_UnloadLibrary

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_UnloadLibrary
    • HANDLE$SDL_GL_ExtensionSupported

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_ExtensionSupported
    • HANDLE$SDL_GL_ResetAttributes

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_ResetAttributes
    • HANDLE$SDL_GL_SetAttribute

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_SetAttribute
    • HANDLE$SDL_GL_GetAttribute

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_GetAttribute
    • HANDLE$SDL_GL_CreateContext

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_CreateContext
    • HANDLE$SDL_GL_MakeCurrent

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_MakeCurrent
    • HANDLE$SDL_GL_GetCurrentWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_GetCurrentWindow
    • HANDLE$SDL_GL_GetCurrentContext

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_GetCurrentContext
    • HANDLE$SDL_EGL_GetCurrentDisplay

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EGL_GetCurrentDisplay
    • HANDLE$SDL_EGL_GetCurrentConfig

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EGL_GetCurrentConfig
    • HANDLE$SDL_EGL_GetWindowSurface

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EGL_GetWindowSurface
    • HANDLE$SDL_EGL_SetAttributeCallbacks

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_EGL_SetAttributeCallbacks
    • HANDLE$SDL_GL_SetSwapInterval

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_SetSwapInterval
    • HANDLE$SDL_GL_GetSwapInterval

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_GetSwapInterval
    • HANDLE$SDL_GL_SwapWindow

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_SwapWindow
    • HANDLE$SDL_GL_DestroyContext

      @Nullable public final @Nullable MethodHandle HANDLE$SDL_GL_DestroyContext
  • Constructor Details

  • Method Details

    • malloc

      @Pointer(comment="void*") public MemorySegment malloc(long size)

      Allocate uninitialized memory.

      The allocated memory returned by this function must be freed with SDL_free().

      If size is 0, it will be set to 1.

      If the allocation is successful, the returned pointer is guaranteed to be aligned to either the fundamental alignment (alignof(max_align_t) in C11 and later) or 2 * sizeof(void *), whichever is smaller. Use SDL_aligned_alloc() if you need to allocate memory aligned to an alignment greater than this guarantee.

      Parameters:
      size - the size to allocate.
      Returns:
      a pointer to the allocated memory, or NULL if allocation failed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • calloc

      @Pointer(comment="void*") public MemorySegment calloc(long nmemb, long size)

      Allocate a zero-initialized array.

      The memory returned by this function must be freed with SDL_free().

      If either of nmemb or size is 0, they will both be set to 1.

      If the allocation is successful, the returned pointer is guaranteed to be aligned to either the fundamental alignment (alignof(max_align_t) in C11 and later) or 2 * sizeof(void *), whichever is smaller.

      Parameters:
      nmemb - the number of elements in the array.
      size - the size of each element of the array.
      Returns:
      a pointer to the allocated array, or NULL if allocation failed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • realloc

      @Pointer(comment="void*") public MemorySegment realloc(@Pointer(comment="void*") MemorySegment mem, long size)

      Change the size of allocated memory.

      The memory returned by this function must be freed with SDL_free().

      If size is 0, it will be set to 1. Note that this is unlike some other C runtime realloc implementations, which may treat realloc(mem, 0) the same way as free(mem).

      If mem is NULL, the behavior of this function is equivalent to SDL_malloc(). Otherwise, the function can have one of three possible outcomes:

      • If it returns the same pointer as mem, it means that mem was resized in place without freeing.
      • If it returns a different non-NULL pointer, it means that mem was freed and cannot be dereferenced anymore.
      • If it returns NULL (indicating failure), then mem will remain valid and must still be freed with SDL_free().

      If the allocation is successfully resized, the returned pointer is guaranteed to be aligned to either the fundamental alignment (alignof(max_align_t) in C11 and later) or 2 * sizeof(void *), whichever is smaller.

      Parameters:
      mem - a pointer to allocated memory to reallocate, or NULL.
      size - the new size of the memory.
      Returns:
      a pointer to the newly allocated memory, or NULL if allocation failed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • free

      public void free(@Pointer(comment="void*") MemorySegment mem)

      Free allocated memory.

      The pointer is no longer valid after this call and cannot be dereferenced anymore.

      If mem is NULL, this function does nothing.

      Parameters:
      mem - a pointer to allocated memory, or NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getOriginalMemoryFunctions

      public void getOriginalMemoryFunctions(@Nullable @Nullable PointerPtr malloc_func, @Nullable @Nullable PointerPtr calloc_func, @Nullable @Nullable PointerPtr realloc_func, @Nullable @Nullable PointerPtr free_func)

      Get the original set of SDL memory functions.

      This is what SDL_malloc and friends will use by default, if there has been no call to SDL_SetMemoryFunctions. This is not necessarily using the C runtime's malloc functions behind the scenes! Different platforms and build configurations might do any number of unexpected things.

      Parameters:
      malloc_func - filled with malloc function.
      calloc_func - filled with calloc function.
      realloc_func - filled with realloc function.
      free_func - filled with free function.
      Since:
      This function is available since SDL 3.2.0.
    • getMemoryFunctions

      public void getMemoryFunctions(@Nullable @Nullable PointerPtr malloc_func, @Nullable @Nullable PointerPtr calloc_func, @Nullable @Nullable PointerPtr realloc_func, @Nullable @Nullable PointerPtr free_func)
      Get the current set of SDL memory functions.
      Parameters:
      malloc_func - filled with malloc function.
      calloc_func - filled with calloc function.
      realloc_func - filled with realloc function.
      free_func - filled with free function.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setMemoryFunctions

      @NativeType("boolean") public boolean setMemoryFunctions(@Pointer(comment="SDL_malloc_func") MemorySegment malloc_func, @Pointer(comment="SDL_calloc_func") MemorySegment calloc_func, @Pointer(comment="SDL_realloc_func") MemorySegment realloc_func, @Pointer(comment="SDL_free_func") MemorySegment free_func)

      Replace SDL's memory allocation functions with a custom set.

      It is not safe to call this function once any allocations have been made, as future calls to SDL_free will use the new allocator, even if they came from an SDL_malloc made with the old one!

      If used, usually this needs to be the first call made into the SDL library, if not the very first thing done at program startup time.

      Parameters:
      malloc_func - custom malloc function.
      calloc_func - custom calloc function.
      realloc_func - custom realloc function.
      free_func - custom free function.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • aligned_alloc

      @Pointer(comment="void*") public MemorySegment aligned_alloc(long alignment, long size)

      Allocate memory aligned to a specific alignment.

      The memory returned by this function must be freed with SDL_aligned_free(), not SDL_free().

      If alignment is less than the size of void *, it will be increased to match that.

      The returned memory address will be a multiple of the alignment value, and the size of the memory allocated will be a multiple of the alignment value.

      Parameters:
      alignment - the alignment of the memory.
      size - the size to allocate.
      Returns:
      a pointer to the aligned memory, or NULL if allocation failed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • aligned_free

      public void aligned_free(@Pointer(comment="void*") MemorySegment mem)

      Free memory allocated by SDL_aligned_alloc().

      The pointer is no longer valid after this call and cannot be dereferenced anymore.

      If mem is NULL, this function does nothing.

      Parameters:
      mem - a pointer previously returned by SDL_aligned_alloc(), or NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumAllocations

      public int getNumAllocations()
      Get the number of outstanding (unfreed) allocations.
      Returns:
      the number of allocations or -1 if allocation counting is disabled.
      Since:
      This function is available since SDL 3.2.0.
    • getEnvironment

      public SDL_Environment getEnvironment()

      Get the process environment.

      This is initialized at application start and is not affected by setenv() and unsetenv() calls after that point. Use SDL_SetEnvironmentVariable() and SDL_UnsetEnvironmentVariable() if you want to modify this environment, or SDL_setenv_unsafe() or SDL_unsetenv_unsafe() if you want changes to persist in the C runtime environment after SDL_Quit().

      Returns:
      a pointer to the environment for the process or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createEnvironment

      public SDL_Environment createEnvironment(@NativeType("boolean") boolean populated)
      Create a set of environment variables
      Parameters:
      populated - true to initialize it from the C runtime environment, false to create an empty environment.
      Returns:
      a pointer to the new environment or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getEnvironmentVariable

      public BytePtr getEnvironmentVariable(@Nullable @Nullable SDL_Environment env, @Nullable @Nullable BytePtr name)
      Get the value of a variable in the environment.
      Parameters:
      env - the environment to query.
      name - the name of the variable to get.
      Returns:
      a pointer to the value of the variable or NULL if it can't be found.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getEnvironmentVariables

      public PointerPtr getEnvironmentVariables(@Nullable @Nullable SDL_Environment env)
      Get all variables in the environment.
      Parameters:
      env - the environment to query.
      Returns:
      a NULL terminated array of pointers to environment variables in the form "variable=value" or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setEnvironmentVariable

      @NativeType("boolean") public boolean setEnvironmentVariable(@Nullable @Nullable SDL_Environment env, @Nullable @Nullable BytePtr name, @Nullable @Nullable BytePtr value, @NativeType("boolean") boolean overwrite)
      Set the value of a variable in the environment.
      Parameters:
      env - the environment to modify.
      name - the name of the variable to set.
      value - the value of the variable to set.
      overwrite - true to overwrite the variable if it exists, false to return success without setting the variable if it already exists.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unsetEnvironmentVariable

      @NativeType("boolean") public boolean unsetEnvironmentVariable(@Nullable @Nullable SDL_Environment env, @Nullable @Nullable BytePtr name)
      Clear a variable from the environment.
      Parameters:
      env - the environment to modify.
      name - the name of the variable to unset.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyEnvironment

      public void destroyEnvironment(@Nullable @Nullable SDL_Environment env)
      Destroy a set of environment variables.
      Parameters:
      env - the environment to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getenv

      public BytePtr getenv(@Nullable @Nullable BytePtr name)

      Get the value of a variable in the environment.

      This function uses SDL's cached copy of the environment and is thread-safe.

      Parameters:
      name - the name of the variable to get.
      Returns:
      a pointer to the value of the variable or NULL if it can't be found.
      Since:
      This function is available since SDL 3.2.0.
    • getenv_unsafe

      public BytePtr getenv_unsafe(@Nullable @Nullable BytePtr name)

      Get the value of a variable in the environment.

      This function bypasses SDL's cached copy of the environment and is not thread-safe.

      Parameters:
      name - the name of the variable to get.
      Returns:
      a pointer to the value of the variable or NULL if it can't be found.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setenv_unsafe

      public int setenv_unsafe(@Nullable @Nullable BytePtr name, @Nullable @Nullable BytePtr value, int overwrite)
      Set the value of a variable in the environment.
      Parameters:
      name - the name of the variable to set.
      value - the value of the variable to set.
      overwrite - 1 to overwrite the variable if it exists, 0 to return success without setting the variable if it already exists.
      Returns:
      0 on success, -1 on error.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unsetenv_unsafe

      public int unsetenv_unsafe(@Nullable @Nullable BytePtr name)
      Clear a variable from the environment.
      Parameters:
      name - the name of the variable to unset.
      Returns:
      0 on success, -1 on error.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • qsort

      public void qsort(@Pointer(comment="void*") MemorySegment base, long nmemb, long size, @Pointer(comment="SDL_CompareCallback") MemorySegment compare)

      Sort an array.

      For example:

      typedef struct {
      int key;
      const char *string;
      } data;
      
      int SDLCALL compare(const void *a, const void *b)
      {
      const data *A = (const data *)a;
      const data *B = (const data *)b;
      
      if (A->n < B->n) {
      return -1;
      } else if (B->n < A->n) {
      return 1;
      } else {
      return 0;
      }
      }
      
      data values[] = {
      { 3, "third" }, { 1, "first" }, { 2, "second" }
      };
      
      SDL_qsort(values, SDL_arraysize(values), sizeof(values[0]), compare);
      
      Parameters:
      base - a pointer to the start of the array.
      nmemb - the number of elements in the array.
      size - the size of the elements in the array.
      compare - a function used to compare elements in the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bsearch

      @Pointer(comment="void*") public MemorySegment bsearch(@Pointer(comment="void*") MemorySegment key, @Pointer(comment="void*") MemorySegment base, long nmemb, long size, @Pointer(comment="SDL_CompareCallback") MemorySegment compare)

      Perform a binary search on a previously sorted array.

      For example:

      typedef struct {
      int key;
      const char *string;
      } data;
      
      int SDLCALL compare(const void *a, const void *b)
      {
      const data *A = (const data *)a;
      const data *B = (const data *)b;
      
      if (A->n < B->n) {
      return -1;
      } else if (B->n < A->n) {
      return 1;
      } else {
      return 0;
      }
      }
      
      data values[] = {
      { 1, "first" }, { 2, "second" }, { 3, "third" }
      };
      data key = { 2, NULL };
      
      data *result = SDL_bsearch(&key, values, SDL_arraysize(values), sizeof(values[0]), compare);
      
      Parameters:
      key - a pointer to a key equal to the element being searched for.
      base - a pointer to the start of the array.
      nmemb - the number of elements in the array.
      size - the size of the elements in the array.
      compare - a function used to compare elements in the array.
      Returns:
      a pointer to the matching element in the array, or NULL if not found.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • qsort_r

      public void qsort_r(@Pointer(comment="void*") MemorySegment base, long nmemb, long size, @Pointer(comment="SDL_CompareCallback_r") MemorySegment compare, @Pointer(comment="void*") MemorySegment userdata)

      Sort an array, passing a userdata pointer to the compare function.

      For example:

      typedef enum {
      sort_increasing,
      sort_decreasing,
      } sort_method;
      
      typedef struct {
      int key;
      const char *string;
      } data;
      
      int SDLCALL compare(const void *userdata, const void *a, const void *b)
      {
      sort_method method = (sort_method)(uintptr_t)userdata;
      const data *A = (const data *)a;
      const data *B = (const data *)b;
      
      if (A->key < B->key) {
      return (method == sort_increasing) ? -1 : 1;
      } else if (B->key < A->key) {
      return (method == sort_increasing) ? 1 : -1;
      } else {
      return 0;
      }
      }
      
      data values[] = {
      { 3, "third" }, { 1, "first" }, { 2, "second" }
      };
      
      SDL_qsort_r(values, SDL_arraysize(values), sizeof(values[0]), compare, (const void *)(uintptr_t)sort_increasing);
      
      Parameters:
      base - a pointer to the start of the array.
      nmemb - the number of elements in the array.
      size - the size of the elements in the array.
      compare - a function used to compare elements in the array.
      userdata - a pointer to pass to the compare function.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bsearch_r

      @Pointer(comment="void*") public MemorySegment bsearch_r(@Pointer(comment="void*") MemorySegment key, @Pointer(comment="void*") MemorySegment base, long nmemb, long size, @Pointer(comment="SDL_CompareCallback_r") MemorySegment compare, @Pointer(comment="void*") MemorySegment userdata)

      Perform a binary search on a previously sorted array, passing a userdata pointer to the compare function.

      For example:

      typedef enum {
      sort_increasing,
      sort_decreasing,
      } sort_method;
      
      typedef struct {
      int key;
      const char *string;
      } data;
      
      int SDLCALL compare(const void *userdata, const void *a, const void *b)
      {
      sort_method method = (sort_method)(uintptr_t)userdata;
      const data *A = (const data *)a;
      const data *B = (const data *)b;
      
      if (A->key < B->key) {
      return (method == sort_increasing) ? -1 : 1;
      } else if (B->key < A->key) {
      return (method == sort_increasing) ? 1 : -1;
      } else {
      return 0;
      }
      }
      
      data values[] = {
      { 1, "first" }, { 2, "second" }, { 3, "third" }
      };
      data key = { 2, NULL };
      
      data *result = SDL_bsearch_r(&key, values, SDL_arraysize(values), sizeof(values[0]), compare, (const void *)(uintptr_t)sort_increasing);
      
      Parameters:
      key - a pointer to a key equal to the element being searched for.
      base - a pointer to the start of the array.
      nmemb - the number of elements in the array.
      size - the size of the elements in the array.
      compare - a function used to compare elements in the array.
      userdata - a pointer to pass to the compare function.
      Returns:
      a pointer to the matching element in the array, or NULL if not found.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • abs

      public int abs(int x)
      Compute the absolute value of x.
      Parameters:
      x - an integer value.
      Returns:
      the absolute value of x.
      Since:
      This function is available since SDL 3.2.0.
    • isalpha

      public int isalpha(int x)

      Query if a character is alphabetic (a letter).

      WARNING: Regardless of system locale, this will only treat ASCII values for English 'a-z' and 'A-Z' as true.

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • isalnum

      public int isalnum(int x)

      Query if a character is alphabetic (a letter) or a number.

      WARNING: Regardless of system locale, this will only treat ASCII values for English 'a-z', 'A-Z', and '0-9' as true.

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • isblank

      public int isblank(int x)

      Report if a character is blank (a space or tab).

      WARNING: Regardless of system locale, this will only treat ASCII values 0x20 (space) or 0x9 (tab) as true.

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • iscntrl

      public int iscntrl(int x)

      Report if a character is a control character.

      WARNING: Regardless of system locale, this will only treat ASCII values 0 through 0x1F, and 0x7F, as true.

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • isdigit

      public int isdigit(int x)

      Report if a character is a numeric digit.

      WARNING: Regardless of system locale, this will only treat ASCII values '0' (0x30) through '9' (0x39), as true.

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • isxdigit

      public int isxdigit(int x)

      Report if a character is a hexadecimal digit.

      WARNING: Regardless of system locale, this will only treat ASCII values 'A' through 'F', 'a' through 'f', and '0' through '9', as true.

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • ispunct

      public int ispunct(int x)

      Report if a character is a punctuation mark.

      WARNING: Regardless of system locale, this is equivalent to ((SDL_isgraph(x)) && (!SDL_isalnum(x))).

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isspace

      public int isspace(int x)

      Report if a character is whitespace.

      WARNING: Regardless of system locale, this will only treat the following ASCII values as true:

      • space (0x20)
      • tab (0x09)
      • newline (0x0A)
      • vertical tab (0x0B)
      • form feed (0x0C)
      • return (0x0D)
      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • isupper

      public int isupper(int x)

      Report if a character is upper case.

      WARNING: Regardless of system locale, this will only treat ASCII values 'A' through 'Z' as true.

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • islower

      public int islower(int x)

      Report if a character is lower case.

      WARNING: Regardless of system locale, this will only treat ASCII values 'a' through 'z' as true.

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • isprint

      public int isprint(int x)

      Report if a character is "printable".

      Be advised that "printable" has a definition that goes back to text terminals from the dawn of computing, making this a sort of special case function that is not suitable for Unicode (or most any) text management.

      WARNING: Regardless of system locale, this will only treat ASCII values ' ' (0x20) through '~' (0x7E) as true.

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • isgraph

      public int isgraph(int x)

      Report if a character is any "printable" except space.

      Be advised that "printable" has a definition that goes back to text terminals from the dawn of computing, making this a sort of special case function that is not suitable for Unicode (or most any) text management.

      WARNING: Regardless of system locale, this is equivalent to (SDL_isprint(x)) && ((x) != ' ').

      Parameters:
      x - character value to check.
      Returns:
      non-zero if x falls within the character class, zero otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • toupper

      public int toupper(int x)

      Convert low-ASCII English letters to uppercase.

      WARNING: Regardless of system locale, this will only convert ASCII values 'a' through 'z' to uppercase.

      This function returns the uppercase equivalent of x. If a character cannot be converted, or is already uppercase, this function returns x.

      Parameters:
      x - character value to check.
      Returns:
      capitalized version of x, or x if no conversion available.
      Since:
      This function is available since SDL 3.2.0.
    • tolower

      public int tolower(int x)

      Convert low-ASCII English letters to lowercase.

      WARNING: Regardless of system locale, this will only convert ASCII values 'A' through 'Z' to lowercase.

      This function returns the lowercase equivalent of x. If a character cannot be converted, or is already lowercase, this function returns x.

      Parameters:
      x - character value to check.
      Returns:
      lowercase version of x, or x if no conversion available.
      Since:
      This function is available since SDL 3.2.0.
    • crc16

      @NativeType("Uint16") @Unsigned public short crc16(@NativeType("Uint16") @Unsigned short crc, @Pointer(comment="void*") MemorySegment data, long len)

      Calculate a CRC-16 value.

      https://en.wikipedia.org/wiki/Cyclic_redundancy_check

      This function can be called multiple times, to stream data to be checksummed in blocks. Each call must provide the previous CRC-16 return value to be updated with the next block. The first call to this function for a set of blocks should pass in a zero CRC value.

      Parameters:
      crc - the current checksum for this data set, or 0 for a new data set.
      data - a new block of data to add to the checksum.
      len - the size, in bytes, of the new block of data.
      Returns:
      a CRC-16 checksum value of all blocks in the data set.
      Since:
      This function is available since SDL 3.2.0.
    • crc32

      @NativeType("Uint32") @Unsigned public int crc32(@NativeType("Uint32") @Unsigned int crc, @Pointer(comment="void*") MemorySegment data, long len)

      Calculate a CRC-32 value.

      https://en.wikipedia.org/wiki/Cyclic_redundancy_check

      This function can be called multiple times, to stream data to be checksummed in blocks. Each call must provide the previous CRC-32 return value to be updated with the next block. The first call to this function for a set of blocks should pass in a zero CRC value.

      Parameters:
      crc - the current checksum for this data set, or 0 for a new data set.
      data - a new block of data to add to the checksum.
      len - the size, in bytes, of the new block of data.
      Returns:
      a CRC-32 checksum value of all blocks in the data set.
      Since:
      This function is available since SDL 3.2.0.
    • murmur3_32

      @NativeType("Uint32") @Unsigned public int murmur3_32(@Pointer(comment="void*") MemorySegment data, long len, @NativeType("Uint32") @Unsigned int seed)

      Calculate a 32-bit MurmurHash3 value for a block of data.

      https://en.wikipedia.org/wiki/MurmurHash

      A seed may be specified, which changes the final results consistently, but this does not work like SDL_crc16 and SDL_crc32: you can't feed a previous result from this function back into itself as the next seed value to calculate a hash in chunks; it won't produce the same hash as it would if the same data was provided in a single call.

      If you aren't sure what to provide for a seed, zero is fine. Murmur3 is not cryptographically secure, so it shouldn't be used for hashing top-secret data.

      Parameters:
      data - the data to be hashed.
      len - the size of data, in bytes.
      seed - a value that alters the final hash value.
      Returns:
      a Murmur3 32-bit hash value.
      Since:
      This function is available since SDL 3.2.0.
    • memcpy

      @Pointer(comment="void*") public MemorySegment memcpy(@Pointer(comment="void*") MemorySegment dst, @Pointer(comment="void*") MemorySegment src, long len)

      Copy non-overlapping memory.

      The memory regions must not overlap. If they do, use SDL_memmove() instead.

      Parameters:
      dst - The destination memory region. Must not be NULL, and must not overlap with src.
      src - The source memory region. Must not be NULL, and must not overlap with dst.
      len - The length in bytes of both dst and src.
      Returns:
      dst.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • memmove

      @Pointer(comment="void*") public MemorySegment memmove(@Pointer(comment="void*") MemorySegment dst, @Pointer(comment="void*") MemorySegment src, long len)

      Copy memory ranges that might overlap.

      It is okay for the memory regions to overlap. If you are confident that the regions never overlap, using SDL_memcpy() may improve performance.

      Parameters:
      dst - The destination memory region. Must not be NULL.
      src - The source memory region. Must not be NULL.
      len - The length in bytes of both dst and src.
      Returns:
      dst.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • memset

      @Pointer(comment="void*") public MemorySegment memset(@Pointer(comment="void*") MemorySegment dst, int c, long len)

      Initialize all bytes of buffer of memory to a specific value.

      This function will set len bytes, pointed to by dst, to the value specified in c.

      Despite c being an int instead of a char, this only operates on bytes; c must be a value between 0 and 255, inclusive.

      Parameters:
      dst - the destination memory region. Must not be NULL.
      c - the byte value to set.
      len - the length, in bytes, to set in dst.
      Returns:
      dst.
      Since:
      This function is available since SDL 3.2.0.
    • memset4

      @Pointer(comment="void*") public MemorySegment memset4(@Pointer(comment="void*") MemorySegment dst, @NativeType("Uint32") @Unsigned int val, long dwords)

      Initialize all 32-bit words of buffer of memory to a specific value.

      This function will set a buffer of dwords Uint32 values, pointed to by dst, to the value specified in val.

      Unlike SDL_memset, this sets 32-bit values, not bytes, so it's not limited to a range of 0-255.

      Parameters:
      dst - the destination memory region. Must not be NULL.
      val - the Uint32 value to set.
      dwords - the number of Uint32 values to set in dst.
      Returns:
      dst.
      Since:
      This function is available since SDL 3.2.0.
    • memcmp

      public int memcmp(@Pointer(comment="void*") MemorySegment s1, @Pointer(comment="void*") MemorySegment s2, long len)
      Compare two buffers of memory.
      Parameters:
      s1 - the first buffer to compare. NULL is not permitted!
      s2 - the second buffer to compare. NULL is not permitted!
      len - the number of bytes to compare between the buffers.
      Returns:
      less than zero if s1 is "less than" s2, greater than zero if s1 is "greater than" s2, and zero if the buffers match exactly for len bytes.
      Since:
      This function is available since SDL 3.2.0.
    • wcslen

      public long wcslen(@Pointer(comment="wchar_t*") MemorySegment wstr)

      This works exactly like wcslen() but doesn't require access to a C runtime.

      Counts the number of wchar_t values in wstr, excluding the null terminator.

      Like SDL_strlen only counts bytes and not codepoints in a UTF-8 string, this counts wchar_t values in a string, even if the string's encoding is of variable width, like UTF-16.

      Also be aware that wchar_t is different sizes on different platforms (4 bytes on Linux, 2 on Windows, etc).

      Parameters:
      wstr - The null-terminated wide string to read. Must not be NULL.
      Returns:
      the length (in wchar_t values, excluding the null terminator) of wstr.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • wcsnlen

      public long wcsnlen(@Pointer(comment="wchar_t*") MemorySegment wstr, long maxlen)

      This works exactly like wcsnlen() but doesn't require access to a C runtime.

      Counts up to a maximum of maxlen wchar_t values in wstr, excluding the null terminator.

      Like SDL_strnlen only counts bytes and not codepoints in a UTF-8 string, this counts wchar_t values in a string, even if the string's encoding is of variable width, like UTF-16.

      Also be aware that wchar_t is different sizes on different platforms (4 bytes on Linux, 2 on Windows, etc).

      Also, maxlen is a count of wide characters, not bytes!

      Parameters:
      wstr - The null-terminated wide string to read. Must not be NULL.
      maxlen - The maximum amount of wide characters to count.
      Returns:
      the length (in wide characters, excluding the null terminator) of wstr but never more than maxlen.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • wcslcpy

      public long wcslcpy(@Pointer(comment="wchar_t*") MemorySegment dst, @Pointer(comment="wchar_t*") MemorySegment src, long maxlen)

      Copy a wide string.

      This function copies maxlen - 1 wide characters from src to dst, then appends a null terminator.

      src and dst must not overlap.

      If maxlen is 0, no wide characters are copied and no null terminator is written.

      Parameters:
      dst - The destination buffer. Must not be NULL, and must not overlap with src.
      src - The null-terminated wide string to copy. Must not be NULL, and must not overlap with dst.
      maxlen - The length (in wide characters) of the destination buffer.
      Returns:
      the length (in wide characters, excluding the null terminator) of src.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • wcslcat

      public long wcslcat(@Pointer(comment="wchar_t*") MemorySegment dst, @Pointer(comment="wchar_t*") MemorySegment src, long maxlen)

      Concatenate wide strings.

      This function appends up to maxlen - SDL_wcslen(dst) - 1 wide characters from src to the end of the wide string in dst, then appends a null terminator.

      src and dst must not overlap.

      If maxlen - SDL_wcslen(dst) - 1 is less than or equal to 0, then dst is unmodified.

      Parameters:
      dst - The destination buffer already containing the first null-terminated wide string. Must not be NULL and must not overlap with src.
      src - The second null-terminated wide string. Must not be NULL, and must not overlap with dst.
      maxlen - The length (in wide characters) of the destination buffer.
      Returns:
      the length (in wide characters, excluding the null terminator) of the string in dst plus the length of src.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • wcsdup

      @Pointer(comment="wchar_t*") public MemorySegment wcsdup(@Pointer(comment="wchar_t*") MemorySegment wstr)

      Allocate a copy of a wide string.

      This allocates enough space for a null-terminated copy of wstr, using SDL_malloc, and then makes a copy of the string into this space.

      The returned string is owned by the caller, and should be passed to SDL_free when no longer needed.

      Parameters:
      wstr - the string to copy.
      Returns:
      a pointer to the newly-allocated wide string.
      Since:
      This function is available since SDL 3.2.0.
    • wcsstr

      @Pointer(comment="wchar_t*") public MemorySegment wcsstr(@Pointer(comment="wchar_t*") MemorySegment haystack, @Pointer(comment="wchar_t*") MemorySegment needle)

      Search a wide string for the first instance of a specific substring.

      The search ends once it finds the requested substring, or a null terminator byte to end the string.

      Note that this looks for strings of wide characters, not codepoints, so it's legal to search for malformed and incomplete UTF-16 sequences.

      Parameters:
      haystack - the wide string to search. Must not be NULL.
      needle - the wide string to search for. Must not be NULL.
      Returns:
      a pointer to the first instance of needle in the string, or NULL if not found.
      Since:
      This function is available since SDL 3.2.0.
    • wcsnstr

      @Pointer(comment="wchar_t*") public MemorySegment wcsnstr(@Pointer(comment="wchar_t*") MemorySegment haystack, @Pointer(comment="wchar_t*") MemorySegment needle, long maxlen)

      Search a wide string, up to n wide chars, for the first instance of a specific substring.

      The search ends once it finds the requested substring, or a null terminator value to end the string, or maxlen wide character have been examined. It is possible to use this function on a wide string without a null terminator.

      Note that this looks for strings of wide characters, not codepoints, so it's legal to search for malformed and incomplete UTF-16 sequences.

      Parameters:
      haystack - the wide string to search. Must not be NULL.
      needle - the wide string to search for. Must not be NULL.
      maxlen - the maximum number of wide characters to search in haystack.
      Returns:
      a pointer to the first instance of needle in the string, or NULL if not found.
      Since:
      This function is available since SDL 3.2.0.
    • wcscmp

      public int wcscmp(@Pointer(comment="wchar_t*") MemorySegment str1, @Pointer(comment="wchar_t*") MemorySegment str2)

      Compare two null-terminated wide strings.

      This only compares wchar_t values until it hits a null-terminating character; it does not care if the string is well-formed UTF-16 (or UTF-32, depending on your platform's wchar_t size), or uses valid Unicode values.

      Parameters:
      str1 - the first string to compare. NULL is not permitted!
      str2 - the second string to compare. NULL is not permitted!
      Returns:
      less than zero if str1 is "less than" str2, greater than zero if str1 is "greater than" str2, and zero if the strings match exactly.
      Since:
      This function is available since SDL 3.2.0.
    • wcsncmp

      public int wcsncmp(@Pointer(comment="wchar_t*") MemorySegment str1, @Pointer(comment="wchar_t*") MemorySegment str2, long maxlen)

      Compare two wide strings up to a number of wchar_t values.

      This only compares wchar_t values; it does not care if the string is well-formed UTF-16 (or UTF-32, depending on your platform's wchar_t size), or uses valid Unicode values.

      Note that while this function is intended to be used with UTF-16 (or UTF-32, depending on your platform's definition of wchar_t), it is comparing raw wchar_t values and not Unicode codepoints: maxlen specifies a wchar_t limit! If the limit lands in the middle of a multi-wchar UTF-16 sequence, it will only compare a portion of the final character.

      maxlen specifies a maximum number of wchar_t to compare; if the strings match to this number of wide chars (or both have matched to a null-terminator character before this count), they will be considered equal.

      Parameters:
      str1 - the first string to compare. NULL is not permitted!
      str2 - the second string to compare. NULL is not permitted!
      maxlen - the maximum number of wchar_t to compare.
      Returns:
      less than zero if str1 is "less than" str2, greater than zero if str1 is "greater than" str2, and zero if the strings match exactly.
      Since:
      This function is available since SDL 3.2.0.
    • wcscasecmp

      public int wcscasecmp(@Pointer(comment="wchar_t*") MemorySegment str1, @Pointer(comment="wchar_t*") MemorySegment str2)

      Compare two null-terminated wide strings, case-insensitively.

      This will work with Unicode strings, using a technique called "case-folding" to handle the vast majority of case-sensitive human languages regardless of system locale. It can deal with expanding values: a German Eszett character can compare against two ASCII 's' chars and be considered a match, for example. A notable exception: it does not handle the Turkish 'i' character; human language is complicated!

      Depending on your platform, "wchar_t" might be 2 bytes, and expected to be UTF-16 encoded (like Windows), or 4 bytes in UTF-32 format. Since this handles Unicode, it expects the string to be well-formed and not a null-terminated string of arbitrary bytes. Characters that are not valid UTF-16 (or UTF-32) are treated as Unicode character U+FFFD (REPLACEMENT CHARACTER), which is to say two strings of random bits may turn out to match if they convert to the same amount of replacement characters.

      Parameters:
      str1 - the first string to compare. NULL is not permitted!
      str2 - the second string to compare. NULL is not permitted!
      Returns:
      less than zero if str1 is "less than" str2, greater than zero if str1 is "greater than" str2, and zero if the strings match exactly.
      Since:
      This function is available since SDL 3.2.0.
    • wcsncasecmp

      public int wcsncasecmp(@Pointer(comment="wchar_t*") MemorySegment str1, @Pointer(comment="wchar_t*") MemorySegment str2, long maxlen)

      Compare two wide strings, case-insensitively, up to a number of wchar_t.

      This will work with Unicode strings, using a technique called "case-folding" to handle the vast majority of case-sensitive human languages regardless of system locale. It can deal with expanding values: a German Eszett character can compare against two ASCII 's' chars and be considered a match, for example. A notable exception: it does not handle the Turkish 'i' character; human language is complicated!

      Depending on your platform, "wchar_t" might be 2 bytes, and expected to be UTF-16 encoded (like Windows), or 4 bytes in UTF-32 format. Since this handles Unicode, it expects the string to be well-formed and not a null-terminated string of arbitrary bytes. Characters that are not valid UTF-16 (or UTF-32) are treated as Unicode character U+FFFD (REPLACEMENT CHARACTER), which is to say two strings of random bits may turn out to match if they convert to the same amount of replacement characters.

      Note that while this function might deal with variable-sized characters, maxlen specifies a wchar limit! If the limit lands in the middle of a multi-byte UTF-16 sequence, it may convert a portion of the final character to one or more Unicode character U+FFFD (REPLACEMENT CHARACTER) so as not to overflow a buffer.

      maxlen specifies a maximum number of wchar_t values to compare; if the strings match to this number of wchar_t (or both have matched to a null-terminator character before this number of bytes), they will be considered equal.

      Parameters:
      str1 - the first string to compare. NULL is not permitted!
      str2 - the second string to compare. NULL is not permitted!
      maxlen - the maximum number of wchar_t values to compare.
      Returns:
      less than zero if str1 is "less than" str2, greater than zero if str1 is "greater than" str2, and zero if the strings match exactly.
      Since:
      This function is available since SDL 3.2.0.
    • wcstol

      public long wcstol(@Pointer(comment="wchar_t*") MemorySegment str, @Nullable @Nullable PointerPtr endp, int base)

      Parse a long from a wide string.

      If str starts with whitespace, then those whitespace characters are skipped before attempting to parse the number.

      If the parsed number does not fit inside a long, the result is clamped to the minimum and maximum representable long values.

      Parameters:
      str - The null-terminated wide string to read. Must not be NULL.
      endp - If not NULL, the address of the first invalid wide character (i.e. the next character after the parsed number) will be written to this pointer.
      base - The base of the integer to read. Supported values are 0 and 2 to 36 inclusive. If 0, the base will be inferred from the number's prefix (0x for hexadecimal, 0 for octal, decimal otherwise).
      Returns:
      the parsed long, or 0 if no number could be parsed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strlen

      public long strlen(@Nullable @Nullable BytePtr str)

      This works exactly like strlen() but doesn't require access to a C runtime.

      Counts the bytes in str, excluding the null terminator.

      If you need the length of a UTF-8 string, consider using SDL_utf8strlen().

      Parameters:
      str - The null-terminated string to read. Must not be NULL.
      Returns:
      the length (in bytes, excluding the null terminator) of src.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strnlen

      public long strnlen(@Nullable @Nullable BytePtr str, long maxlen)

      This works exactly like strnlen() but doesn't require access to a C runtime.

      Counts up to a maximum of maxlen bytes in str, excluding the null terminator.

      If you need the length of a UTF-8 string, consider using SDL_utf8strnlen().

      Parameters:
      str - The null-terminated string to read. Must not be NULL.
      maxlen - The maximum amount of bytes to count.
      Returns:
      the length (in bytes, excluding the null terminator) of src but never more than maxlen.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strlcpy

      public long strlcpy(@Nullable @Nullable BytePtr dst, @Nullable @Nullable BytePtr src, long maxlen)

      Copy a string.

      This function copies up to maxlen - 1 characters from src to dst, then appends a null terminator.

      If maxlen is 0, no characters are copied and no null terminator is written.

      If you want to copy an UTF-8 string but need to ensure that multi-byte sequences are not truncated, consider using SDL_utf8strlcpy().

      Parameters:
      dst - The destination buffer. Must not be NULL, and must not overlap with src.
      src - The null-terminated string to copy. Must not be NULL, and must not overlap with dst.
      maxlen - The length (in characters) of the destination buffer.
      Returns:
      the length (in characters, excluding the null terminator) of src.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • utf8strlcpy

      public long utf8strlcpy(@Nullable @Nullable BytePtr dst, @Nullable @Nullable BytePtr src, long dst_bytes)

      Copy an UTF-8 string.

      This function copies up to dst_bytes - 1 bytes from src to dst while also ensuring that the string written to dst does not end in a truncated multi-byte sequence. Finally, it appends a null terminator.

      src and dst must not overlap.

      Note that unlike SDL_strlcpy(), this function returns the number of bytes written, not the length of src.

      Parameters:
      dst - The destination buffer. Must not be NULL, and must not overlap with src.
      src - The null-terminated UTF-8 string to copy. Must not be NULL, and must not overlap with dst.
      dst_bytes - The length (in bytes) of the destination buffer. Must not be 0.
      Returns:
      the number of bytes written, excluding the null terminator.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strlcat

      public long strlcat(@Nullable @Nullable BytePtr dst, @Nullable @Nullable BytePtr src, long maxlen)

      Concatenate strings.

      This function appends up to maxlen - SDL_strlen(dst) - 1 characters from src to the end of the string in dst, then appends a null terminator.

      src and dst must not overlap.

      If maxlen - SDL_strlen(dst) - 1 is less than or equal to 0, then dst is unmodified.

      Parameters:
      dst - The destination buffer already containing the first null-terminated string. Must not be NULL and must not overlap with src.
      src - The second null-terminated string. Must not be NULL, and must not overlap with dst.
      maxlen - The length (in characters) of the destination buffer.
      Returns:
      the length (in characters, excluding the null terminator) of the string in dst plus the length of src.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strdup

      public BytePtr strdup(@Nullable @Nullable BytePtr str)

      Allocate a copy of a string.

      This allocates enough space for a null-terminated copy of str, using SDL_malloc, and then makes a copy of the string into this space.

      The returned string is owned by the caller, and should be passed to SDL_free when no longer needed.

      Parameters:
      str - the string to copy.
      Returns:
      a pointer to the newly-allocated string.
      Since:
      This function is available since SDL 3.2.0.
    • strndup

      public BytePtr strndup(@Nullable @Nullable BytePtr str, long maxlen)

      Allocate a copy of a string, up to n characters.

      This allocates enough space for a null-terminated copy of str, up to maxlen bytes, using SDL_malloc, and then makes a copy of the string into this space.

      If the string is longer than maxlen bytes, the returned string will be maxlen bytes long, plus a null-terminator character that isn't included in the count.

      The returned string is owned by the caller, and should be passed to SDL_free when no longer needed.

      Parameters:
      str - the string to copy.
      maxlen - the maximum length of the copied string, not counting the null-terminator character.
      Returns:
      a pointer to the newly-allocated string.
      Since:
      This function is available since SDL 3.2.0.
    • strrev

      public BytePtr strrev(@Nullable @Nullable BytePtr str)

      Reverse a string's contents.

      This reverses a null-terminated string in-place. Only the content of the string is reversed; the null-terminator character remains at the end of the reversed string.

      WARNING: This function reverses the bytes of the string, not the codepoints. If str is a UTF-8 string with Unicode codepoints > 127, this will ruin the string data. You should only use this function on strings that are completely comprised of low ASCII characters.

      Parameters:
      str - the string to reverse.
      Returns:
      str.
      Since:
      This function is available since SDL 3.2.0.
    • strupr

      public BytePtr strupr(@Nullable @Nullable BytePtr str)

      Convert a string to uppercase.

      WARNING: Regardless of system locale, this will only convert ASCII values 'A' through 'Z' to uppercase.

      This function operates on a null-terminated string of bytes--even if it is malformed UTF-8!--and converts ASCII characters 'a' through 'z' to their uppercase equivalents in-place, returning the original str pointer.

      Parameters:
      str - the string to convert in-place. Can not be NULL.
      Returns:
      the str pointer passed into this function.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strlwr

      public BytePtr strlwr(@Nullable @Nullable BytePtr str)

      Convert a string to lowercase.

      WARNING: Regardless of system locale, this will only convert ASCII values 'A' through 'Z' to lowercase.

      This function operates on a null-terminated string of bytes--even if it is malformed UTF-8!--and converts ASCII characters 'A' through 'Z' to their lowercase equivalents in-place, returning the original str pointer.

      Parameters:
      str - the string to convert in-place. Can not be NULL.
      Returns:
      the str pointer passed into this function.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strchr

      public BytePtr strchr(@Nullable @Nullable BytePtr str, int c)

      Search a string for the first instance of a specific byte.

      The search ends once it finds the requested byte value, or a null terminator byte to end the string.

      Note that this looks for bytes, not characters, so you cannot match against a Unicode codepoint > 255, regardless of character encoding.

      Parameters:
      str - the string to search. Must not be NULL.
      c - the byte value to search for.
      Returns:
      a pointer to the first instance of c in the string, or NULL if not found.
      Since:
      This function is available since SDL 3.2.0.
    • strrchr

      public BytePtr strrchr(@Nullable @Nullable BytePtr str, int c)

      Search a string for the last instance of a specific byte.

      The search must go until it finds a null terminator byte to end the string.

      Note that this looks for bytes, not characters, so you cannot match against a Unicode codepoint > 255, regardless of character encoding.

      Parameters:
      str - the string to search. Must not be NULL.
      c - the byte value to search for.
      Returns:
      a pointer to the last instance of c in the string, or NULL if not found.
      Since:
      This function is available since SDL 3.2.0.
    • strstr

      public BytePtr strstr(@Nullable @Nullable BytePtr haystack, @Nullable @Nullable BytePtr needle)

      Search a string for the first instance of a specific substring.

      The search ends once it finds the requested substring, or a null terminator byte to end the string.

      Note that this looks for strings of bytes, not characters, so it's legal to search for malformed and incomplete UTF-8 sequences.

      Parameters:
      haystack - the string to search. Must not be NULL.
      needle - the string to search for. Must not be NULL.
      Returns:
      a pointer to the first instance of needle in the string, or NULL if not found.
      Since:
      This function is available since SDL 3.2.0.
    • strnstr

      public BytePtr strnstr(@Nullable @Nullable BytePtr haystack, @Nullable @Nullable BytePtr needle, long maxlen)

      Search a string, up to n bytes, for the first instance of a specific substring.

      The search ends once it finds the requested substring, or a null terminator byte to end the string, or maxlen bytes have been examined. It is possible to use this function on a string without a null terminator.

      Note that this looks for strings of bytes, not characters, so it's legal to search for malformed and incomplete UTF-8 sequences.

      Parameters:
      haystack - the string to search. Must not be NULL.
      needle - the string to search for. Must not be NULL.
      maxlen - the maximum number of bytes to search in haystack.
      Returns:
      a pointer to the first instance of needle in the string, or NULL if not found.
      Since:
      This function is available since SDL 3.2.0.
    • strcasestr

      public BytePtr strcasestr(@Nullable @Nullable BytePtr haystack, @Nullable @Nullable BytePtr needle)

      Search a UTF-8 string for the first instance of a specific substring, case-insensitively.

      This will work with Unicode strings, using a technique called "case-folding" to handle the vast majority of case-sensitive human languages regardless of system locale. It can deal with expanding values: a German Eszett character can compare against two ASCII 's' chars and be considered a match, for example. A notable exception: it does not handle the Turkish 'i' character; human language is complicated!

      Since this handles Unicode, it expects the strings to be well-formed UTF-8 and not a null-terminated string of arbitrary bytes. Bytes that are not valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT CHARACTER), which is to say two strings of random bits may turn out to match if they convert to the same amount of replacement characters.

      Parameters:
      haystack - the string to search. Must not be NULL.
      needle - the string to search for. Must not be NULL.
      Returns:
      a pointer to the first instance of needle in the string, or NULL if not found.
      Since:
      This function is available since SDL 3.2.0.
    • strtok_r

      public BytePtr strtok_r(@Nullable @Nullable BytePtr str, @Nullable @Nullable BytePtr delim, @Nullable @Nullable PointerPtr saveptr)

      This works exactly like strtok_r() but doesn't require access to a C runtime.

      Break a string up into a series of tokens.

      To start tokenizing a new string, str should be the non-NULL address of the string to start tokenizing. Future calls to get the next token from the same string should specify a NULL.

      Note that this function will overwrite pieces of str with null chars to split it into tokens. This function cannot be used with const/read-only strings!

      saveptr just needs to point to a char * that can be overwritten; SDL will use this to save tokenizing state between calls. It is initialized if str is non-NULL, and used to resume tokenizing when str is NULL.

      Parameters:
      str - the string to tokenize, or NULL to continue tokenizing.
      delim - the delimiter string that separates tokens.
      saveptr - pointer to a char *, used for ongoing state.
      Returns:
      A pointer to the next token, or NULL if no tokens remain.
      Since:
      This function is available since SDL 3.2.0.
    • utf8strlen

      public long utf8strlen(@Nullable @Nullable BytePtr str)

      Count the number of codepoints in a UTF-8 string.

      Counts the codepoints, not bytes, in str, excluding the null terminator.

      If you need to count the bytes in a string instead, consider using SDL_strlen().

      Since this handles Unicode, it expects the strings to be well-formed UTF-8 and not a null-terminated string of arbitrary bytes. Bytes that are not valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT CHARACTER), so a malformed or incomplete UTF-8 sequence might increase the count by several replacement characters.

      Parameters:
      str - The null-terminated UTF-8 string to read. Must not be NULL.
      Returns:
      The length (in codepoints, excluding the null terminator) of src.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • utf8strnlen

      public long utf8strnlen(@Nullable @Nullable BytePtr str, long bytes)

      Count the number of codepoints in a UTF-8 string, up to n bytes.

      Counts the codepoints, not bytes, in str, excluding the null terminator.

      If you need to count the bytes in a string instead, consider using SDL_strnlen().

      The counting stops at bytes bytes (not codepoints!). This seems counterintuitive, but makes it easy to express the total size of the string's buffer.

      Since this handles Unicode, it expects the strings to be well-formed UTF-8 and not a null-terminated string of arbitrary bytes. Bytes that are not valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT CHARACTER), so a malformed or incomplete UTF-8 sequence might increase the count by several replacement characters.

      Parameters:
      str - The null-terminated UTF-8 string to read. Must not be NULL.
      bytes - The maximum amount of bytes to count.
      Returns:
      The length (in codepoints, excluding the null terminator) of src but never more than maxlen.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • itoa

      public BytePtr itoa(int value, @Nullable @Nullable BytePtr str, int radix)

      Convert an integer into a string.

      This requires a radix to specified for string format. Specifying 10 produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2 to 36.

      Note that this function will overflow a buffer if str is not large enough to hold the output! It may be safer to use SDL_snprintf to clamp output, or SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate much more space than you expect to use (and don't forget possible negative signs, null terminator bytes, etc).

      Parameters:
      value - the integer to convert.
      str - the buffer to write the string into.
      radix - the radix to use for string generation.
      Returns:
      str.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • uitoa

      public BytePtr uitoa(int value, @Nullable @Nullable BytePtr str, int radix)

      Convert an unsigned integer into a string.

      This requires a radix to specified for string format. Specifying 10 produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2 to 36.

      Note that this function will overflow a buffer if str is not large enough to hold the output! It may be safer to use SDL_snprintf to clamp output, or SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate much more space than you expect to use (and don't forget null terminator bytes, etc).

      Parameters:
      value - the unsigned integer to convert.
      str - the buffer to write the string into.
      radix - the radix to use for string generation.
      Returns:
      str.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • ltoa

      public BytePtr ltoa(long value, @Nullable @Nullable BytePtr str, int radix)

      Convert a long integer into a string.

      This requires a radix to specified for string format. Specifying 10 produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2 to 36.

      Note that this function will overflow a buffer if str is not large enough to hold the output! It may be safer to use SDL_snprintf to clamp output, or SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate much more space than you expect to use (and don't forget possible negative signs, null terminator bytes, etc).

      Parameters:
      value - the long integer to convert.
      str - the buffer to write the string into.
      radix - the radix to use for string generation.
      Returns:
      str.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • ultoa

      public BytePtr ultoa(long value, @Nullable @Nullable BytePtr str, int radix)

      Convert an unsigned long integer into a string.

      This requires a radix to specified for string format. Specifying 10 produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2 to 36.

      Note that this function will overflow a buffer if str is not large enough to hold the output! It may be safer to use SDL_snprintf to clamp output, or SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate much more space than you expect to use (and don't forget null terminator bytes, etc).

      Parameters:
      value - the unsigned long integer to convert.
      str - the buffer to write the string into.
      radix - the radix to use for string generation.
      Returns:
      str.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lltoa

      public BytePtr lltoa(long value, @Nullable @Nullable BytePtr str, int radix)

      Convert a long long integer into a string.

      This requires a radix to specified for string format. Specifying 10 produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2 to 36.

      Note that this function will overflow a buffer if str is not large enough to hold the output! It may be safer to use SDL_snprintf to clamp output, or SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate much more space than you expect to use (and don't forget possible negative signs, null terminator bytes, etc).

      Parameters:
      value - the long long integer to convert.
      str - the buffer to write the string into.
      radix - the radix to use for string generation.
      Returns:
      str.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • ulltoa

      public BytePtr ulltoa(long value, @Nullable @Nullable BytePtr str, int radix)

      Convert an unsigned long long integer into a string.

      This requires a radix to specified for string format. Specifying 10 produces a decimal number, 16 hexidecimal, etc. Must be in the range of 2 to 36.

      Note that this function will overflow a buffer if str is not large enough to hold the output! It may be safer to use SDL_snprintf to clamp output, or SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate much more space than you expect to use (and don't forget null terminator bytes, etc).

      Parameters:
      value - the unsigned long long integer to convert.
      str - the buffer to write the string into.
      radix - the radix to use for string generation.
      Returns:
      str.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • atoi

      public int atoi(@Nullable @Nullable BytePtr str)

      Parse an int from a string.

      The result of calling SDL_atoi(str) is equivalent to (int)SDL_strtol(str, NULL, 10).

      Parameters:
      str - The null-terminated string to read. Must not be NULL.
      Returns:
      the parsed int.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • atof

      public double atof(@Nullable @Nullable BytePtr str)

      Parse a double from a string.

      The result of calling SDL_atof(str) is equivalent to SDL_strtod(str, NULL).

      Parameters:
      str - The null-terminated string to read. Must not be NULL.
      Returns:
      the parsed double.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strtol

      public long strtol(@Nullable @Nullable BytePtr str, @Nullable @Nullable PointerPtr endp, int base)

      Parse a long from a string.

      If str starts with whitespace, then those whitespace characters are skipped before attempting to parse the number.

      If the parsed number does not fit inside a long, the result is clamped to the minimum and maximum representable long values.

      Parameters:
      str - The null-terminated string to read. Must not be NULL.
      endp - If not NULL, the address of the first invalid character (i.e. the next character after the parsed number) will be written to this pointer.
      base - The base of the integer to read. Supported values are 0 and 2 to 36 inclusive. If 0, the base will be inferred from the number's prefix (0x for hexadecimal, 0 for octal, decimal otherwise).
      Returns:
      the parsed long, or 0 if no number could be parsed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strtoul

      public long strtoul(@Nullable @Nullable BytePtr str, @Nullable @Nullable PointerPtr endp, int base)

      Parse an unsigned long from a string.

      If str starts with whitespace, then those whitespace characters are skipped before attempting to parse the number.

      If the parsed number does not fit inside an unsigned long, the result is clamped to the maximum representable unsigned long value.

      Parameters:
      str - The null-terminated string to read. Must not be NULL.
      endp - If not NULL, the address of the first invalid character (i.e. the next character after the parsed number) will be written to this pointer.
      base - The base of the integer to read. Supported values are 0 and 2 to 36 inclusive. If 0, the base will be inferred from the number's prefix (0x for hexadecimal, 0 for octal, decimal otherwise).
      Returns:
      the parsed unsigned long, or 0 if no number could be parsed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strtoll

      public long strtoll(@Nullable @Nullable BytePtr str, @Nullable @Nullable PointerPtr endp, int base)

      Parse a long long from a string.

      If str starts with whitespace, then those whitespace characters are skipped before attempting to parse the number.

      If the parsed number does not fit inside a long long, the result is clamped to the minimum and maximum representable long long values.

      Parameters:
      str - The null-terminated string to read. Must not be NULL.
      endp - If not NULL, the address of the first invalid character (i.e. the next character after the parsed number) will be written to this pointer.
      base - The base of the integer to read. Supported values are 0 and 2 to 36 inclusive. If 0, the base will be inferred from the number's prefix (0x for hexadecimal, 0 for octal, decimal otherwise).
      Returns:
      the parsed long long, or 0 if no number could be parsed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strtoull

      public long strtoull(@Nullable @Nullable BytePtr str, @Nullable @Nullable PointerPtr endp, int base)

      Parse an unsigned long long from a string.

      If str starts with whitespace, then those whitespace characters are skipped before attempting to parse the number.

      If the parsed number does not fit inside an unsigned long long, the result is clamped to the maximum representable unsigned long long value.

      Parameters:
      str - The null-terminated string to read. Must not be NULL.
      endp - If not NULL, the address of the first invalid character (i.e. the next character after the parsed number) will be written to this pointer.
      base - The base of the integer to read. Supported values are 0 and 2 to 36 inclusive. If 0, the base will be inferred from the number's prefix (0x for hexadecimal, 0 for octal, decimal otherwise).
      Returns:
      the parsed unsigned long long, or 0 if no number could be parsed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strtod

      public double strtod(@Nullable @Nullable BytePtr str, @Nullable @Nullable PointerPtr endp)

      Parse a double from a string.

      This function makes fewer guarantees than the C runtime strtod:

      • Only decimal notation is guaranteed to be supported. The handling of scientific and hexadecimal notation is unspecified.
      • Whether or not INF and NAN can be parsed is unspecified.
      • The precision of the result is unspecified.
      Parameters:
      str - the null-terminated string to read. Must not be NULL.
      endp - if not NULL, the address of the first invalid character (i.e. the next character after the parsed number) will be written to this pointer.
      Returns:
      the parsed double, or 0 if no number could be parsed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • strcmp

      public int strcmp(@Nullable @Nullable BytePtr str1, @Nullable @Nullable BytePtr str2)

      Compare two null-terminated UTF-8 strings.

      Due to the nature of UTF-8 encoding, this will work with Unicode strings, since effectively this function just compares bytes until it hits a null-terminating character. Also due to the nature of UTF-8, this can be used with SDL_qsort() to put strings in (roughly) alphabetical order.

      Parameters:
      str1 - the first string to compare. NULL is not permitted!
      str2 - the second string to compare. NULL is not permitted!
      Returns:
      less than zero if str1 is "less than" str2, greater than zero if str1 is "greater than" str2, and zero if the strings match exactly.
      Since:
      This function is available since SDL 3.2.0.
    • strncmp

      public int strncmp(@Nullable @Nullable BytePtr str1, @Nullable @Nullable BytePtr str2, long maxlen)

      Compare two UTF-8 strings up to a number of bytes.

      Due to the nature of UTF-8 encoding, this will work with Unicode strings, since effectively this function just compares bytes until it hits a null-terminating character. Also due to the nature of UTF-8, this can be used with SDL_qsort() to put strings in (roughly) alphabetical order.

      Note that while this function is intended to be used with UTF-8, it is doing a bytewise comparison, and maxlen specifies a byte limit! If the limit lands in the middle of a multi-byte UTF-8 sequence, it will only compare a portion of the final character.

      maxlen specifies a maximum number of bytes to compare; if the strings match to this number of bytes (or both have matched to a null-terminator character before this number of bytes), they will be considered equal.

      Parameters:
      str1 - the first string to compare. NULL is not permitted!
      str2 - the second string to compare. NULL is not permitted!
      maxlen - the maximum number of bytes to compare.
      Returns:
      less than zero if str1 is "less than" str2, greater than zero if str1 is "greater than" str2, and zero if the strings match exactly.
      Since:
      This function is available since SDL 3.2.0.
    • strcasecmp

      public int strcasecmp(@Nullable @Nullable BytePtr str1, @Nullable @Nullable BytePtr str2)

      Compare two null-terminated UTF-8 strings, case-insensitively.

      This will work with Unicode strings, using a technique called "case-folding" to handle the vast majority of case-sensitive human languages regardless of system locale. It can deal with expanding values: a German Eszett character can compare against two ASCII 's' chars and be considered a match, for example. A notable exception: it does not handle the Turkish 'i' character; human language is complicated!

      Since this handles Unicode, it expects the string to be well-formed UTF-8 and not a null-terminated string of arbitrary bytes. Bytes that are not valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT CHARACTER), which is to say two strings of random bits may turn out to match if they convert to the same amount of replacement characters.

      Parameters:
      str1 - the first string to compare. NULL is not permitted!
      str2 - the second string to compare. NULL is not permitted!
      Returns:
      less than zero if str1 is "less than" str2, greater than zero if str1 is "greater than" str2, and zero if the strings match exactly.
      Since:
      This function is available since SDL 3.2.0.
    • strncasecmp

      public int strncasecmp(@Nullable @Nullable BytePtr str1, @Nullable @Nullable BytePtr str2, long maxlen)

      Compare two UTF-8 strings, case-insensitively, up to a number of bytes.

      This will work with Unicode strings, using a technique called "case-folding" to handle the vast majority of case-sensitive human languages regardless of system locale. It can deal with expanding values: a German Eszett character can compare against two ASCII 's' chars and be considered a match, for example. A notable exception: it does not handle the Turkish 'i' character; human language is complicated!

      Since this handles Unicode, it expects the string to be well-formed UTF-8 and not a null-terminated string of arbitrary bytes. Bytes that are not valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT CHARACTER), which is to say two strings of random bits may turn out to match if they convert to the same amount of replacement characters.

      Note that while this function is intended to be used with UTF-8, maxlen specifies a byte limit! If the limit lands in the middle of a multi-byte UTF-8 sequence, it may convert a portion of the final character to one or more Unicode character U+FFFD (REPLACEMENT CHARACTER) so as not to overflow a buffer.

      maxlen specifies a maximum number of bytes to compare; if the strings match to this number of bytes (or both have matched to a null-terminator character before this number of bytes), they will be considered equal.

      Parameters:
      str1 - the first string to compare. NULL is not permitted!
      str2 - the second string to compare. NULL is not permitted!
      maxlen - the maximum number of bytes to compare.
      Returns:
      less than zero if str1 is "less than" str2, greater than zero if str1 is "greater than" str2, and zero if the strings match exactly.
      Since:
      This function is available since SDL 3.2.0.
    • strpbrk

      public BytePtr strpbrk(@Nullable @Nullable BytePtr str, @Nullable @Nullable BytePtr breakset)
      Searches a string for the first occurence of any character contained in a breakset, and returns a pointer from the string to that character.
      Parameters:
      str - The null-terminated string to be searched. Must not be NULL, and must not overlap with breakset.
      breakset - A null-terminated string containing the list of characters to look for. Must not be NULL, and must not overlap with str.
      Returns:
      A pointer to the location, in str, of the first occurence of a character present in the breakset, or NULL if none is found.
      Since:
      This function is available since SDL 3.2.0.
    • stepUTF8

      @NativeType("Uint32") @Unsigned public int stepUTF8(@Nullable @Nullable PointerPtr pstr, @Nullable @Nullable PointerPtr pslen)

      Decode a UTF-8 string, one Unicode codepoint at a time.

      This will return the first Unicode codepoint in the UTF-8 encoded string in *pstr, and then advance *pstr past any consumed bytes before returning.

      It will not access more than *pslen bytes from the string. *pslen will be adjusted, as well, subtracting the number of bytes consumed.

      pslen is allowed to be NULL, in which case the string must be NULL-terminated, as the function will blindly read until it sees the NULL char.

      if *pslen is zero, it assumes the end of string is reached and returns a zero codepoint regardless of the contents of the string buffer.

      If the resulting codepoint is zero (a NULL terminator), or *pslen is zero, it will not advance *pstr or *pslen at all.

      Generally this function is called in a loop until it returns zero, adjusting its parameters each iteration.

      If an invalid UTF-8 sequence is encountered, this function returns SDL_INVALID_UNICODE_CODEPOINT and advances the string/length by one byte (which is to say, a multibyte sequence might produce several SDL_INVALID_UNICODE_CODEPOINT returns before it syncs to the next valid UTF-8 sequence).

      Several things can generate invalid UTF-8 sequences, including overlong encodings, the use of UTF-16 surrogate values, and truncated data. Please refer to RFC3629 for details.

      Parameters:
      pstr - a pointer to a UTF-8 string pointer to be read and adjusted.
      pslen - a pointer to the number of bytes in the string, to be read and adjusted. NULL is allowed.
      Returns:
      the first Unicode codepoint in the string.
      Since:
      This function is available since SDL 3.2.0.
    • stepBackUTF8

      @NativeType("Uint32") @Unsigned public int stepBackUTF8(@Nullable @Nullable BytePtr start, @Nullable @Nullable PointerPtr pstr)

      Decode a UTF-8 string in reverse, one Unicode codepoint at a time.

      This will go to the start of the previous Unicode codepoint in the string, move *pstr to that location and return that codepoint.

      If *pstr is already at the start of the string), it will not advance *pstr at all.

      Generally this function is called in a loop until it returns zero, adjusting its parameter each iteration.

      If an invalid UTF-8 sequence is encountered, this function returns SDL_INVALID_UNICODE_CODEPOINT.

      Several things can generate invalid UTF-8 sequences, including overlong encodings, the use of UTF-16 surrogate values, and truncated data. Please refer to RFC3629 for details.

      Parameters:
      start - a pointer to the beginning of the UTF-8 string.
      pstr - a pointer to a UTF-8 string pointer to be read and adjusted.
      Returns:
      the previous Unicode codepoint in the string.
      Since:
      This function is available since SDL 3.2.0.
    • UCS4ToUTF8

      public BytePtr UCS4ToUTF8(@NativeType("Uint32") @Unsigned int codepoint, @Nullable @Nullable BytePtr dst)

      Convert a single Unicode codepoint to UTF-8.

      The buffer pointed to by dst must be at least 4 bytes long, as this function may generate between 1 and 4 bytes of output.

      This function returns the first byte after the newly-written UTF-8 sequence, which is useful for encoding multiple codepoints in a loop, or knowing where to write a NULL-terminator character to end the string (in either case, plan to have a buffer of more than 4 bytes!).

      If codepoint is an invalid value (outside the Unicode range, or a UTF-16 surrogate value, etc), this will use U+FFFD (REPLACEMENT CHARACTER) for the codepoint instead, and not set an error.

      If dst is NULL, this returns NULL immediately without writing to the pointer and without setting an error.

      Parameters:
      codepoint - a Unicode codepoint to convert to UTF-8.
      dst - the location to write the encoded UTF-8. Must point to at least 4 bytes!
      Returns:
      the first byte past the newly-written UTF-8 sequence.
      Since:
      This function is available since SDL 3.2.0.
    • srand

      public void srand(@NativeType("Uint64") @Unsigned long seed)

      Seeds the pseudo-random number generator.

      Reusing the seed number will cause SDL_rand() to repeat the same stream of 'random' numbers.

      Parameters:
      seed - the value to use as a random number seed, or 0 to use SDL_GetPerformanceCounter().
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • rand

      @NativeType("Sint32") public int rand(@NativeType("Sint32") int n)

      Generate a pseudo-random number less than n for positive n

      The method used is faster and of better quality than rand() % n. Odds are roughly 99.9% even for n = 1 million. Evenness is better for smaller n, and much worse as n gets bigger.

      Example: to simulate a d6 use SDL_rand(6) + 1 The +1 converts 0..5 to 1..6

      If you want to generate a pseudo-random number in the full range of Sint32, you should use: (Sint32)SDL_rand_bits()

      If you want reproducible output, be sure to initialize with SDL_srand() first.

      There are no guarantees as to the quality of the random sequence produced, and this should not be used for security (cryptography, passwords) or where money is on the line (loot-boxes, casinos). There are many random number libraries available with different characteristics and you should pick one of those to meet any serious needs.

      Parameters:
      n - the number of possible outcomes. n must be positive.
      Returns:
      a random value in the range of [0 .. n-1].
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • randf

      public float randf()

      Generate a uniform pseudo-random floating point number less than 1.0

      If you want reproducible output, be sure to initialize with SDL_srand() first.

      There are no guarantees as to the quality of the random sequence produced, and this should not be used for security (cryptography, passwords) or where money is on the line (loot-boxes, casinos). There are many random number libraries available with different characteristics and you should pick one of those to meet any serious needs.

      Returns:
      a random value in the range of [0.0, 1.0).
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • rand_bits

      @NativeType("Uint32") @Unsigned public int rand_bits()

      Generate 32 pseudo-random bits.

      You likely want to use SDL_rand() to get a psuedo-random number instead.

      There are no guarantees as to the quality of the random sequence produced, and this should not be used for security (cryptography, passwords) or where money is on the line (loot-boxes, casinos). There are many random number libraries available with different characteristics and you should pick one of those to meet any serious needs.

      Returns:
      a random value in the range of [0-SDL_MAX_UINT32].
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • rand_r

      @NativeType("Sint32") public int rand_r(@Nullable @Pointer(comment="Uint64") @Unsigned @Nullable LongPtr state, @NativeType("Sint32") int n)

      Generate a pseudo-random number less than n for positive n

      The method used is faster and of better quality than rand() % n. Odds are roughly 99.9% even for n = 1 million. Evenness is better for smaller n, and much worse as n gets bigger.

      Example: to simulate a d6 use SDL_rand_r(state, 6) + 1 The +1 converts 0..5 to 1..6

      If you want to generate a pseudo-random number in the full range of Sint32, you should use: (Sint32)SDL_rand_bits_r(state)

      There are no guarantees as to the quality of the random sequence produced, and this should not be used for security (cryptography, passwords) or where money is on the line (loot-boxes, casinos). There are many random number libraries available with different characteristics and you should pick one of those to meet any serious needs.

      Parameters:
      state - a pointer to the current random number state, this may not be NULL.
      n - the number of possible outcomes. n must be positive.
      Returns:
      a random value in the range of [0 .. n-1].
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • randf_r

      public float randf_r(@Nullable @Pointer(comment="Uint64") @Unsigned @Nullable LongPtr state)

      Generate a uniform pseudo-random floating point number less than 1.0

      If you want reproducible output, be sure to initialize with SDL_srand() first.

      There are no guarantees as to the quality of the random sequence produced, and this should not be used for security (cryptography, passwords) or where money is on the line (loot-boxes, casinos). There are many random number libraries available with different characteristics and you should pick one of those to meet any serious needs.

      Parameters:
      state - a pointer to the current random number state, this may not be NULL.
      Returns:
      a random value in the range of [0.0, 1.0).
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • rand_bits_r

      @NativeType("Uint32") @Unsigned public int rand_bits_r(@Nullable @Pointer(comment="Uint64") @Unsigned @Nullable LongPtr state)

      Generate 32 pseudo-random bits.

      You likely want to use SDL_rand_r() to get a psuedo-random number instead.

      There are no guarantees as to the quality of the random sequence produced, and this should not be used for security (cryptography, passwords) or where money is on the line (loot-boxes, casinos). There are many random number libraries available with different characteristics and you should pick one of those to meet any serious needs.

      Parameters:
      state - a pointer to the current random number state, this may not be NULL.
      Returns:
      a random value in the range of [0-SDL_MAX_UINT32].
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • acos

      public double acos(double x)

      Compute the arc cosine of x.

      The definition of y = acos(x) is x = cos(y).

      Domain: -1 <= x <= 1

      Range: 0 <= y <= Pi

      This function operates on double-precision floating point values, use SDL_acosf for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value.
      Returns:
      arc cosine of x, in radians.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • acosf

      public float acosf(float x)

      Compute the arc cosine of x.

      The definition of y = acos(x) is x = cos(y).

      Domain: -1 <= x <= 1

      Range: 0 <= y <= Pi

      This function operates on single-precision floating point values, use SDL_acos for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value.
      Returns:
      arc cosine of x, in radians.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • asin

      public double asin(double x)

      Compute the arc sine of x.

      The definition of y = asin(x) is x = sin(y).

      Domain: -1 <= x <= 1

      Range: -Pi/2 <= y <= Pi/2

      This function operates on double-precision floating point values, use SDL_asinf for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value.
      Returns:
      arc sine of x, in radians.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • asinf

      public float asinf(float x)

      Compute the arc sine of x.

      The definition of y = asin(x) is x = sin(y).

      Domain: -1 <= x <= 1

      Range: -Pi/2 <= y <= Pi/2

      This function operates on single-precision floating point values, use SDL_asin for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value.
      Returns:
      arc sine of x, in radians.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • atan

      public double atan(double x)

      Compute the arc tangent of x.

      The definition of y = atan(x) is x = tan(y).

      Domain: -INF <= x <= INF

      Range: -Pi/2 <= y <= Pi/2

      This function operates on double-precision floating point values, use SDL_atanf for single-precision floats.

      To calculate the arc tangent of y / x, use SDL_atan2.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value.
      Returns:
      arc tangent of of x in radians, or 0 if x = 0.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • atanf

      public float atanf(float x)

      Compute the arc tangent of x.

      The definition of y = atan(x) is x = tan(y).

      Domain: -INF <= x <= INF

      Range: -Pi/2 <= y <= Pi/2

      This function operates on single-precision floating point values, use SDL_atan for dboule-precision floats.

      To calculate the arc tangent of y / x, use SDL_atan2f.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value.
      Returns:
      arc tangent of of x in radians, or 0 if x = 0.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • atan2

      public double atan2(double y, double x)

      Compute the arc tangent of y / x, using the signs of x and y to adjust the result's quadrant.

      The definition of z = atan2(x, y) is y = x tan(z), where the quadrant of z is determined based on the signs of x and y.

      Domain: -INF <= x <= INF, -INF <= y <= INF

      Range: -Pi/2 <= y <= Pi/2

      This function operates on double-precision floating point values, use SDL_atan2f for single-precision floats.

      To calculate the arc tangent of a single value, use SDL_atan.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      y - floating point value of the numerator (y coordinate).
      x - floating point value of the denominator (x coordinate).
      Returns:
      arc tangent of of y / x in radians, or, if x = 0, either -Pi/2, 0, or Pi/2, depending on the value of y.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • atan2f

      public float atan2f(float y, float x)

      Compute the arc tangent of y / x, using the signs of x and y to adjust the result's quadrant.

      The definition of z = atan2(x, y) is y = x tan(z), where the quadrant of z is determined based on the signs of x and y.

      Domain: -INF <= x <= INF, -INF <= y <= INF

      Range: -Pi/2 <= y <= Pi/2

      This function operates on single-precision floating point values, use SDL_atan2 for double-precision floats.

      To calculate the arc tangent of a single value, use SDL_atanf.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      y - floating point value of the numerator (y coordinate).
      x - floating point value of the denominator (x coordinate).
      Returns:
      arc tangent of of y / x in radians, or, if x = 0, either -Pi/2, 0, or Pi/2, depending on the value of y.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • ceil

      public double ceil(double x)

      Compute the ceiling of x.

      The ceiling of x is the smallest integer y such that y > x, i.e x rounded up to the nearest integer.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF, y integer

      This function operates on double-precision floating point values, use SDL_ceilf for single-precision floats.

      Parameters:
      x - floating point value.
      Returns:
      the ceiling of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • ceilf

      public float ceilf(float x)

      Compute the ceiling of x.

      The ceiling of x is the smallest integer y such that y > x, i.e x rounded up to the nearest integer.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF, y integer

      This function operates on single-precision floating point values, use SDL_ceil for double-precision floats.

      Parameters:
      x - floating point value.
      Returns:
      the ceiling of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • copysign

      public double copysign(double x, double y)

      Copy the sign of one floating-point value to another.

      The definition of copysign is that copysign(x, y) = abs(x) * sign(y).

      Domain: -INF <= x <= INF, -INF <= y <= f

      Range: -INF <= z <= INF

      This function operates on double-precision floating point values, use SDL_copysignf for single-precision floats.

      Parameters:
      x - floating point value to use as the magnitude.
      y - floating point value to use as the sign.
      Returns:
      the floating point value with the sign of y and the magnitude of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • copysignf

      public float copysignf(float x, float y)

      Copy the sign of one floating-point value to another.

      The definition of copysign is that copysign(x, y) = abs(x) * sign(y).

      Domain: -INF <= x <= INF, -INF <= y <= f

      Range: -INF <= z <= INF

      This function operates on single-precision floating point values, use SDL_copysign for double-precision floats.

      Parameters:
      x - floating point value to use as the magnitude.
      y - floating point value to use as the sign.
      Returns:
      the floating point value with the sign of y and the magnitude of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • cos

      public double cos(double x)

      Compute the cosine of x.

      Domain: -INF <= x <= INF

      Range: -1 <= y <= 1

      This function operates on double-precision floating point values, use SDL_cosf for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value, in radians.
      Returns:
      cosine of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • cosf

      public float cosf(float x)

      Compute the cosine of x.

      Domain: -INF <= x <= INF

      Range: -1 <= y <= 1

      This function operates on single-precision floating point values, use SDL_cos for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value, in radians.
      Returns:
      cosine of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • exp

      public double exp(double x)

      Compute the exponential of x.

      The definition of y = exp(x) is y = e^x, where e is the base of the natural logarithm. The inverse is the natural logarithm, SDL_log.

      Domain: -INF <= x <= INF

      Range: 0 <= y <= INF

      The output will overflow if exp(x) is too large to be represented.

      This function operates on double-precision floating point values, use SDL_expf for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value.
      Returns:
      value of e^x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • expf

      public float expf(float x)

      Compute the exponential of x.

      The definition of y = exp(x) is y = e^x, where e is the base of the natural logarithm. The inverse is the natural logarithm, SDL_logf.

      Domain: -INF <= x <= INF

      Range: 0 <= y <= INF

      The output will overflow if exp(x) is too large to be represented.

      This function operates on single-precision floating point values, use SDL_exp for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value.
      Returns:
      value of e^x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • fabs

      public double fabs(double x)

      Compute the absolute value of x

      Domain: -INF <= x <= INF

      Range: 0 <= y <= INF

      This function operates on double-precision floating point values, use SDL_fabsf for single-precision floats.

      Parameters:
      x - floating point value to use as the magnitude.
      Returns:
      the absolute value of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • fabsf

      public float fabsf(float x)

      Compute the absolute value of x

      Domain: -INF <= x <= INF

      Range: 0 <= y <= INF

      This function operates on single-precision floating point values, use SDL_fabs for double-precision floats.

      Parameters:
      x - floating point value to use as the magnitude.
      Returns:
      the absolute value of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • floor

      public double floor(double x)

      Compute the floor of x.

      The floor of x is the largest integer y such that y > x, i.e x rounded down to the nearest integer.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF, y integer

      This function operates on double-precision floating point values, use SDL_floorf for single-precision floats.

      Parameters:
      x - floating point value.
      Returns:
      the floor of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • floorf

      public float floorf(float x)

      Compute the floor of x.

      The floor of x is the largest integer y such that y > x, i.e x rounded down to the nearest integer.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF, y integer

      This function operates on single-precision floating point values, use SDL_floor for double-precision floats.

      Parameters:
      x - floating point value.
      Returns:
      the floor of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • trunc

      public double trunc(double x)

      Truncate x to an integer.

      Rounds x to the next closest integer to 0. This is equivalent to removing the fractional part of x, leaving only the integer part.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF, y integer

      This function operates on double-precision floating point values, use SDL_truncf for single-precision floats.

      Parameters:
      x - floating point value.
      Returns:
      x truncated to an integer.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • truncf

      public float truncf(float x)

      Truncate x to an integer.

      Rounds x to the next closest integer to 0. This is equivalent to removing the fractional part of x, leaving only the integer part.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF, y integer

      This function operates on single-precision floating point values, use SDL_trunc for double-precision floats.

      Parameters:
      x - floating point value.
      Returns:
      x truncated to an integer.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • fmod

      public double fmod(double x, double y)

      Return the floating-point remainder of x / y

      Divides x by y, and returns the remainder.

      Domain: -INF <= x <= INF, -INF <= y <= INF, y != 0

      Range: -y <= z <= y

      This function operates on double-precision floating point values, use SDL_fmodf for single-precision floats.

      Parameters:
      x - the numerator.
      y - the denominator. Must not be 0.
      Returns:
      the remainder of x / y.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • fmodf

      public float fmodf(float x, float y)

      Return the floating-point remainder of x / y

      Divides x by y, and returns the remainder.

      Domain: -INF <= x <= INF, -INF <= y <= INF, y != 0

      Range: -y <= z <= y

      This function operates on single-precision floating point values, use SDL_fmod for double-precision floats.

      Parameters:
      x - the numerator.
      y - the denominator. Must not be 0.
      Returns:
      the remainder of x / y.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isinf

      public int isinf(double x)
      Return whether the value is infinity.
      Parameters:
      x - double-precision floating point value.
      Returns:
      non-zero if the value is infinity, 0 otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isinff

      public int isinff(float x)
      Return whether the value is infinity.
      Parameters:
      x - floating point value.
      Returns:
      non-zero if the value is infinity, 0 otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isnan

      public int isnan(double x)
      Return whether the value is NaN.
      Parameters:
      x - double-precision floating point value.
      Returns:
      non-zero if the value is NaN, 0 otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isnanf

      public int isnanf(float x)
      Return whether the value is NaN.
      Parameters:
      x - floating point value.
      Returns:
      non-zero if the value is NaN, 0 otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • log

      public double log(double x)

      Compute the natural logarithm of x.

      Domain: 0 < x <= INF

      Range: -INF <= y <= INF

      It is an error for x to be less than or equal to 0.

      This function operates on double-precision floating point values, use SDL_logf for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value. Must be greater than 0.
      Returns:
      the natural logarithm of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • logf

      public float logf(float x)

      Compute the natural logarithm of x.

      Domain: 0 < x <= INF

      Range: -INF <= y <= INF

      It is an error for x to be less than or equal to 0.

      This function operates on single-precision floating point values, use SDL_log for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value. Must be greater than 0.
      Returns:
      the natural logarithm of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • log10

      public double log10(double x)

      Compute the base-10 logarithm of x.

      Domain: 0 < x <= INF

      Range: -INF <= y <= INF

      It is an error for x to be less than or equal to 0.

      This function operates on double-precision floating point values, use SDL_log10f for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value. Must be greater than 0.
      Returns:
      the logarithm of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • log10f

      public float log10f(float x)

      Compute the base-10 logarithm of x.

      Domain: 0 < x <= INF

      Range: -INF <= y <= INF

      It is an error for x to be less than or equal to 0.

      This function operates on single-precision floating point values, use SDL_log10 for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value. Must be greater than 0.
      Returns:
      the logarithm of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • modf

      public double modf(double x, @Nullable @Nullable DoublePtr y)

      Split x into integer and fractional parts

      This function operates on double-precision floating point values, use SDL_modff for single-precision floats.

      Parameters:
      x - floating point value.
      y - output pointer to store the integer part of x.
      Returns:
      the fractional part of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • modff

      public float modff(float x, @Nullable @Nullable FloatPtr y)

      Split x into integer and fractional parts

      This function operates on single-precision floating point values, use SDL_modf for double-precision floats.

      Parameters:
      x - floating point value.
      y - output pointer to store the integer part of x.
      Returns:
      the fractional part of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • pow

      public double pow(double x, double y)

      Raise x to the power y

      Domain: -INF <= x <= INF, -INF <= y <= INF

      Range: -INF <= z <= INF

      If y is the base of the natural logarithm (e), consider using SDL_exp instead.

      This function operates on double-precision floating point values, use SDL_powf for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - the base.
      y - the exponent.
      Returns:
      x raised to the power y.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • powf

      public float powf(float x, float y)

      Raise x to the power y

      Domain: -INF <= x <= INF, -INF <= y <= INF

      Range: -INF <= z <= INF

      If y is the base of the natural logarithm (e), consider using SDL_exp instead.

      This function operates on single-precision floating point values, use SDL_pow for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - the base.
      y - the exponent.
      Returns:
      x raised to the power y.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • round

      public double round(double x)

      Round x to the nearest integer.

      Rounds x to the nearest integer. Values halfway between integers will be rounded away from zero.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF, y integer

      This function operates on double-precision floating point values, use SDL_roundf for single-precision floats. To get the result as an integer type, use SDL_lround.

      Parameters:
      x - floating point value.
      Returns:
      the nearest integer to x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • roundf

      public float roundf(float x)

      Round x to the nearest integer.

      Rounds x to the nearest integer. Values halfway between integers will be rounded away from zero.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF, y integer

      This function operates on single-precision floating point values, use SDL_round for double-precision floats. To get the result as an integer type, use SDL_lroundf.

      Parameters:
      x - floating point value.
      Returns:
      the nearest integer to x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lround

      public long lround(double x)

      Round x to the nearest integer representable as a long

      Rounds x to the nearest integer. Values halfway between integers will be rounded away from zero.

      Domain: -INF <= x <= INF

      Range: MIN_LONG <= y <= MAX_LONG

      This function operates on double-precision floating point values, use SDL_lroundf for single-precision floats. To get the result as a floating-point type, use SDL_round.

      Parameters:
      x - floating point value.
      Returns:
      the nearest integer to x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lroundf

      public long lroundf(float x)

      Round x to the nearest integer representable as a long

      Rounds x to the nearest integer. Values halfway between integers will be rounded away from zero.

      Domain: -INF <= x <= INF

      Range: MIN_LONG <= y <= MAX_LONG

      This function operates on single-precision floating point values, use SDL_lround for double-precision floats. To get the result as a floating-point type, use SDL_roundf.

      Parameters:
      x - floating point value.
      Returns:
      the nearest integer to x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • scalbn

      public double scalbn(double x, int n)

      Scale x by an integer power of two.

      Multiplies x by the nth power of the floating point radix (always 2).

      Domain: -INF <= x <= INF, n integer

      Range: -INF <= y <= INF

      This function operates on double-precision floating point values, use SDL_scalbnf for single-precision floats.

      Parameters:
      x - floating point value to be scaled.
      n - integer exponent.
      Returns:
      x * 2^n.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • scalbnf

      public float scalbnf(float x, int n)

      Scale x by an integer power of two.

      Multiplies x by the nth power of the floating point radix (always 2).

      Domain: -INF <= x <= INF, n integer

      Range: -INF <= y <= INF

      This function operates on single-precision floating point values, use SDL_scalbn for double-precision floats.

      Parameters:
      x - floating point value to be scaled.
      n - integer exponent.
      Returns:
      x * 2^n.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • sin

      public double sin(double x)

      Compute the sine of x.

      Domain: -INF <= x <= INF

      Range: -1 <= y <= 1

      This function operates on double-precision floating point values, use SDL_sinf for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value, in radians.
      Returns:
      sine of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • sinf

      public float sinf(float x)

      Compute the sine of x.

      Domain: -INF <= x <= INF

      Range: -1 <= y <= 1

      This function operates on single-precision floating point values, use SDL_sin for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value, in radians.
      Returns:
      sine of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • sqrt

      public double sqrt(double x)

      Compute the square root of x.

      Domain: 0 <= x <= INF

      Range: 0 <= y <= INF

      This function operates on double-precision floating point values, use SDL_sqrtf for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value. Must be greater than or equal to 0.
      Returns:
      square root of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • sqrtf

      public float sqrtf(float x)

      Compute the square root of x.

      Domain: 0 <= x <= INF

      Range: 0 <= y <= INF

      This function operates on single-precision floating point values, use SDL_sqrt for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value. Must be greater than or equal to 0.
      Returns:
      square root of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • tan

      public double tan(double x)

      Compute the tangent of x.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF

      This function operates on double-precision floating point values, use SDL_tanf for single-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value, in radians.
      Returns:
      tangent of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • tanf

      public float tanf(float x)

      Compute the tangent of x.

      Domain: -INF <= x <= INF

      Range: -INF <= y <= INF

      This function operates on single-precision floating point values, use SDL_tan for double-precision floats.

      This function may use a different approximation across different versions, platforms and configurations. i.e, it can return a different value given the same input on different machines or operating systems, or if SDL is updated.

      Parameters:
      x - floating point value, in radians.
      Returns:
      tangent of x.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • iconv_open

      public SDL_iconv_t iconv_open(@Nullable @Nullable BytePtr tocode, @Nullable @Nullable BytePtr fromcode)
      This function allocates a context for the specified character set conversion.
      Parameters:
      tocode - The target character encoding, must not be NULL.
      fromcode - The source character encoding, must not be NULL.
      Returns:
      a handle that must be freed with SDL_iconv_close, or SDL_ICONV_ERROR on failure.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • iconv_close

      public int iconv_close(@Nullable @Nullable SDL_iconv_t cd)
      This function frees a context used for character set conversion.
      Parameters:
      cd - The character set conversion handle.
      Returns:
      0 on success, or -1 on failure.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • iconv

      public long iconv(@Nullable @Nullable SDL_iconv_t cd, @Nullable @Nullable PointerPtr inbuf, @Nullable @Nullable PointerPtr inbytesleft, @Nullable @Nullable PointerPtr outbuf, @Nullable @Nullable PointerPtr outbytesleft)

      This function converts text between encodings, reading from and writing to a buffer.

      It returns the number of succesful conversions on success. On error, SDL_ICONV_E2BIG is returned when the output buffer is too small, or SDL_ICONV_EILSEQ is returned when an invalid input sequence is encountered, or SDL_ICONV_EINVAL is returned when an incomplete input sequence is encountered.

      On exit:

      • inbuf will point to the beginning of the next multibyte sequence. On error, this is the location of the problematic input sequence. On success, this is the end of the input sequence.
      • inbytesleft will be set to the number of bytes left to convert, which will be 0 on success.
      • outbuf will point to the location where to store the next output byte.
      • outbytesleft will be set to the number of bytes left in the output buffer.
      Parameters:
      cd - The character set conversion context, created in SDL_iconv_open().
      inbuf - Address of variable that points to the first character of the input sequence.
      inbytesleft - The number of bytes in the input buffer.
      outbuf - Address of variable that points to the output buffer.
      outbytesleft - The number of bytes in the output buffer.
      Returns:
      the number of conversions on success, or a negative error code.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • iconv_string

      public BytePtr iconv_string(@Nullable @Nullable BytePtr tocode, @Nullable @Nullable BytePtr fromcode, @Nullable @Nullable BytePtr inbuf, long inbytesleft)

      Helper function to convert a string's encoding in one call.

      This function converts a buffer or string between encodings in one pass.

      The string does not need to be NULL-terminated; this function operates on the number of bytes specified in inbytesleft whether there is a NULL character anywhere in the buffer.

      The returned string is owned by the caller, and should be passed to SDL_free when no longer needed.

      Parameters:
      tocode - the character encoding of the output string. Examples are "UTF-8", "UCS-4", etc.
      fromcode - the character encoding of data in inbuf.
      inbuf - the string to convert to a different encoding.
      inbytesleft - the size of the input string in bytes.
      Returns:
      a new string, converted to the new encoding, or NULL on error.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • asyncIOFromFile

      public SDL_AsyncIO asyncIOFromFile(@Nullable @Nullable BytePtr file, @Nullable @Nullable BytePtr mode)

      Use this function to create a new SDL_AsyncIO object for reading from and/or writing to a named file.

      The mode string understands the following values:

      • "r": Open a file for reading only. It must exist.
      • "w": Open a file for writing only. It will create missing files or truncate existing ones.
      • "r+": Open a file for update both reading and writing. The file must exist.
      • "w+": Create an empty file for both reading and writing. If a file with the same name already exists its content is erased and the file is treated as a new empty file.

      There is no "b" mode, as there is only "binary" style I/O, and no "a" mode for appending, since you specify the position when starting a task.

      This function supports Unicode filenames, but they must be encoded in UTF-8 format, regardless of the underlying operating system.

      This call is not asynchronous; it will open the file before returning, under the assumption that doing so is generally a fast operation. Future reads and writes to the opened file will be async, however.

      Parameters:
      file - a UTF-8 string representing the filename to open.
      mode - an ASCII string representing the mode to be used for opening the file.
      Returns:
      a pointer to the SDL_AsyncIO structure that is created or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAsyncIOSize

      @NativeType("Sint64") public long getAsyncIOSize(@Nullable @Nullable SDL_AsyncIO asyncio)

      Use this function to get the size of the data stream in an SDL_AsyncIO.

      This call is not asynchronous; it assumes that obtaining this info is a non-blocking operation in most reasonable cases.

      Parameters:
      asyncio - the SDL_AsyncIO to get the size of the data stream from.
      Returns:
      the size of the data stream in the SDL_IOStream on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readAsyncIO

      @NativeType("boolean") public boolean readAsyncIO(@Nullable @Nullable SDL_AsyncIO asyncio, @Pointer(comment="void*") MemorySegment ptr, @NativeType("Uint64") @Unsigned long offset, @NativeType("Uint64") @Unsigned long size, @Nullable @Nullable SDL_AsyncIOQueue queue, @Pointer(comment="void*") MemorySegment userdata)

      Start an async read.

      This function reads up to size bytes from offset position in the data source to the area pointed at by ptr. This function may read less bytes than requested.

      This function returns as quickly as possible; it does not wait for the read to complete. On a successful return, this work will continue in the background. If the work begins, even failure is asynchronous: a failing return value from this function only means the work couldn't start at all.

      ptr must remain available until the work is done, and may be accessed by the system at any time until then. Do not allocate it on the stack, as this might take longer than the life of the calling function to complete!

      An SDL_AsyncIOQueue must be specified. The newly-created task will be added to it when it completes its work.

      Parameters:
      asyncio - a pointer to an SDL_AsyncIO structure.
      ptr - a pointer to a buffer to read data into.
      offset - the position to start reading in the data source.
      size - the number of bytes to read from the data source.
      queue - a queue to add the new SDL_AsyncIO to.
      userdata - an app-defined pointer that will be provided with the task results.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • writeAsyncIO

      @NativeType("boolean") public boolean writeAsyncIO(@Nullable @Nullable SDL_AsyncIO asyncio, @Pointer(comment="void*") MemorySegment ptr, @NativeType("Uint64") @Unsigned long offset, @NativeType("Uint64") @Unsigned long size, @Nullable @Nullable SDL_AsyncIOQueue queue, @Pointer(comment="void*") MemorySegment userdata)

      Start an async write.

      This function writes size bytes from offset position in the data source to the area pointed at by ptr.

      This function returns as quickly as possible; it does not wait for the write to complete. On a successful return, this work will continue in the background. If the work begins, even failure is asynchronous: a failing return value from this function only means the work couldn't start at all.

      ptr must remain available until the work is done, and may be accessed by the system at any time until then. Do not allocate it on the stack, as this might take longer than the life of the calling function to complete!

      An SDL_AsyncIOQueue must be specified. The newly-created task will be added to it when it completes its work.

      Parameters:
      asyncio - a pointer to an SDL_AsyncIO structure.
      ptr - a pointer to a buffer to write data from.
      offset - the position to start writing to the data source.
      size - the number of bytes to write to the data source.
      queue - a queue to add the new SDL_AsyncIO to.
      userdata - an app-defined pointer that will be provided with the task results.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • closeAsyncIO

      @NativeType("boolean") public boolean closeAsyncIO(@Nullable @Nullable SDL_AsyncIO asyncio, @NativeType("boolean") boolean flush, @Nullable @Nullable SDL_AsyncIOQueue queue, @Pointer(comment="void*") MemorySegment userdata)

      Close and free any allocated resources for an async I/O object.

      Closing a file is also an asynchronous task! If a write failure were to happen during the closing process, for example, the task results will report it as usual.

      Closing a file that has been written to does not guarantee the data has made it to physical media; it may remain in the operating system's file cache, for later writing to disk. This means that a successfully-closed file can be lost if the system crashes or loses power in this small window. To prevent this, call this function with the flush parameter set to true. This will make the operation take longer, and perhaps increase system load in general, but a successful result guarantees that the data has made it to physical storage. Don't use this for temporary files, caches, and unimportant data, and definitely use it for crucial irreplaceable files, like game saves.

      This function guarantees that the close will happen after any other pending tasks to asyncio, so it's safe to open a file, start several operations, close the file immediately, then check for all results later. This function will not block until the tasks have completed.

      Once this function returns true, asyncio is no longer valid, regardless of any future outcomes. Any completed tasks might still contain this pointer in their SDL_AsyncIOOutcome data, in case the app was using this value to track information, but it should not be used again.

      If this function returns false, the close wasn't started at all, and it's safe to attempt to close again later.

      An SDL_AsyncIOQueue must be specified. The newly-created task will be added to it when it completes its work.

      Parameters:
      asyncio - a pointer to an SDL_AsyncIO structure to close.
      flush - true if data should sync to disk before the task completes.
      queue - a queue to add the new SDL_AsyncIO to.
      userdata - an app-defined pointer that will be provided with the task results.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • createAsyncIOQueue

      public SDL_AsyncIOQueue createAsyncIOQueue()

      Create a task queue for tracking multiple I/O operations.

      Async I/O operations are assigned to a queue when started. The queue can be checked for completed tasks thereafter.

      Returns:
      a new task queue object or NULL if there was an error; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyAsyncIOQueue

      public void destroyAsyncIOQueue(@Nullable @Nullable SDL_AsyncIOQueue queue)

      Destroy a previously-created async I/O task queue.

      If there are still tasks pending for this queue, this call will block until those tasks are finished. All those tasks will be deallocated. Their results will be lost to the app.

      Any pending reads from SDL_LoadFileAsync() that are still in this queue will have their buffers deallocated by this function, to prevent a memory leak.

      Once this function is called, the queue is no longer valid and should not be used, including by other threads that might access it while destruction is blocking on pending tasks.

      Do not destroy a queue that still has threads waiting on it through SDL_WaitAsyncIOResult(). You can call SDL_SignalAsyncIOQueue() first to unblock those threads, and take measures (such as SDL_WaitThread()) to make sure they have finished their wait and won't wait on the queue again.

      Parameters:
      queue - the task queue to destroy.
      Since:
      This function is available since SDL 3.2.0.
    • getAsyncIOResult

      @NativeType("boolean") public boolean getAsyncIOResult(@Nullable @Nullable SDL_AsyncIOQueue queue, @Nullable @Pointer @Nullable ISDL_AsyncIOOutcome outcome)

      Query an async I/O task queue for completed tasks.

      If a task assigned to this queue has finished, this will return true and fill in outcome with the details of the task. If no task in the queue has finished, this function will return false. This function does not block.

      If a task has completed, this function will free its resources and the task pointer will no longer be valid. The task will be removed from the queue.

      It is safe for multiple threads to call this function on the same queue at once; a completed task will only go to one of the threads.

      Parameters:
      queue - the async I/O task queue to query.
      outcome - details of a finished task will be written here. May not be NULL.
      Returns:
      true if a task has completed, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitAsyncIOResult

      @NativeType("boolean") public boolean waitAsyncIOResult(@Nullable @Nullable SDL_AsyncIOQueue queue, @Nullable @Pointer @Nullable ISDL_AsyncIOOutcome outcome, @NativeType("Sint32") int timeoutMS)

      Block until an async I/O task queue has a completed task.

      This function puts the calling thread to sleep until there a task assigned to the queue that has finished.

      If a task assigned to the queue has finished, this will return true and fill in outcome with the details of the task. If no task in the queue has finished, this function will return false.

      If a task has completed, this function will free its resources and the task pointer will no longer be valid. The task will be removed from the queue.

      It is safe for multiple threads to call this function on the same queue at once; a completed task will only go to one of the threads.

      Note that by the nature of various platforms, more than one waiting thread may wake to handle a single task, but only one will obtain it, so timeoutMS is a maximum wait time, and this function may return false sooner.

      This function may return false if there was a system error, the OS inadvertently awoke multiple threads, or if SDL_SignalAsyncIOQueue() was called to wake up all waiting threads without a finished task.

      A timeout can be used to specify a maximum wait time, but rather than polling, it is possible to have a timeout of -1 to wait forever, and use SDL_SignalAsyncIOQueue() to wake up the waiting threads later.

      Parameters:
      queue - the async I/O task queue to wait on.
      outcome - details of a finished task will be written here. May not be NULL.
      timeoutMS - the maximum time to wait, in milliseconds, or -1 to wait indefinitely.
      Returns:
      true if task has completed, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • signalAsyncIOQueue

      public void signalAsyncIOQueue(@Nullable @Nullable SDL_AsyncIOQueue queue)

      Wake up any threads that are blocking in SDL_WaitAsyncIOResult().

      This will unblock any threads that are sleeping in a call to SDL_WaitAsyncIOResult for the specified queue, and cause them to return from that function.

      This can be useful when destroying a queue to make sure nothing is touching it indefinitely. In this case, once this call completes, the caller should take measures to make sure any previously-blocked threads have returned from their wait and will not touch the queue again (perhaps by setting a flag to tell the threads to terminate and then using SDL_WaitThread() to make sure they've done so).

      Parameters:
      queue - the async I/O task queue to signal.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • loadFileAsync

      @NativeType("boolean") public boolean loadFileAsync(@Nullable @Nullable BytePtr file, @Nullable @Nullable SDL_AsyncIOQueue queue, @Pointer(comment="void*") MemorySegment userdata)

      Load all the data from a file path, asynchronously.

      This function returns as quickly as possible; it does not wait for the read to complete. On a successful return, this work will continue in the background. If the work begins, even failure is asynchronous: a failing return value from this function only means the work couldn't start at all.

      The data is allocated with a zero byte at the end (null terminated) for convenience. This extra byte is not included in SDL_AsyncIOOutcome's bytes_transferred value.

      This function will allocate the buffer to contain the file. It must be deallocated by calling SDL_free() on SDL_AsyncIOOutcome's buffer field after completion.

      An SDL_AsyncIOQueue must be specified. The newly-created task will be added to it when it completes its work.

      Parameters:
      file - the path to read all available data from.
      queue - a queue to add the new SDL_AsyncIO to.
      userdata - an app-defined pointer that will be provided with the task results.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • tryLockSpinlock

      @NativeType("boolean") public boolean tryLockSpinlock(@Nullable @Pointer(comment="SDL_SpinLock") @Nullable IntPtr lock)

      Try to lock a spin lock by setting it to a non-zero value.

      Please note that spinlocks are dangerous if you don't know what you're doing. Please be careful using any sort of spinlock!

      Parameters:
      lock - a pointer to a lock variable.
      Returns:
      true if the lock succeeded, false if the lock is already held.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lockSpinlock

      public void lockSpinlock(@Nullable @Pointer(comment="SDL_SpinLock") @Nullable IntPtr lock)

      Lock a spin lock by setting it to a non-zero value.

      Please note that spinlocks are dangerous if you don't know what you're doing. Please be careful using any sort of spinlock!

      Parameters:
      lock - a pointer to a lock variable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unlockSpinlock

      public void unlockSpinlock(@Nullable @Pointer(comment="SDL_SpinLock") @Nullable IntPtr lock)

      Unlock a spin lock by setting it to 0.

      Always returns immediately.

      Please note that spinlocks are dangerous if you don't know what you're doing. Please be careful using any sort of spinlock!

      Parameters:
      lock - a pointer to a lock variable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • memoryBarrierReleaseFunction

      public void memoryBarrierReleaseFunction()

      Insert a memory release barrier (function version).

      Please refer to SDL_MemoryBarrierRelease for details. This is a function version, which might be useful if you need to use this functionality from a scripting language, etc. Also, some of the macro versions call this function behind the scenes, where more heavy lifting can happen inside of SDL. Generally, though, an app written in C/C++/etc should use the macro version, as it will be more efficient.

      Since:
      This function is available since SDL 3.2.0.
    • memoryBarrierAcquireFunction

      public void memoryBarrierAcquireFunction()

      Insert a memory acquire barrier (function version).

      Please refer to SDL_MemoryBarrierRelease for details. This is a function version, which might be useful if you need to use this functionality from a scripting language, etc. Also, some of the macro versions call this function behind the scenes, where more heavy lifting can happen inside of SDL. Generally, though, an app written in C/C++/etc should use the macro version, as it will be more efficient.

      Since:
      This function is available since SDL 3.2.0.
    • compareAndSwapAtomicInt

      @NativeType("boolean") public boolean compareAndSwapAtomicInt(@Nullable @Pointer @Nullable ISDL_AtomicInt a, int oldval, int newval)

      Set an atomic variable to a new value if it is currently an old value.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to an SDL_AtomicInt variable to be modified.
      oldval - the old value.
      newval - the new value.
      Returns:
      true if the atomic variable was set, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAtomicInt

      public int setAtomicInt(@Nullable @Pointer @Nullable ISDL_AtomicInt a, int v)

      Set an atomic variable to a value.

      This function also acts as a full memory barrier.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to an SDL_AtomicInt variable to be modified.
      v - the desired value.
      Returns:
      the previous value of the atomic variable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAtomicInt

      public int getAtomicInt(@Nullable @Pointer @Nullable ISDL_AtomicInt a)

      Get the value of an atomic variable.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to an SDL_AtomicInt variable.
      Returns:
      the current value of an atomic variable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • addAtomicInt

      public int addAtomicInt(@Nullable @Pointer @Nullable ISDL_AtomicInt a, int v)

      Add to an atomic variable.

      This function also acts as a full memory barrier.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to an SDL_AtomicInt variable to be modified.
      v - the desired value to add.
      Returns:
      the previous value of the atomic variable.
      Since:
      This function is available since SDL 3.2.0.
    • compareAndSwapAtomicU32

      @NativeType("boolean") public boolean compareAndSwapAtomicU32(@Nullable @Pointer @Nullable ISDL_AtomicU32 a, @NativeType("Uint32") @Unsigned int oldval, @NativeType("Uint32") @Unsigned int newval)

      Set an atomic variable to a new value if it is currently an old value.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to an SDL_AtomicU32 variable to be modified.
      oldval - the old value.
      newval - the new value.
      Returns:
      true if the atomic variable was set, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAtomicU32

      @NativeType("Uint32") @Unsigned public int setAtomicU32(@Nullable @Pointer @Nullable ISDL_AtomicU32 a, @NativeType("Uint32") @Unsigned int v)

      Set an atomic variable to a value.

      This function also acts as a full memory barrier.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to an SDL_AtomicU32 variable to be modified.
      v - the desired value.
      Returns:
      the previous value of the atomic variable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAtomicU32

      @NativeType("Uint32") @Unsigned public int getAtomicU32(@Nullable @Pointer @Nullable ISDL_AtomicU32 a)

      Get the value of an atomic variable.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to an SDL_AtomicU32 variable.
      Returns:
      the current value of an atomic variable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • compareAndSwapAtomicPointer

      @NativeType("boolean") public boolean compareAndSwapAtomicPointer(@Nullable @Nullable PointerPtr a, @Pointer(comment="void*") MemorySegment oldval, @Pointer(comment="void*") MemorySegment newval)

      Set a pointer to a new value if it is currently an old value.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to a pointer.
      oldval - the old pointer value.
      newval - the new pointer value.
      Returns:
      true if the pointer was set, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAtomicPointer

      @Pointer(comment="void*") public MemorySegment setAtomicPointer(@Nullable @Nullable PointerPtr a, @Pointer(comment="void*") MemorySegment v)

      Set a pointer to a value atomically.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to a pointer.
      v - the desired pointer value.
      Returns:
      the previous value of the pointer.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAtomicPointer

      @Pointer(comment="void*") public MemorySegment getAtomicPointer(@Nullable @Nullable PointerPtr a)

      Get the value of a pointer atomically.

      Note: If you don't know what this function is for, you shouldn't use it!

      Parameters:
      a - a pointer to a pointer.
      Returns:
      the current value of a pointer.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumAudioDrivers

      public int getNumAudioDrivers()

      Use this function to get the number of built-in audio drivers.

      This function returns a hardcoded number. This never returns a negative value; if there are no drivers compiled into this build of SDL, this function returns zero. The presence of a driver in this list does not mean it will function, it just means SDL is capable of interacting with that interface. For example, a build of SDL might have esound support, but if there's no esound server available, SDL's esound driver would fail if used.

      By default, SDL tries all drivers, in its preferred order, until one is found to be usable.

      Returns:
      the number of built-in audio drivers.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioDriver

      public BytePtr getAudioDriver(int index)

      Use this function to get the name of a built in audio driver.

      The list of audio drivers is given in the order that they are normally initialized by default; the drivers that seem more reasonable to choose first (as far as the SDL developers believe) are earlier in the list.

      The names of drivers are all simple, low-ASCII identifiers, like "alsa", "coreaudio" or "wasapi". These never have Unicode characters, and are not meant to be proper names.

      Parameters:
      index - the index of the audio driver; the value ranges from 0 to SDL_GetNumAudioDrivers() - 1.
      Returns:
      the name of the audio driver at the requested index, or NULL if an invalid index was specified.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCurrentAudioDriver

      public BytePtr getCurrentAudioDriver()

      Get the name of the current audio driver.

      The names of drivers are all simple, low-ASCII identifiers, like "alsa", "coreaudio" or "wasapi". These never have Unicode characters, and are not meant to be proper names.

      Returns:
      the name of the current audio driver or NULL if no driver has been initialized.
      Since:
      This function is available since SDL 3.2.0.
    • getAudioPlaybackDevices

      @Pointer(comment="SDL_AudioDeviceID") @Unsigned public IntPtr getAudioPlaybackDevices(@Nullable @Nullable IntPtr count)

      Get a list of currently-connected audio playback devices.

      This returns of list of available devices that play sound, perhaps to speakers or headphones ("playback" devices). If you want devices that record audio, like a microphone ("recording" devices), use SDL_GetAudioRecordingDevices() instead.

      This only returns a list of physical devices; it will not have any device IDs returned by SDL_OpenAudioDevice().

      If this function returns NULL, to signify an error, *count will be set to zero.

      Parameters:
      count - a pointer filled in with the number of devices returned, may be NULL.
      Returns:
      a 0 terminated array of device instance IDs or NULL on error; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioRecordingDevices

      @Pointer(comment="SDL_AudioDeviceID") @Unsigned public IntPtr getAudioRecordingDevices(@Nullable @Nullable IntPtr count)

      Get a list of currently-connected audio recording devices.

      This returns of list of available devices that record audio, like a microphone ("recording" devices). If you want devices that play sound, perhaps to speakers or headphones ("playback" devices), use SDL_GetAudioPlaybackDevices() instead.

      This only returns a list of physical devices; it will not have any device IDs returned by SDL_OpenAudioDevice().

      If this function returns NULL, to signify an error, *count will be set to zero.

      Parameters:
      count - a pointer filled in with the number of devices returned, may be NULL.
      Returns:
      a 0 terminated array of device instance IDs, or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioDeviceName

      public BytePtr getAudioDeviceName(@NativeType("SDL_AudioDeviceID") @Unsigned int devid)
      Get the human-readable name of a specific audio device.
      Parameters:
      devid - the instance ID of the device to query.
      Returns:
      the name of the audio device, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioDeviceFormat

      @NativeType("boolean") public boolean getAudioDeviceFormat(@NativeType("SDL_AudioDeviceID") @Unsigned int devid, @Nullable @Pointer @Nullable ISDL_AudioSpec spec, @Nullable @Nullable IntPtr sample_frames)

      Get the current audio format of a specific audio device.

      For an opened device, this will report the format the device is currently using. If the device isn't yet opened, this will report the device's preferred format (or a reasonable default if this can't be determined).

      You may also specify SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK or SDL_AUDIO_DEVICE_DEFAULT_RECORDING here, which is useful for getting a reasonable recommendation before opening the system-recommended default device.

      You can also use this to request the current device buffer size. This is specified in sample frames and represents the amount of data SDL will feed to the physical hardware in each chunk. This can be converted to milliseconds of audio with the following equation:

      ms = (int) ((((Sint64) frames) * 1000) / spec.freq);

      Buffer size is only important if you need low-level control over the audio playback timing. Most apps do not need this.

      Parameters:
      devid - the instance ID of the device to query.
      spec - on return, will be filled with device details.
      sample_frames - pointer to store device buffer size, in sample frames. Can be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getAudioDeviceChannelMap

      public IntPtr getAudioDeviceChannelMap(@NativeType("SDL_AudioDeviceID") @Unsigned int devid, @Nullable @Nullable IntPtr count)

      Get the current channel map of an audio device.

      Channel maps are optional; most things do not need them, instead passing data in the order that SDL expects.

      Audio devices usually have no remapping applied. This is represented by returning NULL, and does not signify an error.

      Parameters:
      devid - the instance ID of the device to query.
      count - On output, set to number of channels in the map. Can be NULL.
      Returns:
      an array of the current channel mapping, with as many elements as the current output spec's channels, or NULL if default. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openAudioDevice

      @NativeType("SDL_AudioDeviceID") @Unsigned public int openAudioDevice(@NativeType("SDL_AudioDeviceID") @Unsigned int devid, @Nullable @Pointer @Nullable ISDL_AudioSpec spec)

      Open a specific audio device.

      You can open both playback and recording devices through this function. Playback devices will take data from bound audio streams, mix it, and send it to the hardware. Recording devices will feed any bound audio streams with a copy of any incoming data.

      An opened audio device starts out with no audio streams bound. To start audio playing, bind a stream and supply audio data to it. Unlike SDL2, there is no audio callback; you only bind audio streams and make sure they have data flowing into them (however, you can simulate SDL2's semantics fairly closely by using SDL_OpenAudioDeviceStream instead of this function).

      If you don't care about opening a specific device, pass a devid of either SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK or SDL_AUDIO_DEVICE_DEFAULT_RECORDING. In this case, SDL will try to pick the most reasonable default, and may also switch between physical devices seamlessly later, if the most reasonable default changes during the lifetime of this opened device (user changed the default in the OS's system preferences, the default got unplugged so the system jumped to a new default, the user plugged in headphones on a mobile device, etc). Unless you have a good reason to choose a specific device, this is probably what you want.

      You may request a specific format for the audio device, but there is no promise the device will honor that request for several reasons. As such, it's only meant to be a hint as to what data your app will provide. Audio streams will accept data in whatever format you specify and manage conversion for you as appropriate. SDL_GetAudioDeviceFormat can tell you the preferred format for the device before opening and the actual format the device is using after opening.

      It's legal to open the same device ID more than once; each successful open will generate a new logical SDL_AudioDeviceID that is managed separately from others on the same physical device. This allows libraries to open a device separately from the main app and bind its own streams without conflicting.

      It is also legal to open a device ID returned by a previous call to this function; doing so just creates another logical device on the same physical device. This may be useful for making logical groupings of audio streams.

      This function returns the opened device ID on success. This is a new, unique SDL_AudioDeviceID that represents a logical device.

      Some backends might offer arbitrary devices (for example, a networked audio protocol that can connect to an arbitrary server). For these, as a change from SDL2, you should open a default device ID and use an SDL hint to specify the target if you care, or otherwise let the backend figure out a reasonable default. Most backends don't offer anything like this, and often this would be an end user setting an environment variable for their custom need, and not something an application should specifically manage.

      When done with an audio device, possibly at the end of the app's life, one should call SDL_CloseAudioDevice() on the returned device id.

      Parameters:
      devid - the device instance id to open, or SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK or SDL_AUDIO_DEVICE_DEFAULT_RECORDING for the most reasonable default device.
      spec - the requested device configuration. Can be NULL to use reasonable defaults.
      Returns:
      the device ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isAudioDevicePhysical

      @NativeType("boolean") public boolean isAudioDevicePhysical(@NativeType("SDL_AudioDeviceID") @Unsigned int devid)

      Determine if an audio device is physical (instead of logical).

      An SDL_AudioDeviceID that represents physical hardware is a physical device; there is one for each piece of hardware that SDL can see. Logical devices are created by calling SDL_OpenAudioDevice or SDL_OpenAudioDeviceStream, and while each is associated with a physical device, there can be any number of logical devices on one physical device.

      For the most part, logical and physical IDs are interchangeable--if you try to open a logical device, SDL understands to assign that effort to the underlying physical device, etc. However, it might be useful to know if an arbitrary device ID is physical or logical. This function reports which.

      This function may return either true or false for invalid device IDs.

      Parameters:
      devid - the device ID to query.
      Returns:
      true if devid is a physical device, false if it is logical.
      Since:
      This function is available since SDL 3.2.0.
    • isAudioDevicePlayback

      @NativeType("boolean") public boolean isAudioDevicePlayback(@NativeType("SDL_AudioDeviceID") @Unsigned int devid)

      Determine if an audio device is a playback device (instead of recording).

      This function may return either true or false for invalid device IDs.

      Parameters:
      devid - the device ID to query.
      Returns:
      true if devid is a playback device, false if it is recording.
      Since:
      This function is available since SDL 3.2.0.
    • pauseAudioDevice

      @NativeType("boolean") public boolean pauseAudioDevice(@NativeType("SDL_AudioDeviceID") @Unsigned int devid)

      Use this function to pause audio playback on a specified device.

      This function pauses audio processing for a given device. Any bound audio streams will not progress, and no audio will be generated. Pausing one device does not prevent other unpaused devices from running.

      Unlike in SDL2, audio devices start in an unpaused state, since an app has to bind a stream before any audio will flow. Pausing a paused device is a legal no-op.

      Pausing a device can be useful to halt all audio without unbinding all the audio streams. This might be useful while a game is paused, or a level is loading, etc.

      Physical devices can not be paused or unpaused, only logical devices created through SDL_OpenAudioDevice() can be.

      Parameters:
      devid - a device opened by SDL_OpenAudioDevice().
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • resumeAudioDevice

      @NativeType("boolean") public boolean resumeAudioDevice(@NativeType("SDL_AudioDeviceID") @Unsigned int devid)

      Use this function to unpause audio playback on a specified device.

      This function unpauses audio processing for a given device that has previously been paused with SDL_PauseAudioDevice(). Once unpaused, any bound audio streams will begin to progress again, and audio can be generated.

      Unlike in SDL2, audio devices start in an unpaused state, since an app has to bind a stream before any audio will flow. Unpausing an unpaused device is a legal no-op.

      Physical devices can not be paused or unpaused, only logical devices created through SDL_OpenAudioDevice() can be.

      Parameters:
      devid - a device opened by SDL_OpenAudioDevice().
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • audioDevicePaused

      @NativeType("boolean") public boolean audioDevicePaused(@NativeType("SDL_AudioDeviceID") @Unsigned int devid)

      Use this function to query if an audio device is paused.

      Unlike in SDL2, audio devices start in an unpaused state, since an app has to bind a stream before any audio will flow.

      Physical devices can not be paused or unpaused, only logical devices created through SDL_OpenAudioDevice() can be. Physical and invalid device IDs will report themselves as unpaused here.

      Parameters:
      devid - a device opened by SDL_OpenAudioDevice().
      Returns:
      true if device is valid and paused, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioDeviceGain

      public float getAudioDeviceGain(@NativeType("SDL_AudioDeviceID") @Unsigned int devid)

      Get the gain of an audio device.

      The gain of a device is its volume; a larger gain means a louder output, with a gain of zero being silence.

      Audio devices default to a gain of 1.0f (no change in output).

      Physical devices may not have their gain changed, only logical devices, and this function will always return -1.0f when used on physical devices.

      Parameters:
      devid - the audio device to query.
      Returns:
      the gain of the device or -1.0f on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAudioDeviceGain

      @NativeType("boolean") public boolean setAudioDeviceGain(@NativeType("SDL_AudioDeviceID") @Unsigned int devid, float gain)

      Change the gain of an audio device.

      The gain of a device is its volume; a larger gain means a louder output, with a gain of zero being silence.

      Audio devices default to a gain of 1.0f (no change in output).

      Physical devices may not have their gain changed, only logical devices, and this function will always return false when used on physical devices. While it might seem attractive to adjust several logical devices at once in this way, it would allow an app or library to interfere with another portion of the program's otherwise-isolated devices.

      This is applied, along with any per-audiostream gain, during playback to the hardware, and can be continuously changed to create various effects. On recording devices, this will adjust the gain before passing the data into an audiostream; that recording audiostream can then adjust its gain further when outputting the data elsewhere, if it likes, but that second gain is not applied until the data leaves the audiostream again.

      Parameters:
      devid - the audio device on which to change gain.
      gain - the gain. 1.0f is no change, 0.0f is silence.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • closeAudioDevice

      public void closeAudioDevice(@NativeType("SDL_AudioDeviceID") @Unsigned int devid)

      Close a previously-opened audio device.

      The application should close open audio devices once they are no longer needed.

      This function may block briefly while pending audio data is played by the hardware, so that applications don't drop the last buffer of data they supplied if terminating immediately afterwards.

      Parameters:
      devid - an audio device id previously returned by SDL_OpenAudioDevice().
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindAudioStreams

      @NativeType("boolean") public boolean bindAudioStreams(@NativeType("SDL_AudioDeviceID") @Unsigned int devid, @Nullable @Pointer SDL_AudioStream.Ptr streams, int num_streams)

      Bind a list of audio streams to an audio device.

      Audio data will flow through any bound streams. For a playback device, data for all bound streams will be mixed together and fed to the device. For a recording device, a copy of recorded data will be provided to each bound stream.

      Audio streams can only be bound to an open device. This operation is atomic--all streams bound in the same call will start processing at the same time, so they can stay in sync. Also: either all streams will be bound or none of them will be.

      It is an error to bind an already-bound stream; it must be explicitly unbound first.

      Binding a stream to a device will set its output format for playback devices, and its input format for recording devices, so they match the device's settings. The caller is welcome to change the other end of the stream's format at any time with SDL_SetAudioStreamFormat().

      Parameters:
      devid - an audio device to bind a stream to.
      streams - an array of audio streams to bind.
      num_streams - number streams listed in the streams array.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindAudioStream

      @NativeType("boolean") public boolean bindAudioStream(@NativeType("SDL_AudioDeviceID") @Unsigned int devid, @Nullable @Nullable SDL_AudioStream stream)

      Bind a single audio stream to an audio device.

      This is a convenience function, equivalent to calling SDL_BindAudioStreams(devid, &stream, 1).

      Parameters:
      devid - an audio device to bind a stream to.
      stream - an audio stream to bind to a device.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unbindAudioStreams

      public void unbindAudioStreams(@Nullable @Pointer SDL_AudioStream.Ptr streams, int num_streams)

      Unbind a list of audio streams from their audio devices.

      The streams being unbound do not all have to be on the same device. All streams on the same device will be unbound atomically (data will stop flowing through all unbound streams on the same device at the same time).

      Unbinding a stream that isn't bound to a device is a legal no-op.

      Parameters:
      streams - an array of audio streams to unbind. Can be NULL or contain NULL.
      num_streams - number streams listed in the streams array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unbindAudioStream

      public void unbindAudioStream(@Nullable @Nullable SDL_AudioStream stream)

      Unbind a single audio stream from its audio device.

      This is a convenience function, equivalent to calling SDL_UnbindAudioStreams(&stream, 1).

      Parameters:
      stream - an audio stream to unbind from a device. Can be NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioStreamDevice

      @NativeType("SDL_AudioDeviceID") @Unsigned public int getAudioStreamDevice(@Nullable @Nullable SDL_AudioStream stream)

      Query an audio stream for its currently-bound device.

      This reports the audio device that an audio stream is currently bound to.

      If not bound, or invalid, this returns zero, which is not a valid device ID.

      Parameters:
      stream - the audio stream to query.
      Returns:
      the bound audio device, or 0 if not bound or invalid.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createAudioStream

    • getAudioStreamProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getAudioStreamProperties(@Nullable @Nullable SDL_AudioStream stream)
      Get the properties associated with an audio stream.
      Parameters:
      stream - the SDL_AudioStream to query.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getAudioStreamFormat

      @NativeType("boolean") public boolean getAudioStreamFormat(@Nullable @Nullable SDL_AudioStream stream, @Nullable @Pointer @Nullable ISDL_AudioSpec src_spec, @Nullable @Pointer @Nullable ISDL_AudioSpec dst_spec)
      Query the current format of an audio stream.
      Parameters:
      stream - the SDL_AudioStream to query.
      src_spec - where to store the input audio format; ignored if NULL.
      dst_spec - where to store the output audio format; ignored if NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAudioStreamFormat

      @NativeType("boolean") public boolean setAudioStreamFormat(@Nullable @Nullable SDL_AudioStream stream, @Nullable @Pointer @Nullable ISDL_AudioSpec src_spec, @Nullable @Pointer @Nullable ISDL_AudioSpec dst_spec)

      Change the input and output formats of an audio stream.

      Future calls to and SDL_GetAudioStreamAvailable and SDL_GetAudioStreamData will reflect the new format, and future calls to SDL_PutAudioStreamData must provide data in the new input formats.

      Data that was previously queued in the stream will still be operated on in the format that was current when it was added, which is to say you can put the end of a sound file in one format to a stream, change formats for the next sound file, and start putting that new data while the previous sound file is still queued, and everything will still play back correctly.

      If a stream is bound to a device, then the format of the side of the stream bound to a device cannot be changed (src_spec for recording devices, dst_spec for playback devices). Attempts to make a change to this side will be ignored, but this will not report an error. The other side's format can be changed.

      Parameters:
      stream - the stream the format is being changed.
      src_spec - the new format of the audio input; if NULL, it is not changed.
      dst_spec - the new format of the audio output; if NULL, it is not changed.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioStreamFrequencyRatio

      public float getAudioStreamFrequencyRatio(@Nullable @Nullable SDL_AudioStream stream)
      Get the frequency ratio of an audio stream.
      Parameters:
      stream - the SDL_AudioStream to query.
      Returns:
      the frequency ratio of the stream or 0.0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAudioStreamFrequencyRatio

      @NativeType("boolean") public boolean setAudioStreamFrequencyRatio(@Nullable @Nullable SDL_AudioStream stream, float ratio)

      Change the frequency ratio of an audio stream.

      The frequency ratio is used to adjust the rate at which input data is consumed. Changing this effectively modifies the speed and pitch of the audio. A value greater than 1.0 will play the audio faster, and at a higher pitch. A value less than 1.0 will play the audio slower, and at a lower pitch.

      This is applied during SDL_GetAudioStreamData, and can be continuously changed to create various effects.

      Parameters:
      stream - the stream the frequency ratio is being changed.
      ratio - the frequency ratio. 1.0 is normal speed. Must be between 0.01 and 100.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioStreamGain

      public float getAudioStreamGain(@Nullable @Nullable SDL_AudioStream stream)

      Get the gain of an audio stream.

      The gain of a stream is its volume; a larger gain means a louder output, with a gain of zero being silence.

      Audio streams default to a gain of 1.0f (no change in output).

      Parameters:
      stream - the SDL_AudioStream to query.
      Returns:
      the gain of the stream or -1.0f on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAudioStreamGain

      @NativeType("boolean") public boolean setAudioStreamGain(@Nullable @Nullable SDL_AudioStream stream, float gain)

      Change the gain of an audio stream.

      The gain of a stream is its volume; a larger gain means a louder output, with a gain of zero being silence.

      Audio streams default to a gain of 1.0f (no change in output).

      This is applied during SDL_GetAudioStreamData, and can be continuously changed to create various effects.

      Parameters:
      stream - the stream on which the gain is being changed.
      gain - the gain. 1.0f is no change, 0.0f is silence.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioStreamInputChannelMap

      public IntPtr getAudioStreamInputChannelMap(@Nullable @Nullable SDL_AudioStream stream, @Nullable @Nullable IntPtr count)

      Get the current input channel map of an audio stream.

      Channel maps are optional; most things do not need them, instead passing data in the order that SDL expects.

      Audio streams default to no remapping applied. This is represented by returning NULL, and does not signify an error.

      Parameters:
      stream - the SDL_AudioStream to query.
      count - On output, set to number of channels in the map. Can be NULL.
      Returns:
      an array of the current channel mapping, with as many elements as the current output spec's channels, or NULL if default. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioStreamOutputChannelMap

      public IntPtr getAudioStreamOutputChannelMap(@Nullable @Nullable SDL_AudioStream stream, @Nullable @Nullable IntPtr count)

      Get the current output channel map of an audio stream.

      Channel maps are optional; most things do not need them, instead passing data in the order that SDL expects.

      Audio streams default to no remapping applied. This is represented by returning NULL, and does not signify an error.

      Parameters:
      stream - the SDL_AudioStream to query.
      count - On output, set to number of channels in the map. Can be NULL.
      Returns:
      an array of the current channel mapping, with as many elements as the current output spec's channels, or NULL if default. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAudioStreamInputChannelMap

      @NativeType("boolean") public boolean setAudioStreamInputChannelMap(@Nullable @Nullable SDL_AudioStream stream, @Nullable @Nullable IntPtr chmap, int count)

      Set the current input channel map of an audio stream.

      Channel maps are optional; most things do not need them, instead passing data in the order that SDL expects.

      The input channel map reorders data that is added to a stream via SDL_PutAudioStreamData. Future calls to SDL_PutAudioStreamData must provide data in the new channel order.

      Each item in the array represents an input channel, and its value is the channel that it should be remapped to. To reverse a stereo signal's left and right values, you'd have an array of { 1, 0 }. It is legal to remap multiple channels to the same thing, so { 1, 1 } would duplicate the right channel to both channels of a stereo signal. An element in the channel map set to -1 instead of a valid channel will mute that channel, setting it to a silence value.

      You cannot change the number of channels through a channel map, just reorder/mute them.

      Data that was previously queued in the stream will still be operated on in the order that was current when it was added, which is to say you can put the end of a sound file in one order to a stream, change orders for the next sound file, and start putting that new data while the previous sound file is still queued, and everything will still play back correctly.

      Audio streams default to no remapping applied. Passing a NULL channel map is legal, and turns off remapping.

      SDL will copy the channel map; the caller does not have to save this array after this call.

      If count is not equal to the current number of channels in the audio stream's format, this will fail. This is a safety measure to make sure a race condition hasn't changed the format while this call is setting the channel map.

      Unlike attempting to change the stream's format, the input channel map on a stream bound to a recording device is permitted to change at any time; any data added to the stream from the device after this call will have the new mapping, but previously-added data will still have the prior mapping.

      Parameters:
      stream - the SDL_AudioStream to change.
      chmap - the new channel map, NULL to reset to default.
      count - The number of channels in the map.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAudioStreamOutputChannelMap

      @NativeType("boolean") public boolean setAudioStreamOutputChannelMap(@Nullable @Nullable SDL_AudioStream stream, @Nullable @Nullable IntPtr chmap, int count)

      Set the current output channel map of an audio stream.

      Channel maps are optional; most things do not need them, instead passing data in the order that SDL expects.

      The output channel map reorders data that leaving a stream via SDL_GetAudioStreamData.

      Each item in the array represents an input channel, and its value is the channel that it should be remapped to. To reverse a stereo signal's left and right values, you'd have an array of { 1, 0 }. It is legal to remap multiple channels to the same thing, so { 1, 1 } would duplicate the right channel to both channels of a stereo signal. An element in the channel map set to -1 instead of a valid channel will mute that channel, setting it to a silence value.

      You cannot change the number of channels through a channel map, just reorder/mute them.

      The output channel map can be changed at any time, as output remapping is applied during SDL_GetAudioStreamData.

      Audio streams default to no remapping applied. Passing a NULL channel map is legal, and turns off remapping.

      SDL will copy the channel map; the caller does not have to save this array after this call.

      If count is not equal to the current number of channels in the audio stream's format, this will fail. This is a safety measure to make sure a race condition hasn't changed the format while this call is setting the channel map.

      Unlike attempting to change the stream's format, the output channel map on a stream bound to a recording device is permitted to change at any time; any data added to the stream after this call will have the new mapping, but previously-added data will still have the prior mapping. When the channel map doesn't match the hardware's channel layout, SDL will convert the data before feeding it to the device for playback.

      Parameters:
      stream - the SDL_AudioStream to change.
      chmap - the new channel map, NULL to reset to default.
      count - The number of channels in the map.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • putAudioStreamData

      @NativeType("boolean") public boolean putAudioStreamData(@Nullable @Nullable SDL_AudioStream stream, @Pointer(comment="void*") MemorySegment buf, int len)

      Add data to the stream.

      This data must match the format/channels/samplerate specified in the latest call to SDL_SetAudioStreamFormat, or the format specified when creating the stream if it hasn't been changed.

      Note that this call simply copies the unconverted data for later. This is different than SDL2, where data was converted during the Put call and the Get call would just dequeue the previously-converted data.

      Parameters:
      stream - the stream the audio data is being added to.
      buf - a pointer to the audio data to add.
      len - the number of bytes to write to the stream.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioStreamData

      public int getAudioStreamData(@Nullable @Nullable SDL_AudioStream stream, @Pointer(comment="void*") MemorySegment buf, int len)

      Get converted/resampled data from the stream.

      The input/output data format/channels/samplerate is specified when creating the stream, and can be changed after creation by calling SDL_SetAudioStreamFormat.

      Note that any conversion and resampling necessary is done during this call, and SDL_PutAudioStreamData simply queues unconverted data for later. This is different than SDL2, where that work was done while inputting new data to the stream and requesting the output just copied the converted data.

      Parameters:
      stream - the stream the audio is being requested from.
      buf - a buffer to fill with audio data.
      len - the maximum number of bytes to fill.
      Returns:
      the number of bytes read from the stream or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioStreamAvailable

      public int getAudioStreamAvailable(@Nullable @Nullable SDL_AudioStream stream)

      Get the number of converted/resampled bytes available.

      The stream may be buffering data behind the scenes until it has enough to resample correctly, so this number might be lower than what you expect, or even be zero. Add more data or flush the stream if you need the data now.

      If the stream has so much data that it would overflow an int, the return value is clamped to a maximum value, but no queued data is lost; if there are gigabytes of data queued, the app might need to read some of it with SDL_GetAudioStreamData before this function's return value is no longer clamped.

      Parameters:
      stream - the audio stream to query.
      Returns:
      the number of converted/resampled bytes available or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAudioStreamQueued

      public int getAudioStreamQueued(@Nullable @Nullable SDL_AudioStream stream)

      Get the number of bytes currently queued.

      This is the number of bytes put into a stream as input, not the number that can be retrieved as output. Because of several details, it's not possible to calculate one number directly from the other. If you need to know how much usable data can be retrieved right now, you should use SDL_GetAudioStreamAvailable() and not this function.

      Note that audio streams can change their input format at any time, even if there is still data queued in a different format, so the returned byte count will not necessarily match the number of sample frames available. Users of this API should be aware of format changes they make when feeding a stream and plan accordingly.

      Queued data is not converted until it is consumed by SDL_GetAudioStreamData, so this value should be representative of the exact data that was put into the stream.

      If the stream has so much data that it would overflow an int, the return value is clamped to a maximum value, but no queued data is lost; if there are gigabytes of data queued, the app might need to read some of it with SDL_GetAudioStreamData before this function's return value is no longer clamped.

      Parameters:
      stream - the audio stream to query.
      Returns:
      the number of bytes queued or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • flushAudioStream

      @NativeType("boolean") public boolean flushAudioStream(@Nullable @Nullable SDL_AudioStream stream)

      Tell the stream that you're done sending data, and anything being buffered should be converted/resampled and made available immediately.

      It is legal to add more data to a stream after flushing, but there may be audio gaps in the output. Generally this is intended to signal the end of input, so the complete output becomes available.

      Parameters:
      stream - the audio stream to flush.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • clearAudioStream

      @NativeType("boolean") public boolean clearAudioStream(@Nullable @Nullable SDL_AudioStream stream)

      Clear any pending data in the stream.

      This drops any queued data, so there will be nothing to read from the stream until more is added.

      Parameters:
      stream - the audio stream to clear.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • pauseAudioStreamDevice

      @NativeType("boolean") public boolean pauseAudioStreamDevice(@Nullable @Nullable SDL_AudioStream stream)

      Use this function to pause audio playback on the audio device associated with an audio stream.

      This function pauses audio processing for a given device. Any bound audio streams will not progress, and no audio will be generated. Pausing one device does not prevent other unpaused devices from running.

      Pausing a device can be useful to halt all audio without unbinding all the audio streams. This might be useful while a game is paused, or a level is loading, etc.

      Parameters:
      stream - the audio stream associated with the audio device to pause.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • resumeAudioStreamDevice

      @NativeType("boolean") public boolean resumeAudioStreamDevice(@Nullable @Nullable SDL_AudioStream stream)

      Use this function to unpause audio playback on the audio device associated with an audio stream.

      This function unpauses audio processing for a given device that has previously been paused. Once unpaused, any bound audio streams will begin to progress again, and audio can be generated.

      Remember, SDL_OpenAudioDeviceStream opens device in a paused state, so this function call is required for audio playback to begin on such device.

      Parameters:
      stream - the audio stream associated with the audio device to resume.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • audioStreamDevicePaused

      @NativeType("boolean") public boolean audioStreamDevicePaused(@Nullable @Nullable SDL_AudioStream stream)

      Use this function to query if an audio device associated with a stream is paused.

      Unlike in SDL2, audio devices start in an unpaused state, since an app has to bind a stream before any audio will flow.

      Parameters:
      stream - the audio stream associated with the audio device to query.
      Returns:
      true if device is valid and paused, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lockAudioStream

      @NativeType("boolean") public boolean lockAudioStream(@Nullable @Nullable SDL_AudioStream stream)

      Lock an audio stream for serialized access.

      Each SDL_AudioStream has an internal mutex it uses to protect its data structures from threading conflicts. This function allows an app to lock that mutex, which could be useful if registering callbacks on this stream.

      One does not need to lock a stream to use in it most cases, as the stream manages this lock internally. However, this lock is held during callbacks, which may run from arbitrary threads at any time, so if an app needs to protect shared data during those callbacks, locking the stream guarantees that the callback is not running while the lock is held.

      As this is just a wrapper over SDL_LockMutex for an internal lock; it has all the same attributes (recursive locks are allowed, etc).

      Parameters:
      stream - the audio stream to lock.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unlockAudioStream

      @NativeType("boolean") public boolean unlockAudioStream(@Nullable @Nullable SDL_AudioStream stream)

      Unlock an audio stream for serialized access.

      This unlocks an audio stream after a call to SDL_LockAudioStream.

      Parameters:
      stream - the audio stream to unlock.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAudioStreamGetCallback

      @NativeType("boolean") public boolean setAudioStreamGetCallback(@Nullable @Nullable SDL_AudioStream stream, @Pointer(comment="SDL_AudioStreamCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Set a callback that runs when data is requested from an audio stream.

      This callback is called before data is obtained from the stream, giving the callback the chance to add more on-demand.

      The callback can (optionally) call SDL_PutAudioStreamData() to add more audio to the stream during this call; if needed, the request that triggered this callback will obtain the new data immediately.

      The callback's additional_amount argument is roughly how many bytes of unconverted data (in the stream's input format) is needed by the caller, although this may overestimate a little for safety. This takes into account how much is already in the stream and only asks for any extra necessary to resolve the request, which means the callback may be asked for zero bytes, and a different amount on each call.

      The callback is not required to supply exact amounts; it is allowed to supply too much or too little or none at all. The caller will get what's available, up to the amount they requested, regardless of this callback's outcome.

      Clearing or flushing an audio stream does not call this callback.

      This function obtains the stream's lock, which means any existing callback (get or put) in progress will finish running before setting the new callback.

      Setting a NULL function turns off the callback.

      Parameters:
      stream - the audio stream to set the new callback on.
      callback - the new callback function to call when data is requested from the stream.
      userdata - an opaque pointer provided to the callback for its own personal use.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information. This only fails if stream is NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAudioStreamPutCallback

      @NativeType("boolean") public boolean setAudioStreamPutCallback(@Nullable @Nullable SDL_AudioStream stream, @Pointer(comment="SDL_AudioStreamCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Set a callback that runs when data is added to an audio stream.

      This callback is called after the data is added to the stream, giving the callback the chance to obtain it immediately.

      The callback can (optionally) call SDL_GetAudioStreamData() to obtain audio from the stream during this call.

      The callback's additional_amount argument is how many bytes of converted data (in the stream's output format) was provided by the caller, although this may underestimate a little for safety. This value might be less than what is currently available in the stream, if data was already there, and might be less than the caller provided if the stream needs to keep a buffer to aid in resampling. Which means the callback may be provided with zero bytes, and a different amount on each call.

      The callback may call SDL_GetAudioStreamAvailable to see the total amount currently available to read from the stream, instead of the total provided by the current call.

      The callback is not required to obtain all data. It is allowed to read less or none at all. Anything not read now simply remains in the stream for later access.

      Clearing or flushing an audio stream does not call this callback.

      This function obtains the stream's lock, which means any existing callback (get or put) in progress will finish running before setting the new callback.

      Setting a NULL function turns off the callback.

      Parameters:
      stream - the audio stream to set the new callback on.
      callback - the new callback function to call when data is added to the stream.
      userdata - an opaque pointer provided to the callback for its own personal use.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information. This only fails if stream is NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyAudioStream

      public void destroyAudioStream(@Nullable @Nullable SDL_AudioStream stream)

      Free an audio stream.

      This will release all allocated data, including any audio that is still queued. You do not need to manually clear the stream first.

      If this stream was bound to an audio device, it is unbound during this call. If this stream was created with SDL_OpenAudioDeviceStream, the audio device that was opened alongside this stream's creation will be closed, too.

      Parameters:
      stream - the audio stream to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openAudioDeviceStream

      public SDL_AudioStream openAudioDeviceStream(@NativeType("SDL_AudioDeviceID") @Unsigned int devid, @Nullable @Pointer @Nullable ISDL_AudioSpec spec, @Pointer(comment="SDL_AudioStreamCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Convenience function for straightforward audio init for the common case.

      If all your app intends to do is provide a single source of PCM audio, this function allows you to do all your audio setup in a single call.

      This is also intended to be a clean means to migrate apps from SDL2.

      This function will open an audio device, create a stream and bind it. Unlike other methods of setup, the audio device will be closed when this stream is destroyed, so the app can treat the returned SDL_AudioStream as the only object needed to manage audio playback.

      Also unlike other functions, the audio device begins paused. This is to map more closely to SDL2-style behavior, since there is no extra step here to bind a stream to begin audio flowing. The audio device should be resumed with SDL_ResumeAudioStreamDevice(stream);

      This function works with both playback and recording devices.

      The spec parameter represents the app's side of the audio stream. That is, for recording audio, this will be the output format, and for playing audio, this will be the input format. If spec is NULL, the system will choose the format, and the app can use SDL_GetAudioStreamFormat() to obtain this information later.

      If you don't care about opening a specific audio device, you can (and probably should), use SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK for playback and SDL_AUDIO_DEVICE_DEFAULT_RECORDING for recording.

      One can optionally provide a callback function; if NULL, the app is expected to queue audio data for playback (or unqueue audio data if capturing). Otherwise, the callback will begin to fire once the device is unpaused.

      Destroying the returned stream with SDL_DestroyAudioStream will also close the audio device associated with this stream.

      Parameters:
      devid - an audio device to open, or SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK or SDL_AUDIO_DEVICE_DEFAULT_RECORDING.
      spec - the audio stream's data format. Can be NULL.
      callback - a callback where the app will provide new data for playback, or receive new data for recording. Can be NULL, in which case the app will need to call SDL_PutAudioStreamData or SDL_GetAudioStreamData as necessary.
      userdata - app-controlled pointer passed to callback. Can be NULL. Ignored if callback is NULL.
      Returns:
      an audio stream on success, ready to use, or NULL on failure; call SDL_GetError() for more information. When done with this stream, call SDL_DestroyAudioStream to free resources and close the device.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAudioPostmixCallback

      @NativeType("boolean") public boolean setAudioPostmixCallback(@NativeType("SDL_AudioDeviceID") @Unsigned int devid, @Pointer(comment="SDL_AudioPostmixCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Set a callback that fires when data is about to be fed to an audio device.

      This is useful for accessing the final mix, perhaps for writing a visualizer or applying a final effect to the audio data before playback.

      The buffer is the final mix of all bound audio streams on an opened device; this callback will fire regularly for any device that is both opened and unpaused. If there is no new data to mix, either because no streams are bound to the device or all the streams are empty, this callback will still fire with the entire buffer set to silence.

      This callback is allowed to make changes to the data; the contents of the buffer after this call is what is ultimately passed along to the hardware.

      The callback is always provided the data in float format (values from -1.0f to 1.0f), but the number of channels or sample rate may be different than the format the app requested when opening the device; SDL might have had to manage a conversion behind the scenes, or the playback might have jumped to new physical hardware when a system default changed, etc. These details may change between calls. Accordingly, the size of the buffer might change between calls as well.

      This callback can run at any time, and from any thread; if you need to serialize access to your app's data, you should provide and use a mutex or other synchronization device.

      All of this to say: there are specific needs this callback can fulfill, but it is not the simplest interface. Apps should generally provide audio in their preferred format through an SDL_AudioStream and let SDL handle the difference.

      This function is extremely time-sensitive; the callback should do the least amount of work possible and return as quickly as it can. The longer the callback runs, the higher the risk of audio dropouts or other problems.

      This function will block until the audio device is in between iterations, so any existing callback that might be running will finish before this function sets the new callback and returns.

      Setting a NULL callback function disables any previously-set callback.

      Parameters:
      devid - the ID of an opened audio device.
      callback - a callback function to be called. Can be NULL.
      userdata - app-controlled pointer passed to callback. Can be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • loadWAV_IO

      @NativeType("boolean") public boolean loadWAV_IO(@Nullable @Nullable SDL_IOStream src, @NativeType("boolean") boolean closeio, @Nullable @Pointer @Nullable ISDL_AudioSpec spec, @Nullable @Nullable PointerPtr audio_buf, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr audio_len)

      Load the audio data of a WAVE file into memory.

      Loading a WAVE file requires src, spec, audio_buf and audio_len to be valid pointers. The entire data portion of the file is then loaded into memory and decoded if necessary.

      Supported formats are RIFF WAVE files with the formats PCM (8, 16, 24, and 32 bits), IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and A-law and mu-law (8 bits). Other formats are currently unsupported and cause an error.

      If this function succeeds, the return value is zero and the pointer to the audio data allocated by the function is written to audio_buf and its length in bytes to audio_len. The SDL_AudioSpec members freq, channels, and format are set to the values of the audio data in the buffer.

      It's necessary to use SDL_free() to free the audio data returned in audio_buf when it is no longer used.

      Because of the underspecification of the .WAV format, there are many problematic files in the wild that cause issues with strict decoders. To provide compatibility with these files, this decoder is lenient in regards to the truncation of the file, the fact chunk, and the size of the RIFF chunk. The hints SDL_HINT_WAVE_RIFF_CHUNK_SIZE, SDL_HINT_WAVE_TRUNCATION, and SDL_HINT_WAVE_FACT_CHUNK can be used to tune the behavior of the loading process.

      Any file that is invalid (due to truncation, corruption, or wrong values in the headers), too big, or unsupported causes an error. Additionally, any critical I/O error from the data source will terminate the loading process with an error. The function returns NULL on error and in all cases (with the exception of src being NULL), an appropriate error message will be set.

      It is required that the data source supports seeking.

      Example:

      SDL_LoadWAV_IO(SDL_IOFromFile("sample.wav", "rb"), true, &spec, &buf, &len);
      

      Note that the SDL_LoadWAV function does this same thing for you, but in a less messy way:

      SDL_LoadWAV("sample.wav", &spec, &buf, &len);
      
      Parameters:
      src - the data source for the WAVE data.
      closeio - if true, calls SDL_CloseIO() on src before returning, even in the case of an error.
      spec - a pointer to an SDL_AudioSpec that will be set to the WAVE data's format details on successful return.
      audio_buf - a pointer filled with the audio data, allocated by the function.
      audio_len - a pointer filled with the length of the audio data buffer in bytes.
      Returns:

      true on success. audio_buf will be filled with a pointer to an allocated buffer containing the audio data, and audio_len is filled with the length of that audio buffer in bytes.

      This function returns false if the .WAV file cannot be opened, uses an unknown data format, or is corrupt; call SDL_GetError() for more information.

      When the application is done with the data returned in audio_buf, it should call SDL_free() to dispose of it.

      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • loadWAV

      @NativeType("boolean") public boolean loadWAV(@Nullable @Nullable BytePtr path, @Nullable @Pointer @Nullable ISDL_AudioSpec spec, @Nullable @Nullable PointerPtr audio_buf, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr audio_len)

      Loads a WAV from a file path.

      This is a convenience function that is effectively the same as:

      SDL_LoadWAV_IO(SDL_IOFromFile(path, "rb"), true, spec, audio_buf, audio_len);
      
      Parameters:
      path - the file path of the WAV file to open.
      spec - a pointer to an SDL_AudioSpec that will be set to the WAVE data's format details on successful return.
      audio_buf - a pointer filled with the audio data, allocated by the function.
      audio_len - a pointer filled with the length of the audio data buffer in bytes.
      Returns:

      true on success. audio_buf will be filled with a pointer to an allocated buffer containing the audio data, and audio_len is filled with the length of that audio buffer in bytes.

      This function returns false if the .WAV file cannot be opened, uses an unknown data format, or is corrupt; call SDL_GetError() for more information.

      When the application is done with the data returned in audio_buf, it should call SDL_free() to dispose of it.

      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • mixAudio

      @NativeType("boolean") public boolean mixAudio(@Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr dst, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr src, @EnumType(SDL_AudioFormat.class) int format, @NativeType("Uint32") @Unsigned int len, float volume)

      Mix audio data in a specified format.

      This takes an audio buffer src of len bytes of format data and mixes it into dst, performing addition, volume adjustment, and overflow clipping. The buffer pointed to by dst must also be len bytes of format data.

      This is provided for convenience -- you can mix your own audio data.

      Do not use this function for mixing together more than two streams of sample data. The output from repeated application of this function may be distorted by clipping, because there is no accumulator with greater range than the input (not to mention this being an inefficient way of doing it).

      It is a common misconception that this function is required to write audio data to an output stream in an audio callback. While you can do that, SDL_MixAudio() is really only needed when you're mixing a single audio stream with a volume adjustment.

      Parameters:
      dst - the destination for the mixed audio.
      src - the source audio buffer to be mixed.
      format - the SDL_AudioFormat structure representing the desired audio format.
      len - the length of the audio buffer in bytes.
      volume - ranges from 0.0 - 1.0, and should be set to 1.0 for full audio volume.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • convertAudioSamples

      @NativeType("boolean") public boolean convertAudioSamples(@Nullable @Pointer @Nullable ISDL_AudioSpec src_spec, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr src_data, int src_len, @Nullable @Pointer @Nullable ISDL_AudioSpec dst_spec, @Nullable @Nullable PointerPtr dst_data, @Nullable @Nullable IntPtr dst_len)

      Convert some audio data of one format to another format.

      Please note that this function is for convenience, but should not be used to resample audio in blocks, as it will introduce audio artifacts on the boundaries. You should only use this function if you are converting audio data in its entirety in one call. If you want to convert audio in smaller chunks, use an SDL_AudioStream, which is designed for this situation.

      Internally, this function creates and destroys an SDL_AudioStream on each use, so it's also less efficient than using one directly, if you need to convert multiple times.

      Parameters:
      src_spec - the format details of the input audio.
      src_data - the audio data to be converted.
      src_len - the len of src_data.
      dst_spec - the format details of the output audio.
      dst_data - will be filled with a pointer to converted audio data, which should be freed with SDL_free(). On error, it will be NULL.
      dst_len - will be filled with the len of dst_data.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getAudioFormatName

      public BytePtr getAudioFormatName(@EnumType(SDL_AudioFormat.class) int format)
      Get the human readable name of an audio format.
      Parameters:
      format - the audio format to query.
      Returns:
      the human readable name of the specified audio format or "SDL_AUDIO_UNKNOWN" if the format isn't recognized.
      Since:
      This function is available since SDL 3.2.0.
    • getSilenceValueForFormat

      public int getSilenceValueForFormat(@EnumType(SDL_AudioFormat.class) int format)

      Get the appropriate memset value for silencing an audio format.

      The value returned by this function can be used as the second argument to memset (or SDL_memset) to set an audio buffer in a specific format to silence.

      Parameters:
      format - the audio data format to query.
      Returns:
      a byte value that can be passed to memset.
      Since:
      This function is available since SDL 3.2.0.
    • composeCustomBlendMode

      @EnumType(SDL_BlendMode.class) public int composeCustomBlendMode(@EnumType(SDL_BlendFactor.class) int srcColorFactor, @EnumType(SDL_BlendFactor.class) int dstColorFactor, @EnumType(SDL_BlendOperation.class) int colorOperation, @EnumType(SDL_BlendFactor.class) int srcAlphaFactor, @EnumType(SDL_BlendFactor.class) int dstAlphaFactor, @EnumType(SDL_BlendOperation.class) int alphaOperation)

      Compose a custom blend mode for renderers.

      The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept the SDL_BlendMode returned by this function if the renderer supports it.

      A blend mode controls how the pixels from a drawing operation (source) get combined with the pixels from the render target (destination). First, the components of the source and destination pixels get multiplied with their blend factors. Then, the blend operation takes the two products and calculates the result that will get stored in the render target.

      Expressed in pseudocode, it would look like this:

      dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
      dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
      

      Where the functions colorOperation(src, dst) and alphaOperation(src, dst) can return one of the following:

      • src + dst
      • src - dst
      • dst - src
      • min(src, dst)
      • max(src, dst)

      The red, green, and blue components are always multiplied with the first, second, and third components of the SDL_BlendFactor, respectively. The fourth component is not used.

      The alpha component is always multiplied with the fourth component of the SDL_BlendFactor. The other components are not used in the alpha calculation.

      Support for these blend modes varies for each renderer. To check if a specific SDL_BlendMode is supported, create a renderer and pass it to either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will return with an error if the blend mode is not supported.

      This list describes the support of custom blend modes for each renderer. All renderers support the four blend modes listed in the SDL_BlendMode enumeration.

      • direct3d: Supports all operations with all factors. However, some factors produce unexpected results with SDL_BLENDOPERATION_MINIMUM and SDL_BLENDOPERATION_MAXIMUM.
      • direct3d11: Same as Direct3D 9.
      • opengl: Supports the SDL_BLENDOPERATION_ADD operation with all factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly here.
      • opengles2: Supports the SDL_BLENDOPERATION_ADD, SDL_BLENDOPERATION_SUBTRACT, SDL_BLENDOPERATION_REV_SUBTRACT operations with all factors.
      • psp: No custom blend mode support.
      • software: No custom blend mode support.

      Some renderers do not provide an alpha component for the default render target. The SDL_BLENDFACTOR_DST_ALPHA and SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA factors do not have an effect in this case.

      Parameters:
      srcColorFactor - the SDL_BlendFactor applied to the red, green, and blue components of the source pixels.
      dstColorFactor - the SDL_BlendFactor applied to the red, green, and blue components of the destination pixels.
      colorOperation - the SDL_BlendOperation used to combine the red, green, and blue components of the source and destination pixels.
      srcAlphaFactor - the SDL_BlendFactor applied to the alpha component of the source pixels.
      dstAlphaFactor - the SDL_BlendFactor applied to the alpha component of the destination pixels.
      alphaOperation - the SDL_BlendOperation used to combine the alpha component of the source and destination pixels.
      Returns:
      an SDL_BlendMode that represents the chosen factors and operations.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumCameraDrivers

      public int getNumCameraDrivers()

      Use this function to get the number of built-in camera drivers.

      This function returns a hardcoded number. This never returns a negative value; if there are no drivers compiled into this build of SDL, this function returns zero. The presence of a driver in this list does not mean it will function, it just means SDL is capable of interacting with that interface. For example, a build of SDL might have v4l2 support, but if there's no kernel support available, SDL's v4l2 driver would fail if used.

      By default, SDL tries all drivers, in its preferred order, until one is found to be usable.

      Returns:
      the number of built-in camera drivers.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCameraDriver

      public BytePtr getCameraDriver(int index)

      Use this function to get the name of a built in camera driver.

      The list of camera drivers is given in the order that they are normally initialized by default; the drivers that seem more reasonable to choose first (as far as the SDL developers believe) are earlier in the list.

      The names of drivers are all simple, low-ASCII identifiers, like "v4l2", "coremedia" or "android". These never have Unicode characters, and are not meant to be proper names.

      Parameters:
      index - the index of the camera driver; the value ranges from 0 to SDL_GetNumCameraDrivers() - 1.
      Returns:
      the name of the camera driver at the requested index, or NULL if an invalid index was specified.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCurrentCameraDriver

      public BytePtr getCurrentCameraDriver()

      Get the name of the current camera driver.

      The names of drivers are all simple, low-ASCII identifiers, like "v4l2", "coremedia" or "android". These never have Unicode characters, and are not meant to be proper names.

      Returns:
      the name of the current camera driver or NULL if no driver has been initialized.
      Since:
      This function is available since SDL 3.2.0.
    • getCameras

      @Pointer(comment="SDL_CameraID") @Unsigned public IntPtr getCameras(@Nullable @Nullable IntPtr count)
      Get a list of currently connected camera devices.
      Parameters:
      count - a pointer filled in with the number of cameras returned, may be NULL.
      Returns:
      a 0 terminated array of camera instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCameraSupportedFormats

      public PointerPtr getCameraSupportedFormats(@NativeType("SDL_CameraID") @Unsigned int instance_id, @Nullable @Nullable IntPtr count)

      Get the list of native formats/sizes a camera supports.

      This returns a list of all formats and frame sizes that a specific camera can offer. This is useful if your app can accept a variety of image formats and sizes and so want to find the optimal spec that doesn't require conversion.

      This function isn't strictly required; if you call SDL_OpenCamera with a NULL spec, SDL will choose a native format for you, and if you instead specify a desired format, it will transparently convert to the requested format on your behalf.

      If count is not NULL, it will be filled with the number of elements in the returned array.

      Note that it's legal for a camera to supply an empty list. This is what will happen on Emscripten builds, since that platform won't tell anything about available cameras until you've opened one, and won't even tell if there is a camera until the user has given you permission to check through a scary warning popup.

      Parameters:
      instance_id - the camera device instance ID.
      count - a pointer filled in with the number of elements in the list, may be NULL.
      Returns:
      a NULL terminated array of pointers to SDL_CameraSpec or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCameraName

      public BytePtr getCameraName(@NativeType("SDL_CameraID") @Unsigned int instance_id)
      Get the human-readable device name for a camera.
      Parameters:
      instance_id - the camera device instance ID.
      Returns:
      a human-readable device name or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCameraPosition

      @EnumType(SDL_CameraPosition.class) public int getCameraPosition(@NativeType("SDL_CameraID") @Unsigned int instance_id)

      Get the position of the camera in relation to the system.

      Most platforms will report UNKNOWN, but mobile devices, like phones, can often make a distinction between cameras on the front of the device (that points towards the user, for taking "selfies") and cameras on the back (for filming in the direction the user is facing).

      Parameters:
      instance_id - the camera device instance ID.
      Returns:
      the position of the camera on the system hardware.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openCamera

      public SDL_Camera openCamera(@NativeType("SDL_CameraID") @Unsigned int instance_id, @Nullable @Pointer @Nullable ISDL_CameraSpec spec)

      Open a video recording device (a "camera").

      You can open the device with any reasonable spec, and if the hardware can't directly support it, it will convert data seamlessly to the requested format. This might incur overhead, including scaling of image data.

      If you would rather accept whatever format the device offers, you can pass a NULL spec here and it will choose one for you (and you can use SDL_Surface's conversion/scaling functions directly if necessary).

      You can call SDL_GetCameraFormat() to get the actual data format if passing a NULL spec here. You can see the exact specs a device can support without conversion with SDL_GetCameraSupportedFormats().

      SDL will not attempt to emulate framerate; it will try to set the hardware to the rate closest to the requested speed, but it won't attempt to limit or duplicate frames artificially; call SDL_GetCameraFormat() to see the actual framerate of the opened the device, and check your timestamps if this is crucial to your app!

      Note that the camera is not usable until the user approves its use! On some platforms, the operating system will prompt the user to permit access to the camera, and they can choose Yes or No at that point. Until they do, the camera will not be usable. The app should either wait for an SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event, or poll SDL_GetCameraPermissionState() occasionally until it returns non-zero. On platforms that don't require explicit user approval (and perhaps in places where the user previously permitted access), the approval event might come immediately, but it might come seconds, minutes, or hours later!

      Parameters:
      instance_id - the camera device instance ID.
      spec - the desired format for data the device will provide. Can be NULL.
      Returns:
      an SDL_Camera object or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCameraPermissionState

      public int getCameraPermissionState(@Nullable @Nullable SDL_Camera camera)

      Query if camera access has been approved by the user.

      Cameras will not function between when the device is opened by the app and when the user permits access to the hardware. On some platforms, this presents as a popup dialog where the user has to explicitly approve access; on others the approval might be implicit and not alert the user at all.

      This function can be used to check the status of that approval. It will return 0 if still waiting for user response, 1 if the camera is approved for use, and -1 if the user denied access.

      Instead of polling with this function, you can wait for a SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event in the standard SDL event loop, which is guaranteed to be sent once when permission to use the camera is decided.

      If a camera is declined, there's nothing to be done but call SDL_CloseCamera() to dispose of it.

      Parameters:
      camera - the opened camera device to query.
      Returns:
      -1 if user denied access to the camera, 1 if user approved access, 0 if no decision has been made yet.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCameraID

      @NativeType("SDL_CameraID") @Unsigned public int getCameraID(@Nullable @Nullable SDL_Camera camera)
      Get the instance ID of an opened camera.
      Parameters:
      camera - an SDL_Camera to query.
      Returns:
      the instance ID of the specified camera on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCameraProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getCameraProperties(@Nullable @Nullable SDL_Camera camera)
      Get the properties associated with an opened camera.
      Parameters:
      camera - the SDL_Camera obtained from SDL_OpenCamera().
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getCameraFormat

      @NativeType("boolean") public boolean getCameraFormat(@Nullable @Nullable SDL_Camera camera, @Nullable @Pointer @Nullable ISDL_CameraSpec spec)

      Get the spec that a camera is using when generating images.

      Note that this might not be the native format of the hardware, as SDL might be converting to this format behind the scenes.

      If the system is waiting for the user to approve access to the camera, as some platforms require, this will return false, but this isn't necessarily a fatal error; you should either wait for an SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event, or poll SDL_GetCameraPermissionState() occasionally until it returns non-zero.

      Parameters:
      camera - opened camera device.
      spec - the SDL_CameraSpec to be initialized by this function.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • acquireCameraFrame

      public SDL_Surface acquireCameraFrame(@Nullable @Nullable SDL_Camera camera, @Nullable @Pointer(comment="Uint64") @Unsigned @Nullable LongPtr timestampNS)

      Acquire a frame.

      The frame is a memory pointer to the image data, whose size and format are given by the spec requested when opening the device.

      This is a non blocking API. If there is a frame available, a non-NULL surface is returned, and timestampNS will be filled with a non-zero value.

      Note that an error case can also return NULL, but a NULL by itself is normal and just signifies that a new frame is not yet available. Note that even if a camera device fails outright (a USB camera is unplugged while in use, etc), SDL will send an event separately to notify the app, but continue to provide blank frames at ongoing intervals until SDL_CloseCamera() is called, so real failure here is almost always an out of memory condition.

      After use, the frame should be released with SDL_ReleaseCameraFrame(). If you don't do this, the system may stop providing more video!

      Do not call SDL_DestroySurface() on the returned surface! It must be given back to the camera subsystem with SDL_ReleaseCameraFrame!

      If the system is waiting for the user to approve access to the camera, as some platforms require, this will return NULL (no frames available); you should either wait for an SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event, or poll SDL_GetCameraPermissionState() occasionally until it returns non-zero.

      Parameters:
      camera - opened camera device.
      timestampNS - a pointer filled in with the frame's timestamp, or 0 on error. Can be NULL.
      Returns:
      a new frame of video on success, NULL if none is currently available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • releaseCameraFrame

      public void releaseCameraFrame(@Nullable @Nullable SDL_Camera camera, @Nullable @Nullable SDL_Surface frame)

      Release a frame of video acquired from a camera.

      Let the back-end re-use the internal buffer for camera.

      This function must be called only on surface objects returned by SDL_AcquireCameraFrame(). This function should be called as quickly as possible after acquisition, as SDL keeps a small FIFO queue of surfaces for video frames; if surfaces aren't released in a timely manner, SDL may drop upcoming video frames from the camera.

      If the app needs to keep the surface for a significant time, they should make a copy of it and release the original.

      The app should not use the surface again after calling this function; assume the surface is freed and the pointer is invalid.

      Parameters:
      camera - opened camera device.
      frame - the video frame surface to release.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • closeCamera

      public void closeCamera(@Nullable @Nullable SDL_Camera camera)
      Use this function to shut down camera processing and close the camera device.
      Parameters:
      camera - opened camera device.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setClipboardText

      @NativeType("boolean") public boolean setClipboardText(@Nullable @Nullable BytePtr text)
      Put UTF-8 text into the clipboard.
      Parameters:
      text - the text to store in the clipboard.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getClipboardText

      public BytePtr getClipboardText()

      Get UTF-8 text from the clipboard.

      This functions returns an empty string if there was not enough memory left for a copy of the clipboard's content.

      Returns:
      the clipboard text on success or an empty string on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasClipboardText

      @NativeType("boolean") public boolean hasClipboardText()
      Query whether the clipboard exists and contains a non-empty text string.
      Returns:
      true if the clipboard has text, or false if it does not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setPrimarySelectionText

      @NativeType("boolean") public boolean setPrimarySelectionText(@Nullable @Nullable BytePtr text)
      Put UTF-8 text into the primary selection.
      Parameters:
      text - the text to store in the primary selection.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPrimarySelectionText

      public BytePtr getPrimarySelectionText()

      Get UTF-8 text from the primary selection.

      This functions returns an empty string if there was not enough memory left for a copy of the primary selection's content.

      Returns:
      the primary selection text on success or an empty string on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasPrimarySelectionText

      @NativeType("boolean") public boolean hasPrimarySelectionText()
      Query whether the primary selection exists and contains a non-empty text string.
      Returns:
      true if the primary selection has text, or false if it does not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setClipboardData

      @NativeType("boolean") public boolean setClipboardData(@Pointer(comment="SDL_ClipboardDataCallback") MemorySegment callback, @Pointer(comment="SDL_ClipboardCleanupCallback") MemorySegment cleanup, @Pointer(comment="void*") MemorySegment userdata, @Nullable @Nullable PointerPtr mime_types, long num_mime_types)

      Offer clipboard data to the OS.

      Tell the operating system that the application is offering clipboard data for each of the provided mime-types. Once another application requests the data the callback function will be called, allowing it to generate and respond with the data for the requested mime-type.

      The size of text data does not include any terminator, and the text does not need to be null terminated (e.g. you can directly copy a portion of a document).

      Parameters:
      callback - a function pointer to the function that provides the clipboard data.
      cleanup - a function pointer to the function that cleans up the clipboard data.
      userdata - an opaque pointer that will be forwarded to the callbacks.
      mime_types - a list of mime-types that are being offered.
      num_mime_types - the number of mime-types in the mime_types list.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • clearClipboardData

      @NativeType("boolean") public boolean clearClipboardData()
      Clear the clipboard data.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getClipboardData

      @Pointer(comment="void*") public MemorySegment getClipboardData(@Nullable @Nullable BytePtr mime_type, @Nullable @Nullable PointerPtr size)

      Get the data from clipboard for a given mime type.

      The size of text data does not include the terminator, but the text is guaranteed to be null terminated.

      Parameters:
      mime_type - the mime type to read from the clipboard.
      size - a pointer filled in with the length of the returned data.
      Returns:
      the retrieved data buffer or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasClipboardData

      @NativeType("boolean") public boolean hasClipboardData(@Nullable @Nullable BytePtr mime_type)
      Query whether there is data in the clipboard for the provided mime type.
      Parameters:
      mime_type - the mime type to check for data for.
      Returns:
      true if there exists data in clipboard for the provided mime type, false if it does not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getClipboardMimeTypes

      public PointerPtr getClipboardMimeTypes(@Nullable @Nullable PointerPtr num_mime_types)
      Retrieve the list of mime types available in the clipboard.
      Parameters:
      num_mime_types - a pointer filled with the number of mime types, may be NULL.
      Returns:
      a null terminated array of strings with mime types, or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumLogicalCPUCores

      public int getNumLogicalCPUCores()
      Get the number of logical CPU cores available.
      Returns:
      the total number of logical CPU cores. On CPUs that include technologies such as hyperthreading, the number of logical cores may be more than the number of physical cores.
      Since:
      This function is available since SDL 3.2.0.
    • getCPUCacheLineSize

      public int getCPUCacheLineSize()

      Determine the L1 cache line size of the CPU.

      This is useful for determining multi-threaded structure padding or SIMD prefetch sizes.

      Returns:
      the L1 cache line size of the CPU, in bytes.
      Since:
      This function is available since SDL 3.2.0.
    • hasAltiVec

      @NativeType("boolean") public boolean hasAltiVec()

      Determine whether the CPU has AltiVec features.

      This always returns false on CPUs that aren't using PowerPC instruction sets.

      Returns:
      true if the CPU has AltiVec features or false if not.
      Since:
      This function is available since SDL 3.2.0.
    • hasMMX

      @NativeType("boolean") public boolean hasMMX()

      Determine whether the CPU has MMX features.

      This always returns false on CPUs that aren't using Intel instruction sets.

      Returns:
      true if the CPU has MMX features or false if not.
      Since:
      This function is available since SDL 3.2.0.
    • hasSSE

      @NativeType("boolean") public boolean hasSSE()

      Determine whether the CPU has SSE features.

      This always returns false on CPUs that aren't using Intel instruction sets.

      Returns:
      true if the CPU has SSE features or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasSSE2

      @NativeType("boolean") public boolean hasSSE2()

      Determine whether the CPU has SSE2 features.

      This always returns false on CPUs that aren't using Intel instruction sets.

      Returns:
      true if the CPU has SSE2 features or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasSSE3

      @NativeType("boolean") public boolean hasSSE3()

      Determine whether the CPU has SSE3 features.

      This always returns false on CPUs that aren't using Intel instruction sets.

      Returns:
      true if the CPU has SSE3 features or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasSSE41

      @NativeType("boolean") public boolean hasSSE41()

      Determine whether the CPU has SSE4.1 features.

      This always returns false on CPUs that aren't using Intel instruction sets.

      Returns:
      true if the CPU has SSE4.1 features or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasSSE42

      @NativeType("boolean") public boolean hasSSE42()

      Determine whether the CPU has SSE4.2 features.

      This always returns false on CPUs that aren't using Intel instruction sets.

      Returns:
      true if the CPU has SSE4.2 features or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasAVX

      @NativeType("boolean") public boolean hasAVX()

      Determine whether the CPU has AVX features.

      This always returns false on CPUs that aren't using Intel instruction sets.

      Returns:
      true if the CPU has AVX features or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasAVX2

      @NativeType("boolean") public boolean hasAVX2()

      Determine whether the CPU has AVX2 features.

      This always returns false on CPUs that aren't using Intel instruction sets.

      Returns:
      true if the CPU has AVX2 features or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasAVX512F

      @NativeType("boolean") public boolean hasAVX512F()

      Determine whether the CPU has AVX-512F (foundation) features.

      This always returns false on CPUs that aren't using Intel instruction sets.

      Returns:
      true if the CPU has AVX-512F features or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasARMSIMD

      @NativeType("boolean") public boolean hasARMSIMD()

      Determine whether the CPU has ARM SIMD (ARMv6) features.

      This is different from ARM NEON, which is a different instruction set.

      This always returns false on CPUs that aren't using ARM instruction sets.

      Returns:
      true if the CPU has ARM SIMD features or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasNEON

      @NativeType("boolean") public boolean hasNEON()

      Determine whether the CPU has NEON (ARM SIMD) features.

      This always returns false on CPUs that aren't using ARM instruction sets.

      Returns:
      true if the CPU has ARM NEON features or false if not.
      Since:
      This function is available since SDL 3.2.0.
    • hasLSX

      @NativeType("boolean") public boolean hasLSX()

      Determine whether the CPU has LSX (LOONGARCH SIMD) features.

      This always returns false on CPUs that aren't using LOONGARCH instruction sets.

      Returns:
      true if the CPU has LOONGARCH LSX features or false if not.
      Since:
      This function is available since SDL 3.2.0.
    • hasLASX

      @NativeType("boolean") public boolean hasLASX()

      Determine whether the CPU has LASX (LOONGARCH SIMD) features.

      This always returns false on CPUs that aren't using LOONGARCH instruction sets.

      Returns:
      true if the CPU has LOONGARCH LASX features or false if not.
      Since:
      This function is available since SDL 3.2.0.
    • getSystemRAM

      public int getSystemRAM()
      Get the amount of RAM configured in the system.
      Returns:
      the amount of RAM configured in the system in MiB.
      Since:
      This function is available since SDL 3.2.0.
    • getSIMDAlignment

      public long getSIMDAlignment()

      Report the alignment this system needs for SIMD allocations.

      This will return the minimum number of bytes to which a pointer must be aligned to be compatible with SIMD instructions on the current machine. For example, if the machine supports SSE only, it will return 16, but if it supports AVX-512F, it'll return 64 (etc). This only reports values for instruction sets SDL knows about, so if your SDL build doesn't have SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and not 64 for the AVX-512 instructions that exist but SDL doesn't know about. Plan accordingly.

      Returns:
      the alignment in bytes needed for available, known SIMD instructions.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • showOpenFileDialog

      public void showOpenFileDialog(@Pointer(comment="SDL_DialogFileCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata, @Nullable @Nullable SDL_Window window, @Nullable @Pointer @Nullable ISDL_DialogFileFilter filters, int nfilters, @Nullable @Nullable BytePtr default_location, @NativeType("boolean") boolean allow_many)

      Displays a dialog that lets the user select a file on their filesystem.

      This is an asynchronous function; it will return immediately, and the result will be passed to the callback.

      The callback will be invoked with a null-terminated list of files the user chose. The list will be empty if the user canceled the dialog, and it will be NULL if an error occurred.

      Note that the callback may be called from a different thread than the one the function was invoked on.

      Depending on the platform, the user may be allowed to input paths that don't yet exist.

      On Linux, dialogs may require XDG Portals, which requires DBus, which requires an event-handling loop. Apps that do not use SDL to handle events should add a call to SDL_PumpEvents in their main loop.

      Parameters:
      callback - a function pointer to be invoked when the user selects a file and accepts, or cancels the dialog, or an error occurs.
      userdata - an optional pointer to pass extra data to the callback when it will be invoked.
      window - the window that the dialog should be modal for, may be NULL. Not all platforms support this option.
      filters - a list of filters, may be NULL. Not all platforms support this option, and platforms that do support it may allow the user to ignore the filters. If non-NULL, it must remain valid at least until the callback is invoked.
      nfilters - the number of filters. Ignored if filters is NULL.
      default_location - the default folder or file to start the dialog at, may be NULL. Not all platforms support this option.
      allow_many - if non-zero, the user will be allowed to select multiple entries. Not all platforms support this option.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • showSaveFileDialog

      public void showSaveFileDialog(@Pointer(comment="SDL_DialogFileCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata, @Nullable @Nullable SDL_Window window, @Nullable @Pointer @Nullable ISDL_DialogFileFilter filters, int nfilters, @Nullable @Nullable BytePtr default_location)

      Displays a dialog that lets the user choose a new or existing file on their filesystem.

      This is an asynchronous function; it will return immediately, and the result will be passed to the callback.

      The callback will be invoked with a null-terminated list of files the user chose. The list will be empty if the user canceled the dialog, and it will be NULL if an error occurred.

      Note that the callback may be called from a different thread than the one the function was invoked on.

      The chosen file may or may not already exist.

      On Linux, dialogs may require XDG Portals, which requires DBus, which requires an event-handling loop. Apps that do not use SDL to handle events should add a call to SDL_PumpEvents in their main loop.

      Parameters:
      callback - a function pointer to be invoked when the user selects a file and accepts, or cancels the dialog, or an error occurs.
      userdata - an optional pointer to pass extra data to the callback when it will be invoked.
      window - the window that the dialog should be modal for, may be NULL. Not all platforms support this option.
      filters - a list of filters, may be NULL. Not all platforms support this option, and platforms that do support it may allow the user to ignore the filters. If non-NULL, it must remain valid at least until the callback is invoked.
      nfilters - the number of filters. Ignored if filters is NULL.
      default_location - the default folder or file to start the dialog at, may be NULL. Not all platforms support this option.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • showOpenFolderDialog

      public void showOpenFolderDialog(@Pointer(comment="SDL_DialogFileCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata, @Nullable @Nullable SDL_Window window, @Nullable @Nullable BytePtr default_location, @NativeType("boolean") boolean allow_many)

      Displays a dialog that lets the user select a folder on their filesystem.

      This is an asynchronous function; it will return immediately, and the result will be passed to the callback.

      The callback will be invoked with a null-terminated list of files the user chose. The list will be empty if the user canceled the dialog, and it will be NULL if an error occurred.

      Note that the callback may be called from a different thread than the one the function was invoked on.

      Depending on the platform, the user may be allowed to input paths that don't yet exist.

      On Linux, dialogs may require XDG Portals, which requires DBus, which requires an event-handling loop. Apps that do not use SDL to handle events should add a call to SDL_PumpEvents in their main loop.

      Parameters:
      callback - a function pointer to be invoked when the user selects a file and accepts, or cancels the dialog, or an error occurs.
      userdata - an optional pointer to pass extra data to the callback when it will be invoked.
      window - the window that the dialog should be modal for, may be NULL. Not all platforms support this option.
      default_location - the default folder or file to start the dialog at, may be NULL. Not all platforms support this option.
      allow_many - if non-zero, the user will be allowed to select multiple entries. Not all platforms support this option.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • showFileDialogWithProperties

      public void showFileDialogWithProperties(@EnumType(SDL_FileDialogType.class) int type, @Pointer(comment="SDL_DialogFileCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata, @NativeType("SDL_PropertiesID") @Unsigned int props)

      Create and launch a file dialog with the specified properties.

      These are the supported properties:

      • SDL_PROP_FILE_DIALOG_FILTERS_POINTER: a pointer to a list of SDL_DialogFileFilter structs, which will be used as filters for file-based selections. Ignored if the dialog is an "Open Folder" dialog. If non-NULL, the array of filters must remain valid at least until the callback is invoked.
      • SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER: the number of filters in the array of filters, if it exists.
      • SDL_PROP_FILE_DIALOG_WINDOW_POINTER: the window that the dialog should be modal for.
      • SDL_PROP_FILE_DIALOG_LOCATION_STRING: the default folder or file to start the dialog at.
      • SDL_PROP_FILE_DIALOG_MANY_BOOLEAN: true to allow the user to select more than one entry.
      • SDL_PROP_FILE_DIALOG_TITLE_STRING: the title for the dialog.
      • SDL_PROP_FILE_DIALOG_ACCEPT_STRING: the label that the accept button should have.
      • SDL_PROP_FILE_DIALOG_CANCEL_STRING: the label that the cancel button should have.

      Note that each platform may or may not support any of the properties.

      Parameters:
      type - the type of file dialog.
      callback - a function pointer to be invoked when the user selects a file and accepts, or cancels the dialog, or an error occurs.
      userdata - an optional pointer to pass extra data to the callback when it will be invoked.
      props - the properties to use.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • outOfMemory

      @NativeType("boolean") public boolean outOfMemory()

      Set an error indicating that memory allocation failed.

      This function does not do any memory allocation.

      Returns:
      false.
      Since:
      This function is available since SDL 3.2.0.
    • getError

      public BytePtr getError()

      Retrieve a message about the last error that occurred on the current thread.

      It is possible for multiple errors to occur before calling SDL_GetError(). Only the last error is returned.

      The message is only applicable when an SDL function has signaled an error. You must check the return values of SDL function calls to determine when to appropriately call SDL_GetError(). You should not use the results of SDL_GetError() to decide if an error has occurred! Sometimes SDL will set an error string even when reporting success.

      SDL will not clear the error string for successful API calls. You must check return values for failure cases before you can assume the error string applies.

      Error strings are set per-thread, so an error set in a different thread will not interfere with the current thread's operation.

      The returned value is a thread-local string which will remain valid until the current thread's error string is changed. The caller should make a copy if the value is needed after the next SDL API call.

      Returns:
      a message with information about the specific error that occurred, or an empty string if there hasn't been an error message set since the last call to SDL_ClearError().
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • clearError

      @NativeType("boolean") public boolean clearError()
      Clear any previous error message for this thread.
      Returns:
      true.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • pumpEvents

      public void pumpEvents()

      Pump the event loop, gathering events from the input devices.

      This function updates the event queue and internal input device state.

      SDL_PumpEvents() gathers all the pending input information from devices and places it in the event queue. Without calls to SDL_PumpEvents() no events would ever be placed on the queue. Often the need for calls to SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not polling or waiting for events (e.g. you are filtering them), then you must call SDL_PumpEvents() to force an event queue update.

      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • peepEvents

      public int peepEvents(@Nullable @Pointer @Nullable ISDL_Event events, int numevents, @EnumType(SDL_EventAction.class) int action, @NativeType("Uint32") @Unsigned int minType, @NativeType("Uint32") @Unsigned int maxType)

      Check the event queue for messages and optionally return them.

      action may be any of the following:

      • SDL_ADDEVENT: up to numevents events will be added to the back of the event queue.
      • SDL_PEEKEVENT: numevents events at the front of the event queue, within the specified minimum and maximum type, will be returned to the caller and will not be removed from the queue. If you pass NULL for events, then numevents is ignored and the total number of matching events will be returned.
      • SDL_GETEVENT: up to numevents events at the front of the event queue, within the specified minimum and maximum type, will be returned to the caller and will be removed from the queue.

      You may have to call SDL_PumpEvents() before calling this function. Otherwise, the events may not be ready to be filtered when you call SDL_PeepEvents().

      Parameters:
      events - destination buffer for the retrieved events, may be NULL to leave the events in the queue and return the number of events that would have been stored.
      numevents - if action is SDL_ADDEVENT, the number of events to add back to the event queue; if action is SDL_PEEKEVENT or SDL_GETEVENT, the maximum number of events to retrieve.
      action - action to take; see Remarks for details.
      minType - minimum value of the event type to be considered; SDL_EVENT_FIRST is a safe choice.
      maxType - maximum value of the event type to be considered; SDL_EVENT_LAST is a safe choice.
      Returns:
      the number of events actually stored or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasEvent

      @NativeType("boolean") public boolean hasEvent(@NativeType("Uint32") @Unsigned int type)

      Check for the existence of a certain event type in the event queue.

      If you need to check for a range of event types, use SDL_HasEvents() instead.

      Parameters:
      type - the type of event to be queried; see SDL_EventType for details.
      Returns:
      true if events matching type are present, or false if events matching type are not present.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasEvents

      @NativeType("boolean") public boolean hasEvents(@NativeType("Uint32") @Unsigned int minType, @NativeType("Uint32") @Unsigned int maxType)

      Check for the existence of certain event types in the event queue.

      If you need to check for a single event type, use SDL_HasEvent() instead.

      Parameters:
      minType - the low end of event type to be queried, inclusive; see SDL_EventType for details.
      maxType - the high end of event type to be queried, inclusive; see SDL_EventType for details.
      Returns:
      true if events with type >= minType and <= maxType are present, or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • flushEvent

      public void flushEvent(@NativeType("Uint32") @Unsigned int type)

      Clear events of a specific type from the event queue.

      This will unconditionally remove any events from the queue that match type. If you need to remove a range of event types, use SDL_FlushEvents() instead.

      It's also normal to just ignore events you don't care about in your event loop without calling this function.

      This function only affects currently queued events. If you want to make sure that all pending OS events are flushed, you can call SDL_PumpEvents() on the main thread immediately before the flush call.

      If you have user events with custom data that needs to be freed, you should use SDL_PeepEvents() to remove and clean up those events before calling this function.

      Parameters:
      type - the type of event to be cleared; see SDL_EventType for details.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • flushEvents

      public void flushEvents(@NativeType("Uint32") @Unsigned int minType, @NativeType("Uint32") @Unsigned int maxType)

      Clear events of a range of types from the event queue.

      This will unconditionally remove any events from the queue that are in the range of minType to maxType, inclusive. If you need to remove a single event type, use SDL_FlushEvent() instead.

      It's also normal to just ignore events you don't care about in your event loop without calling this function.

      This function only affects currently queued events. If you want to make sure that all pending OS events are flushed, you can call SDL_PumpEvents() on the main thread immediately before the flush call.

      Parameters:
      minType - the low end of event type to be cleared, inclusive; see SDL_EventType for details.
      maxType - the high end of event type to be cleared, inclusive; see SDL_EventType for details.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • pollEvent

      @NativeType("boolean") public boolean pollEvent(@Nullable @Pointer @Nullable ISDL_Event event)

      Poll for currently pending events.

      If event is not NULL, the next event is removed from the queue and stored in the SDL_Event structure pointed to by event. The 1 returned refers to this event, immediately stored in the SDL Event structure -- not an event to follow.

      If event is NULL, it simply returns 1 if there is an event in the queue, but will not remove it from the queue.

      As this function may implicitly call SDL_PumpEvents(), you can only call this function in the thread that set the video mode.

      SDL_PollEvent() is the favored way of receiving system events since it can be done from the main loop and does not suspend the main loop while waiting on an event to be posted.

      The common practice is to fully process the event queue once every frame, usually as a first step before updating the game's state:

      while (game_is_still_running) {
      SDL_Event event;
      while (SDL_PollEvent(&event)) {  // poll until all events are handled!
      // decide what to do with this event.
      }
      
      // update game state, draw the current frame
      }
      
      Parameters:
      event - the SDL_Event structure to be filled with the next event from the queue, or NULL.
      Returns:
      true if this got an event or false if there are none available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitEvent

      @NativeType("boolean") public boolean waitEvent(@Nullable @Pointer @Nullable ISDL_Event event)

      Wait indefinitely for the next available event.

      If event is not NULL, the next event is removed from the queue and stored in the SDL_Event structure pointed to by event.

      As this function may implicitly call SDL_PumpEvents(), you can only call this function in the thread that initialized the video subsystem.

      Parameters:
      event - the SDL_Event structure to be filled in with the next event from the queue, or NULL.
      Returns:
      true on success or false if there was an error while waiting for events; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitEventTimeout

      @NativeType("boolean") public boolean waitEventTimeout(@Nullable @Pointer @Nullable ISDL_Event event, @NativeType("Sint32") int timeoutMS)

      Wait until the specified timeout (in milliseconds) for the next available event.

      If event is not NULL, the next event is removed from the queue and stored in the SDL_Event structure pointed to by event.

      As this function may implicitly call SDL_PumpEvents(), you can only call this function in the thread that initialized the video subsystem.

      The timeout is not guaranteed, the actual wait time could be longer due to system scheduling.

      Parameters:
      event - the SDL_Event structure to be filled in with the next event from the queue, or NULL.
      timeoutMS - the maximum number of milliseconds to wait for the next available event.
      Returns:
      true if this got an event or false if the timeout elapsed without any events available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • pushEvent

      @NativeType("boolean") public boolean pushEvent(@Nullable @Pointer @Nullable ISDL_Event event)

      Add an event to the event queue.

      The event queue can actually be used as a two way communication channel. Not only can events be read from the queue, but the user can also push their own events onto it. event is a pointer to the event structure you wish to push onto the queue. The event is copied into the queue, and the caller may dispose of the memory pointed to after SDL_PushEvent() returns.

      Note: Pushing device input events onto the queue doesn't modify the state of the device within SDL.

      Note: Events pushed onto the queue with SDL_PushEvent() get passed through the event filter but events added with SDL_PeepEvents() do not.

      For pushing application-specific events, please use SDL_RegisterEvents() to get an event type that does not conflict with other code that also wants its own custom event types.

      Parameters:
      event - the SDL_Event to be added to the queue.
      Returns:
      true on success, false if the event was filtered or on failure; call SDL_GetError() for more information. A common reason for error is the event queue being full.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setEventFilter

      public void setEventFilter(@Pointer(comment="SDL_EventFilter") MemorySegment filter, @Pointer(comment="void*") MemorySegment userdata)

      Set up a filter to process all events before they are added to the internal event queue.

      If you just want to see events without modifying them or preventing them from being queued, you should use SDL_AddEventWatch() instead.

      If the filter function returns true when called, then the event will be added to the internal queue. If it returns false, then the event will be dropped from the queue, but the internal state will still be updated. This allows selective filtering of dynamically arriving events.

      WARNING: Be very careful of what you do in the event filter function, as it may run in a different thread!

      On platforms that support it, if the quit event is generated by an interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the application at the next event poll.

      Note: Disabled events never make it to the event filter function; see SDL_SetEventEnabled().

      Note: Events pushed onto the queue with SDL_PushEvent() get passed through the event filter, but events pushed onto the queue with SDL_PeepEvents() do not.

      Parameters:
      filter - an SDL_EventFilter function to call when an event happens.
      userdata - a pointer that is passed to filter.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getEventFilter

      @NativeType("boolean") public boolean getEventFilter(@Nullable @Nullable PointerPtr filter, @Nullable @Nullable PointerPtr userdata)

      Query the current event filter.

      This function can be used to "chain" filters, by saving the existing filter before replacing it with a function that will call that saved filter.

      Parameters:
      filter - the current callback function will be stored here.
      userdata - the pointer that is passed to the current event filter will be stored here.
      Returns:
      true on success or false if there is no event filter set.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • addEventWatch

      @NativeType("boolean") public boolean addEventWatch(@Pointer(comment="SDL_EventFilter") MemorySegment filter, @Pointer(comment="void*") MemorySegment userdata)

      Add a callback to be triggered when an event is added to the event queue.

      filter will be called when an event happens, and its return value is ignored.

      WARNING: Be very careful of what you do in the event filter function, as it may run in a different thread!

      If the quit event is generated by a signal (e.g. SIGINT), it will bypass the internal queue and be delivered to the watch callback immediately, and arrive at the next event poll.

      Note: the callback is called for events posted by the user through SDL_PushEvent(), but not for disabled events, nor for events by a filter callback set with SDL_SetEventFilter(), nor for events posted by the user through SDL_PeepEvents().

      Parameters:
      filter - an SDL_EventFilter function to call when an event happens.
      userdata - a pointer that is passed to filter.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • removeEventWatch

      public void removeEventWatch(@Pointer(comment="SDL_EventFilter") MemorySegment filter, @Pointer(comment="void*") MemorySegment userdata)

      Remove an event watch callback added with SDL_AddEventWatch().

      This function takes the same input as SDL_AddEventWatch() to identify and delete the corresponding callback.

      Parameters:
      filter - the function originally passed to SDL_AddEventWatch().
      userdata - the pointer originally passed to SDL_AddEventWatch().
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • filterEvents

      public void filterEvents(@Pointer(comment="SDL_EventFilter") MemorySegment filter, @Pointer(comment="void*") MemorySegment userdata)

      Run a specific filter function on the current event queue, removing any events for which the filter returns false.

      See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(), this function does not change the filter permanently, it only uses the supplied filter until this function returns.

      Parameters:
      filter - the SDL_EventFilter function to call when an event happens.
      userdata - a pointer that is passed to filter.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setEventEnabled

      public void setEventEnabled(@NativeType("Uint32") @Unsigned int type, @NativeType("boolean") boolean enabled)
      Set the state of processing events by type.
      Parameters:
      type - the type of event; see SDL_EventType for details.
      enabled - whether to process the event or not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • eventEnabled

      @NativeType("boolean") public boolean eventEnabled(@NativeType("Uint32") @Unsigned int type)
      Query the state of processing events by type.
      Parameters:
      type - the type of event; see SDL_EventType for details.
      Returns:
      true if the event is being processed, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • registerEvents

      @NativeType("Uint32") @Unsigned public int registerEvents(int numevents)
      Allocate a set of user-defined events, and return the beginning event number for that set of events.
      Parameters:
      numevents - the number of events to be allocated.
      Returns:
      the beginning event number, or 0 if numevents is invalid or if there are not enough user-defined events left.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowFromEvent

      public SDL_Window getWindowFromEvent(@Nullable @Pointer @Nullable ISDL_Event event)
      Get window associated with an event.
      Parameters:
      event - an event containing a windowID.
      Returns:
      the associated window on success or NULL if there is none.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getBasePath

      public BytePtr getBasePath()

      Get the directory where the application was run from.

      SDL caches the result of this call internally, but the first call to this function is not necessarily fast, so plan accordingly.

      macOS and iOS Specific Functionality: If the application is in a ".app" bundle, this function returns the Resource directory (e.g. MyApp.app/Contents/Resources/). This behaviour can be overridden by adding a property to the Info.plist file. Adding a string key with the name SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the behaviour.

      Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an application in /Applications/SDLApp/MyApp.app):

      • resource: bundle resource directory (the default). For example: /Applications/SDLApp/MyApp.app/Contents/Resources
      • bundle: the Bundle directory. For example: /Applications/SDLApp/MyApp.app/
      • parent: the containing directory of the bundle. For example: /Applications/SDLApp/

      Nintendo 3DS Specific Functionality: This function returns "romfs" directory of the application as it is uncommon to store resources outside the executable. As such it is not a writable directory.

      The returned path is guaranteed to end with a path separator ('\' on Windows, '/' on most other platforms).

      Returns:
      an absolute path in UTF-8 encoding to the application data directory. NULL will be returned on error or when the platform doesn't implement this functionality, call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPrefPath

      public BytePtr getPrefPath(@Nullable @Nullable BytePtr org, @Nullable @Nullable BytePtr app)

      Get the user-and-app-specific path where files can be written.

      Get the "pref dir". This is meant to be where users can write personal files (preferences and save games, etc) that are specific to your application. This directory is unique per user, per application.

      This function will decide the appropriate location in the native filesystem, create the directory if necessary, and return a string of the absolute path to the directory in UTF-8 encoding.

      On Windows, the string might look like:

      C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\

      On Linux, the string might look like:

      /home/bob/.local/share/My Program Name/

      On macOS, the string might look like:

      /Users/bob/Library/Application Support/My Program Name/

      You should assume the path returned by this function is the only safe place to write files (and that SDL_GetBasePath(), while it might be writable, or even the parent of the returned path, isn't where you should be writing things).

      Both the org and app strings may become part of a directory name, so please follow these rules:

      • Try to use the same org string (including case-sensitivity) for all your applications that use this function.
      • Always use a unique app string for each one, and make sure it never changes for an app once you've decided on it.
      • Unicode characters are legal, as long as they are UTF-8 encoded, but...
      • ...only use letters, numbers, and spaces. Avoid punctuation like "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.

      The returned path is guaranteed to end with a path separator ('\' on Windows, '/' on most other platforms).

      Parameters:
      org - the name of your organization.
      app - the name of your application.
      Returns:
      a UTF-8 string of the user directory in platform-dependent notation. NULL if there's a problem (creating directory failed, etc.). This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getUserFolder

      public BytePtr getUserFolder(@EnumType(SDL_Folder.class) int folder)

      Finds the most suitable user folder for a specific purpose.

      Many OSes provide certain standard folders for certain purposes, such as storing pictures, music or videos for a certain user. This function gives the path for many of those special locations.

      This function is specifically for user folders, which are meant for the user to access and manage. For application-specific folders, meant to hold data for the application to manage, see SDL_GetBasePath() and SDL_GetPrefPath().

      The returned path is guaranteed to end with a path separator ('\' on Windows, '/' on most other platforms).

      If NULL is returned, the error may be obtained with SDL_GetError().

      Parameters:
      folder - the type of folder to find.
      Returns:
      either a null-terminated C string containing the full path to the folder, or NULL if an error happened.
      Since:
      This function is available since SDL 3.2.0.
    • createDirectory

      @NativeType("boolean") public boolean createDirectory(@Nullable @Nullable BytePtr path)

      Create a directory, and any missing parent directories.

      This reports success if path already exists as a directory.

      If parent directories are missing, it will also create them. Note that if this fails, it will not remove any parent directories it already made.

      Parameters:
      path - the path of the directory to create.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • enumerateDirectory

      @NativeType("boolean") public boolean enumerateDirectory(@Nullable @Nullable BytePtr path, @Pointer(comment="SDL_EnumerateDirectoryCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Enumerate a directory through a callback function.

      This function provides every directory entry through an app-provided callback, called once for each directory entry, until all results have been provided or the callback returns either SDL_ENUM_SUCCESS or SDL_ENUM_FAILURE.

      This will return false if there was a system problem in general, or if a callback returns SDL_ENUM_FAILURE. A successful return means a callback returned SDL_ENUM_SUCCESS to halt enumeration, or all directory entries were enumerated.

      Parameters:
      path - the path of the directory to enumerate.
      callback - a function that is called for each entry in the directory.
      userdata - a pointer that is passed to callback.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • removePath

      @NativeType("boolean") public boolean removePath(@Nullable @Nullable BytePtr path)

      Remove a file or an empty directory.

      Directories that are not empty will fail; this function will not recursely delete directory trees.

      Parameters:
      path - the path to remove from the filesystem.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • renamePath

      @NativeType("boolean") public boolean renamePath(@Nullable @Nullable BytePtr oldpath, @Nullable @Nullable BytePtr newpath)

      Rename a file or directory.

      If the file at newpath already exists, it will replaced.

      Note that this will not copy files across filesystems/drives/volumes, as that is a much more complicated (and possibly time-consuming) operation.

      Which is to say, if this function fails, SDL_CopyFile() to a temporary file in the same directory as newpath, then SDL_RenamePath() from the temporary file to newpath and SDL_RemovePath() on oldpath might work for files. Renaming a non-empty directory across filesystems is dramatically more complex, however.

      Parameters:
      oldpath - the old path.
      newpath - the new path.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • copyFile

      @NativeType("boolean") public boolean copyFile(@Nullable @Nullable BytePtr oldpath, @Nullable @Nullable BytePtr newpath)

      Copy a file.

      If the file at newpath already exists, it will be overwritten with the contents of the file at oldpath.

      This function will block until the copy is complete, which might be a significant time for large files on slow disks. On some platforms, the copy can be handed off to the OS itself, but on others SDL might just open both paths, and read from one and write to the other.

      Note that this is not an atomic operation! If something tries to read from newpath while the copy is in progress, it will see an incomplete copy of the data, and if the calling thread terminates (or the power goes out) during the copy, newpath's previous contents will be gone, replaced with an incomplete copy of the data. To avoid this risk, it is recommended that the app copy to a temporary file in the same directory as newpath, and if the copy is successful, use SDL_RenamePath() to replace newpath with the temporary file. This will ensure that reads of newpath will either see a complete copy of the data, or it will see the pre-copy state of newpath.

      This function attempts to synchronize the newly-copied data to disk before returning, if the platform allows it, so that the renaming trick will not have a problem in a system crash or power failure, where the file could be renamed but the contents never made it from the system file cache to the physical disk.

      If the copy fails for any reason, the state of newpath is undefined. It might be half a copy, it might be the untouched data of what was already there, or it might be a zero-byte file, etc.

      Parameters:
      oldpath - the old path.
      newpath - the new path.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getPathInfo

      @NativeType("boolean") public boolean getPathInfo(@Nullable @Nullable BytePtr path, @Nullable @Pointer @Nullable ISDL_PathInfo info)
      Get information about a filesystem path.
      Parameters:
      path - the path to query.
      info - a pointer filled in with information about the path, or NULL to check for the existence of a file.
      Returns:
      true on success or false if the file doesn't exist, or another failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • globDirectory

      public PointerPtr globDirectory(@Nullable @Nullable BytePtr path, @Nullable @Nullable BytePtr pattern, @EnumType(SDL_GlobFlags.class) int flags, @Nullable @Nullable IntPtr count)

      Enumerate a directory tree, filtered by pattern, and return a list.

      Files are filtered out if they don't match the string in pattern, which may contain wildcard characters '*' (match everything) and '?' (match one character). If pattern is NULL, no filtering is done and all results are returned. Subdirectories are permitted, and are specified with a path separator of '/'. Wildcard characters '*' and '?' never match a path separator.

      flags may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern matching case-insensitive.

      The returned array is always NULL-terminated, for your iterating convenience, but if count is non-NULL, on return it will contain the number of items in the array, not counting the NULL terminator.

      Parameters:
      path - the path of the directory to enumerate.
      pattern - the pattern that files in the directory must match. Can be NULL.
      flags - SDL_GLOB_* bitflags that affect this search.
      count - on return, will be set to the number of items in the returned array. Can be NULL.
      Returns:
      an array of strings on success or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • getCurrentDirectory

      public BytePtr getCurrentDirectory()

      Get what the system believes is the "current working directory."

      For systems without a concept of a current working directory, this will still attempt to provide something reasonable.

      SDL does not provide a means to change the current working directory; for platforms without this concept, this would cause surprises with file access outside of SDL.

      The returned path is guaranteed to end with a path separator ('\' on Windows, '/' on most other platforms).

      Returns:
      a UTF-8 string of the current working directory in platform-dependent notation. NULL if there's a problem. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • addGamepadMapping

      public int addGamepadMapping(@Nullable @Nullable BytePtr mapping)

      Add support for gamepads that SDL is unaware of or change the binding of an existing gamepad.

      The mapping string has the format "GUID,name,mapping", where GUID is the string value from SDL_GUIDToString(), name is the human readable string for the device and mappings are gamepad mappings to joystick ones. Under Windows there is a reserved GUID of "xinput" that covers all XInput devices. The mapping format for joystick is:

      • bX: a joystick button, index X
      • hX.Y: hat X with value Y
      • aX: axis X of the joystick

      Buttons can be used as a gamepad axes and vice versa.

      If a device with this GUID is already plugged in, SDL will generate an SDL_EVENT_GAMEPAD_ADDED event.

      This string shows an example of a valid mapping for a gamepad:

      "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
      
      Parameters:
      mapping - the mapping string.
      Returns:
      1 if a new mapping is added, 0 if an existing mapping is updated, -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • addGamepadMappingsFromIO

      public int addGamepadMappingsFromIO(@Nullable @Nullable SDL_IOStream src, @NativeType("boolean") boolean closeio)

      Load a set of gamepad mappings from an SDL_IOStream.

      You can call this function several times, if needed, to load different database files.

      If a new mapping is loaded for an already known gamepad GUID, the later version will overwrite the one currently loaded.

      Any new mappings for already plugged in controllers will generate SDL_EVENT_GAMEPAD_ADDED events.

      Mappings not belonging to the current platform or with no platform field specified will be ignored (i.e. mappings for Linux will be ignored in Windows, etc).

      This function will load the text database entirely in memory before processing it, so take this into consideration if you are in a memory constrained environment.

      Parameters:
      src - the data stream for the mappings to be added.
      closeio - if true, calls SDL_CloseIO() on src before returning, even in the case of an error.
      Returns:
      the number of mappings added or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • addGamepadMappingsFromFile

      public int addGamepadMappingsFromFile(@Nullable @Nullable BytePtr file)

      Load a set of gamepad mappings from a file.

      You can call this function several times, if needed, to load different database files.

      If a new mapping is loaded for an already known gamepad GUID, the later version will overwrite the one currently loaded.

      Any new mappings for already plugged in controllers will generate SDL_EVENT_GAMEPAD_ADDED events.

      Mappings not belonging to the current platform or with no platform field specified will be ignored (i.e. mappings for Linux will be ignored in Windows, etc).

      Parameters:
      file - the mappings file to load.
      Returns:
      the number of mappings added or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • reloadGamepadMappings

      @NativeType("boolean") public boolean reloadGamepadMappings()

      Reinitialize the SDL mapping database to its initial state.

      This will generate gamepad events as needed if device mappings change.

      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadMappings

      public PointerPtr getGamepadMappings(@Nullable @Nullable IntPtr count)
      Get the current gamepad mappings.
      Parameters:
      count - a pointer filled in with the number of mappings returned, can be NULL.
      Returns:
      an array of the mapping strings, NULL-terminated, or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadMappingForGUID

      public BytePtr getGamepadMappingForGUID(SDL_GUID guid)
      Get the gamepad mapping string for a given GUID.
      Parameters:
      guid - a structure containing the GUID for which a mapping is desired.
      Returns:
      a mapping string or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadMapping

      public BytePtr getGamepadMapping(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the current mapping of a gamepad.

      Details about mappings are discussed with SDL_AddGamepadMapping().

      Parameters:
      gamepad - the gamepad you want to get the current mapping for.
      Returns:
      a string that has the gamepad's mapping or NULL if no mapping is available; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setGamepadMapping

      @NativeType("boolean") public boolean setGamepadMapping(@NativeType("SDL_JoystickID") @Unsigned int instance_id, @Nullable @Nullable BytePtr mapping)

      Set the current mapping of a joystick or gamepad.

      Details about mappings are discussed with SDL_AddGamepadMapping().

      Parameters:
      instance_id - the joystick instance ID.
      mapping - the mapping to use for this device, or NULL to clear the mapping.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasGamepad

      @NativeType("boolean") public boolean hasGamepad()
      Return whether a gamepad is currently connected.
      Returns:
      true if a gamepad is connected, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepads

      @Pointer(comment="SDL_JoystickID") @Unsigned public IntPtr getGamepads(@Nullable @Nullable IntPtr count)
      Get a list of currently connected gamepads.
      Parameters:
      count - a pointer filled in with the number of gamepads returned, may be NULL.
      Returns:
      a 0 terminated array of joystick instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isGamepad

      @NativeType("boolean") public boolean isGamepad(@NativeType("SDL_JoystickID") @Unsigned int instance_id)
      Check if the given joystick is supported by the gamepad interface.
      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      true if the given joystick is supported by the gamepad interface, false if it isn't or it's an invalid index.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadNameForID

      public BytePtr getGamepadNameForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the implementation dependent name of a gamepad.

      This can be called before any gamepads are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the name of the selected gamepad. If no name can be found, this function returns NULL; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadPathForID

      public BytePtr getGamepadPathForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the implementation dependent path of a gamepad.

      This can be called before any gamepads are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the path of the selected gamepad. If no path can be found, this function returns NULL; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadPlayerIndexForID

      public int getGamepadPlayerIndexForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the player index of a gamepad.

      This can be called before any gamepads are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the player index of a gamepad, or -1 if it's not available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadGUIDForID

      public SDL_GUID getGamepadGUIDForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the implementation-dependent GUID of a gamepad.

      This can be called before any gamepads are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the GUID of the selected gamepad. If called on an invalid index, this function returns a zero GUID.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadVendorForID

      @NativeType("Uint16") @Unsigned public short getGamepadVendorForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the USB vendor ID of a gamepad, if available.

      This can be called before any gamepads are opened. If the vendor ID isn't available this function returns 0.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the USB vendor ID of the selected gamepad. If called on an invalid index, this function returns zero.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadProductForID

      @NativeType("Uint16") @Unsigned public short getGamepadProductForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the USB product ID of a gamepad, if available.

      This can be called before any gamepads are opened. If the product ID isn't available this function returns 0.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the USB product ID of the selected gamepad. If called on an invalid index, this function returns zero.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadProductVersionForID

      @NativeType("Uint16") @Unsigned public short getGamepadProductVersionForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the product version of a gamepad, if available.

      This can be called before any gamepads are opened. If the product version isn't available this function returns 0.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the product version of the selected gamepad. If called on an invalid index, this function returns zero.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadTypeForID

      @EnumType(SDL_GamepadType.class) public int getGamepadTypeForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the type of a gamepad.

      This can be called before any gamepads are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the gamepad type.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRealGamepadTypeForID

      @EnumType(SDL_GamepadType.class) public int getRealGamepadTypeForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the type of a gamepad, ignoring any mapping override.

      This can be called before any gamepads are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the gamepad type.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadMappingForID

      public BytePtr getGamepadMappingForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the mapping of a gamepad.

      This can be called before any gamepads are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the mapping string. Returns NULL if no mapping is available. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openGamepad

      public SDL_Gamepad openGamepad(@NativeType("SDL_JoystickID") @Unsigned int instance_id)
      Open a gamepad for use.
      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      a gamepad identifier or NULL if an error occurred; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadFromID

      public SDL_Gamepad getGamepadFromID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)
      Get the SDL_Gamepad associated with a joystick instance ID, if it has been opened.
      Parameters:
      instance_id - the joystick instance ID of the gamepad.
      Returns:
      an SDL_Gamepad on success or NULL on failure or if it hasn't been opened yet; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadFromPlayerIndex

      public SDL_Gamepad getGamepadFromPlayerIndex(int player_index)
      Get the SDL_Gamepad associated with a player index.
      Parameters:
      player_index - the player index, which different from the instance ID.
      Returns:
      the SDL_Gamepad associated with a player index.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getGamepadProperties(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the properties associated with an opened gamepad.

      These properties are shared with the underlying joystick object.

      The following read-only properties are provided by SDL:

      • SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN: true if this gamepad has an LED that has adjustable brightness
      • SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN: true if this gamepad has an LED that has adjustable color
      • SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN: true if this gamepad has a player LED
      • SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN: true if this gamepad has left/right rumble
      • SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN: true if this gamepad has simple trigger rumble
      Parameters:
      gamepad - a gamepad identifier previously returned by SDL_OpenGamepad().
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadID

      @NativeType("SDL_JoystickID") @Unsigned public int getGamepadID(@Nullable @Nullable SDL_Gamepad gamepad)
      Get the instance ID of an opened gamepad.
      Parameters:
      gamepad - a gamepad identifier previously returned by SDL_OpenGamepad().
      Returns:
      the instance ID of the specified gamepad on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadName

      public BytePtr getGamepadName(@Nullable @Nullable SDL_Gamepad gamepad)
      Get the implementation-dependent name for an opened gamepad.
      Parameters:
      gamepad - a gamepad identifier previously returned by SDL_OpenGamepad().
      Returns:
      the implementation dependent name for the gamepad, or NULL if there is no name or the identifier passed is invalid.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadPath

      public BytePtr getGamepadPath(@Nullable @Nullable SDL_Gamepad gamepad)
      Get the implementation-dependent path for an opened gamepad.
      Parameters:
      gamepad - a gamepad identifier previously returned by SDL_OpenGamepad().
      Returns:
      the implementation dependent path for the gamepad, or NULL if there is no path or the identifier passed is invalid.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadType

      @EnumType(SDL_GamepadType.class) public int getGamepadType(@Nullable @Nullable SDL_Gamepad gamepad)
      Get the type of an opened gamepad.
      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRealGamepadType

      @EnumType(SDL_GamepadType.class) public int getRealGamepadType(@Nullable @Nullable SDL_Gamepad gamepad)
      Get the type of an opened gamepad, ignoring any mapping override.
      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadPlayerIndex

      public int getGamepadPlayerIndex(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the player index of an opened gamepad.

      For XInput gamepads this returns the XInput user index.

      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the player index for gamepad, or -1 if it's not available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setGamepadPlayerIndex

      @NativeType("boolean") public boolean setGamepadPlayerIndex(@Nullable @Nullable SDL_Gamepad gamepad, int player_index)
      Set the player index of an opened gamepad.
      Parameters:
      gamepad - the gamepad object to adjust.
      player_index - player index to assign to this gamepad, or -1 to clear the player index and turn off player LEDs.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadVendor

      @NativeType("Uint16") @Unsigned public short getGamepadVendor(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the USB vendor ID of an opened gamepad, if available.

      If the vendor ID isn't available this function returns 0.

      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the USB vendor ID, or zero if unavailable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadProduct

      @NativeType("Uint16") @Unsigned public short getGamepadProduct(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the USB product ID of an opened gamepad, if available.

      If the product ID isn't available this function returns 0.

      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the USB product ID, or zero if unavailable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadProductVersion

      @NativeType("Uint16") @Unsigned public short getGamepadProductVersion(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the product version of an opened gamepad, if available.

      If the product version isn't available this function returns 0.

      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the USB product version, or zero if unavailable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadFirmwareVersion

      @NativeType("Uint16") @Unsigned public short getGamepadFirmwareVersion(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the firmware version of an opened gamepad, if available.

      If the firmware version isn't available this function returns 0.

      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the gamepad firmware version, or zero if unavailable.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadSerial

      public BytePtr getGamepadSerial(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the serial number of an opened gamepad, if available.

      Returns the serial number of the gamepad, or NULL if it is not available.

      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the serial number, or NULL if unavailable.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadSteamHandle

      @NativeType("Uint64") @Unsigned public long getGamepadSteamHandle(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the Steam Input handle of an opened gamepad, if available.

      Returns an InputHandle_t for the gamepad that can be used with Steam Input API: https://partner.steamgames.com/doc/api/ISteamInput

      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the gamepad handle, or 0 if unavailable.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadConnectionState

      @EnumType(SDL_JoystickConnectionState.class) public int getGamepadConnectionState(@Nullable @Nullable SDL_Gamepad gamepad)
      Get the connection state of a gamepad.
      Parameters:
      gamepad - the gamepad object to query.
      Returns:
      the connection state on success or SDL_JOYSTICK_CONNECTION_INVALID on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadPowerInfo

      @EnumType(SDL_PowerState.class) public int getGamepadPowerInfo(@Nullable @Nullable SDL_Gamepad gamepad, @Nullable @Nullable IntPtr percent)

      Get the battery state of a gamepad.

      You should never take a battery status as absolute truth. Batteries (especially failing batteries) are delicate hardware, and the values reported here are best estimates based on what that hardware reports. It's not uncommon for older batteries to lose stored power much faster than it reports, or completely drain when reporting it has 20 percent left, etc.

      Parameters:
      gamepad - the gamepad object to query.
      percent - a pointer filled in with the percentage of battery life left, between 0 and 100, or NULL to ignore. This will be filled in with -1 we can't determine a value or there is no battery.
      Returns:
      the current battery state.
      Since:
      This function is available since SDL 3.2.0.
    • gamepadConnected

      @NativeType("boolean") public boolean gamepadConnected(@Nullable @Nullable SDL_Gamepad gamepad)
      Check if a gamepad has been opened and is currently connected.
      Parameters:
      gamepad - a gamepad identifier previously returned by SDL_OpenGamepad().
      Returns:
      true if the gamepad has been opened and is currently connected, or false if not.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadJoystick

      public SDL_Joystick getGamepadJoystick(@Nullable @Nullable SDL_Gamepad gamepad)

      Get the underlying joystick from a gamepad.

      This function will give you a SDL_Joystick object, which allows you to use the SDL_Joystick functions with a SDL_Gamepad object. This would be useful for getting a joystick's position at any given time, even if it hasn't moved (moving it would produce an event, which would have the axis' value).

      The pointer returned is owned by the SDL_Gamepad. You should not call SDL_CloseJoystick() on it, for example, since doing so will likely cause SDL to crash.

      Parameters:
      gamepad - the gamepad object that you want to get a joystick from.
      Returns:
      an SDL_Joystick object, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setGamepadEventsEnabled

      public void setGamepadEventsEnabled(@NativeType("boolean") boolean enabled)

      Set the state of gamepad event processing.

      If gamepad events are disabled, you must call SDL_UpdateGamepads() yourself and check the state of the gamepad when you want gamepad information.

      Parameters:
      enabled - whether to process gamepad events or not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • gamepadEventsEnabled

      @NativeType("boolean") public boolean gamepadEventsEnabled()

      Query the state of gamepad event processing.

      If gamepad events are disabled, you must call SDL_UpdateGamepads() yourself and check the state of the gamepad when you want gamepad information.

      Returns:
      true if gamepad events are being processed, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadBindings

      public PointerPtr getGamepadBindings(@Nullable @Nullable SDL_Gamepad gamepad, @Nullable @Nullable IntPtr count)
      Get the SDL joystick layer bindings for a gamepad.
      Parameters:
      gamepad - a gamepad.
      count - a pointer filled in with the number of bindings returned.
      Returns:
      a NULL terminated array of pointers to bindings or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • updateGamepads

      public void updateGamepads()

      Manually pump gamepad updates if not using the loop.

      This function is called automatically by the event loop if events are enabled. Under such circumstances, it will not be necessary to call this function.

      Since:
      This function is available since SDL 3.2.0.
    • getGamepadTypeFromString

      @EnumType(SDL_GamepadType.class) public int getGamepadTypeFromString(@Nullable @Nullable BytePtr str)

      Convert a string into SDL_GamepadType enum.

      This function is called internally to translate SDL_Gamepad mapping strings for the underlying joystick device into the consistent SDL_Gamepad mapping. You do not normally need to call this function unless you are parsing SDL_Gamepad mappings in your own code.

      Parameters:
      str - string representing a SDL_GamepadType type.
      Returns:
      the SDL_GamepadType enum corresponding to the input string, or SDL_GAMEPAD_TYPE_UNKNOWN if no match was found.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadStringForType

      public BytePtr getGamepadStringForType(@EnumType(SDL_GamepadType.class) int type)
      Convert from an SDL_GamepadType enum to a string.
      Parameters:
      type - an enum value for a given SDL_GamepadType.
      Returns:
      a string for the given type, or NULL if an invalid type is specified. The string returned is of the format used by SDL_Gamepad mapping strings.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadAxisFromString

      @EnumType(SDL_GamepadAxis.class) public int getGamepadAxisFromString(@Nullable @Nullable BytePtr str)

      Convert a string into SDL_GamepadAxis enum.

      This function is called internally to translate SDL_Gamepad mapping strings for the underlying joystick device into the consistent SDL_Gamepad mapping. You do not normally need to call this function unless you are parsing SDL_Gamepad mappings in your own code.

      Note specially that "righttrigger" and "lefttrigger" map to SDL_GAMEPAD_AXIS_RIGHT_TRIGGER and SDL_GAMEPAD_AXIS_LEFT_TRIGGER, respectively.

      Parameters:
      str - string representing a SDL_Gamepad axis.
      Returns:
      the SDL_GamepadAxis enum corresponding to the input string, or SDL_GAMEPAD_AXIS_INVALID if no match was found.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadStringForAxis

      public BytePtr getGamepadStringForAxis(@EnumType(SDL_GamepadAxis.class) int axis)
      Convert from an SDL_GamepadAxis enum to a string.
      Parameters:
      axis - an enum value for a given SDL_GamepadAxis.
      Returns:
      a string for the given axis, or NULL if an invalid axis is specified. The string returned is of the format used by SDL_Gamepad mapping strings.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • gamepadHasAxis

      @NativeType("boolean") public boolean gamepadHasAxis(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_GamepadAxis.class) int axis)

      Query whether a gamepad has a given axis.

      This merely reports whether the gamepad's mapping defined this axis, as that is all the information SDL has about the physical device.

      Parameters:
      gamepad - a gamepad.
      axis - an axis enum value (an SDL_GamepadAxis value).
      Returns:
      true if the gamepad has this axis, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadAxis

      @NativeType("Sint16") public short getGamepadAxis(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_GamepadAxis.class) int axis)

      Get the current state of an axis control on a gamepad.

      The axis indices start at index 0.

      For thumbsticks, the state is a value ranging from -32768 (up/left) to 32767 (down/right).

      Triggers range from 0 when released to 32767 when fully pressed, and never return a negative value. Note that this differs from the value reported by the lower-level SDL_GetJoystickAxis(), which normally uses the full range.

      Parameters:
      gamepad - a gamepad.
      axis - an axis index (one of the SDL_GamepadAxis values).
      Returns:
      axis state (including 0) on success or 0 (also) on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadButtonFromString

      @EnumType(SDL_GamepadButton.class) public int getGamepadButtonFromString(@Nullable @Nullable BytePtr str)

      Convert a string into an SDL_GamepadButton enum.

      This function is called internally to translate SDL_Gamepad mapping strings for the underlying joystick device into the consistent SDL_Gamepad mapping. You do not normally need to call this function unless you are parsing SDL_Gamepad mappings in your own code.

      Parameters:
      str - string representing a SDL_Gamepad axis.
      Returns:
      the SDL_GamepadButton enum corresponding to the input string, or SDL_GAMEPAD_BUTTON_INVALID if no match was found.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadStringForButton

      public BytePtr getGamepadStringForButton(@EnumType(SDL_GamepadButton.class) int button)
      Convert from an SDL_GamepadButton enum to a string.
      Parameters:
      button - an enum value for a given SDL_GamepadButton.
      Returns:
      a string for the given button, or NULL if an invalid button is specified. The string returned is of the format used by SDL_Gamepad mapping strings.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • gamepadHasButton

      @NativeType("boolean") public boolean gamepadHasButton(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_GamepadButton.class) int button)

      Query whether a gamepad has a given button.

      This merely reports whether the gamepad's mapping defined this button, as that is all the information SDL has about the physical device.

      Parameters:
      gamepad - a gamepad.
      button - a button enum value (an SDL_GamepadButton value).
      Returns:
      true if the gamepad has this button, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadButton

      @NativeType("boolean") public boolean getGamepadButton(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_GamepadButton.class) int button)
      Get the current state of a button on a gamepad.
      Parameters:
      gamepad - a gamepad.
      button - a button index (one of the SDL_GamepadButton values).
      Returns:
      true if the button is pressed, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadButtonLabelForType

      @EnumType(SDL_GamepadButtonLabel.class) public int getGamepadButtonLabelForType(@EnumType(SDL_GamepadType.class) int type, @EnumType(SDL_GamepadButton.class) int button)
      Get the label of a button on a gamepad.
      Parameters:
      type - the type of gamepad to check.
      button - a button index (one of the SDL_GamepadButton values).
      Returns:
      the SDL_GamepadButtonLabel enum corresponding to the button label.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadButtonLabel

      @EnumType(SDL_GamepadButtonLabel.class) public int getGamepadButtonLabel(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_GamepadButton.class) int button)
      Get the label of a button on a gamepad.
      Parameters:
      gamepad - a gamepad.
      button - a button index (one of the SDL_GamepadButton values).
      Returns:
      the SDL_GamepadButtonLabel enum corresponding to the button label.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumGamepadTouchpads

      public int getNumGamepadTouchpads(@Nullable @Nullable SDL_Gamepad gamepad)
      Get the number of touchpads on a gamepad.
      Parameters:
      gamepad - a gamepad.
      Returns:
      number of touchpads.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumGamepadTouchpadFingers

      public int getNumGamepadTouchpadFingers(@Nullable @Nullable SDL_Gamepad gamepad, int touchpad)
      Get the number of supported simultaneous fingers on a touchpad on a game gamepad.
      Parameters:
      gamepad - a gamepad.
      touchpad - a touchpad.
      Returns:
      number of supported simultaneous fingers.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadTouchpadFinger

      @NativeType("boolean") public boolean getGamepadTouchpadFinger(@Nullable @Nullable SDL_Gamepad gamepad, int touchpad, int finger, @Nullable @Pointer(comment="boolean") @Nullable BytePtr down, @Nullable @Nullable FloatPtr x, @Nullable @Nullable FloatPtr y, @Nullable @Nullable FloatPtr pressure)
      Get the current state of a finger on a touchpad on a gamepad.
      Parameters:
      gamepad - a gamepad.
      touchpad - a touchpad.
      finger - a finger.
      down - a pointer filled with true if the finger is down, false otherwise, may be NULL.
      x - a pointer filled with the x position, normalized 0 to 1, with the origin in the upper left, may be NULL.
      y - a pointer filled with the y position, normalized 0 to 1, with the origin in the upper left, may be NULL.
      pressure - a pointer filled with pressure value, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • gamepadHasSensor

      @NativeType("boolean") public boolean gamepadHasSensor(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_SensorType.class) int type)
      Return whether a gamepad has a particular sensor.
      Parameters:
      gamepad - the gamepad to query.
      type - the type of sensor to query.
      Returns:
      true if the sensor exists, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setGamepadSensorEnabled

      @NativeType("boolean") public boolean setGamepadSensorEnabled(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_SensorType.class) int type, @NativeType("boolean") boolean enabled)
      Set whether data reporting for a gamepad sensor is enabled.
      Parameters:
      gamepad - the gamepad to update.
      type - the type of sensor to enable/disable.
      enabled - whether data reporting should be enabled.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • gamepadSensorEnabled

      @NativeType("boolean") public boolean gamepadSensorEnabled(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_SensorType.class) int type)
      Query whether sensor data reporting is enabled for a gamepad.
      Parameters:
      gamepad - the gamepad to query.
      type - the type of sensor to query.
      Returns:
      true if the sensor is enabled, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadSensorDataRate

      public float getGamepadSensorDataRate(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_SensorType.class) int type)
      Get the data rate (number of events per second) of a gamepad sensor.
      Parameters:
      gamepad - the gamepad to query.
      type - the type of sensor to query.
      Returns:
      the data rate, or 0.0f if the data rate is not available.
      Since:
      This function is available since SDL 3.2.0.
    • getGamepadSensorData

      @NativeType("boolean") public boolean getGamepadSensorData(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_SensorType.class) int type, @Nullable @Nullable FloatPtr data, int num_values)

      Get the current state of a gamepad sensor.

      The number of values and interpretation of the data is sensor dependent. See SDL_sensor.h for the details for each type of sensor.

      Parameters:
      gamepad - the gamepad to query.
      type - the type of sensor to query.
      data - a pointer filled with the current sensor state.
      num_values - the number of values to write to data.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • rumbleGamepad

      @NativeType("boolean") public boolean rumbleGamepad(@Nullable @Nullable SDL_Gamepad gamepad, @NativeType("Uint16") @Unsigned short low_frequency_rumble, @NativeType("Uint16") @Unsigned short high_frequency_rumble, @NativeType("Uint32") @Unsigned int duration_ms)

      Start a rumble effect on a gamepad.

      Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.

      This function requires you to process SDL events or call SDL_UpdateJoysticks() to update rumble state.

      Parameters:
      gamepad - the gamepad to vibrate.
      low_frequency_rumble - the intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF.
      high_frequency_rumble - the intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF.
      duration_ms - the duration of the rumble effect, in milliseconds.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • rumbleGamepadTriggers

      @NativeType("boolean") public boolean rumbleGamepadTriggers(@Nullable @Nullable SDL_Gamepad gamepad, @NativeType("Uint16") @Unsigned short left_rumble, @NativeType("Uint16") @Unsigned short right_rumble, @NativeType("Uint32") @Unsigned int duration_ms)

      Start a rumble effect in the gamepad's triggers.

      Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling.

      Note that this is rumbling of the triggers and not the gamepad as a whole. This is currently only supported on Xbox One gamepads. If you want the (more common) whole-gamepad rumble, use SDL_RumbleGamepad() instead.

      This function requires you to process SDL events or call SDL_UpdateJoysticks() to update rumble state.

      Parameters:
      gamepad - the gamepad to vibrate.
      left_rumble - the intensity of the left trigger rumble motor, from 0 to 0xFFFF.
      right_rumble - the intensity of the right trigger rumble motor, from 0 to 0xFFFF.
      duration_ms - the duration of the rumble effect, in milliseconds.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setGamepadLED

      @NativeType("boolean") public boolean setGamepadLED(@Nullable @Nullable SDL_Gamepad gamepad, @NativeType("Uint8") @Unsigned byte red, @NativeType("Uint8") @Unsigned byte green, @NativeType("Uint8") @Unsigned byte blue)

      Update a gamepad's LED color.

      An example of a joystick LED is the light on the back of a PlayStation 4's DualShock 4 controller.

      For gamepads with a single color LED, the maximum of the RGB values will be used as the LED brightness.

      Parameters:
      gamepad - the gamepad to update.
      red - the intensity of the red LED.
      green - the intensity of the green LED.
      blue - the intensity of the blue LED.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • sendGamepadEffect

      @NativeType("boolean") public boolean sendGamepadEffect(@Nullable @Nullable SDL_Gamepad gamepad, @Pointer(comment="void*") MemorySegment data, int size)
      Send a gamepad specific effect packet.
      Parameters:
      gamepad - the gamepad to affect.
      data - the data to send to the gamepad.
      size - the size of the data to send to the gamepad.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • closeGamepad

      public void closeGamepad(@Nullable @Nullable SDL_Gamepad gamepad)
      Close a gamepad previously opened with SDL_OpenGamepad().
      Parameters:
      gamepad - a gamepad identifier previously returned by SDL_OpenGamepad().
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadAppleSFSymbolsNameForButton

      public BytePtr getGamepadAppleSFSymbolsNameForButton(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_GamepadButton.class) int button)
      Return the sfSymbolsName for a given button on a gamepad on Apple platforms.
      Parameters:
      gamepad - the gamepad to query.
      button - a button on the gamepad.
      Returns:
      the sfSymbolsName or NULL if the name can't be found.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGamepadAppleSFSymbolsNameForAxis

      public BytePtr getGamepadAppleSFSymbolsNameForAxis(@Nullable @Nullable SDL_Gamepad gamepad, @EnumType(SDL_GamepadAxis.class) int axis)
      Return the sfSymbolsName for a given axis on a gamepad on Apple platforms.
      Parameters:
      gamepad - the gamepad to query.
      axis - an axis on the gamepad.
      Returns:
      the sfSymbolsName or NULL if the name can't be found.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GPUSupportsShaderFormats

      @NativeType("boolean") public boolean GPUSupportsShaderFormats(@EnumType(SDL_GPUShaderFormat.class) int format_flags, @Nullable @Nullable BytePtr name)
      Checks for GPU runtime support.
      Parameters:
      format_flags - a bitflag indicating which shader formats the app is able to provide.
      name - the preferred GPU driver, or NULL to let SDL pick the optimal driver.
      Returns:
      true if supported, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GPUSupportsProperties

      @NativeType("boolean") public boolean GPUSupportsProperties(@NativeType("SDL_PropertiesID") @Unsigned int props)
      Checks for GPU runtime support.
      Parameters:
      props - the properties to use.
      Returns:
      true if supported, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createGPUDevice

      public SDL_GPUDevice createGPUDevice(@EnumType(SDL_GPUShaderFormat.class) int format_flags, @NativeType("boolean") boolean debug_mode, @Nullable @Nullable BytePtr name)
      Creates a GPU context.
      Parameters:
      format_flags - a bitflag indicating which shader formats the app is able to provide.
      debug_mode - enable debug mode properties and validations.
      name - the preferred GPU driver, or NULL to let SDL pick the optimal driver.
      Returns:
      a GPU context on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createGPUDeviceWithProperties

      public SDL_GPUDevice createGPUDeviceWithProperties(@NativeType("SDL_PropertiesID") @Unsigned int props)

      Creates a GPU context.

      These are the supported properties:

      • SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN: enable debug mode properties and validations, defaults to true.
      • SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN: enable to prefer energy efficiency over maximum GPU performance, defaults to false.
      • SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING: the name of the GPU driver to use, if a specific one is desired.

      These are the current shader format properties:

      • SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN: The app is able to provide shaders for an NDA platform.
      • SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN: The app is able to provide SPIR-V shaders if applicable.
      • SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN: The app is able to provide DXBC shaders if applicable
      • SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN: The app is able to provide DXIL shaders if applicable.
      • SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN: The app is able to provide MSL shaders if applicable.
      • SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN: The app is able to provide Metal shader libraries if applicable.

      With the D3D12 renderer:

      • SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING: the prefix to use for all vertex semantics, default is "TEXCOORD".
      Parameters:
      props - the properties to use.
      Returns:
      a GPU context on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyGPUDevice

      public void destroyGPUDevice(@Nullable @Nullable SDL_GPUDevice device)
      Destroys a GPU context previously returned by SDL_CreateGPUDevice.
      Parameters:
      device - a GPU Context to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumGPUDrivers

      public int getNumGPUDrivers()
      Get the number of GPU drivers compiled into SDL.
      Returns:
      the number of built in GPU drivers.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGPUDriver

      public BytePtr getGPUDriver(int index)

      Get the name of a built in GPU driver.

      The GPU drivers are presented in the order in which they are normally checked during initialization.

      The names of drivers are all simple, low-ASCII identifiers, like "vulkan", "metal" or "direct3d12". These never have Unicode characters, and are not meant to be proper names.

      Parameters:
      index - the index of a GPU driver.
      Returns:
      the name of the GPU driver with the given index.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGPUDeviceDriver

      public BytePtr getGPUDeviceDriver(@Nullable @Nullable SDL_GPUDevice device)
      Returns the name of the backend used to create this GPU context.
      Parameters:
      device - a GPU context to query.
      Returns:
      the name of the device's driver, or NULL on error.
      Since:
      This function is available since SDL 3.2.0.
    • getGPUShaderFormats

      @EnumType(SDL_GPUShaderFormat.class) public int getGPUShaderFormats(@Nullable @Nullable SDL_GPUDevice device)
      Returns the supported shader formats for this GPU context.
      Parameters:
      device - a GPU context to query.
      Returns:
      a bitflag indicating which shader formats the driver is able to consume.
      Since:
      This function is available since SDL 3.2.0.
    • createGPUComputePipeline

      public SDL_GPUComputePipeline createGPUComputePipeline(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Pointer @Nullable ISDL_GPUComputePipelineCreateInfo createinfo)

      Creates a pipeline object to be used in a compute workflow.

      Shader resource bindings must be authored to follow a particular order depending on the shader format.

      For SPIR-V shaders, use the following resource sets:

      • 0: Sampled textures, followed by read-only storage textures, followed by read-only storage buffers
      • 1: Read-write storage textures, followed by read-write storage buffers
      • 2: Uniform buffers

      For DXBC and DXIL shaders, use the following register order:

      • (t
      invalid reference
      n
      , space0): Sampled textures, followed by read-only storage textures,

      followed by read-only storage buffers

      • (u
      invalid reference
      n
      , space1): Read-write storage textures, followed by read-write

      storage buffers

      • (b
      invalid reference
      n
      , space2): Uniform buffers

      For MSL/metallib, use the following order:

      • [
      invalid reference
      buffer
      ]: Uniform buffers, followed by read-only storage buffers,

      followed by read-write storage buffers

      • [
      invalid reference
      texture
      ]: Sampled textures, followed by read-only storage textures,

      followed by read-write storage textures

      There are optional properties that can be provided through props. These are the supported properties:

      • SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING: a name that can be displayed in debugging tools.
      Parameters:
      device - a GPU Context.
      createinfo - a struct describing the state of the compute pipeline to create.
      Returns:
      a compute pipeline object on success, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createGPUGraphicsPipeline

      public SDL_GPUGraphicsPipeline createGPUGraphicsPipeline(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Pointer @Nullable ISDL_GPUGraphicsPipelineCreateInfo createinfo)

      Creates a pipeline object to be used in a graphics workflow.

      There are optional properties that can be provided through props. These are the supported properties:

      • SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING: a name that can be displayed in debugging tools.
      Parameters:
      device - a GPU Context.
      createinfo - a struct describing the state of the graphics pipeline to create.
      Returns:
      a graphics pipeline object on success, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createGPUSampler

      public SDL_GPUSampler createGPUSampler(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Pointer @Nullable ISDL_GPUSamplerCreateInfo createinfo)

      Creates a sampler object to be used when binding textures in a graphics workflow.

      There are optional properties that can be provided through props. These are the supported properties:

      • SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING: a name that can be displayed in debugging tools.
      Parameters:
      device - a GPU Context.
      createinfo - a struct describing the state of the sampler to create.
      Returns:
      a sampler object on success, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createGPUShader

      public SDL_GPUShader createGPUShader(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Pointer @Nullable ISDL_GPUShaderCreateInfo createinfo)

      Creates a shader to be used when creating a graphics pipeline.

      Shader resource bindings must be authored to follow a particular order depending on the shader format.

      For SPIR-V shaders, use the following resource sets:

      For vertex shaders:

      • 0: Sampled textures, followed by storage textures, followed by storage buffers
      • 1: Uniform buffers

      For fragment shaders:

      • 2: Sampled textures, followed by storage textures, followed by storage buffers
      • 3: Uniform buffers

      For DXBC and DXIL shaders, use the following register order:

      For vertex shaders:

      • (t
      invalid reference
      n
      , space0): Sampled textures, followed by storage textures, followed

      by storage buffers

      • (s
      invalid reference
      n
      , space0): Samplers with indices corresponding to the sampled

      textures

      • (b
      invalid reference
      n
      , space1): Uniform buffers

      For pixel shaders:

      • (t
      invalid reference
      n
      , space2): Sampled textures, followed by storage textures, followed

      by storage buffers

      • (s
      invalid reference
      n
      , space2): Samplers with indices corresponding to the sampled

      textures

      • (b
      invalid reference
      n
      , space3): Uniform buffers

      For MSL/metallib, use the following order:

      • [
      invalid reference
      texture
      ]: Sampled textures, followed by storage textures
      • [
      invalid reference
      sampler
      ]: Samplers with indices corresponding to the sampled textures
      • [
      invalid reference
      buffer
      ]: Uniform buffers, followed by storage buffers. Vertex buffer 0

      is bound at [[buffer(14)]], vertex buffer 1 at [[buffer(15)]], and so on. Rather than manually authoring vertex buffer indices, use the [

      invalid reference
      stage_in
      ] attribute which will automatically use the vertex input

      information from the SDL_GPUGraphicsPipeline.

      Shader semantics other than system-value semantics do not matter in D3D12 and for ease of use the SDL implementation assumes that non system-value semantics will all be TEXCOORD. If you are using HLSL as the shader source language, your vertex semantics should start at TEXCOORD0 and increment like so: TEXCOORD1, TEXCOORD2, etc. If you wish to change the semantic prefix to something other than TEXCOORD you can use SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING with SDL_CreateGPUDeviceWithProperties().

      There are optional properties that can be provided through props. These are the supported properties:

      • SDL_PROP_GPU_SHADER_CREATE_NAME_STRING: a name that can be displayed in debugging tools.
      Parameters:
      device - a GPU Context.
      createinfo - a struct describing the state of the shader to create.
      Returns:
      a shader object on success, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createGPUTexture

      public SDL_GPUTexture createGPUTexture(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Pointer @Nullable ISDL_GPUTextureCreateInfo createinfo)

      Creates a texture object to be used in graphics or compute workflows.

      The contents of this texture are undefined until data is written to the texture.

      Note that certain combinations of usage flags are invalid. For example, a texture cannot have both the SAMPLER and GRAPHICS_STORAGE_READ flags.

      If you request a sample count higher than the hardware supports, the implementation will automatically fall back to the highest available sample count.

      There are optional properties that can be provided through SDL_GPUTextureCreateInfo's props. These are the supported properties:

      • SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT: (Direct3D 12 only) if the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this red intensity. Defaults to zero.
      • SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT: (Direct3D 12 only) if the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this green intensity. Defaults to zero.
      • SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT: (Direct3D 12 only) if the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this blue intensity. Defaults to zero.
      • SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT: (Direct3D 12 only) if the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this alpha intensity. Defaults to zero.
      • SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT: (Direct3D 12 only) if the texture usage is SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET, clear the texture to a depth of this value. Defaults to zero.
      • SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER: (Direct3D 12 only) if the texture usage is SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET, clear the texture to a stencil of this Uint8 value. Defaults to zero.
      • SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING: a name that can be displayed in debugging tools.
      Parameters:
      device - a GPU Context.
      createinfo - a struct describing the state of the texture to create.
      Returns:
      a texture object on success, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createGPUBuffer

      public SDL_GPUBuffer createGPUBuffer(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Pointer @Nullable ISDL_GPUBufferCreateInfo createinfo)

      Creates a buffer object to be used in graphics or compute workflows.

      The contents of this buffer are undefined until data is written to the buffer.

      Note that certain combinations of usage flags are invalid. For example, a buffer cannot have both the VERTEX and INDEX flags.

      If you use a STORAGE flag, the data in the buffer must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

      For better understanding of underlying concepts and memory management with SDL GPU API, you may refer this blog post .

      There are optional properties that can be provided through props. These are the supported properties:

      • SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING: a name that can be displayed in debugging tools.
      Parameters:
      device - a GPU Context.
      createinfo - a struct describing the state of the buffer to create.
      Returns:
      a buffer object on success, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createGPUTransferBuffer

      public SDL_GPUTransferBuffer createGPUTransferBuffer(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Pointer @Nullable ISDL_GPUTransferBufferCreateInfo createinfo)

      Creates a transfer buffer to be used when uploading to or downloading from graphics resources.

      Download buffers can be particularly expensive to create, so it is good practice to reuse them if data will be downloaded regularly.

      There are optional properties that can be provided through props. These are the supported properties:

      • SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING: a name that can be displayed in debugging tools.
      Parameters:
      device - a GPU Context.
      createinfo - a struct describing the state of the transfer buffer to create.
      Returns:
      a transfer buffer on success, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setGPUBufferName

      public void setGPUBufferName(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUBuffer buffer, @Nullable @Nullable BytePtr text)

      Sets an arbitrary string constant to label a buffer.

      You should use SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING with SDL_CreateGPUBuffer instead of this function to avoid thread safety issues.

      Parameters:
      device - a GPU Context.
      buffer - a buffer to attach the name to.
      text - a UTF-8 string constant to mark as the name of the buffer.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setGPUTextureName

      public void setGPUTextureName(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUTexture texture, @Nullable @Nullable BytePtr text)

      Sets an arbitrary string constant to label a texture.

      You should use SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING with SDL_CreateGPUTexture instead of this function to avoid thread safety issues.

      Parameters:
      device - a GPU Context.
      texture - a texture to attach the name to.
      text - a UTF-8 string constant to mark as the name of the texture.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • insertGPUDebugLabel

      public void insertGPUDebugLabel(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @Nullable @Nullable BytePtr text)

      Inserts an arbitrary string label into the command buffer callstream.

      Useful for debugging.

      Parameters:
      command_buffer - a command buffer.
      text - a UTF-8 string constant to insert as the label.
      Since:
      This function is available since SDL 3.2.0.
    • pushGPUDebugGroup

      public void pushGPUDebugGroup(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @Nullable @Nullable BytePtr name)

      Begins a debug group with an arbitary name.

      Used for denoting groups of calls when viewing the command buffer callstream in a graphics debugging tool.

      Each call to SDL_PushGPUDebugGroup must have a corresponding call to SDL_PopGPUDebugGroup.

      On some backends (e.g. Metal), pushing a debug group during a render/blit/compute pass will create a group that is scoped to the native pass rather than the command buffer. For best results, if you push a debug group during a pass, always pop it in the same pass.

      Parameters:
      command_buffer - a command buffer.
      name - a UTF-8 string constant that names the group.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • popGPUDebugGroup

      public void popGPUDebugGroup(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer)
      Ends the most-recently pushed debug group.
      Parameters:
      command_buffer - a command buffer.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • releaseGPUTexture

      public void releaseGPUTexture(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUTexture texture)

      Frees the given texture as soon as it is safe to do so.

      You must not reference the texture after calling this function.

      Parameters:
      device - a GPU context.
      texture - a texture to be destroyed.
      Since:
      This function is available since SDL 3.2.0.
    • releaseGPUSampler

      public void releaseGPUSampler(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUSampler sampler)

      Frees the given sampler as soon as it is safe to do so.

      You must not reference the sampler after calling this function.

      Parameters:
      device - a GPU context.
      sampler - a sampler to be destroyed.
      Since:
      This function is available since SDL 3.2.0.
    • releaseGPUBuffer

      public void releaseGPUBuffer(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUBuffer buffer)

      Frees the given buffer as soon as it is safe to do so.

      You must not reference the buffer after calling this function.

      Parameters:
      device - a GPU context.
      buffer - a buffer to be destroyed.
      Since:
      This function is available since SDL 3.2.0.
    • releaseGPUTransferBuffer

      public void releaseGPUTransferBuffer(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUTransferBuffer transfer_buffer)

      Frees the given transfer buffer as soon as it is safe to do so.

      You must not reference the transfer buffer after calling this function.

      Parameters:
      device - a GPU context.
      transfer_buffer - a transfer buffer to be destroyed.
      Since:
      This function is available since SDL 3.2.0.
    • releaseGPUComputePipeline

      public void releaseGPUComputePipeline(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUComputePipeline compute_pipeline)

      Frees the given compute pipeline as soon as it is safe to do so.

      You must not reference the compute pipeline after calling this function.

      Parameters:
      device - a GPU context.
      compute_pipeline - a compute pipeline to be destroyed.
      Since:
      This function is available since SDL 3.2.0.
    • releaseGPUShader

      public void releaseGPUShader(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUShader shader)

      Frees the given shader as soon as it is safe to do so.

      You must not reference the shader after calling this function.

      Parameters:
      device - a GPU context.
      shader - a shader to be destroyed.
      Since:
      This function is available since SDL 3.2.0.
    • releaseGPUGraphicsPipeline

      public void releaseGPUGraphicsPipeline(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUGraphicsPipeline graphics_pipeline)

      Frees the given graphics pipeline as soon as it is safe to do so.

      You must not reference the graphics pipeline after calling this function.

      Parameters:
      device - a GPU context.
      graphics_pipeline - a graphics pipeline to be destroyed.
      Since:
      This function is available since SDL 3.2.0.
    • acquireGPUCommandBuffer

      public SDL_GPUCommandBuffer acquireGPUCommandBuffer(@Nullable @Nullable SDL_GPUDevice device)

      Acquire a command buffer.

      This command buffer is managed by the implementation and should not be freed by the user. The command buffer may only be used on the thread it was acquired on. The command buffer should be submitted on the thread it was acquired on.

      It is valid to acquire multiple command buffers on the same thread at once. In fact a common design pattern is to acquire two command buffers per frame where one is dedicated to render and compute passes and the other is dedicated to copy passes and other preparatory work such as generating mipmaps. Interleaving commands between the two command buffers reduces the total amount of passes overall which improves rendering performance.

      Parameters:
      device - a GPU context.
      Returns:
      a command buffer, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • pushGPUVertexUniformData

      public void pushGPUVertexUniformData(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @NativeType("Uint32") @Unsigned int slot_index, @Pointer(comment="void*") MemorySegment data, @NativeType("Uint32") @Unsigned int length)

      Pushes data to a vertex uniform slot on the command buffer.

      Subsequent draw calls will use this uniform data.

      The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

      Parameters:
      command_buffer - a command buffer.
      slot_index - the vertex uniform slot to push data to.
      data - client data to write.
      length - the length of the data to write.
      Since:
      This function is available since SDL 3.2.0.
    • pushGPUFragmentUniformData

      public void pushGPUFragmentUniformData(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @NativeType("Uint32") @Unsigned int slot_index, @Pointer(comment="void*") MemorySegment data, @NativeType("Uint32") @Unsigned int length)

      Pushes data to a fragment uniform slot on the command buffer.

      Subsequent draw calls will use this uniform data.

      The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

      Parameters:
      command_buffer - a command buffer.
      slot_index - the fragment uniform slot to push data to.
      data - client data to write.
      length - the length of the data to write.
      Since:
      This function is available since SDL 3.2.0.
    • pushGPUComputeUniformData

      public void pushGPUComputeUniformData(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @NativeType("Uint32") @Unsigned int slot_index, @Pointer(comment="void*") MemorySegment data, @NativeType("Uint32") @Unsigned int length)

      Pushes data to a uniform slot on the command buffer.

      Subsequent draw calls will use this uniform data.

      The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

      Parameters:
      command_buffer - a command buffer.
      slot_index - the uniform slot to push data to.
      data - client data to write.
      length - the length of the data to write.
      Since:
      This function is available since SDL 3.2.0.
    • beginGPURenderPass

      public SDL_GPURenderPass beginGPURenderPass(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @Nullable @Pointer @Nullable ISDL_GPUColorTargetInfo color_target_infos, @NativeType("Uint32") @Unsigned int num_color_targets, @Nullable @Pointer @Nullable ISDL_GPUDepthStencilTargetInfo depth_stencil_target_info)

      Begins a render pass on a command buffer.

      A render pass consists of a set of texture subresources (or depth slices in the 3D texture case) which will be rendered to during the render pass, along with corresponding clear values and load/store operations. All operations related to graphics pipelines must take place inside of a render pass. A default viewport and scissor state are automatically set when this is called. You cannot begin another render pass, or begin a compute pass or copy pass until you have ended the render pass.

      Parameters:
      command_buffer - a command buffer.
      color_target_infos - an array of texture subresources with corresponding clear values and load/store ops.
      num_color_targets - the number of color targets in the color_target_infos array.
      depth_stencil_target_info - a texture subresource with corresponding clear value and load/store ops, may be NULL.
      Returns:
      a render pass handle.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindGPUGraphicsPipeline

      public void bindGPUGraphicsPipeline(@Nullable @Nullable SDL_GPURenderPass render_pass, @Nullable @Nullable SDL_GPUGraphicsPipeline graphics_pipeline)

      Binds a graphics pipeline on a render pass to be used in rendering.

      A graphics pipeline must be bound before making any draw calls.

      Parameters:
      render_pass - a render pass handle.
      graphics_pipeline - the graphics pipeline to bind.
      Since:
      This function is available since SDL 3.2.0.
    • setGPUViewport

      public void setGPUViewport(@Nullable @Nullable SDL_GPURenderPass render_pass, @Nullable @Pointer @Nullable ISDL_GPUViewport viewport)
      Sets the current viewport state on a command buffer.
      Parameters:
      render_pass - a render pass handle.
      viewport - the viewport to set.
      Since:
      This function is available since SDL 3.2.0.
    • setGPUScissor

      public void setGPUScissor(@Nullable @Nullable SDL_GPURenderPass render_pass, @Nullable @Pointer @Nullable ISDL_Rect scissor)
      Sets the current scissor state on a command buffer.
      Parameters:
      render_pass - a render pass handle.
      scissor - the scissor area to set.
      Since:
      This function is available since SDL 3.2.0.
    • setGPUBlendConstants

      public void setGPUBlendConstants(@Nullable @Nullable SDL_GPURenderPass render_pass, SDL_FColor blend_constants)
      Sets the current blend constants on a command buffer.
      Parameters:
      render_pass - a render pass handle.
      blend_constants - the blend constant color.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
      • invalid reference
        #CONSTANT_COLOR
      • invalid reference
        #ONE_MINUS_CONSTANT_COLOR
    • setGPUStencilReference

      public void setGPUStencilReference(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint8") @Unsigned byte reference)
      Sets the current stencil reference value on a command buffer.
      Parameters:
      render_pass - a render pass handle.
      reference - the stencil reference value to set.
      Since:
      This function is available since SDL 3.2.0.
    • bindGPUVertexBuffers

      public void bindGPUVertexBuffers(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer @Nullable ISDL_GPUBufferBinding bindings, @NativeType("Uint32") @Unsigned int num_bindings)
      Binds vertex buffers on a command buffer for use with subsequent draw calls.
      Parameters:
      render_pass - a render pass handle.
      first_slot - the vertex buffer slot to begin binding from.
      bindings - an array of SDL_GPUBufferBinding structs containing vertex buffers and offset values.
      num_bindings - the number of bindings in the bindings array.
      Since:
      This function is available since SDL 3.2.0.
    • bindGPUIndexBuffer

      public void bindGPUIndexBuffer(@Nullable @Nullable SDL_GPURenderPass render_pass, @Nullable @Pointer @Nullable ISDL_GPUBufferBinding binding, @EnumType(SDL_GPUIndexElementSize.class) int index_element_size)
      Binds an index buffer on a command buffer for use with subsequent draw calls.
      Parameters:
      render_pass - a render pass handle.
      binding - a pointer to a struct containing an index buffer and offset.
      index_element_size - whether the index values in the buffer are 16- or 32-bit.
      Since:
      This function is available since SDL 3.2.0.
    • bindGPUVertexSamplers

      public void bindGPUVertexSamplers(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer @Nullable ISDL_GPUTextureSamplerBinding texture_sampler_bindings, @NativeType("Uint32") @Unsigned int num_bindings)

      Binds texture-sampler pairs for use on the vertex shader.

      The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.

      Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

      Parameters:
      render_pass - a render pass handle.
      first_slot - the vertex sampler slot to begin binding from.
      texture_sampler_bindings - an array of texture-sampler binding structs.
      num_bindings - the number of texture-sampler pairs to bind from the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindGPUVertexStorageTextures

      public void bindGPUVertexStorageTextures(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer SDL_GPUTexture.Ptr storage_textures, @NativeType("Uint32") @Unsigned int num_bindings)

      Binds storage textures for use on the vertex shader.

      These textures must have been created with SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.

      Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

      Parameters:
      render_pass - a render pass handle.
      first_slot - the vertex storage texture slot to begin binding from.
      storage_textures - an array of storage textures.
      num_bindings - the number of storage texture to bind from the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindGPUVertexStorageBuffers

      public void bindGPUVertexStorageBuffers(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer SDL_GPUBuffer.Ptr storage_buffers, @NativeType("Uint32") @Unsigned int num_bindings)

      Binds storage buffers for use on the vertex shader.

      These buffers must have been created with SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.

      Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

      Parameters:
      render_pass - a render pass handle.
      first_slot - the vertex storage buffer slot to begin binding from.
      storage_buffers - an array of buffers.
      num_bindings - the number of buffers to bind from the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindGPUFragmentSamplers

      public void bindGPUFragmentSamplers(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer @Nullable ISDL_GPUTextureSamplerBinding texture_sampler_bindings, @NativeType("Uint32") @Unsigned int num_bindings)

      Binds texture-sampler pairs for use on the fragment shader.

      The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.

      Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

      Parameters:
      render_pass - a render pass handle.
      first_slot - the fragment sampler slot to begin binding from.
      texture_sampler_bindings - an array of texture-sampler binding structs.
      num_bindings - the number of texture-sampler pairs to bind from the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindGPUFragmentStorageTextures

      public void bindGPUFragmentStorageTextures(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer SDL_GPUTexture.Ptr storage_textures, @NativeType("Uint32") @Unsigned int num_bindings)

      Binds storage textures for use on the fragment shader.

      These textures must have been created with SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.

      Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

      Parameters:
      render_pass - a render pass handle.
      first_slot - the fragment storage texture slot to begin binding from.
      storage_textures - an array of storage textures.
      num_bindings - the number of storage textures to bind from the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindGPUFragmentStorageBuffers

      public void bindGPUFragmentStorageBuffers(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer SDL_GPUBuffer.Ptr storage_buffers, @NativeType("Uint32") @Unsigned int num_bindings)

      Binds storage buffers for use on the fragment shader.

      These buffers must have been created with SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.

      Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

      Parameters:
      render_pass - a render pass handle.
      first_slot - the fragment storage buffer slot to begin binding from.
      storage_buffers - an array of storage buffers.
      num_bindings - the number of storage buffers to bind from the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • drawGPUIndexedPrimitives

      public void drawGPUIndexedPrimitives(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint32") @Unsigned int num_indices, @NativeType("Uint32") @Unsigned int num_instances, @NativeType("Uint32") @Unsigned int first_index, @NativeType("Sint32") int vertex_offset, @NativeType("Uint32") @Unsigned int first_instance)

      Draws data using bound graphics state with an index buffer and instancing enabled.

      You must not call this function before binding a graphics pipeline.

      Note that the first_vertex and first_instance parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

      Parameters:
      render_pass - a render pass handle.
      num_indices - the number of indices to draw per instance.
      num_instances - the number of instances to draw.
      first_index - the starting index within the index buffer.
      vertex_offset - value added to vertex index before indexing into the vertex buffer.
      first_instance - the ID of the first instance to draw.
      Since:
      This function is available since SDL 3.2.0.
    • drawGPUPrimitives

      public void drawGPUPrimitives(@Nullable @Nullable SDL_GPURenderPass render_pass, @NativeType("Uint32") @Unsigned int num_vertices, @NativeType("Uint32") @Unsigned int num_instances, @NativeType("Uint32") @Unsigned int first_vertex, @NativeType("Uint32") @Unsigned int first_instance)

      Draws data using bound graphics state.

      You must not call this function before binding a graphics pipeline.

      Note that the first_vertex and first_instance parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

      Parameters:
      render_pass - a render pass handle.
      num_vertices - the number of vertices to draw.
      num_instances - the number of instances that will be drawn.
      first_vertex - the index of the first vertex to draw.
      first_instance - the ID of the first instance to draw.
      Since:
      This function is available since SDL 3.2.0.
    • drawGPUPrimitivesIndirect

      public void drawGPUPrimitivesIndirect(@Nullable @Nullable SDL_GPURenderPass render_pass, @Nullable @Nullable SDL_GPUBuffer buffer, @NativeType("Uint32") @Unsigned int offset, @NativeType("Uint32") @Unsigned int draw_count)

      Draws data using bound graphics state and with draw parameters set from a buffer.

      The buffer must consist of tightly-packed draw parameter sets that each match the layout of SDL_GPUIndirectDrawCommand. You must not call this function before binding a graphics pipeline.

      Parameters:
      render_pass - a render pass handle.
      buffer - a buffer containing draw parameters.
      offset - the offset to start reading from the draw buffer.
      draw_count - the number of draw parameter sets that should be read from the draw buffer.
      Since:
      This function is available since SDL 3.2.0.
    • drawGPUIndexedPrimitivesIndirect

      public void drawGPUIndexedPrimitivesIndirect(@Nullable @Nullable SDL_GPURenderPass render_pass, @Nullable @Nullable SDL_GPUBuffer buffer, @NativeType("Uint32") @Unsigned int offset, @NativeType("Uint32") @Unsigned int draw_count)

      Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer.

      The buffer must consist of tightly-packed draw parameter sets that each match the layout of SDL_GPUIndexedIndirectDrawCommand. You must not call this function before binding a graphics pipeline.

      Parameters:
      render_pass - a render pass handle.
      buffer - a buffer containing draw parameters.
      offset - the offset to start reading from the draw buffer.
      draw_count - the number of draw parameter sets that should be read from the draw buffer.
      Since:
      This function is available since SDL 3.2.0.
    • endGPURenderPass

      public void endGPURenderPass(@Nullable @Nullable SDL_GPURenderPass render_pass)

      Ends the given render pass.

      All bound graphics state on the render pass command buffer is unset. The render pass handle is now invalid.

      Parameters:
      render_pass - a render pass handle.
      Since:
      This function is available since SDL 3.2.0.
    • beginGPUComputePass

      public SDL_GPUComputePass beginGPUComputePass(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @Nullable @Pointer @Nullable ISDL_GPUStorageTextureReadWriteBinding storage_texture_bindings, @NativeType("Uint32") @Unsigned int num_storage_texture_bindings, @Nullable @Pointer @Nullable ISDL_GPUStorageBufferReadWriteBinding storage_buffer_bindings, @NativeType("Uint32") @Unsigned int num_storage_buffer_bindings)

      Begins a compute pass on a command buffer.

      A compute pass is defined by a set of texture subresources and buffers that may be written to by compute pipelines. These textures and buffers must have been created with the COMPUTE_STORAGE_WRITE bit or the COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE bit. If you do not create a texture with COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE, you must not read from the texture in the compute pass. All operations related to compute pipelines must take place inside of a compute pass. You must not begin another compute pass, or a render pass or copy pass before ending the compute pass.

      A VERY IMPORTANT NOTE - Reads and writes in compute passes are NOT implicitly synchronized. This means you may cause data races by both reading and writing a resource region in a compute pass, or by writing multiple times to a resource region. If your compute work depends on reading the completed output from a previous dispatch, you MUST end the current compute pass and begin a new one before you can safely access the data. Otherwise you will receive unexpected results. Reading and writing a texture in the same compute pass is only supported by specific texture formats. Make sure you check the format support!

      Parameters:
      command_buffer - a command buffer.
      storage_texture_bindings - an array of writeable storage texture binding structs.
      num_storage_texture_bindings - the number of storage textures to bind from the array.
      storage_buffer_bindings - an array of writeable storage buffer binding structs.
      num_storage_buffer_bindings - the number of storage buffers to bind from the array.
      Returns:
      a compute pass handle.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindGPUComputePipeline

      public void bindGPUComputePipeline(@Nullable @Nullable SDL_GPUComputePass compute_pass, @Nullable @Nullable SDL_GPUComputePipeline compute_pipeline)
      Binds a compute pipeline on a command buffer for use in compute dispatch.
      Parameters:
      compute_pass - a compute pass handle.
      compute_pipeline - a compute pipeline to bind.
      Since:
      This function is available since SDL 3.2.0.
    • bindGPUComputeSamplers

      public void bindGPUComputeSamplers(@Nullable @Nullable SDL_GPUComputePass compute_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer @Nullable ISDL_GPUTextureSamplerBinding texture_sampler_bindings, @NativeType("Uint32") @Unsigned int num_bindings)

      Binds texture-sampler pairs for use on the compute shader.

      The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.

      Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

      Parameters:
      compute_pass - a compute pass handle.
      first_slot - the compute sampler slot to begin binding from.
      texture_sampler_bindings - an array of texture-sampler binding structs.
      num_bindings - the number of texture-sampler bindings to bind from the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindGPUComputeStorageTextures

      public void bindGPUComputeStorageTextures(@Nullable @Nullable SDL_GPUComputePass compute_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer SDL_GPUTexture.Ptr storage_textures, @NativeType("Uint32") @Unsigned int num_bindings)

      Binds storage textures as readonly for use on the compute pipeline.

      These textures must have been created with SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ.

      Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

      Parameters:
      compute_pass - a compute pass handle.
      first_slot - the compute storage texture slot to begin binding from.
      storage_textures - an array of storage textures.
      num_bindings - the number of storage textures to bind from the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • bindGPUComputeStorageBuffers

      public void bindGPUComputeStorageBuffers(@Nullable @Nullable SDL_GPUComputePass compute_pass, @NativeType("Uint32") @Unsigned int first_slot, @Nullable @Pointer SDL_GPUBuffer.Ptr storage_buffers, @NativeType("Uint32") @Unsigned int num_bindings)

      Binds storage buffers as readonly for use on the compute pipeline.

      These buffers must have been created with SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.

      Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

      Parameters:
      compute_pass - a compute pass handle.
      first_slot - the compute storage buffer slot to begin binding from.
      storage_buffers - an array of storage buffer binding structs.
      num_bindings - the number of storage buffers to bind from the array.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • dispatchGPUCompute

      public void dispatchGPUCompute(@Nullable @Nullable SDL_GPUComputePass compute_pass, @NativeType("Uint32") @Unsigned int groupcount_x, @NativeType("Uint32") @Unsigned int groupcount_y, @NativeType("Uint32") @Unsigned int groupcount_z)

      Dispatches compute work.

      You must not call this function before binding a compute pipeline.

      A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and the dispatches write to the same resource region as each other, there is no guarantee of which order the writes will occur. If the write order matters, you MUST end the compute pass and begin another one.

      Parameters:
      compute_pass - a compute pass handle.
      groupcount_x - number of local workgroups to dispatch in the X dimension.
      groupcount_y - number of local workgroups to dispatch in the Y dimension.
      groupcount_z - number of local workgroups to dispatch in the Z dimension.
      Since:
      This function is available since SDL 3.2.0.
    • dispatchGPUComputeIndirect

      public void dispatchGPUComputeIndirect(@Nullable @Nullable SDL_GPUComputePass compute_pass, @Nullable @Nullable SDL_GPUBuffer buffer, @NativeType("Uint32") @Unsigned int offset)

      Dispatches compute work with parameters set from a buffer.

      The buffer layout should match the layout of SDL_GPUIndirectDispatchCommand. You must not call this function before binding a compute pipeline.

      A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and the dispatches write to the same resource region as each other, there is no guarantee of which order the writes will occur. If the write order matters, you MUST end the compute pass and begin another one.

      Parameters:
      compute_pass - a compute pass handle.
      buffer - a buffer containing dispatch parameters.
      offset - the offset to start reading from the dispatch buffer.
      Since:
      This function is available since SDL 3.2.0.
    • endGPUComputePass

      public void endGPUComputePass(@Nullable @Nullable SDL_GPUComputePass compute_pass)

      Ends the current compute pass.

      All bound compute state on the command buffer is unset. The compute pass handle is now invalid.

      Parameters:
      compute_pass - a compute pass handle.
      Since:
      This function is available since SDL 3.2.0.
    • mapGPUTransferBuffer

      @Pointer(comment="void*") public MemorySegment mapGPUTransferBuffer(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUTransferBuffer transfer_buffer, @NativeType("boolean") boolean cycle)

      Maps a transfer buffer into application address space.

      You must unmap the transfer buffer before encoding upload commands. The memory is owned by the graphics driver - do NOT call SDL_free() on the returned pointer.

      Parameters:
      device - a GPU context.
      transfer_buffer - a transfer buffer.
      cycle - if true, cycles the transfer buffer if it is already bound.
      Returns:
      the address of the mapped transfer buffer memory, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • unmapGPUTransferBuffer

      public void unmapGPUTransferBuffer(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUTransferBuffer transfer_buffer)
      Unmaps a previously mapped transfer buffer.
      Parameters:
      device - a GPU context.
      transfer_buffer - a previously mapped transfer buffer.
      Since:
      This function is available since SDL 3.2.0.
    • beginGPUCopyPass

      public SDL_GPUCopyPass beginGPUCopyPass(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer)

      Begins a copy pass on a command buffer.

      All operations related to copying to or from buffers or textures take place inside a copy pass. You must not begin another copy pass, or a render pass or compute pass before ending the copy pass.

      Parameters:
      command_buffer - a command buffer.
      Returns:
      a copy pass handle.
      Since:
      This function is available since SDL 3.2.0.
    • uploadToGPUTexture

      public void uploadToGPUTexture(@Nullable @Nullable SDL_GPUCopyPass copy_pass, @Nullable @Pointer @Nullable ISDL_GPUTextureTransferInfo source, @Nullable @Pointer @Nullable ISDL_GPUTextureRegion destination, @NativeType("boolean") boolean cycle)

      Uploads data from a transfer buffer to a texture.

      The upload occurs on the GPU timeline. You may assume that the upload has finished in subsequent commands.

      You must align the data in the transfer buffer to a multiple of the texel size of the texture format.

      Parameters:
      copy_pass - a copy pass handle.
      source - the source transfer buffer with image layout information.
      destination - the destination texture region.
      cycle - if true, cycles the texture if the texture is bound, otherwise overwrites the data.
      Since:
      This function is available since SDL 3.2.0.
    • uploadToGPUBuffer

      public void uploadToGPUBuffer(@Nullable @Nullable SDL_GPUCopyPass copy_pass, @Nullable @Pointer @Nullable ISDL_GPUTransferBufferLocation source, @Nullable @Pointer @Nullable ISDL_GPUBufferRegion destination, @NativeType("boolean") boolean cycle)

      Uploads data from a transfer buffer to a buffer.

      The upload occurs on the GPU timeline. You may assume that the upload has finished in subsequent commands.

      Parameters:
      copy_pass - a copy pass handle.
      source - the source transfer buffer with offset.
      destination - the destination buffer with offset and size.
      cycle - if true, cycles the buffer if it is already bound, otherwise overwrites the data.
      Since:
      This function is available since SDL 3.2.0.
    • copyGPUTextureToTexture

      public void copyGPUTextureToTexture(@Nullable @Nullable SDL_GPUCopyPass copy_pass, @Nullable @Pointer @Nullable ISDL_GPUTextureLocation source, @Nullable @Pointer @Nullable ISDL_GPUTextureLocation destination, @NativeType("Uint32") @Unsigned int w, @NativeType("Uint32") @Unsigned int h, @NativeType("Uint32") @Unsigned int d, @NativeType("boolean") boolean cycle)

      Performs a texture-to-texture copy.

      This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.

      Parameters:
      copy_pass - a copy pass handle.
      source - a source texture region.
      destination - a destination texture region.
      w - the width of the region to copy.
      h - the height of the region to copy.
      d - the depth of the region to copy.
      cycle - if true, cycles the destination texture if the destination texture is bound, otherwise overwrites the data.
      Since:
      This function is available since SDL 3.2.0.
    • copyGPUBufferToBuffer

      public void copyGPUBufferToBuffer(@Nullable @Nullable SDL_GPUCopyPass copy_pass, @Nullable @Pointer @Nullable ISDL_GPUBufferLocation source, @Nullable @Pointer @Nullable ISDL_GPUBufferLocation destination, @NativeType("Uint32") @Unsigned int size, @NativeType("boolean") boolean cycle)

      Performs a buffer-to-buffer copy.

      This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.

      Parameters:
      copy_pass - a copy pass handle.
      source - the buffer and offset to copy from.
      destination - the buffer and offset to copy to.
      size - the length of the buffer to copy.
      cycle - if true, cycles the destination buffer if it is already bound, otherwise overwrites the data.
      Since:
      This function is available since SDL 3.2.0.
    • downloadFromGPUTexture

      public void downloadFromGPUTexture(@Nullable @Nullable SDL_GPUCopyPass copy_pass, @Nullable @Pointer @Nullable ISDL_GPUTextureRegion source, @Nullable @Pointer @Nullable ISDL_GPUTextureTransferInfo destination)

      Copies data from a texture to a transfer buffer on the GPU timeline.

      This data is not guaranteed to be copied until the command buffer fence is signaled.

      Parameters:
      copy_pass - a copy pass handle.
      source - the source texture region.
      destination - the destination transfer buffer with image layout information.
      Since:
      This function is available since SDL 3.2.0.
    • downloadFromGPUBuffer

      public void downloadFromGPUBuffer(@Nullable @Nullable SDL_GPUCopyPass copy_pass, @Nullable @Pointer @Nullable ISDL_GPUBufferRegion source, @Nullable @Pointer @Nullable ISDL_GPUTransferBufferLocation destination)

      Copies data from a buffer to a transfer buffer on the GPU timeline.

      This data is not guaranteed to be copied until the command buffer fence is signaled.

      Parameters:
      copy_pass - a copy pass handle.
      source - the source buffer with offset and size.
      destination - the destination transfer buffer with offset.
      Since:
      This function is available since SDL 3.2.0.
    • endGPUCopyPass

      public void endGPUCopyPass(@Nullable @Nullable SDL_GPUCopyPass copy_pass)
      Ends the current copy pass.
      Parameters:
      copy_pass - a copy pass handle.
      Since:
      This function is available since SDL 3.2.0.
    • generateMipmapsForGPUTexture

      public void generateMipmapsForGPUTexture(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @Nullable @Nullable SDL_GPUTexture texture)

      Generates mipmaps for the given texture.

      This function must not be called inside of any pass.

      Parameters:
      command_buffer - a command_buffer.
      texture - a texture with more than 1 mip level.
      Since:
      This function is available since SDL 3.2.0.
    • blitGPUTexture

      public void blitGPUTexture(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @Nullable @Pointer @Nullable ISDL_GPUBlitInfo info)

      Blits from a source texture region to a destination texture region.

      This function must not be called inside of any pass.

      Parameters:
      command_buffer - a command buffer.
      info - the blit info struct containing the blit parameters.
      Since:
      This function is available since SDL 3.2.0.
    • windowSupportsGPUSwapchainComposition

      @NativeType("boolean") public boolean windowSupportsGPUSwapchainComposition(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_Window window, @EnumType(SDL_GPUSwapchainComposition.class) int swapchain_composition)

      Determines whether a swapchain composition is supported by the window.

      The window must be claimed before calling this function.

      Parameters:
      device - a GPU context.
      window - an SDL_Window.
      swapchain_composition - the swapchain composition to check.
      Returns:
      true if supported, false if unsupported.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • windowSupportsGPUPresentMode

      @NativeType("boolean") public boolean windowSupportsGPUPresentMode(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_Window window, @EnumType(SDL_GPUPresentMode.class) int present_mode)

      Determines whether a presentation mode is supported by the window.

      The window must be claimed before calling this function.

      Parameters:
      device - a GPU context.
      window - an SDL_Window.
      present_mode - the presentation mode to check.
      Returns:
      true if supported, false if unsupported.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • claimWindowForGPUDevice

      @NativeType("boolean") public boolean claimWindowForGPUDevice(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_Window window)

      Claims a window, creating a swapchain structure for it.

      This must be called before SDL_AcquireGPUSwapchainTexture is called using the window. You should only call this function from the thread that created the window.

      The swapchain will be created with SDL_GPU_SWAPCHAINCOMPOSITION_SDR and SDL_GPU_PRESENTMODE_VSYNC. If you want to have different swapchain parameters, you must call SDL_SetGPUSwapchainParameters after claiming the window.

      Parameters:
      device - a GPU context.
      window - an SDL_Window.
      Returns:
      true on success, or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • releaseWindowFromGPUDevice

      public void releaseWindowFromGPUDevice(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_Window window)
      Unclaims a window, destroying its swapchain structure.
      Parameters:
      device - a GPU context.
      window - an SDL_Window that has been claimed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setGPUSwapchainParameters

      @NativeType("boolean") public boolean setGPUSwapchainParameters(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_Window window, @EnumType(SDL_GPUSwapchainComposition.class) int swapchain_composition, @EnumType(SDL_GPUPresentMode.class) int present_mode)

      Changes the swapchain parameters for the given claimed window.

      This function will fail if the requested present mode or swapchain composition are unsupported by the device. Check if the parameters are supported via SDL_WindowSupportsGPUPresentMode / SDL_WindowSupportsGPUSwapchainComposition prior to calling this function.

      SDL_GPU_PRESENTMODE_VSYNC with SDL_GPU_SWAPCHAINCOMPOSITION_SDR are always supported.

      Parameters:
      device - a GPU context.
      window - an SDL_Window that has been claimed.
      swapchain_composition - the desired composition of the swapchain.
      present_mode - the desired present mode for the swapchain.
      Returns:
      true if successful, false on error; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setGPUAllowedFramesInFlight

      @NativeType("boolean") public boolean setGPUAllowedFramesInFlight(@Nullable @Nullable SDL_GPUDevice device, @NativeType("Uint32") @Unsigned int allowed_frames_in_flight)

      Configures the maximum allowed number of frames in flight.

      The default value when the device is created is 2. This means that after you have submitted 2 frames for presentation, if the GPU has not finished working on the first frame, SDL_AcquireGPUSwapchainTexture() will fill the swapchain texture pointer with NULL, and SDL_WaitAndAcquireGPUSwapchainTexture() will block.

      Higher values increase throughput at the expense of visual latency. Lower values decrease visual latency at the expense of throughput.

      Note that calling this function will stall and flush the command queue to prevent synchronization issues.

      The minimum value of allowed frames in flight is 1, and the maximum is 3.

      Parameters:
      device - a GPU context.
      allowed_frames_in_flight - the maximum number of frames that can be pending on the GPU.
      Returns:
      true if successful, false on error; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getGPUSwapchainTextureFormat

      @EnumType(SDL_GPUTextureFormat.class) public int getGPUSwapchainTextureFormat(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_Window window)

      Obtains the texture format of the swapchain for the given window.

      Note that this format can change if the swapchain parameters change.

      Parameters:
      device - a GPU context.
      window - an SDL_Window that has been claimed.
      Returns:
      the texture format of the swapchain.
      Since:
      This function is available since SDL 3.2.0.
    • acquireGPUSwapchainTexture

      @NativeType("boolean") public boolean acquireGPUSwapchainTexture(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @Nullable @Nullable SDL_Window window, @Nullable @Pointer SDL_GPUTexture.Ptr swapchain_texture, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr swapchain_texture_width, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr swapchain_texture_height)

      Acquire a texture to use in presentation.

      When a swapchain texture is acquired on a command buffer, it will automatically be submitted for presentation when the command buffer is submitted. The swapchain texture should only be referenced by the command buffer used to acquire it.

      This function will fill the swapchain texture handle with NULL if too many frames are in flight. This is not an error.

      If you use this function, it is possible to create a situation where many command buffers are allocated while the rendering context waits for the GPU to catch up, which will cause memory usage to grow. You should use SDL_WaitAndAcquireGPUSwapchainTexture() unless you know what you are doing with timing.

      The swapchain texture is managed by the implementation and must not be freed by the user. You MUST NOT call this function from any thread other than the one that created the window.

      Parameters:
      command_buffer - a command buffer.
      window - a window that has been claimed.
      swapchain_texture - a pointer filled in with a swapchain texture handle.
      swapchain_texture_width - a pointer filled in with the swapchain texture width, may be NULL.
      swapchain_texture_height - a pointer filled in with the swapchain texture height, may be NULL.
      Returns:
      true on success, false on error; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitForGPUSwapchain

      @NativeType("boolean") public boolean waitForGPUSwapchain(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_Window window)
      Blocks the thread until a swapchain texture is available to be acquired.
      Parameters:
      device - a GPU context.
      window - a window that has been claimed.
      Returns:
      true on success, false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitAndAcquireGPUSwapchainTexture

      @NativeType("boolean") public boolean waitAndAcquireGPUSwapchainTexture(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer, @Nullable @Nullable SDL_Window window, @Nullable @Pointer SDL_GPUTexture.Ptr swapchain_texture, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr swapchain_texture_width, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr swapchain_texture_height)

      Blocks the thread until a swapchain texture is available to be acquired, and then acquires it.

      When a swapchain texture is acquired on a command buffer, it will automatically be submitted for presentation when the command buffer is submitted. The swapchain texture should only be referenced by the command buffer used to acquire it. It is an error to call SDL_CancelGPUCommandBuffer() after a swapchain texture is acquired.

      This function can fill the swapchain texture handle with NULL in certain cases, for example if the window is minimized. This is not an error. You should always make sure to check whether the pointer is NULL before actually using it.

      The swapchain texture is managed by the implementation and must not be freed by the user. You MUST NOT call this function from any thread other than the one that created the window.

      The swapchain texture is write-only and cannot be used as a sampler or for another reading operation.

      Parameters:
      command_buffer - a command buffer.
      window - a window that has been claimed.
      swapchain_texture - a pointer filled in with a swapchain texture handle.
      swapchain_texture_width - a pointer filled in with the swapchain texture width, may be NULL.
      swapchain_texture_height - a pointer filled in with the swapchain texture height, may be NULL.
      Returns:
      true on success, false on error; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • submitGPUCommandBuffer

      @NativeType("boolean") public boolean submitGPUCommandBuffer(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer)

      Submits a command buffer so its commands can be processed on the GPU.

      It is invalid to use the command buffer after this is called.

      This must be called from the thread the command buffer was acquired on.

      All commands in the submission are guaranteed to begin executing before any command in a subsequent submission begins executing.

      Parameters:
      command_buffer - a command buffer.
      Returns:
      true on success, false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • submitGPUCommandBufferAndAcquireFence

      public SDL_GPUFence submitGPUCommandBufferAndAcquireFence(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer)

      Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated with the command buffer.

      You must release this fence when it is no longer needed or it will cause a leak. It is invalid to use the command buffer after this is called.

      This must be called from the thread the command buffer was acquired on.

      All commands in the submission are guaranteed to begin executing before any command in a subsequent submission begins executing.

      Parameters:
      command_buffer - a command buffer.
      Returns:
      a fence associated with the command buffer, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • cancelGPUCommandBuffer

      @NativeType("boolean") public boolean cancelGPUCommandBuffer(@Nullable @Nullable SDL_GPUCommandBuffer command_buffer)

      Cancels a command buffer.

      None of the enqueued commands are executed.

      It is an error to call this function after a swapchain texture has been acquired.

      This must be called from the thread the command buffer was acquired on.

      You must not reference the command buffer after calling this function.

      Parameters:
      command_buffer - a command buffer.
      Returns:
      true on success, false on error; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitForGPUIdle

      @NativeType("boolean") public boolean waitForGPUIdle(@Nullable @Nullable SDL_GPUDevice device)
      Blocks the thread until the GPU is completely idle.
      Parameters:
      device - a GPU context.
      Returns:
      true on success, false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitForGPUFences

      @NativeType("boolean") public boolean waitForGPUFences(@Nullable @Nullable SDL_GPUDevice device, @NativeType("boolean") boolean wait_all, @Nullable @Pointer SDL_GPUFence.Ptr fences, @NativeType("Uint32") @Unsigned int num_fences)
      Blocks the thread until the given fences are signaled.
      Parameters:
      device - a GPU context.
      wait_all - if 0, wait for any fence to be signaled, if 1, wait for all fences to be signaled.
      fences - an array of fences to wait on.
      num_fences - the number of fences in the fences array.
      Returns:
      true on success, false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • queryGPUFence

      @NativeType("boolean") public boolean queryGPUFence(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUFence fence)
      Checks the status of a fence.
      Parameters:
      device - a GPU context.
      fence - a fence.
      Returns:
      true if the fence is signaled, false if it is not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • releaseGPUFence

      public void releaseGPUFence(@Nullable @Nullable SDL_GPUDevice device, @Nullable @Nullable SDL_GPUFence fence)

      Releases a fence obtained from SDL_SubmitGPUCommandBufferAndAcquireFence.

      You must not reference the fence after calling this function.

      Parameters:
      device - a GPU context.
      fence - a fence.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GPUTextureFormatTexelBlockSize

      @NativeType("Uint32") @Unsigned public int GPUTextureFormatTexelBlockSize(@EnumType(SDL_GPUTextureFormat.class) int format)
      Obtains the texel block size for a texture format.
      Parameters:
      format - the texture format you want to know the texel size of.
      Returns:
      the texel block size of the texture format.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GPUTextureSupportsFormat

      @NativeType("boolean") public boolean GPUTextureSupportsFormat(@Nullable @Nullable SDL_GPUDevice device, @EnumType(SDL_GPUTextureFormat.class) int format, @EnumType(SDL_GPUTextureType.class) int type, @EnumType(SDL_GPUTextureUsageFlags.class) int usage)
      Determines whether a texture format is supported for a given type and usage.
      Parameters:
      device - a GPU context.
      format - the texture format to check.
      type - the type of texture (2D, 3D, Cube).
      usage - a bitmask of all usage scenarios to check.
      Returns:
      whether the texture format is supported for this type and usage.
      Since:
      This function is available since SDL 3.2.0.
    • GPUTextureSupportsSampleCount

      @NativeType("boolean") public boolean GPUTextureSupportsSampleCount(@Nullable @Nullable SDL_GPUDevice device, @EnumType(SDL_GPUTextureFormat.class) int format, @EnumType(SDL_GPUSampleCount.class) int sample_count)
      Determines if a sample count for a texture format is supported.
      Parameters:
      device - a GPU context.
      format - the texture format to check.
      sample_count - the sample count to check.
      Returns:
      whether the sample count is supported for this texture format.
      Since:
      This function is available since SDL 3.2.0.
    • calculateGPUTextureFormatSize

      @NativeType("Uint32") @Unsigned public int calculateGPUTextureFormatSize(@EnumType(SDL_GPUTextureFormat.class) int format, @NativeType("Uint32") @Unsigned int width, @NativeType("Uint32") @Unsigned int height, @NativeType("Uint32") @Unsigned int depth_or_layer_count)
      Calculate the size in bytes of a texture format with dimensions.
      Parameters:
      format - a texture format.
      width - width in pixels.
      height - height in pixels.
      depth_or_layer_count - depth for 3D textures or layer count otherwise.
      Returns:
      the size of a texture with this format and dimensions.
      Since:
      This function is available since SDL 3.2.0.
    • GDKSuspendGPU

      public void GDKSuspendGPU(@Nullable @Nullable SDL_GPUDevice device)

      Call this to suspend GPU operation on Xbox when you receive the SDL_EVENT_DID_ENTER_BACKGROUND event.

      Do NOT call any SDL_GPU functions after calling this function! This must also be called before calling SDL_GDKSuspendComplete.

      Parameters:
      device - a GPU context.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GDKResumeGPU

      public void GDKResumeGPU(@Nullable @Nullable SDL_GPUDevice device)

      Call this to resume GPU operation on Xbox when you receive the SDL_EVENT_WILL_ENTER_FOREGROUND event.

      When resuming, this function MUST be called before calling any other SDL_GPU functions.

      Parameters:
      device - a GPU context.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GUIDToString

      public void GUIDToString(SDL_GUID guid, @Nullable @Nullable BytePtr pszGUID, int cbGUID)
      Get an ASCII string representation for a given SDL_GUID.
      Parameters:
      guid - the SDL_GUID you wish to convert to string.
      pszGUID - buffer in which to write the ASCII string.
      cbGUID - the size of pszGUID, should be at least 33 bytes.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • stringToGUID

      public SDL_GUID stringToGUID(@Nullable @Nullable BytePtr pchGUID)

      Convert a GUID string into a SDL_GUID structure.

      Performs no error checking. If this function is given a string containing an invalid GUID, the function will silently succeed, but the GUID generated will not be useful.

      Parameters:
      pchGUID - string containing an ASCII representation of a GUID.
      Returns:
      a SDL_GUID structure.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getHaptics

      @Pointer(comment="SDL_HapticID") @Unsigned public IntPtr getHaptics(@Nullable @Nullable IntPtr count)
      Get a list of currently connected haptic devices.
      Parameters:
      count - a pointer filled in with the number of haptic devices returned, may be NULL.
      Returns:
      a 0 terminated array of haptic device instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getHapticNameForID

      public BytePtr getHapticNameForID(@NativeType("SDL_HapticID") @Unsigned int instance_id)

      Get the implementation dependent name of a haptic device.

      This can be called before any haptic devices are opened.

      Parameters:
      instance_id - the haptic device instance ID.
      Returns:
      the name of the selected haptic device. If no name can be found, this function returns NULL; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openHaptic

      public SDL_Haptic openHaptic(@NativeType("SDL_HapticID") @Unsigned int instance_id)

      Open a haptic device for use.

      The index passed as an argument refers to the N'th haptic device on this system.

      When opening a haptic device, its gain will be set to maximum and autocenter will be disabled. To modify these values use SDL_SetHapticGain() and SDL_SetHapticAutocenter().

      Parameters:
      instance_id - the haptic device instance ID.
      Returns:
      the device identifier or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getHapticFromID

      public SDL_Haptic getHapticFromID(@NativeType("SDL_HapticID") @Unsigned int instance_id)
      Get the SDL_Haptic associated with an instance ID, if it has been opened.
      Parameters:
      instance_id - the instance ID to get the SDL_Haptic for.
      Returns:
      an SDL_Haptic on success or NULL on failure or if it hasn't been opened yet; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getHapticID

      @NativeType("SDL_HapticID") @Unsigned public int getHapticID(@Nullable @Nullable SDL_Haptic haptic)
      Get the instance ID of an opened haptic device.
      Parameters:
      haptic - the SDL_Haptic device to query.
      Returns:
      the instance ID of the specified haptic device on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getHapticName

      public BytePtr getHapticName(@Nullable @Nullable SDL_Haptic haptic)
      Get the implementation dependent name of a haptic device.
      Parameters:
      haptic - the SDL_Haptic obtained from SDL_OpenJoystick().
      Returns:
      the name of the selected haptic device. If no name can be found, this function returns NULL; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isMouseHaptic

      @NativeType("boolean") public boolean isMouseHaptic()
      Query whether or not the current mouse has haptic capabilities.
      Returns:
      true if the mouse is haptic or false if it isn't.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openHapticFromMouse

      public SDL_Haptic openHapticFromMouse()
      Try to open a haptic device from the current mouse.
      Returns:
      the haptic device identifier or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isJoystickHaptic

      @NativeType("boolean") public boolean isJoystickHaptic(@Nullable @Nullable SDL_Joystick joystick)
      Query if a joystick has haptic features.
      Parameters:
      joystick - the SDL_Joystick to test for haptic capabilities.
      Returns:
      true if the joystick is haptic or false if it isn't.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openHapticFromJoystick

      public SDL_Haptic openHapticFromJoystick(@Nullable @Nullable SDL_Joystick joystick)

      Open a haptic device for use from a joystick device.

      You must still close the haptic device separately. It will not be closed with the joystick.

      When opened from a joystick you should first close the haptic device before closing the joystick device. If not, on some implementations the haptic device will also get unallocated and you'll be unable to use force feedback on that device.

      Parameters:
      joystick - the SDL_Joystick to create a haptic device from.
      Returns:
      a valid haptic device identifier on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • closeHaptic

      public void closeHaptic(@Nullable @Nullable SDL_Haptic haptic)
      Close a haptic device previously opened with SDL_OpenHaptic().
      Parameters:
      haptic - the SDL_Haptic device to close.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getMaxHapticEffects

      public int getMaxHapticEffects(@Nullable @Nullable SDL_Haptic haptic)

      Get the number of effects a haptic device can store.

      On some platforms this isn't fully supported, and therefore is an approximation. Always check to see if your created effect was actually created and do not rely solely on SDL_GetMaxHapticEffects().

      Parameters:
      haptic - the SDL_Haptic device to query.
      Returns:
      the number of effects the haptic device can store or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getMaxHapticEffectsPlaying

      public int getMaxHapticEffectsPlaying(@Nullable @Nullable SDL_Haptic haptic)

      Get the number of effects a haptic device can play at the same time.

      This is not supported on all platforms, but will always return a value.

      Parameters:
      haptic - the SDL_Haptic device to query maximum playing effects.
      Returns:
      the number of effects the haptic device can play at the same time or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getHapticFeatures

      @NativeType("Uint32") @Unsigned public int getHapticFeatures(@Nullable @Nullable SDL_Haptic haptic)
      Get the haptic device's supported features in bitwise manner.
      Parameters:
      haptic - the SDL_Haptic device to query.
      Returns:
      a list of supported haptic features in bitwise manner (OR'd), or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumHapticAxes

      public int getNumHapticAxes(@Nullable @Nullable SDL_Haptic haptic)

      Get the number of haptic axes the device has.

      The number of haptic axes might be useful if working with the SDL_HapticDirection effect.

      Parameters:
      haptic - the SDL_Haptic device to query.
      Returns:
      the number of axes on success or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hapticEffectSupported

      @NativeType("boolean") public boolean hapticEffectSupported(@Nullable @Nullable SDL_Haptic haptic, @Nullable @Pointer @Nullable ISDL_HapticEffect effect)
      Check to see if an effect is supported by a haptic device.
      Parameters:
      haptic - the SDL_Haptic device to query.
      effect - the desired effect to query.
      Returns:
      true if the effect is supported or false if it isn't.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createHapticEffect

      public int createHapticEffect(@Nullable @Nullable SDL_Haptic haptic, @Nullable @Pointer @Nullable ISDL_HapticEffect effect)
      Create a new haptic effect on a specified device.
      Parameters:
      haptic - an SDL_Haptic device to create the effect on.
      effect - an SDL_HapticEffect structure containing the properties of the effect to create.
      Returns:
      the ID of the effect on success or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • updateHapticEffect

      @NativeType("boolean") public boolean updateHapticEffect(@Nullable @Nullable SDL_Haptic haptic, int effect, @Nullable @Pointer @Nullable ISDL_HapticEffect data)

      Update the properties of an effect.

      Can be used dynamically, although behavior when dynamically changing direction may be strange. Specifically the effect may re-upload itself and start playing from the start. You also cannot change the type either when running SDL_UpdateHapticEffect().

      Parameters:
      haptic - the SDL_Haptic device that has the effect.
      effect - the identifier of the effect to update.
      data - an SDL_HapticEffect structure containing the new effect properties to use.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • runHapticEffect

      @NativeType("boolean") public boolean runHapticEffect(@Nullable @Nullable SDL_Haptic haptic, int effect, @NativeType("Uint32") @Unsigned int iterations)

      Run the haptic effect on its associated haptic device.

      To repeat the effect over and over indefinitely, set iterations to SDL_HAPTIC_INFINITY. (Repeats the envelope - attack and fade.) To make one instance of the effect last indefinitely (so the effect does not fade), set the effect's length in its structure/union to SDL_HAPTIC_INFINITY instead.

      Parameters:
      haptic - the SDL_Haptic device to run the effect on.
      effect - the ID of the haptic effect to run.
      iterations - the number of iterations to run the effect; use SDL_HAPTIC_INFINITY to repeat forever.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • stopHapticEffect

      @NativeType("boolean") public boolean stopHapticEffect(@Nullable @Nullable SDL_Haptic haptic, int effect)
      Stop the haptic effect on its associated haptic device.
      Parameters:
      haptic - the SDL_Haptic device to stop the effect on.
      effect - the ID of the haptic effect to stop.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyHapticEffect

      public void destroyHapticEffect(@Nullable @Nullable SDL_Haptic haptic, int effect)

      Destroy a haptic effect on the device.

      This will stop the effect if it's running. Effects are automatically destroyed when the device is closed.

      Parameters:
      haptic - the SDL_Haptic device to destroy the effect on.
      effect - the ID of the haptic effect to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getHapticEffectStatus

      @NativeType("boolean") public boolean getHapticEffectStatus(@Nullable @Nullable SDL_Haptic haptic, int effect)

      Get the status of the current effect on the specified haptic device.

      Device must support the SDL_HAPTIC_STATUS feature.

      Parameters:
      haptic - the SDL_Haptic device to query for the effect status on.
      effect - the ID of the haptic effect to query its status.
      Returns:
      true if it is playing, false if it isn't playing or haptic status isn't supported.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setHapticGain

      @NativeType("boolean") public boolean setHapticGain(@Nullable @Nullable SDL_Haptic haptic, int gain)

      Set the global gain of the specified haptic device.

      Device must support the SDL_HAPTIC_GAIN feature.

      The user may specify the maximum gain by setting the environment variable SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to SDL_SetHapticGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the maximum.

      Parameters:
      haptic - the SDL_Haptic device to set the gain on.
      gain - value to set the gain to, should be between 0 and 100 (0 - 100).
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setHapticAutocenter

      @NativeType("boolean") public boolean setHapticAutocenter(@Nullable @Nullable SDL_Haptic haptic, int autocenter)

      Set the global autocenter of the device.

      Autocenter should be between 0 and 100. Setting it to 0 will disable autocentering.

      Device must support the SDL_HAPTIC_AUTOCENTER feature.

      Parameters:
      haptic - the SDL_Haptic device to set autocentering on.
      autocenter - value to set autocenter to (0-100).
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • pauseHaptic

      @NativeType("boolean") public boolean pauseHaptic(@Nullable @Nullable SDL_Haptic haptic)

      Pause a haptic device.

      Device must support the SDL_HAPTIC_PAUSE feature. Call SDL_ResumeHaptic() to resume playback.

      Do not modify the effects nor add new ones while the device is paused. That can cause all sorts of weird errors.

      Parameters:
      haptic - the SDL_Haptic device to pause.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • resumeHaptic

      @NativeType("boolean") public boolean resumeHaptic(@Nullable @Nullable SDL_Haptic haptic)

      Resume a haptic device.

      Call to unpause after SDL_PauseHaptic().

      Parameters:
      haptic - the SDL_Haptic device to unpause.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • stopHapticEffects

      @NativeType("boolean") public boolean stopHapticEffects(@Nullable @Nullable SDL_Haptic haptic)
      Stop all the currently playing effects on a haptic device.
      Parameters:
      haptic - the SDL_Haptic device to stop.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hapticRumbleSupported

      @NativeType("boolean") public boolean hapticRumbleSupported(@Nullable @Nullable SDL_Haptic haptic)
      Check whether rumble is supported on a haptic device.
      Parameters:
      haptic - haptic device to check for rumble support.
      Returns:
      true if the effect is supported or false if it isn't.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • initHapticRumble

      @NativeType("boolean") public boolean initHapticRumble(@Nullable @Nullable SDL_Haptic haptic)
      Initialize a haptic device for simple rumble playback.
      Parameters:
      haptic - the haptic device to initialize for simple rumble playback.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • playHapticRumble

      @NativeType("boolean") public boolean playHapticRumble(@Nullable @Nullable SDL_Haptic haptic, float strength, @NativeType("Uint32") @Unsigned int length)
      Run a simple rumble effect on a haptic device.
      Parameters:
      haptic - the haptic device to play the rumble effect on.
      strength - strength of the rumble to play as a 0-1 float value.
      length - length of the rumble to play in milliseconds.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • stopHapticRumble

      @NativeType("boolean") public boolean stopHapticRumble(@Nullable @Nullable SDL_Haptic haptic)
      Stop the simple rumble on a haptic device.
      Parameters:
      haptic - the haptic device to stop the rumble effect on.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hid_init

      public int hid_init()

      Initialize the HIDAPI library.

      This function initializes the HIDAPI library. Calling it is not strictly necessary, as it will be called automatically by SDL_hid_enumerate() and any of the SDL_hid_open_*() functions if it is needed. This function should be called at the beginning of execution however, if there is a chance of HIDAPI handles being opened by different threads simultaneously.

      Each call to this function should have a matching call to SDL_hid_exit()

      Returns:
      0 on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hid_exit

      public int hid_exit()

      Finalize the HIDAPI library.

      This function frees all of the static data associated with HIDAPI. It should be called at the end of execution to avoid memory leaks.

      Returns:
      0 on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hid_device_change_count

      @NativeType("Uint32") @Unsigned public int hid_device_change_count()

      Check to see if devices may have been added or removed.

      Enumerating the HID devices is an expensive operation, so you can call this to see if there have been any system device changes since the last call to this function. A change in the counter returned doesn't necessarily mean that anything has changed, but you can call SDL_hid_enumerate() to get an updated device list.

      Calling this function for the first time may cause a thread or other system resource to be allocated to track device change notifications.

      Returns:
      a change counter that is incremented with each potential device change, or 0 if device change detection isn't available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hid_enumerate

      @Pointer public ISDL_hid_device_info hid_enumerate(short vendor_id, short product_id)

      Enumerate the HID Devices.

      This function returns a linked list of all the HID devices attached to the system which match vendor_id and product_id. If vendor_id is set to 0 then any vendor matches. If product_id is set to 0 then any product matches. If vendor_id and product_id are both set to 0, then all HID devices will be returned.

      By default SDL will only enumerate controllers, to reduce risk of hanging or crashing on bad drivers, but SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS can be set to "0" to enumerate all HID devices.

      Parameters:
      vendor_id - the Vendor ID (VID) of the types of device to open, or 0 to match any vendor.
      product_id - the Product ID (PID) of the types of device to open, or 0 to match any product.
      Returns:
      a pointer to a linked list of type SDL_hid_device_info, containing information about the HID devices attached to the system, or NULL in the case of failure. Free this linked list by calling SDL_hid_free_enumeration().
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hid_free_enumeration

      public void hid_free_enumeration(@Nullable @Pointer @Nullable ISDL_hid_device_info devs)

      Free an enumeration linked list.

      This function frees a linked list created by SDL_hid_enumerate().

      Parameters:
      devs - pointer to a list of struct_device returned from SDL_hid_enumerate().
      Since:
      This function is available since SDL 3.2.0.
    • hid_open

      public SDL_hid_device hid_open(short vendor_id, short product_id, @Pointer(comment="wchar_t*") MemorySegment serial_number)

      Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number.

      If serial_number is NULL, the first device with the specified VID and PID is opened.

      Parameters:
      vendor_id - the Vendor ID (VID) of the device to open.
      product_id - the Product ID (PID) of the device to open.
      serial_number - the Serial Number of the device to open (Optionally NULL).
      Returns:
      a pointer to a SDL_hid_device object on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_open_path

      public SDL_hid_device hid_open_path(@Nullable @Nullable BytePtr path)

      Open a HID device by its path name.

      The path name be determined by calling SDL_hid_enumerate(), or a platform-specific path name can be used (eg: /dev/hidraw0 on Linux).

      Parameters:
      path - the path name of the device to open.
      Returns:
      a pointer to a SDL_hid_device object on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_write

      public int hid_write(@Nullable @Nullable SDL_hid_device dev, @Nullable @Nullable BytePtr data, long length)

      Write an Output report to a HID device.

      The first byte of data must contain the Report ID. For devices which only support a single report, this must be set to 0x0. The remaining bytes contain the report data. Since the Report ID is mandatory, calls to SDL_hid_write() will always contain one more byte than the report contains. For example, if a hid report is 16 bytes long, 17 bytes must be passed to SDL_hid_write(), the Report ID (or 0x0, for devices with a single report), followed by the report data (16 bytes). In this example, the length passed in would be 17.

      SDL_hid_write() will send the data on the first OUT endpoint, if one exists. If it does not, it will send the data through the Control Endpoint (Endpoint 0).

      Parameters:
      dev - a device handle returned from SDL_hid_open().
      data - the data to send, including the report number as the first byte.
      length - the length in bytes of the data to send.
      Returns:
      the actual number of bytes written and -1 on on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_read_timeout

      public int hid_read_timeout(@Nullable @Nullable SDL_hid_device dev, @Nullable @Nullable BytePtr data, long length, int milliseconds)

      Read an Input report from a HID device with timeout.

      Input reports are returned to the host through the INTERRUPT IN endpoint. The first byte will contain the Report number if the device uses numbered reports.

      Parameters:
      dev - a device handle returned from SDL_hid_open().
      data - a buffer to put the read data into.
      length - the number of bytes to read. For devices with multiple reports, make sure to read an extra byte for the report number.
      milliseconds - timeout in milliseconds or -1 for blocking wait.
      Returns:
      the actual number of bytes read and -1 on on failure; call SDL_GetError() for more information. If no packet was available to be read within the timeout period, this function returns 0.
      Since:
      This function is available since SDL 3.2.0.
    • hid_read

      public int hid_read(@Nullable @Nullable SDL_hid_device dev, @Nullable @Nullable BytePtr data, long length)

      Read an Input report from a HID device.

      Input reports are returned to the host through the INTERRUPT IN endpoint. The first byte will contain the Report number if the device uses numbered reports.

      Parameters:
      dev - a device handle returned from SDL_hid_open().
      data - a buffer to put the read data into.
      length - the number of bytes to read. For devices with multiple reports, make sure to read an extra byte for the report number.
      Returns:
      the actual number of bytes read and -1 on failure; call SDL_GetError() for more information. If no packet was available to be read and the handle is in non-blocking mode, this function returns 0.
      Since:
      This function is available since SDL 3.2.0.
    • hid_set_nonblocking

      public int hid_set_nonblocking(@Nullable @Nullable SDL_hid_device dev, int nonblock)

      Set the device handle to be non-blocking.

      In non-blocking mode calls to SDL_hid_read() will return immediately with a value of 0 if there is no data to be read. In blocking mode, SDL_hid_read() will wait (block) until there is data to read before returning.

      Nonblocking can be turned on and off at any time.

      Parameters:
      dev - a device handle returned from SDL_hid_open().
      nonblock - enable or not the nonblocking reads - 1 to enable nonblocking - 0 to disable nonblocking.
      Returns:
      0 on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_send_feature_report

      public int hid_send_feature_report(@Nullable @Nullable SDL_hid_device dev, @Nullable @Nullable BytePtr data, long length)

      Send a Feature report to the device.

      Feature reports are sent over the Control endpoint as a Set_Report transfer. The first byte of data must contain the Report ID. For devices which only support a single report, this must be set to 0x0. The remaining bytes contain the report data. Since the Report ID is mandatory, calls to SDL_hid_send_feature_report() will always contain one more byte than the report contains. For example, if a hid report is 16 bytes long, 17 bytes must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for devices which do not use numbered reports), followed by the report data (16 bytes). In this example, the length passed in would be 17.

      Parameters:
      dev - a device handle returned from SDL_hid_open().
      data - the data to send, including the report number as the first byte.
      length - the length in bytes of the data to send, including the report number.
      Returns:
      the actual number of bytes written and -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_get_feature_report

      public int hid_get_feature_report(@Nullable @Nullable SDL_hid_device dev, @Nullable @Nullable BytePtr data, long length)

      Get a feature report from a HID device.

      Set the first byte of data to the Report ID of the report to be read. Make sure to allow space for this extra byte in data. Upon return, the first byte will still contain the Report ID, and the report data will start in data[1].

      Parameters:
      dev - a device handle returned from SDL_hid_open().
      data - a buffer to put the read data into, including the Report ID. Set the first byte of data to the Report ID of the report to be read, or set it to zero if your device does not use numbered reports.
      length - the number of bytes to read, including an extra byte for the report ID. The buffer can be longer than the actual report.
      Returns:
      the number of bytes read plus one for the report ID (which is still in the first byte), or -1 on on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_get_input_report

      public int hid_get_input_report(@Nullable @Nullable SDL_hid_device dev, @Nullable @Nullable BytePtr data, long length)

      Get an input report from a HID device.

      Set the first byte of data to the Report ID of the report to be read. Make sure to allow space for this extra byte in data. Upon return, the first byte will still contain the Report ID, and the report data will start in data[1].

      Parameters:
      dev - a device handle returned from SDL_hid_open().
      data - a buffer to put the read data into, including the Report ID. Set the first byte of data to the Report ID of the report to be read, or set it to zero if your device does not use numbered reports.
      length - the number of bytes to read, including an extra byte for the report ID. The buffer can be longer than the actual report.
      Returns:
      the number of bytes read plus one for the report ID (which is still in the first byte), or -1 on on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_close

      public int hid_close(@Nullable @Nullable SDL_hid_device dev)
      Close a HID device.
      Parameters:
      dev - a device handle returned from SDL_hid_open().
      Returns:
      0 on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_get_manufacturer_string

      public int hid_get_manufacturer_string(@Nullable @Nullable SDL_hid_device dev, @Pointer(comment="wchar_t*") MemorySegment string, long maxlen)
      Get The Manufacturer String from a HID device.
      Parameters:
      dev - a device handle returned from SDL_hid_open().
      string - a wide string buffer to put the data into.
      maxlen - the length of the buffer in multiples of wchar_t.
      Returns:
      0 on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_get_product_string

      public int hid_get_product_string(@Nullable @Nullable SDL_hid_device dev, @Pointer(comment="wchar_t*") MemorySegment string, long maxlen)
      Get The Product String from a HID device.
      Parameters:
      dev - a device handle returned from SDL_hid_open().
      string - a wide string buffer to put the data into.
      maxlen - the length of the buffer in multiples of wchar_t.
      Returns:
      0 on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_get_serial_number_string

      public int hid_get_serial_number_string(@Nullable @Nullable SDL_hid_device dev, @Pointer(comment="wchar_t*") MemorySegment string, long maxlen)
      Get The Serial Number String from a HID device.
      Parameters:
      dev - a device handle returned from SDL_hid_open().
      string - a wide string buffer to put the data into.
      maxlen - the length of the buffer in multiples of wchar_t.
      Returns:
      0 on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_get_indexed_string

      public int hid_get_indexed_string(@Nullable @Nullable SDL_hid_device dev, int string_index, @Pointer(comment="wchar_t*") MemorySegment string, long maxlen)
      Get a string from a HID device, based on its string index.
      Parameters:
      dev - a device handle returned from SDL_hid_open().
      string_index - the index of the string to get.
      string - a wide string buffer to put the data into.
      maxlen - the length of the buffer in multiples of wchar_t.
      Returns:
      0 on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_get_device_info

      @Pointer public ISDL_hid_device_info hid_get_device_info(@Nullable @Nullable SDL_hid_device dev)
      Get the device info from a HID device.
      Parameters:
      dev - a device handle returned from SDL_hid_open().
      Returns:
      a pointer to the SDL_hid_device_info for this hid_device or NULL on failure; call SDL_GetError() for more information. This struct is valid until the device is closed with SDL_hid_close().
      Since:
      This function is available since SDL 3.2.0.
    • hid_get_report_descriptor

      public int hid_get_report_descriptor(@Nullable @Nullable SDL_hid_device dev, @Nullable @Nullable BytePtr buf, long buf_size)

      Get a report descriptor from a HID device.

      User has to provide a preallocated buffer where descriptor will be copied to. The recommended size for a preallocated buffer is 4096 bytes.

      Parameters:
      dev - a device handle returned from SDL_hid_open().
      buf - the buffer to copy descriptor into.
      buf_size - the size of the buffer in bytes.
      Returns:
      the number of bytes actually copied or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hid_ble_scan

      public void hid_ble_scan(@NativeType("boolean") boolean active)
      Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers.
      Parameters:
      active - true to start the scan, false to stop the scan.
      Since:
      This function is available since SDL 3.2.0.
    • setHintWithPriority

      @NativeType("boolean") public boolean setHintWithPriority(@Nullable @Nullable BytePtr name, @Nullable @Nullable BytePtr value, @EnumType(SDL_HintPriority.class) int priority)

      Set a hint with a specific priority.

      The priority controls the behavior when setting a hint that already has a value. Hints will replace existing hints of their priority and lower. Environment variables are considered to have override priority.

      Parameters:
      name - the hint to set.
      value - the value of the hint variable.
      priority - the SDL_HintPriority level for the hint.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setHint

      @NativeType("boolean") public boolean setHint(@Nullable @Nullable BytePtr name, @Nullable @Nullable BytePtr value)

      Set a hint with normal priority.

      Hints will not be set if there is an existing override hint or environment variable that takes precedence. You can use SDL_SetHintWithPriority() to set the hint with override priority instead.

      Parameters:
      name - the hint to set.
      value - the value of the hint variable.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • resetHint

      @NativeType("boolean") public boolean resetHint(@Nullable @Nullable BytePtr name)

      Reset a hint to the default value.

      This will reset a hint to the value of the environment variable, or NULL if the environment isn't set. Callbacks will be called normally with this change.

      Parameters:
      name - the hint to set.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • resetHints

      public void resetHints()

      Reset all hints to the default values.

      This will reset all hints to the value of the associated environment variable, or NULL if the environment isn't set. Callbacks will be called normally with this change.

      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getHint

      public BytePtr getHint(@Nullable @Nullable BytePtr name)
      Get the value of a hint.
      Parameters:
      name - the hint to query.
      Returns:
      the string value of a hint or NULL if the hint isn't set.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getHintBoolean

      @NativeType("boolean") public boolean getHintBoolean(@Nullable @Nullable BytePtr name, @NativeType("boolean") boolean default_value)
      Get the boolean value of a hint variable.
      Parameters:
      name - the name of the hint to get the boolean value from.
      default_value - the value to return if the hint does not exist.
      Returns:
      the boolean value of a hint or the provided default value if the hint does not exist.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • addHintCallback

      @NativeType("boolean") public boolean addHintCallback(@Nullable @Nullable BytePtr name, @Pointer(comment="SDL_HintCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Add a function to watch a particular hint.

      The callback function is called during this function, to provide it an initial value, and again each time the hint's value changes.

      Parameters:
      name - the hint to watch.
      callback - An SDL_HintCallback function that will be called when the hint value changes.
      userdata - a pointer to pass to the callback function.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • removeHintCallback

      public void removeHintCallback(@Nullable @Nullable BytePtr name, @Pointer(comment="SDL_HintCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)
      Remove a function watching a particular hint.
      Parameters:
      name - the hint being watched.
      callback - an SDL_HintCallback function that will be called when the hint value changes.
      userdata - a pointer being passed to the callback function.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • init

      @NativeType("boolean") public boolean init(@EnumType(SDL_InitFlags.class) int flags)

      Initialize the SDL library.

      SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the two may be used interchangeably. Though for readability of your code SDL_InitSubSystem() might be preferred.

      The file I/O (for example: SDL_IOFromFile) and threading (SDL_CreateThread) subsystems are initialized by default. Message boxes (SDL_ShowSimpleMessageBox) also attempt to work without initializing the video subsystem, in hopes of being useful in showing an error dialog when SDL_Init fails. You must specifically initialize other subsystems if you use them in your application.

      Logging (such as SDL_Log) works without initialization, too.

      flags may be any of the following OR'd together:

      • SDL_INIT_AUDIO: audio subsystem; automatically initializes the events subsystem
      • SDL_INIT_VIDEO: video subsystem; automatically initializes the events subsystem, should be initialized on the main thread.
      • SDL_INIT_JOYSTICK: joystick subsystem; automatically initializes the events subsystem
      • SDL_INIT_HAPTIC: haptic (force feedback) subsystem
      • SDL_INIT_GAMEPAD: gamepad subsystem; automatically initializes the joystick subsystem
      • SDL_INIT_EVENTS: events subsystem
      • SDL_INIT_SENSOR: sensor subsystem; automatically initializes the events subsystem
      • SDL_INIT_CAMERA: camera subsystem; automatically initializes the events subsystem

      Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or call SDL_Quit() to force shutdown). If a subsystem is already loaded then this call will increase the ref-count and return.

      Consider reporting some basic metadata about your application before calling SDL_Init, using either SDL_SetAppMetadata() or SDL_SetAppMetadataProperty().

      Parameters:
      flags - subsystem initialization flags.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • initSubSystem

      @NativeType("boolean") public boolean initSubSystem(@EnumType(SDL_InitFlags.class) int flags)

      Compatibility function to initialize the SDL library.

      This function and SDL_Init() are interchangeable.

      Parameters:
      flags - any of the flags used by SDL_Init(); see SDL_Init for details.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • quitSubSystem

      public void quitSubSystem(@EnumType(SDL_InitFlags.class) int flags)

      Shut down specific SDL subsystems.

      You still need to call SDL_Quit() even if you close all open subsystems with SDL_QuitSubSystem().

      Parameters:
      flags - any of the flags used by SDL_Init(); see SDL_Init for details.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • wasInit

      @EnumType(SDL_InitFlags.class) public int wasInit(@EnumType(SDL_InitFlags.class) int flags)
      Get a mask of the specified subsystems which are currently initialized.
      Parameters:
      flags - any of the flags used by SDL_Init(); see SDL_Init for details.
      Returns:
      a mask of all initialized subsystems if flags is 0, otherwise it returns the initialization status of the specified subsystems.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • quit

      public void quit()

      Clean up all initialized subsystems.

      You should call this function even if you have already shutdown each initialized subsystem with SDL_QuitSubSystem(). It is safe to call this function even in the case of errors in initialization.

      You can use this function with atexit() to ensure that it is run when your application is shutdown, but it is not wise to do this from a library or other dynamically loaded code.

      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isMainThread

      @NativeType("boolean") public boolean isMainThread()

      Return whether this is the main thread.

      On Apple platforms, the main thread is the thread that runs your program's main() entry point. On other platforms, the main thread is the one that calls SDL_Init(SDL_INIT_VIDEO), which should usually be the one that runs your program's main() entry point. If you are using the main callbacks, SDL_AppInit(), SDL_AppIterate(), and SDL_AppQuit() are all called on the main thread.

      Returns:
      true if this thread is the main thread, or false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • runOnMainThread

      @NativeType("boolean") public boolean runOnMainThread(@Pointer(comment="SDL_MainThreadCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata, @NativeType("boolean") boolean wait_complete)

      Call a function on the main thread during event processing.

      If this is called on the main thread, the callback is executed immediately. If this is called on another thread, this callback is queued for execution on the main thread during event processing.

      Be careful of deadlocks when using this functionality. You should not have the main thread wait for the current thread while this function is being called with wait_complete true.

      Parameters:
      callback - the callback to call on the main thread.
      userdata - a pointer that is passed to callback.
      wait_complete - true to wait for the callback to complete, false to return immediately.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAppMetadata

      @NativeType("boolean") public boolean setAppMetadata(@Nullable @Nullable BytePtr appname, @Nullable @Nullable BytePtr appversion, @Nullable @Nullable BytePtr appidentifier)

      Specify basic metadata about your app.

      You can optionally provide metadata about your app to SDL. This is not required, but strongly encouraged.

      There are several locations where SDL can make use of metadata (an "About" box in the macOS menu bar, the name of the app can be shown on some audio mixers, etc). Any piece of metadata can be left as NULL, if a specific detail doesn't make sense for the app.

      This function should be called as early as possible, before SDL_Init. Multiple calls to this function are allowed, but various state might not change once it has been set up with a previous call to this function.

      Passing a NULL removes any previous metadata.

      This is a simplified interface for the most important information. You can supply significantly more detailed metadata with SDL_SetAppMetadataProperty().

      Parameters:
      appname - The name of the application ("My Game 2: Bad Guy's Revenge!").
      appversion - The version of the application ("1.0.0beta5" or a git hash, or whatever makes sense).
      appidentifier - A unique string in reverse-domain format that identifies this app ("com.example.mygame2").
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setAppMetadataProperty

      @NativeType("boolean") public boolean setAppMetadataProperty(@Nullable @Nullable BytePtr name, @Nullable @Nullable BytePtr value)

      Specify metadata about your app through a set of properties.

      You can optionally provide metadata about your app to SDL. This is not required, but strongly encouraged.

      There are several locations where SDL can make use of metadata (an "About" box in the macOS menu bar, the name of the app can be shown on some audio mixers, etc). Any piece of metadata can be left out, if a specific detail doesn't make sense for the app.

      This function should be called as early as possible, before SDL_Init. Multiple calls to this function are allowed, but various state might not change once it has been set up with a previous call to this function.

      Once set, this metadata can be read using SDL_GetAppMetadataProperty().

      These are the supported properties:

      • SDL_PROP_APP_METADATA_NAME_STRING: The human-readable name of the application, like "My Game 2: Bad Guy's Revenge!". This will show up anywhere the OS shows the name of the application separately from window titles, such as volume control applets, etc. This defaults to "SDL Application".
      • SDL_PROP_APP_METADATA_VERSION_STRING: The version of the app that is running; there are no rules on format, so "1.0.3beta2" and "April 22nd, 2024" and a git hash are all valid options. This has no default.
      • SDL_PROP_APP_METADATA_IDENTIFIER_STRING: A unique string that identifies this app. This must be in reverse-domain format, like "com.example.mygame2". This string is used by desktop compositors to identify and group windows together, as well as match applications with associated desktop settings and icons. If you plan to package your application in a container such as Flatpak, the app ID should match the name of your Flatpak container as well. This has no default.
      • SDL_PROP_APP_METADATA_CREATOR_STRING: The human-readable name of the creator/developer/maker of this app, like "MojoWorkshop, LLC"
      • SDL_PROP_APP_METADATA_COPYRIGHT_STRING: The human-readable copyright notice, like "Copyright (c) 2024 MojoWorkshop, LLC" or whatnot. Keep this to one line, don't paste a copy of a whole software license in here. This has no default.
      • SDL_PROP_APP_METADATA_URL_STRING: A URL to the app on the web. Maybe a product page, or a storefront, or even a GitHub repository, for user's further information This has no default.
      • SDL_PROP_APP_METADATA_TYPE_STRING: The type of application this is. Currently this string can be "game" for a video game, "mediaplayer" for a media player, or generically "application" if nothing else applies. Future versions of SDL might add new types. This defaults to "application".
      Parameters:
      name - the name of the metadata property to set.
      value - the value of the property, or NULL to remove that property.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAppMetadataProperty

      public BytePtr getAppMetadataProperty(@Nullable @Nullable BytePtr name)

      Get metadata about your app.

      This returns metadata previously set using SDL_SetAppMetadata() or SDL_SetAppMetadataProperty(). See SDL_SetAppMetadataProperty() for the list of available properties and their meanings.

      Parameters:
      name - the name of the metadata property to get.
      Returns:
      the current value of the metadata property, or the default if it is not set, NULL for properties with no default.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • IOFromFile

      public SDL_IOStream IOFromFile(@Nullable @Nullable BytePtr file, @Nullable @Nullable BytePtr mode)

      Use this function to create a new SDL_IOStream structure for reading from and/or writing to a named file.

      The mode string is treated roughly the same as in a call to the C library's fopen(), even if SDL doesn't happen to use fopen() behind the scenes.

      Available mode strings:

      • "r": Open a file for reading. The file must exist.
      • "w": Create an empty file for writing. If a file with the same name already exists its content is erased and the file is treated as a new empty file.
      • "a": Append to a file. Writing operations append data at the end of the file. The file is created if it does not exist.
      • "r+": Open a file for update both reading and writing. The file must exist.
      • "w+": Create an empty file for both reading and writing. If a file with the same name already exists its content is erased and the file is treated as a new empty file.
      • "a+": Open a file for reading and appending. All writing operations are performed at the end of the file, protecting the previous content to be overwritten. You can reposition (fseek, rewind) the internal pointer to anywhere in the file for reading, but writing operations will move it back to the end of file. The file is created if it does not exist.

      NOTE: In order to open a file as a binary file, a "b" character has to be included in the mode string. This additional "b" character can either be appended at the end of the string (thus making the following compound modes: "rb", "wb", "ab", "r+b", "w+b", "a+b") or be inserted between the letter and the "+" sign for the mixed modes ("rb+", "wb+", "ab+"). Additional characters may follow the sequence, although they should have no effect. For example, "t" is sometimes appended to make explicit the file is a text file.

      This function supports Unicode filenames, but they must be encoded in UTF-8 format, regardless of the underlying operating system.

      In Android, SDL_IOFromFile() can be used to open content:// URIs. As a fallback, SDL_IOFromFile() will transparently open a matching filename in the app's assets.

      Closing the SDL_IOStream will close SDL's internal file handle.

      The following properties may be set at creation time by SDL:

      • SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER: a pointer, that can be cast to a win32 HANDLE, that this SDL_IOStream is using to access the filesystem. If the program isn't running on Windows, or SDL used some other method to access the filesystem, this property will not be set.
      • SDL_PROP_IOSTREAM_STDIO_FILE_POINTER: a pointer, that can be cast to a stdio FILE *, that this SDL_IOStream is using to access the filesystem. If SDL used some other method to access the filesystem, this property will not be set. PLEASE NOTE that if SDL is using a different C runtime than your app, trying to use this pointer will almost certainly result in a crash! This is mostly a problem on Windows; make sure you build SDL and your app with the same compiler and settings to avoid it.
      • SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER: a file descriptor that this SDL_IOStream is using to access the filesystem.
      • SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER: a pointer, that can be cast to an Android NDK AAsset *, that this SDL_IOStream is using to access the filesystem. If SDL used some other method to access the filesystem, this property will not be set.
      Parameters:
      file - a UTF-8 string representing the filename to open.
      mode - an ASCII string representing the mode to be used for opening the file.
      Returns:
      a pointer to the SDL_IOStream structure that is created or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • IOFromMem

      public SDL_IOStream IOFromMem(@Pointer(comment="void*") MemorySegment mem, long size)

      Use this function to prepare a read-write memory buffer for use with SDL_IOStream.

      This function sets up an SDL_IOStream struct based on a memory area of a certain size, for both read and write access.

      This memory buffer is not copied by the SDL_IOStream; the pointer you provide must remain valid until you close the stream. Closing the stream will not free the original buffer.

      If you need to make sure the SDL_IOStream never writes to the memory buffer, you should use SDL_IOFromConstMem() with a read-only buffer of memory instead.

      The following properties will be set at creation time by SDL:

      • SDL_PROP_IOSTREAM_MEMORY_POINTER: this will be the mem parameter that was passed to this function.
      • SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER: this will be the size parameter that was passed to this function.
      Parameters:
      mem - a pointer to a buffer to feed an SDL_IOStream stream.
      size - the buffer size, in bytes.
      Returns:
      a pointer to a new SDL_IOStream structure or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • IOFromConstMem

      public SDL_IOStream IOFromConstMem(@Pointer(comment="void*") MemorySegment mem, long size)

      Use this function to prepare a read-only memory buffer for use with SDL_IOStream.

      This function sets up an SDL_IOStream struct based on a memory area of a certain size. It assumes the memory area is not writable.

      Attempting to write to this SDL_IOStream stream will report an error without writing to the memory buffer.

      This memory buffer is not copied by the SDL_IOStream; the pointer you provide must remain valid until you close the stream. Closing the stream will not free the original buffer.

      If you need to write to a memory buffer, you should use SDL_IOFromMem() with a writable buffer of memory instead.

      The following properties will be set at creation time by SDL:

      • SDL_PROP_IOSTREAM_MEMORY_POINTER: this will be the mem parameter that was passed to this function.
      • SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER: this will be the size parameter that was passed to this function.
      Parameters:
      mem - a pointer to a read-only buffer to feed an SDL_IOStream stream.
      size - the buffer size, in bytes.
      Returns:
      a pointer to a new SDL_IOStream structure or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • IOFromDynamicMem

      public SDL_IOStream IOFromDynamicMem()

      Use this function to create an SDL_IOStream that is backed by dynamically allocated memory.

      This supports the following properties to provide access to the memory and control over allocations:

      • SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER: a pointer to the internal memory of the stream. This can be set to NULL to transfer ownership of the memory to the application, which should free the memory with SDL_free(). If this is done, the next operation on the stream must be SDL_CloseIO().
      • SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER: memory will be allocated in multiples of this size, defaulting to 1024.
      Returns:
      a pointer to a new SDL_IOStream structure or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openIO

      public SDL_IOStream openIO(@Nullable @Pointer @Nullable ISDL_IOStreamInterface iface, @Pointer(comment="void*") MemorySegment userdata)

      Create a custom SDL_IOStream.

      Applications do not need to use this function unless they are providing their own SDL_IOStream implementation. If you just need an SDL_IOStream to read/write a common data source, you should use the built-in implementations in SDL, like SDL_IOFromFile() or SDL_IOFromMem(), etc.

      This function makes a copy of iface and the caller does not need to keep it around after this call.

      Parameters:
      iface - the interface that implements this SDL_IOStream, initialized using SDL_INIT_INTERFACE().
      userdata - the pointer that will be passed to the interface functions.
      Returns:
      a pointer to the allocated memory on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • closeIO

      @NativeType("boolean") public boolean closeIO(@Nullable @Nullable SDL_IOStream context)

      Close and free an allocated SDL_IOStream structure.

      SDL_CloseIO() closes and cleans up the SDL_IOStream stream. It releases any resources used by the stream and frees the SDL_IOStream itself. This returns true on success, or false if the stream failed to flush to its output (e.g. to disk).

      Note that if this fails to flush the stream for any reason, this function reports an error, but the SDL_IOStream is still invalid once this function returns.

      This call flushes any buffered writes to the operating system, but there are no guarantees that those writes have gone to physical media; they might be in the OS's file cache, waiting to go to disk later. If it's absolutely crucial that writes go to disk immediately, so they are definitely stored even if the power fails before the file cache would have caught up, one should call SDL_FlushIO() before closing. Note that flushing takes time and makes the system and your app operate less efficiently, so do so sparingly.

      Parameters:
      context - SDL_IOStream structure to close.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getIOProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getIOProperties(@Nullable @Nullable SDL_IOStream context)
      Get the properties associated with an SDL_IOStream.
      Parameters:
      context - a pointer to an SDL_IOStream structure.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getIOStatus

      @EnumType(SDL_IOStatus.class) public int getIOStatus(@Nullable @Nullable SDL_IOStream context)

      Query the stream status of an SDL_IOStream.

      This information can be useful to decide if a short read or write was due to an error, an EOF, or a non-blocking operation that isn't yet ready to complete.

      An SDL_IOStream's status is only expected to change after a SDL_ReadIO or SDL_WriteIO call; don't expect it to change if you just call this query function in a tight loop.

      Parameters:
      context - the SDL_IOStream to query.
      Returns:
      an SDL_IOStatus enum with the current state.
      Since:
      This function is available since SDL 3.2.0.
    • getIOSize

      @NativeType("Sint64") public long getIOSize(@Nullable @Nullable SDL_IOStream context)
      Use this function to get the size of the data stream in an SDL_IOStream.
      Parameters:
      context - the SDL_IOStream to get the size of the data stream from.
      Returns:
      the size of the data stream in the SDL_IOStream on success or a negative error code on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • seekIO

      @NativeType("Sint64") public long seekIO(@Nullable @Nullable SDL_IOStream context, @NativeType("Sint64") long offset, @EnumType(SDL_IOWhence.class) int whence)

      Seek within an SDL_IOStream data stream.

      This function seeks to byte offset, relative to whence.

      whence may be any of the following values:

      • SDL_IO_SEEK_SET: seek from the beginning of data
      • SDL_IO_SEEK_CUR: seek relative to current read point
      • SDL_IO_SEEK_END: seek relative to the end of data

      If this stream can not seek, it will return -1.

      Parameters:
      context - a pointer to an SDL_IOStream structure.
      offset - an offset in bytes, relative to whence location; can be negative.
      whence - any of SDL_IO_SEEK_SET, SDL_IO_SEEK_CUR, SDL_IO_SEEK_END.
      Returns:
      the final offset in the data stream after the seek or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • tellIO

      @NativeType("Sint64") public long tellIO(@Nullable @Nullable SDL_IOStream context)

      Determine the current read/write offset in an SDL_IOStream data stream.

      SDL_TellIO is actually a wrapper function that calls the SDL_IOStream's seek method, with an offset of 0 bytes from SDL_IO_SEEK_CUR, to simplify application development.

      Parameters:
      context - an SDL_IOStream data stream object from which to get the current offset.
      Returns:
      the current offset in the stream, or -1 if the information can not be determined.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • readIO

      public long readIO(@Nullable @Nullable SDL_IOStream context, @Pointer(comment="void*") MemorySegment ptr, long size)

      Read from a data source.

      This function reads up size bytes from the data source to the area pointed at by ptr. This function may read less bytes than requested.

      This function will return zero when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If zero is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      context - a pointer to an SDL_IOStream structure.
      ptr - a pointer to a buffer to read data into.
      size - the number of bytes to read from the data source.
      Returns:
      the number of bytes read, or 0 on end of file or other failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • writeIO

      public long writeIO(@Nullable @Nullable SDL_IOStream context, @Pointer(comment="void*") MemorySegment ptr, long size)

      Write to an SDL_IOStream data stream.

      This function writes exactly size bytes from the area pointed at by ptr to the stream. If this fails for any reason, it'll return less than size to demonstrate how far the write progressed. On success, it returns size.

      On error, this function still attempts to write as much as possible, so it might return a positive value less than the requested write size.

      The caller can use SDL_GetIOStatus() to determine if the problem is recoverable, such as a non-blocking write that can simply be retried later, or a fatal error.

      Parameters:
      context - a pointer to an SDL_IOStream structure.
      ptr - a pointer to a buffer containing data to write.
      size - the number of bytes to write.
      Returns:
      the number of bytes written, which will be less than size on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • flushIO

      @NativeType("boolean") public boolean flushIO(@Nullable @Nullable SDL_IOStream context)

      Flush any buffered data in the stream.

      This function makes sure that any buffered data is written to the stream. Normally this isn't necessary but if the stream is a pipe or socket it guarantees that any pending data is sent.

      Parameters:
      context - SDL_IOStream structure to flush.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • loadFile_IO

      @Pointer(comment="void*") public MemorySegment loadFile_IO(@Nullable @Nullable SDL_IOStream src, @Nullable @Nullable PointerPtr datasize, @NativeType("boolean") boolean closeio)

      Load all the data from an SDL data stream.

      The data is allocated with a zero byte at the end (null terminated) for convenience. This extra byte is not included in the value reported via datasize.

      The data should be freed with SDL_free().

      Parameters:
      src - the SDL_IOStream to read all available data from.
      datasize - a pointer filled in with the number of bytes read, may be NULL.
      closeio - if true, calls SDL_CloseIO() on src before returning, even in the case of an error.
      Returns:
      the data or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • loadFile

      @Pointer(comment="void*") public MemorySegment loadFile(@Nullable @Nullable BytePtr file, @Nullable @Nullable PointerPtr datasize)

      Load all the data from a file path.

      The data is allocated with a zero byte at the end (null terminated) for convenience. This extra byte is not included in the value reported via datasize.

      The data should be freed with SDL_free().

      Parameters:
      file - the path to read all available data from.
      datasize - if not NULL, will store the number of bytes read.
      Returns:
      the data or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • saveFile_IO

      @NativeType("boolean") public boolean saveFile_IO(@Nullable @Nullable SDL_IOStream src, @Pointer(comment="void*") MemorySegment data, long datasize, @NativeType("boolean") boolean closeio)
      Save all the data into an SDL data stream.
      Parameters:
      src - the SDL_IOStream to write all data to.
      data - the data to be written. If datasize is 0, may be NULL or a invalid pointer.
      datasize - the number of bytes to be written.
      closeio - if true, calls SDL_CloseIO() on src before returning, even in the case of an error.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • saveFile

      @NativeType("boolean") public boolean saveFile(@Nullable @Nullable BytePtr file, @Pointer(comment="void*") MemorySegment data, long datasize)
      Save all the data into a file path.
      Parameters:
      file - the path to write all available data into.
      data - the data to be written. If datasize is 0, may be NULL or a invalid pointer.
      datasize - the number of bytes to be written.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • readU8

      @NativeType("boolean") public boolean readU8(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr value)

      Use this function to read a byte from an SDL_IOStream.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the SDL_IOStream to read from.
      value - a pointer filled in with the data read.
      Returns:
      true on success or false on failure or EOF; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readS8

      @NativeType("boolean") public boolean readS8(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Sint8") @Nullable BytePtr value)

      Use this function to read a signed byte from an SDL_IOStream.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the SDL_IOStream to read from.
      value - a pointer filled in with the data read.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readU16LE

      @NativeType("boolean") public boolean readU16LE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Uint16") @Unsigned @Nullable ShortPtr value)

      Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readS16LE

      @NativeType("boolean") public boolean readS16LE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Sint16") @Nullable ShortPtr value)

      Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readU16BE

      @NativeType("boolean") public boolean readU16BE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Uint16") @Unsigned @Nullable ShortPtr value)

      Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readS16BE

      @NativeType("boolean") public boolean readS16BE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Sint16") @Nullable ShortPtr value)

      Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readU32LE

      @NativeType("boolean") public boolean readU32LE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr value)

      Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readS32LE

      @NativeType("boolean") public boolean readS32LE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Sint32") @Nullable IntPtr value)

      Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readU32BE

      @NativeType("boolean") public boolean readU32BE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr value)

      Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readS32BE

      @NativeType("boolean") public boolean readS32BE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Sint32") @Nullable IntPtr value)

      Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readU64LE

      @NativeType("boolean") public boolean readU64LE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Uint64") @Unsigned @Nullable LongPtr value)

      Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readS64LE

      @NativeType("boolean") public boolean readS64LE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Sint64") @Nullable LongPtr value)

      Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readU64BE

      @NativeType("boolean") public boolean readU64BE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Uint64") @Unsigned @Nullable LongPtr value)

      Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readS64BE

      @NativeType("boolean") public boolean readS64BE(@Nullable @Nullable SDL_IOStream src, @Nullable @Pointer(comment="Sint64") @Nullable LongPtr value)

      Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format.

      SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.

      This function will return false when the data stream is completely read, and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned and the stream is not at EOF, SDL_GetIOStatus() will return a different error value and SDL_GetError() will offer a human-readable message.

      Parameters:
      src - the stream from which to read data.
      value - a pointer filled in with the data read.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeU8

      @NativeType("boolean") public boolean writeU8(@Nullable @Nullable SDL_IOStream dst, @NativeType("Uint8") @Unsigned byte value)
      Use this function to write a byte to an SDL_IOStream.
      Parameters:
      dst - the SDL_IOStream to write to.
      value - the byte value to write.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeS8

      @NativeType("boolean") public boolean writeS8(@Nullable @Nullable SDL_IOStream dst, @NativeType("Sint8") byte value)
      Use this function to write a signed byte to an SDL_IOStream.
      Parameters:
      dst - the SDL_IOStream to write to.
      value - the byte value to write.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeU16LE

      @NativeType("boolean") public boolean writeU16LE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Uint16") @Unsigned short value)

      Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeS16LE

      @NativeType("boolean") public boolean writeS16LE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Sint16") short value)

      Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeU16BE

      @NativeType("boolean") public boolean writeU16BE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Uint16") @Unsigned short value)

      Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeS16BE

      @NativeType("boolean") public boolean writeS16BE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Sint16") short value)

      Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeU32LE

      @NativeType("boolean") public boolean writeU32LE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Uint32") @Unsigned int value)

      Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeS32LE

      @NativeType("boolean") public boolean writeS32LE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Sint32") int value)

      Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeU32BE

      @NativeType("boolean") public boolean writeU32BE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Uint32") @Unsigned int value)

      Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeS32BE

      @NativeType("boolean") public boolean writeS32BE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Sint32") int value)

      Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeU64LE

      @NativeType("boolean") public boolean writeU64LE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Uint64") @Unsigned long value)

      Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeS64LE

      @NativeType("boolean") public boolean writeS64LE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Sint64") long value)

      Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeU64BE

      @NativeType("boolean") public boolean writeU64BE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Uint64") @Unsigned long value)

      Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeS64BE

      @NativeType("boolean") public boolean writeS64BE(@Nullable @Nullable SDL_IOStream dst, @NativeType("Sint64") long value)

      Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data.

      SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.

      Parameters:
      dst - the stream to which data will be written.
      value - the data to be written, in native format.
      Returns:
      true on successful write or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • lockJoysticks

      public void lockJoysticks()

      Locking for atomic access to the joystick API.

      The SDL joystick functions are thread-safe, however you can lock the joysticks while processing to guarantee that the joystick list won't change and joystick and gamepad events will not be delivered.

      Since:
      This function is available since SDL 3.2.0.
    • unlockJoysticks

      public void unlockJoysticks()
      Unlocking for atomic access to the joystick API.
      Since:
      This function is available since SDL 3.2.0.
    • hasJoystick

      @NativeType("boolean") public boolean hasJoystick()
      Return whether a joystick is currently connected.
      Returns:
      true if a joystick is connected, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoysticks

      @Pointer(comment="SDL_JoystickID") @Unsigned public IntPtr getJoysticks(@Nullable @Nullable IntPtr count)
      Get a list of currently connected joysticks.
      Parameters:
      count - a pointer filled in with the number of joysticks returned, may be NULL.
      Returns:
      a 0 terminated array of joystick instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickNameForID

      public BytePtr getJoystickNameForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the implementation dependent name of a joystick.

      This can be called before any joysticks are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the name of the selected joystick. If no name can be found, this function returns NULL; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickPathForID

      public BytePtr getJoystickPathForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the implementation dependent path of a joystick.

      This can be called before any joysticks are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the path of the selected joystick. If no path can be found, this function returns NULL; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickPlayerIndexForID

      public int getJoystickPlayerIndexForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the player index of a joystick.

      This can be called before any joysticks are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the player index of a joystick, or -1 if it's not available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickGUIDForID

      public SDL_GUID getJoystickGUIDForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the implementation-dependent GUID of a joystick.

      This can be called before any joysticks are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the GUID of the selected joystick. If called with an invalid instance_id, this function returns a zero GUID.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickVendorForID

      @NativeType("Uint16") @Unsigned public short getJoystickVendorForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the USB vendor ID of a joystick, if available.

      This can be called before any joysticks are opened. If the vendor ID isn't available this function returns 0.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the USB vendor ID of the selected joystick. If called with an invalid instance_id, this function returns 0.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickProductForID

      @NativeType("Uint16") @Unsigned public short getJoystickProductForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the USB product ID of a joystick, if available.

      This can be called before any joysticks are opened. If the product ID isn't available this function returns 0.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the USB product ID of the selected joystick. If called with an invalid instance_id, this function returns 0.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickProductVersionForID

      @NativeType("Uint16") @Unsigned public short getJoystickProductVersionForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the product version of a joystick, if available.

      This can be called before any joysticks are opened. If the product version isn't available this function returns 0.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the product version of the selected joystick. If called with an invalid instance_id, this function returns 0.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickTypeForID

      @EnumType(SDL_JoystickType.class) public int getJoystickTypeForID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Get the type of a joystick, if available.

      This can be called before any joysticks are opened.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      the SDL_JoystickType of the selected joystick. If called with an invalid instance_id, this function returns SDL_JOYSTICK_TYPE_UNKNOWN.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openJoystick

      public SDL_Joystick openJoystick(@NativeType("SDL_JoystickID") @Unsigned int instance_id)

      Open a joystick for use.

      The joystick subsystem must be initialized before a joystick can be opened for use.

      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      a joystick identifier or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickFromID

      public SDL_Joystick getJoystickFromID(@NativeType("SDL_JoystickID") @Unsigned int instance_id)
      Get the SDL_Joystick associated with an instance ID, if it has been opened.
      Parameters:
      instance_id - the instance ID to get the SDL_Joystick for.
      Returns:
      an SDL_Joystick on success or NULL on failure or if it hasn't been opened yet; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getJoystickFromPlayerIndex

      public SDL_Joystick getJoystickFromPlayerIndex(int player_index)
      Get the SDL_Joystick associated with a player index.
      Parameters:
      player_index - the player index to get the SDL_Joystick for.
      Returns:
      an SDL_Joystick on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • attachVirtualJoystick

      @NativeType("SDL_JoystickID") @Unsigned public int attachVirtualJoystick(@Nullable @Pointer @Nullable ISDL_VirtualJoystickDesc desc)
      Attach a new virtual joystick.
      Parameters:
      desc - joystick description, initialized using SDL_INIT_INTERFACE().
      Returns:
      the joystick instance ID, or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • detachVirtualJoystick

      @NativeType("boolean") public boolean detachVirtualJoystick(@NativeType("SDL_JoystickID") @Unsigned int instance_id)
      Detach a virtual joystick.
      Parameters:
      instance_id - the joystick instance ID, previously returned from SDL_AttachVirtualJoystick().
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • isJoystickVirtual

      @NativeType("boolean") public boolean isJoystickVirtual(@NativeType("SDL_JoystickID") @Unsigned int instance_id)
      Query whether or not a joystick is virtual.
      Parameters:
      instance_id - the joystick instance ID.
      Returns:
      true if the joystick is virtual, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • setJoystickVirtualAxis

      @NativeType("boolean") public boolean setJoystickVirtualAxis(@Nullable @Nullable SDL_Joystick joystick, int axis, @NativeType("Sint16") short value)

      Set the state of an axis on an opened virtual joystick.

      Please note that values set here will not be applied until the next call to SDL_UpdateJoysticks, which can either be called directly, or can be called indirectly through various other SDL APIs, including, but not limited to the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.

      Note that when sending trigger axes, you should scale the value to the full range of Sint16. For example, a trigger at rest would have the value of SDL_JOYSTICK_AXIS_MIN.

      Parameters:
      joystick - the virtual joystick on which to set state.
      axis - the index of the axis on the virtual joystick to update.
      value - the new value for the specified axis.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setJoystickVirtualBall

      @NativeType("boolean") public boolean setJoystickVirtualBall(@Nullable @Nullable SDL_Joystick joystick, int ball, @NativeType("Sint16") short xrel, @NativeType("Sint16") short yrel)

      Generate ball motion on an opened virtual joystick.

      Please note that values set here will not be applied until the next call to SDL_UpdateJoysticks, which can either be called directly, or can be called indirectly through various other SDL APIs, including, but not limited to the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.

      Parameters:
      joystick - the virtual joystick on which to set state.
      ball - the index of the ball on the virtual joystick to update.
      xrel - the relative motion on the X axis.
      yrel - the relative motion on the Y axis.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setJoystickVirtualButton

      @NativeType("boolean") public boolean setJoystickVirtualButton(@Nullable @Nullable SDL_Joystick joystick, int button, @NativeType("boolean") boolean down)

      Set the state of a button on an opened virtual joystick.

      Please note that values set here will not be applied until the next call to SDL_UpdateJoysticks, which can either be called directly, or can be called indirectly through various other SDL APIs, including, but not limited to the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.

      Parameters:
      joystick - the virtual joystick on which to set state.
      button - the index of the button on the virtual joystick to update.
      down - true if the button is pressed, false otherwise.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setJoystickVirtualHat

      @NativeType("boolean") public boolean setJoystickVirtualHat(@Nullable @Nullable SDL_Joystick joystick, int hat, @NativeType("Uint8") @Unsigned byte value)

      Set the state of a hat on an opened virtual joystick.

      Please note that values set here will not be applied until the next call to SDL_UpdateJoysticks, which can either be called directly, or can be called indirectly through various other SDL APIs, including, but not limited to the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.

      Parameters:
      joystick - the virtual joystick on which to set state.
      hat - the index of the hat on the virtual joystick to update.
      value - the new value for the specified hat.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setJoystickVirtualTouchpad

      @NativeType("boolean") public boolean setJoystickVirtualTouchpad(@Nullable @Nullable SDL_Joystick joystick, int touchpad, int finger, @NativeType("boolean") boolean down, float x, float y, float pressure)

      Set touchpad finger state on an opened virtual joystick.

      Please note that values set here will not be applied until the next call to SDL_UpdateJoysticks, which can either be called directly, or can be called indirectly through various other SDL APIs, including, but not limited to the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.

      Parameters:
      joystick - the virtual joystick on which to set state.
      touchpad - the index of the touchpad on the virtual joystick to update.
      finger - the index of the finger on the touchpad to set.
      down - true if the finger is pressed, false if the finger is released.
      x - the x coordinate of the finger on the touchpad, normalized 0 to 1, with the origin in the upper left.
      y - the y coordinate of the finger on the touchpad, normalized 0 to 1, with the origin in the upper left.
      pressure - the pressure of the finger.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • sendJoystickVirtualSensorData

      @NativeType("boolean") public boolean sendJoystickVirtualSensorData(@Nullable @Nullable SDL_Joystick joystick, @EnumType(SDL_SensorType.class) int type, @NativeType("Uint64") @Unsigned long sensor_timestamp, @Nullable @Nullable FloatPtr data, int num_values)

      Send a sensor update for an opened virtual joystick.

      Please note that values set here will not be applied until the next call to SDL_UpdateJoysticks, which can either be called directly, or can be called indirectly through various other SDL APIs, including, but not limited to the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.

      Parameters:
      joystick - the virtual joystick on which to set state.
      type - the type of the sensor on the virtual joystick to update.
      sensor_timestamp - a 64-bit timestamp in nanoseconds associated with the sensor reading.
      data - the data associated with the sensor reading.
      num_values - the number of values pointed to by data.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getJoystickProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getJoystickProperties(@Nullable @Nullable SDL_Joystick joystick)

      Get the properties associated with a joystick.

      The following read-only properties are provided by SDL:

      • SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN: true if this joystick has an LED that has adjustable brightness
      • SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN: true if this joystick has an LED that has adjustable color
      • SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN: true if this joystick has a player LED
      • SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN: true if this joystick has left/right rumble
      • SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN: true if this joystick has simple trigger rumble
      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getJoystickName

      public BytePtr getJoystickName(@Nullable @Nullable SDL_Joystick joystick)
      Get the implementation dependent name of a joystick.
      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the name of the selected joystick. If no name can be found, this function returns NULL; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickPath

      public BytePtr getJoystickPath(@Nullable @Nullable SDL_Joystick joystick)
      Get the implementation dependent path of a joystick.
      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the path of the selected joystick. If no path can be found, this function returns NULL; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickPlayerIndex

      public int getJoystickPlayerIndex(@Nullable @Nullable SDL_Joystick joystick)

      Get the player index of an opened joystick.

      For XInput controllers this returns the XInput user index. Many joysticks will not be able to supply this information.

      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the player index, or -1 if it's not available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setJoystickPlayerIndex

      @NativeType("boolean") public boolean setJoystickPlayerIndex(@Nullable @Nullable SDL_Joystick joystick, int player_index)
      Set the player index of an opened joystick.
      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      player_index - player index to assign to this joystick, or -1 to clear the player index and turn off player LEDs.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickGUID

      public SDL_GUID getJoystickGUID(@Nullable @Nullable SDL_Joystick joystick)

      Get the implementation-dependent GUID for the joystick.

      This function requires an open joystick.

      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the GUID of the given joystick. If called on an invalid index, this function returns a zero GUID; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickVendor

      @NativeType("Uint16") @Unsigned public short getJoystickVendor(@Nullable @Nullable SDL_Joystick joystick)

      Get the USB vendor ID of an opened joystick, if available.

      If the vendor ID isn't available this function returns 0.

      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the USB vendor ID of the selected joystick, or 0 if unavailable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickProduct

      @NativeType("Uint16") @Unsigned public short getJoystickProduct(@Nullable @Nullable SDL_Joystick joystick)

      Get the USB product ID of an opened joystick, if available.

      If the product ID isn't available this function returns 0.

      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the USB product ID of the selected joystick, or 0 if unavailable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickProductVersion

      @NativeType("Uint16") @Unsigned public short getJoystickProductVersion(@Nullable @Nullable SDL_Joystick joystick)

      Get the product version of an opened joystick, if available.

      If the product version isn't available this function returns 0.

      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the product version of the selected joystick, or 0 if unavailable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickFirmwareVersion

      @NativeType("Uint16") @Unsigned public short getJoystickFirmwareVersion(@Nullable @Nullable SDL_Joystick joystick)

      Get the firmware version of an opened joystick, if available.

      If the firmware version isn't available this function returns 0.

      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the firmware version of the selected joystick, or 0 if unavailable.
      Since:
      This function is available since SDL 3.2.0.
    • getJoystickSerial

      public BytePtr getJoystickSerial(@Nullable @Nullable SDL_Joystick joystick)

      Get the serial number of an opened joystick, if available.

      Returns the serial number of the joystick, or NULL if it is not available.

      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the serial number of the selected joystick, or NULL if unavailable.
      Since:
      This function is available since SDL 3.2.0.
    • getJoystickType

      @EnumType(SDL_JoystickType.class) public int getJoystickType(@Nullable @Nullable SDL_Joystick joystick)
      Get the type of an opened joystick.
      Parameters:
      joystick - the SDL_Joystick obtained from SDL_OpenJoystick().
      Returns:
      the SDL_JoystickType of the selected joystick.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickGUIDInfo

      public void getJoystickGUIDInfo(SDL_GUID guid, @Nullable @Pointer(comment="Uint16") @Unsigned @Nullable ShortPtr vendor, @Nullable @Pointer(comment="Uint16") @Unsigned @Nullable ShortPtr product, @Nullable @Pointer(comment="Uint16") @Unsigned @Nullable ShortPtr version, @Nullable @Pointer(comment="Uint16") @Unsigned @Nullable ShortPtr crc16)
      Get the device information encoded in a SDL_GUID structure.
      Parameters:
      guid - the SDL_GUID you wish to get info about.
      vendor - a pointer filled in with the device VID, or 0 if not available.
      product - a pointer filled in with the device PID, or 0 if not available.
      version - a pointer filled in with the device version, or 0 if not available.
      crc16 - a pointer filled in with a CRC used to distinguish different products with the same VID/PID, or 0 if not available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • joystickConnected

      @NativeType("boolean") public boolean joystickConnected(@Nullable @Nullable SDL_Joystick joystick)
      Get the status of a specified joystick.
      Parameters:
      joystick - the joystick to query.
      Returns:
      true if the joystick has been opened, false if it has not; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getJoystickID

      @NativeType("SDL_JoystickID") @Unsigned public int getJoystickID(@Nullable @Nullable SDL_Joystick joystick)
      Get the instance ID of an opened joystick.
      Parameters:
      joystick - an SDL_Joystick structure containing joystick information.
      Returns:
      the instance ID of the specified joystick on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getNumJoystickAxes

      public int getNumJoystickAxes(@Nullable @Nullable SDL_Joystick joystick)

      Get the number of general axis controls on a joystick.

      Often, the directional pad on a game controller will either look like 4 separate buttons or a POV hat, and not axes, but all of this is up to the device and platform.

      Parameters:
      joystick - an SDL_Joystick structure containing joystick information.
      Returns:
      the number of axis controls/number of axes on success or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumJoystickBalls

      public int getNumJoystickBalls(@Nullable @Nullable SDL_Joystick joystick)

      Get the number of trackballs on a joystick.

      Joystick trackballs have only relative motion events associated with them and their state cannot be polled.

      Most joysticks do not have trackballs.

      Parameters:
      joystick - an SDL_Joystick structure containing joystick information.
      Returns:
      the number of trackballs on success or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumJoystickHats

      public int getNumJoystickHats(@Nullable @Nullable SDL_Joystick joystick)
      Get the number of POV hats on a joystick.
      Parameters:
      joystick - an SDL_Joystick structure containing joystick information.
      Returns:
      the number of POV hats on success or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumJoystickButtons

      public int getNumJoystickButtons(@Nullable @Nullable SDL_Joystick joystick)
      Get the number of buttons on a joystick.
      Parameters:
      joystick - an SDL_Joystick structure containing joystick information.
      Returns:
      the number of buttons on success or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setJoystickEventsEnabled

      public void setJoystickEventsEnabled(@NativeType("boolean") boolean enabled)

      Set the state of joystick event processing.

      If joystick events are disabled, you must call SDL_UpdateJoysticks() yourself and check the state of the joystick when you want joystick information.

      Parameters:
      enabled - whether to process joystick events or not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • joystickEventsEnabled

      @NativeType("boolean") public boolean joystickEventsEnabled()

      Query the state of joystick event processing.

      If joystick events are disabled, you must call SDL_UpdateJoysticks() yourself and check the state of the joystick when you want joystick information.

      Returns:
      true if joystick events are being processed, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • updateJoysticks

      public void updateJoysticks()

      Update the current state of the open joysticks.

      This is called automatically by the event loop if any joystick events are enabled.

      Since:
      This function is available since SDL 3.2.0.
    • getJoystickAxis

      @NativeType("Sint16") public short getJoystickAxis(@Nullable @Nullable SDL_Joystick joystick, int axis)

      Get the current state of an axis control on a joystick.

      SDL makes no promises about what part of the joystick any given axis refers to. Your game should have some sort of configuration UI to let users specify what each axis should be bound to. Alternately, SDL's higher-level Game Controller API makes a great effort to apply order to this lower-level interface, so you know that a specific axis is the "left thumb stick," etc.

      The value returned by SDL_GetJoystickAxis() is a signed integer (-32768 to 32767) representing the current position of the axis. It may be necessary to impose certain tolerances on these values to account for jitter.

      Parameters:
      joystick - an SDL_Joystick structure containing joystick information.
      axis - the axis to query; the axis indices start at index 0.
      Returns:
      a 16-bit signed integer representing the current position of the axis or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickAxisInitialState

      @NativeType("boolean") public boolean getJoystickAxisInitialState(@Nullable @Nullable SDL_Joystick joystick, int axis, @Nullable @Pointer(comment="Sint16") @Nullable ShortPtr state)

      Get the initial state of an axis control on a joystick.

      The state is a value ranging from -32768 to 32767.

      The axis indices start at index 0.

      Parameters:
      joystick - an SDL_Joystick structure containing joystick information.
      axis - the axis to query; the axis indices start at index 0.
      state - upon return, the initial value is supplied here.
      Returns:
      true if this axis has any initial value, or false if not.
      Since:
      This function is available since SDL 3.2.0.
    • getJoystickBall

      @NativeType("boolean") public boolean getJoystickBall(@Nullable @Nullable SDL_Joystick joystick, int ball, @Nullable @Nullable IntPtr dx, @Nullable @Nullable IntPtr dy)

      Get the ball axis change since the last poll.

      Trackballs can only return relative motion since the last call to SDL_GetJoystickBall(), these motion deltas are placed into dx and dy.

      Most joysticks do not have trackballs.

      Parameters:
      joystick - the SDL_Joystick to query.
      ball - the ball index to query; ball indices start at index 0.
      dx - stores the difference in the x axis position since the last poll.
      dy - stores the difference in the y axis position since the last poll.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickHat

      @NativeType("Uint8") @Unsigned public byte getJoystickHat(@Nullable @Nullable SDL_Joystick joystick, int hat)

      Get the current state of a POV hat on a joystick.

      The returned value will be one of the SDL_HAT_* values.

      Parameters:
      joystick - an SDL_Joystick structure containing joystick information.
      hat - the hat index to get the state from; indices start at index 0.
      Returns:
      the current hat position.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickButton

      @NativeType("boolean") public boolean getJoystickButton(@Nullable @Nullable SDL_Joystick joystick, int button)
      Get the current state of a button on a joystick.
      Parameters:
      joystick - an SDL_Joystick structure containing joystick information.
      button - the button index to get the state from; indices start at index 0.
      Returns:
      true if the button is pressed, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • rumbleJoystick

      @NativeType("boolean") public boolean rumbleJoystick(@Nullable @Nullable SDL_Joystick joystick, @NativeType("Uint16") @Unsigned short low_frequency_rumble, @NativeType("Uint16") @Unsigned short high_frequency_rumble, @NativeType("Uint32") @Unsigned int duration_ms)

      Start a rumble effect.

      Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.

      This function requires you to process SDL events or call SDL_UpdateJoysticks() to update rumble state.

      Parameters:
      joystick - the joystick to vibrate.
      low_frequency_rumble - the intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF.
      high_frequency_rumble - the intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF.
      duration_ms - the duration of the rumble effect, in milliseconds.
      Returns:
      true, or false if rumble isn't supported on this joystick.
      Since:
      This function is available since SDL 3.2.0.
    • rumbleJoystickTriggers

      @NativeType("boolean") public boolean rumbleJoystickTriggers(@Nullable @Nullable SDL_Joystick joystick, @NativeType("Uint16") @Unsigned short left_rumble, @NativeType("Uint16") @Unsigned short right_rumble, @NativeType("Uint32") @Unsigned int duration_ms)

      Start a rumble effect in the joystick's triggers.

      Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling.

      Note that this is rumbling of the triggers and not the game controller as a whole. This is currently only supported on Xbox One controllers. If you want the (more common) whole-controller rumble, use SDL_RumbleJoystick() instead.

      This function requires you to process SDL events or call SDL_UpdateJoysticks() to update rumble state.

      Parameters:
      joystick - the joystick to vibrate.
      left_rumble - the intensity of the left trigger rumble motor, from 0 to 0xFFFF.
      right_rumble - the intensity of the right trigger rumble motor, from 0 to 0xFFFF.
      duration_ms - the duration of the rumble effect, in milliseconds.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setJoystickLED

      @NativeType("boolean") public boolean setJoystickLED(@Nullable @Nullable SDL_Joystick joystick, @NativeType("Uint8") @Unsigned byte red, @NativeType("Uint8") @Unsigned byte green, @NativeType("Uint8") @Unsigned byte blue)

      Update a joystick's LED color.

      An example of a joystick LED is the light on the back of a PlayStation 4's DualShock 4 controller.

      For joysticks with a single color LED, the maximum of the RGB values will be used as the LED brightness.

      Parameters:
      joystick - the joystick to update.
      red - the intensity of the red LED.
      green - the intensity of the green LED.
      blue - the intensity of the blue LED.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • sendJoystickEffect

      @NativeType("boolean") public boolean sendJoystickEffect(@Nullable @Nullable SDL_Joystick joystick, @Pointer(comment="void*") MemorySegment data, int size)
      Send a joystick specific effect packet.
      Parameters:
      joystick - the joystick to affect.
      data - the data to send to the joystick.
      size - the size of the data to send to the joystick.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • closeJoystick

      public void closeJoystick(@Nullable @Nullable SDL_Joystick joystick)
      Close a joystick previously opened with SDL_OpenJoystick().
      Parameters:
      joystick - the joystick device to close.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getJoystickConnectionState

      @EnumType(SDL_JoystickConnectionState.class) public int getJoystickConnectionState(@Nullable @Nullable SDL_Joystick joystick)
      Get the connection state of a joystick.
      Parameters:
      joystick - the joystick to query.
      Returns:
      the connection state on success or SDL_JOYSTICK_CONNECTION_INVALID on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getJoystickPowerInfo

      @EnumType(SDL_PowerState.class) public int getJoystickPowerInfo(@Nullable @Nullable SDL_Joystick joystick, @Nullable @Nullable IntPtr percent)

      Get the battery state of a joystick.

      You should never take a battery status as absolute truth. Batteries (especially failing batteries) are delicate hardware, and the values reported here are best estimates based on what that hardware reports. It's not uncommon for older batteries to lose stored power much faster than it reports, or completely drain when reporting it has 20 percent left, etc.

      Parameters:
      joystick - the joystick to query.
      percent - a pointer filled in with the percentage of battery life left, between 0 and 100, or NULL to ignore. This will be filled in with -1 we can't determine a value or there is no battery.
      Returns:
      the current battery state or SDL_POWERSTATE_ERROR on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hasKeyboard

      @NativeType("boolean") public boolean hasKeyboard()
      Return whether a keyboard is currently connected.
      Returns:
      true if a keyboard is connected, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getKeyboards

      @Pointer(comment="SDL_KeyboardID") @Unsigned public IntPtr getKeyboards(@Nullable @Nullable IntPtr count)

      Get a list of currently connected keyboards.

      Note that this will include any device or virtual driver that includes keyboard functionality, including some mice, KVM switches, motherboard power buttons, etc. You should wait for input from a device before you consider it actively in use.

      Parameters:
      count - a pointer filled in with the number of keyboards returned, may be NULL.
      Returns:
      a 0 terminated array of keyboards instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getKeyboardNameForID

      public BytePtr getKeyboardNameForID(@NativeType("SDL_KeyboardID") @Unsigned int instance_id)

      Get the name of a keyboard.

      This function returns "" if the keyboard doesn't have a name.

      Parameters:
      instance_id - the keyboard instance ID.
      Returns:
      the name of the selected keyboard or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getKeyboardFocus

      public SDL_Window getKeyboardFocus()
      Query the window which currently has keyboard focus.
      Returns:
      the window with keyboard focus.
      Since:
      This function is available since SDL 3.2.0.
    • getKeyboardState

      @Pointer(comment="boolean") public BytePtr getKeyboardState(@Nullable @Nullable IntPtr numkeys)

      Get a snapshot of the current state of the keyboard.

      The pointer returned is a pointer to an internal SDL array. It will be valid for the whole lifetime of the application and should not be freed by the caller.

      A array element with a value of true means that the key is pressed and a value of false means that it is not. Indexes into this array are obtained by using SDL_Scancode values.

      Use SDL_PumpEvents() to update the state array.

      This function gives you the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the SDL_GetKeyboardState() calls.

      Note: This function doesn't take into account whether shift has been pressed or not.

      Parameters:
      numkeys - if non-NULL, receives the length of the returned array.
      Returns:
      a pointer to an array of key states.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • resetKeyboard

      public void resetKeyboard()

      Clear the state of the keyboard.

      This function will generate key up events for all pressed keys.

      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getModState

      @EnumType(SDL_Keymod.class) public int getModState()
      Get the current key modifier state for the keyboard.
      Returns:
      an OR'd combination of the modifier keys for the keyboard. See SDL_Keymod for details.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setModState

      public void setModState(@EnumType(SDL_Keymod.class) int modstate)

      Set the current key modifier state for the keyboard.

      The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose modifier key states on your application. Simply pass your desired modifier states into modstate. This value may be a bitwise, OR'd combination of SDL_Keymod values.

      This does not change the keyboard state, only the key modifier flags that SDL reports.

      Parameters:
      modstate - the desired SDL_Keymod for the keyboard.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getKeyFromScancode

      @EnumType(SDL_Keycode.class) public int getKeyFromScancode(@EnumType(SDL_Scancode.class) int scancode, @EnumType(SDL_Keymod.class) int modstate, @NativeType("boolean") boolean key_event)

      Get the key code corresponding to the given scancode according to the current keyboard layout.

      If you want to get the keycode as it would be delivered in key events, including options specified in SDL_HINT_KEYCODE_OPTIONS, then you should pass key_event as true. Otherwise this function simply translates the scancode based on the given modifier state.

      Parameters:
      scancode - the desired SDL_Scancode to query.
      modstate - the modifier state to use when translating the scancode to a keycode.
      key_event - true if the keycode will be used in key events.
      Returns:
      the SDL_Keycode that corresponds to the given SDL_Scancode.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getScancodeFromKey

      @EnumType(SDL_Scancode.class) public int getScancodeFromKey(@EnumType(SDL_Keycode.class) int key, @Nullable @EnumType(SDL_Keymod.class) @Nullable IntPtr modstate)

      Get the scancode corresponding to the given key code according to the current keyboard layout.

      Note that there may be multiple scancode+modifier states that can generate this keycode, this will just return the first one found.

      Parameters:
      key - the desired SDL_Keycode to query.
      modstate - a pointer to the modifier state that would be used when the scancode generates this key, may be NULL.
      Returns:
      the SDL_Scancode that corresponds to the given SDL_Keycode.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setScancodeName

      @NativeType("boolean") public boolean setScancodeName(@EnumType(SDL_Scancode.class) int scancode, @Nullable @Nullable BytePtr name)
      Set a human-readable name for a scancode.
      Parameters:
      scancode - the desired SDL_Scancode.
      name - the name to use for the scancode, encoded as UTF-8. The string is not copied, so the pointer given to this function must stay valid while SDL is being used.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getScancodeName

      public BytePtr getScancodeName(@EnumType(SDL_Scancode.class) int scancode)

      Get a human-readable name for a scancode.

      Warning: The returned name is by design not stable across platforms, e.g. the name for SDL_SCANCODE_LGUI is "Left GUI" under Linux but "Left Windows" under Microsoft Windows, and some scancodes like SDL_SCANCODE_NONUSBACKSLASH don't have any name at all. There are even scancodes that share names, e.g. SDL_SCANCODE_RETURN and SDL_SCANCODE_RETURN2 (both called "Return"). This function is therefore unsuitable for creating a stable cross-platform two-way mapping between strings and scancodes.

      Parameters:
      scancode - the desired SDL_Scancode to query.
      Returns:
      a pointer to the name for the scancode. If the scancode doesn't have a name this function returns an empty string ("").
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getScancodeFromName

      @EnumType(SDL_Scancode.class) public int getScancodeFromName(@Nullable @Nullable BytePtr name)
      Get a scancode from a human-readable name.
      Parameters:
      name - the human-readable scancode name.
      Returns:
      the SDL_Scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't recognized; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getKeyName

      public BytePtr getKeyName(@EnumType(SDL_Keycode.class) int key)

      Get a human-readable name for a key.

      If the key doesn't have a name, this function returns an empty string ("").

      Letters will be presented in their uppercase form, if applicable.

      Parameters:
      key - the desired SDL_Keycode to query.
      Returns:
      a UTF-8 encoded string of the key name.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getKeyFromName

      @EnumType(SDL_Keycode.class) public int getKeyFromName(@Nullable @Nullable BytePtr name)
      Get a key code from a human-readable name.
      Parameters:
      name - the human-readable key name.
      Returns:
      key code, or SDLK_UNKNOWN if the name wasn't recognized; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • startTextInput

      @NativeType("boolean") public boolean startTextInput(@Nullable @Nullable SDL_Window window)

      Start accepting Unicode text input events in a window.

      This function will enable text input (SDL_EVENT_TEXT_INPUT and SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this function paired with SDL_StopTextInput().

      Text input events are not received by default.

      On some platforms using this function shows the screen keyboard and/or activates an IME, which can prevent some key press events from being passed through.

      Parameters:
      window - the window to enable text input.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • startTextInputWithProperties

      @NativeType("boolean") public boolean startTextInputWithProperties(@Nullable @Nullable SDL_Window window, @NativeType("SDL_PropertiesID") @Unsigned int props)

      Start accepting Unicode text input events in a window, with properties describing the input.

      This function will enable text input (SDL_EVENT_TEXT_INPUT and SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this function paired with SDL_StopTextInput().

      Text input events are not received by default.

      On some platforms using this function shows the screen keyboard and/or activates an IME, which can prevent some key press events from being passed through.

      These are the supported properties:

      • SDL_PROP_TEXTINPUT_TYPE_NUMBER - an SDL_TextInputType value that describes text being input, defaults to SDL_TEXTINPUT_TYPE_TEXT.
      • SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER - an SDL_Capitalization value that describes how text should be capitalized, defaults to SDL_CAPITALIZE_SENTENCES for normal text entry, SDL_CAPITALIZE_WORDS for SDL_TEXTINPUT_TYPE_TEXT_NAME, and SDL_CAPITALIZE_NONE for e-mail addresses, usernames, and passwords.
      • SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN - true to enable auto completion and auto correction, defaults to true.
      • SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN - true if multiple lines of text are allowed. This defaults to true if SDL_HINT_RETURN_KEY_HIDES_IME is "0" or is not set, and defaults to false if SDL_HINT_RETURN_KEY_HIDES_IME is "1".

      On Android you can directly specify the input type:

      • SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER - the text input type to use, overriding other properties. This is documented at https://developer.android.com/reference/android/text/InputType
      Parameters:
      window - the window to enable text input.
      props - the properties to use.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • textInputActive

      @NativeType("boolean") public boolean textInputActive(@Nullable @Nullable SDL_Window window)
      Check whether or not Unicode text input events are enabled for a window.
      Parameters:
      window - the window to check.
      Returns:
      true if text input events are enabled else false.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • stopTextInput

      @NativeType("boolean") public boolean stopTextInput(@Nullable @Nullable SDL_Window window)

      Stop receiving any text input events in a window.

      If SDL_StartTextInput() showed the screen keyboard, this function will hide it.

      Parameters:
      window - the window to disable text input.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • clearComposition

      @NativeType("boolean") public boolean clearComposition(@Nullable @Nullable SDL_Window window)
      Dismiss the composition window/IME without disabling the subsystem.
      Parameters:
      window - the window to affect.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTextInputArea

      @NativeType("boolean") public boolean setTextInputArea(@Nullable @Nullable SDL_Window window, @Nullable @Pointer @Nullable ISDL_Rect rect, int cursor)

      Set the area used to type Unicode text input.

      Native input methods may place a window with word suggestions near the cursor, without covering the text being entered.

      Parameters:
      window - the window for which to set the text input area.
      rect - the SDL_Rect representing the text input area, in window coordinates, or NULL to clear it.
      cursor - the offset of the current cursor location relative to rect->x, in window coordinates.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTextInputArea

      @NativeType("boolean") public boolean getTextInputArea(@Nullable @Nullable SDL_Window window, @Nullable @Pointer @Nullable ISDL_Rect rect, @Nullable @Nullable IntPtr cursor)

      Get the area used to type Unicode text input.

      This returns the values previously set by SDL_SetTextInputArea().

      Parameters:
      window - the window for which to query the text input area.
      rect - a pointer to an SDL_Rect filled in with the text input area, may be NULL.
      cursor - a pointer to the offset of the current cursor location relative to rect->x, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasScreenKeyboardSupport

      @NativeType("boolean") public boolean hasScreenKeyboardSupport()
      Check whether the platform has screen keyboard support.
      Returns:
      true if the platform has some screen keyboard support or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • screenKeyboardShown

      @NativeType("boolean") public boolean screenKeyboardShown(@Nullable @Nullable SDL_Window window)
      Check whether the screen keyboard is shown for given window.
      Parameters:
      window - the window for which screen keyboard should be queried.
      Returns:
      true if screen keyboard is shown or false if not.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • loadObject

      public SDL_SharedObject loadObject(@Nullable @Nullable BytePtr sofile)
      Dynamically load a shared object.
      Parameters:
      sofile - a system-dependent name of the object file.
      Returns:
      an opaque pointer to the object handle or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • loadFunction

      @Pointer(comment="SDL_FunctionPointer") public MemorySegment loadFunction(@Nullable @Nullable SDL_SharedObject handle, @Nullable @Nullable BytePtr name)

      Look up the address of the named function in a shared object.

      This function pointer is no longer valid after calling SDL_UnloadObject().

      This function can only look up C function names. Other languages may have name mangling and intrinsic language support that varies from compiler to compiler.

      Make sure you declare your function pointers with the same calling convention as the actual library function. Your code will crash mysteriously if you do not do this.

      If the requested function doesn't exist, NULL is returned.

      Parameters:
      handle - a valid shared object handle returned by SDL_LoadObject().
      name - the name of the function to look up.
      Returns:
      a pointer to the function or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unloadObject

      public void unloadObject(@Nullable @Nullable SDL_SharedObject handle)

      Unload a shared object from memory.

      Note that any pointers from this object looked up through SDL_LoadFunction() will no longer be valid.

      Parameters:
      handle - a valid shared object handle returned by SDL_LoadObject().
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPreferredLocales

      public PointerPtr getPreferredLocales(@Nullable @Nullable IntPtr count)

      Report the user's preferred locale.

      Returned language strings are in the format xx, where 'xx' is an ISO-639 language specifier (such as "en" for English, "de" for German, etc). Country strings are in the format YY, where "YY" is an ISO-3166 country code (such as "US" for the United States, "CA" for Canada, etc). Country might be NULL if there's no specific guidance on them (so you might get { "en", "US" } for American English, but { "en", NULL } means "English language, generically"). Language strings are never NULL, except to terminate the array.

      Please note that not all of these strings are 2 characters; some are three or more.

      The returned list of locales are in the order of the user's preference. For example, a German citizen that is fluent in US English and knows enough Japanese to navigate around Tokyo might have a list like: { "de", "en_US", "jp", NULL }. Someone from England might prefer British English (where "color" is spelled "colour", etc), but will settle for anything like it: { "en_GB", "en", NULL }.

      This function returns NULL on error, including when the platform does not supply this information at all.

      This might be a "slow" call that has to query the operating system. It's best to ask for this once and save the results. However, this list can change, usually because the user has changed a system preference outside of your program; SDL will send an SDL_EVENT_LOCALE_CHANGED event in this case, if possible, and you can call this function again to get an updated copy of preferred locales.

      Parameters:
      count - a pointer filled in with the number of locales returned, may be NULL.
      Returns:
      a NULL terminated array of locale pointers, or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • setLogPriorities

      public void setLogPriorities(@EnumType(SDL_LogPriority.class) int priority)
      Set the priority of all log categories.
      Parameters:
      priority - the SDL_LogPriority to assign.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setLogPriority

      public void setLogPriority(int category, @EnumType(SDL_LogPriority.class) int priority)
      Set the priority of a particular log category.
      Parameters:
      category - the category to assign a priority to.
      priority - the SDL_LogPriority to assign.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getLogPriority

      @EnumType(SDL_LogPriority.class) public int getLogPriority(int category)
      Get the priority of a particular log category.
      Parameters:
      category - the category to query.
      Returns:
      the SDL_LogPriority for the requested category.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • resetLogPriorities

      public void resetLogPriorities()

      Reset all priorities to default.

      This is called by SDL_Quit().

      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setLogPriorityPrefix

      @NativeType("boolean") public boolean setLogPriorityPrefix(@EnumType(SDL_LogPriority.class) int priority, @Nullable @Nullable BytePtr prefix)

      Set the text prepended to log messages of a given priority.

      By default SDL_LOG_PRIORITY_INFO and below have no prefix, and SDL_LOG_PRIORITY_WARN and higher have a prefix showing their priority, e.g. "WARNING: ".

      Parameters:
      priority - the SDL_LogPriority to modify.
      prefix - the prefix to use for that log priority, or NULL to use no prefix.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDefaultLogOutputFunction

      @Pointer(comment="SDL_LogOutputFunction") public MemorySegment getDefaultLogOutputFunction()
      Get the default log output function.
      Returns:
      the default log output callback.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getLogOutputFunction

      public void getLogOutputFunction(@Nullable @Nullable PointerPtr callback, @Nullable @Nullable PointerPtr userdata)
      Get the current log output function.
      Parameters:
      callback - an SDL_LogOutputFunction filled in with the current log callback.
      userdata - a pointer filled in with the pointer that is passed to callback.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setLogOutputFunction

      public void setLogOutputFunction(@Pointer(comment="SDL_LogOutputFunction") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)
      Replace the default log output function with one of your own.
      Parameters:
      callback - an SDL_LogOutputFunction to call instead of the default.
      userdata - a pointer that is passed to callback.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • showMessageBox

      @NativeType("boolean") public boolean showMessageBox(@Nullable @Pointer @Nullable ISDL_MessageBoxData messageboxdata, @Nullable @Nullable IntPtr buttonid)

      Create a modal message box.

      If your needs aren't complex, it might be easier to use SDL_ShowSimpleMessageBox.

      This function should be called on the thread that created the parent window, or on the main thread if the messagebox has no parent. It will block execution of that thread until the user clicks a button or closes the messagebox.

      This function may be called at any time, even before SDL_Init(). This makes it useful for reporting errors like a failure to create a renderer or OpenGL context.

      On X11, SDL rolls its own dialog box with X11 primitives instead of a formal toolkit like GTK+ or Qt.

      Note that if SDL_Init() would fail because there isn't any available video target, this function is likely to fail for the same reasons. If this is a concern, check the return value from this function and fall back to writing to stderr if you can.

      Parameters:
      messageboxdata - the SDL_MessageBoxData structure with title, text and other options.
      buttonid - the pointer to which user id of hit button should be copied.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • showSimpleMessageBox

      @NativeType("boolean") public boolean showSimpleMessageBox(@EnumType(SDL_MessageBoxFlags.class) int flags, @Nullable @Nullable BytePtr title, @Nullable @Nullable BytePtr message, @Nullable @Nullable SDL_Window window)

      Display a simple modal message box.

      If your needs aren't complex, this function is preferred over SDL_ShowMessageBox.

      flags may be any of the following:

      • SDL_MESSAGEBOX_ERROR: error dialog
      • SDL_MESSAGEBOX_WARNING: warning dialog
      • SDL_MESSAGEBOX_INFORMATION: informational dialog

      This function should be called on the thread that created the parent window, or on the main thread if the messagebox has no parent. It will block execution of that thread until the user clicks a button or closes the messagebox.

      This function may be called at any time, even before SDL_Init(). This makes it useful for reporting errors like a failure to create a renderer or OpenGL context.

      On X11, SDL rolls its own dialog box with X11 primitives instead of a formal toolkit like GTK+ or Qt.

      Note that if SDL_Init() would fail because there isn't any available video target, this function is likely to fail for the same reasons. If this is a concern, check the return value from this function and fall back to writing to stderr if you can.

      Parameters:
      flags - an SDL_MessageBoxFlags value.
      title - UTF-8 title text.
      message - UTF-8 message text.
      window - the parent window, or NULL for no parent.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • metal_CreateView

      @Pointer(comment="SDL_MetalView") public MemorySegment metal_CreateView(@Nullable @Nullable SDL_Window window)

      Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window.

      On macOS, this does not associate a MTLDevice with the CAMetalLayer on its own. It is up to user code to do that.

      The returned handle can be casted directly to a NSView or UIView. To access the backing CAMetalLayer, call SDL_Metal_GetLayer().

      Parameters:
      window - the window.
      Returns:
      handle NSView or UIView.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • metal_DestroyView

      public void metal_DestroyView(@Pointer(comment="SDL_MetalView") MemorySegment view)

      Destroy an existing SDL_MetalView object.

      This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was called after SDL_CreateWindow.

      Parameters:
      view - the SDL_MetalView object.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • metal_GetLayer

      @Pointer(comment="void*") public MemorySegment metal_GetLayer(@Pointer(comment="SDL_MetalView") MemorySegment view)
      Get a pointer to the backing CAMetalLayer for the given view.
      Parameters:
      view - the SDL_MetalView object.
      Returns:
      a pointer.
      Since:
      This function is available since SDL 3.2.0.
    • openURL

      @NativeType("boolean") public boolean openURL(@Nullable @Nullable BytePtr url)

      Open a URL/URI in the browser or other appropriate external application.

      Open a URL in a separate, system-provided application. How this works will vary wildly depending on the platform. This will likely launch what makes sense to handle a specific URL's protocol (a web browser for http://, etc), but it might also be able to launch file managers for directories and other things.

      What happens when you open a URL varies wildly as well: your game window may lose focus (and may or may not lose focus if your game was fullscreen or grabbing input at the time). On mobile devices, your app will likely move to the background or your process might be paused. Any given platform may or may not handle a given URL.

      If this is unimplemented (or simply unavailable) for a platform, this will fail with an error. A successful result does not mean the URL loaded, just that we launched something to handle it (or at least believe we did).

      All this to say: this function can be useful, but you should definitely test it on every platform you target.

      Parameters:
      url - a valid URL/URI to open. Use file:///full/path/to/file for local files, if supported.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • hasMouse

      @NativeType("boolean") public boolean hasMouse()
      Return whether a mouse is currently connected.
      Returns:
      true if a mouse is connected, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getMice

      @Pointer(comment="SDL_MouseID") @Unsigned public IntPtr getMice(@Nullable @Nullable IntPtr count)

      Get a list of currently connected mice.

      Note that this will include any device or virtual driver that includes mouse functionality, including some game controllers, KVM switches, etc. You should wait for input from a device before you consider it actively in use.

      Parameters:
      count - a pointer filled in with the number of mice returned, may be NULL.
      Returns:
      a 0 terminated array of mouse instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getMouseNameForID

      public BytePtr getMouseNameForID(@NativeType("SDL_MouseID") @Unsigned int instance_id)

      Get the name of a mouse.

      This function returns "" if the mouse doesn't have a name.

      Parameters:
      instance_id - the mouse instance ID.
      Returns:
      the name of the selected mouse, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getMouseFocus

      public SDL_Window getMouseFocus()
      Get the window which currently has mouse focus.
      Returns:
      the window with mouse focus.
      Since:
      This function is available since SDL 3.2.0.
    • getMouseState

      @EnumType(SDL_MouseButtonFlags.class) public int getMouseState(@Nullable @Nullable FloatPtr x, @Nullable @Nullable FloatPtr y)

      Query SDL's cache for the synchronous mouse button state and the window-relative SDL-cursor position.

      This function returns the cached synchronous state as SDL understands it from the last pump of the event queue.

      To query the platform for immediate asynchronous state, use SDL_GetGlobalMouseState.

      Passing non-NULL pointers to x or y will write the destination with respective x or y coordinates relative to the focused window.

      In Relative Mode, the SDL-cursor's position usually contradicts the platform-cursor's position as manually calculated from SDL_GetGlobalMouseState() and SDL_GetWindowPosition.

      Parameters:
      x - a pointer to receive the SDL-cursor's x-position from the focused window's top left corner, can be NULL if unused.
      y - a pointer to receive the SDL-cursor's y-position from the focused window's top left corner, can be NULL if unused.
      Returns:
      a 32-bit bitmask of the button state that can be bitwise-compared against the SDL_BUTTON_MASK(X) macro.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGlobalMouseState

      @EnumType(SDL_MouseButtonFlags.class) public int getGlobalMouseState(@Nullable @Nullable FloatPtr x, @Nullable @Nullable FloatPtr y)

      Query the platform for the asynchronous mouse button state and the desktop-relative platform-cursor position.

      This function immediately queries the platform for the most recent asynchronous state, more costly than retrieving SDL's cached state in SDL_GetMouseState().

      Passing non-NULL pointers to x or y will write the destination with respective x or y coordinates relative to the desktop.

      In Relative Mode, the platform-cursor's position usually contradicts the SDL-cursor's position as manually calculated from SDL_GetMouseState() and SDL_GetWindowPosition.

      This function can be useful if you need to track the mouse outside of a specific window and SDL_CaptureMouse() doesn't fit your needs. For example, it could be useful if you need to track the mouse while dragging a window, where coordinates relative to a window might not be in sync at all times.

      Parameters:
      x - a pointer to receive the platform-cursor's x-position from the desktop's top left corner, can be NULL if unused.
      y - a pointer to receive the platform-cursor's y-position from the desktop's top left corner, can be NULL if unused.
      Returns:
      a 32-bit bitmask of the button state that can be bitwise-compared against the SDL_BUTTON_MASK(X) macro.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRelativeMouseState

      @EnumType(SDL_MouseButtonFlags.class) public int getRelativeMouseState(@Nullable @Nullable FloatPtr x, @Nullable @Nullable FloatPtr y)

      Query SDL's cache for the synchronous mouse button state and accumulated mouse delta since last call.

      This function returns the cached synchronous state as SDL understands it from the last pump of the event queue.

      To query the platform for immediate asynchronous state, use SDL_GetGlobalMouseState.

      Passing non-NULL pointers to x or y will write the destination with respective x or y deltas accumulated since the last call to this function (or since event initialization).

      This function is useful for reducing overhead by processing relative mouse inputs in one go per-frame instead of individually per-event, at the expense of losing the order between events within the frame (e.g. quickly pressing and releasing a button within the same frame).

      Parameters:
      x - a pointer to receive the x mouse delta accumulated since last call, can be NULL if unused.
      y - a pointer to receive the y mouse delta accumulated since last call, can be NULL if unused.
      Returns:
      a 32-bit bitmask of the button state that can be bitwise-compared against the SDL_BUTTON_MASK(X) macro.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • warpMouseInWindow

      public void warpMouseInWindow(@Nullable @Nullable SDL_Window window, float x, float y)

      Move the mouse cursor to the given position within the window.

      This function generates a mouse motion event if relative mode is not enabled. If relative mode is enabled, you can force mouse events for the warp by setting the SDL_HINT_MOUSE_RELATIVE_WARP_MOTION hint.

      Note that this function will appear to succeed, but not actually move the mouse when used over Microsoft Remote Desktop.

      Parameters:
      window - the window to move the mouse into, or NULL for the current mouse focus.
      x - the x coordinate within the window.
      y - the y coordinate within the window.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • warpMouseGlobal

      @NativeType("boolean") public boolean warpMouseGlobal(float x, float y)

      Move the mouse to the given position in global screen space.

      This function generates a mouse motion event.

      A failure of this function usually means that it is unsupported by a platform.

      Note that this function will appear to succeed, but not actually move the mouse when used over Microsoft Remote Desktop.

      Parameters:
      x - the x coordinate.
      y - the y coordinate.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowRelativeMouseMode

      @NativeType("boolean") public boolean setWindowRelativeMouseMode(@Nullable @Nullable SDL_Window window, @NativeType("boolean") boolean enabled)

      Set relative mouse mode for a window.

      While the window has focus and relative mouse mode is enabled, the cursor is hidden, the mouse position is constrained to the window, and SDL will report continuous relative mouse motion even if the mouse is at the edge of the window.

      If you'd like to keep the mouse position fixed while in relative mode you can use SDL_SetWindowMouseRect(). If you'd like the cursor to be at a specific location when relative mode ends, you should use SDL_WarpMouseInWindow() before disabling relative mode.

      This function will flush any pending mouse motion for this window.

      Parameters:
      window - the window to change.
      enabled - true to enable relative mode, false to disable.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowRelativeMouseMode

      @NativeType("boolean") public boolean getWindowRelativeMouseMode(@Nullable @Nullable SDL_Window window)
      Query whether relative mouse mode is enabled for a window.
      Parameters:
      window - the window to query.
      Returns:
      true if relative mode is enabled for a window or false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • captureMouse

      @NativeType("boolean") public boolean captureMouse(@NativeType("boolean") boolean enabled)

      Capture the mouse and to track input outside an SDL window.

      Capturing enables your app to obtain mouse events globally, instead of just within your window. Not all video targets support this function. When capturing is enabled, the current window will get all mouse events, but unlike relative mode, no change is made to the cursor and it is not restrained to your window.

      This function may also deny mouse input to other windows--both those in your application and others on the system--so you should use this function sparingly, and in small bursts. For example, you might want to track the mouse while the user is dragging something, until the user releases a mouse button. It is not recommended that you capture the mouse for long periods of time, such as the entire time your app is running. For that, you should probably use SDL_SetWindowRelativeMouseMode() or SDL_SetWindowMouseGrab(), depending on your goals.

      While captured, mouse events still report coordinates relative to the current (foreground) window, but those coordinates may be outside the bounds of the window (including negative values). Capturing is only allowed for the foreground window. If the window loses focus while capturing, the capture will be disabled automatically.

      While capturing is enabled, the current window will have the SDL_WINDOW_MOUSE_CAPTURE flag set.

      Please note that SDL will attempt to "auto capture" the mouse while the user is pressing a button; this is to try and make mouse behavior more consistent between platforms, and deal with the common case of a user dragging the mouse outside of the window. This means that if you are calling SDL_CaptureMouse() only to deal with this situation, you do not have to (although it is safe to do so). If this causes problems for your app, you can disable auto capture by setting the SDL_HINT_MOUSE_AUTO_CAPTURE hint to zero.

      Parameters:
      enabled - true to enable capturing, false to disable.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createCursor

      public SDL_Cursor createCursor(@Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr data, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr mask, int w, int h, int hot_x, int hot_y)

      Create a cursor using the specified bitmap data and mask (in MSB format).

      mask has to be in MSB (Most Significant Bit) format.

      The cursor width (w) must be a multiple of 8 bits.

      The cursor is created in black and white according to the following:

      • data=0, mask=1: white
      • data=1, mask=1: black
      • data=0, mask=0: transparent
      • data=1, mask=0: inverted color if possible, black if not.

      Cursors created with this function must be freed with SDL_DestroyCursor().

      If you want to have a color cursor, or create your cursor from an SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can hide the cursor and draw your own as part of your game's rendering, but it will be bound to the framerate.

      Also, SDL_CreateSystemCursor() is available, which provides several readily-available system cursors to pick from.

      Parameters:
      data - the color value for each pixel of the cursor.
      mask - the mask value for each pixel of the cursor.
      w - the width of the cursor.
      h - the height of the cursor.
      hot_x - the x-axis offset from the left of the cursor image to the mouse x position, in the range of 0 to w - 1.
      hot_y - the y-axis offset from the top of the cursor image to the mouse y position, in the range of 0 to h - 1.
      Returns:
      a new cursor with the specified parameters on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createColorCursor

      public SDL_Cursor createColorCursor(@Nullable @Nullable SDL_Surface surface, int hot_x, int hot_y)

      Create a color cursor.

      If this function is passed a surface with alternate representations, the surface will be interpreted as the content to be used for 100% display scale, and the alternate representations will be used for high DPI situations. For example, if the original surface is 32x32, then on a 2x macOS display or 200% display scale on Windows, a 64x64 version of the image will be used, if available. If a matching version of the image isn't available, the closest larger size image will be downscaled to the appropriate size and be used instead, if available. Otherwise, the closest smaller image will be upscaled and be used instead.

      Parameters:
      surface - an SDL_Surface structure representing the cursor image.
      hot_x - the x position of the cursor hot spot.
      hot_y - the y position of the cursor hot spot.
      Returns:
      the new cursor on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createSystemCursor

      public SDL_Cursor createSystemCursor(@EnumType(SDL_SystemCursor.class) int id)
      Create a system cursor.
      Parameters:
      id - an SDL_SystemCursor enum value.
      Returns:
      a cursor on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setCursor

      @NativeType("boolean") public boolean setCursor(@Nullable @Nullable SDL_Cursor cursor)

      Set the active cursor.

      This function sets the currently active cursor to the specified one. If the cursor is currently visible, the change will be immediately represented on the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if this is desired for any reason.

      Parameters:
      cursor - a cursor to make active.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCursor

      public SDL_Cursor getCursor()

      Get the active cursor.

      This function returns a pointer to the current cursor which is owned by the library. It is not necessary to free the cursor with SDL_DestroyCursor().

      Returns:
      the active cursor or NULL if there is no mouse.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDefaultCursor

      public SDL_Cursor getDefaultCursor()

      Get the default cursor.

      You do not have to call SDL_DestroyCursor() on the return value, but it is safe to do so.

      Returns:
      the default cursor on success or NULL on failuree; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • destroyCursor

      public void destroyCursor(@Nullable @Nullable SDL_Cursor cursor)

      Free a previously-created cursor.

      Use this function to free cursor resources created with SDL_CreateCursor(), SDL_CreateColorCursor() or SDL_CreateSystemCursor().

      Parameters:
      cursor - the cursor to free.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • showCursor

      @NativeType("boolean") public boolean showCursor()
      Show the cursor.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hideCursor

      @NativeType("boolean") public boolean hideCursor()
      Hide the cursor.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • cursorVisible

      @NativeType("boolean") public boolean cursorVisible()
      Return whether the cursor is currently being shown.
      Returns:
      true if the cursor is being shown, or false if the cursor is hidden.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createMutex

      public SDL_Mutex createMutex()

      Create a new mutex.

      All newly-created mutexes begin in the unlocked state.

      Calls to SDL_LockMutex() will not return while the mutex is locked by another thread. See SDL_TryLockMutex() to attempt to lock without blocking.

      SDL mutexes are reentrant.

      Returns:
      the initialized and unlocked mutex or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lockMutex

      public void lockMutex(@Nullable @Nullable SDL_Mutex mutex)

      Lock the mutex.

      This will block until the mutex is available, which is to say it is in the unlocked state and the OS has chosen the caller as the next thread to lock it. Of all threads waiting to lock the mutex, only one may do so at a time.

      It is legal for the owning thread to lock an already-locked mutex. It must unlock it the same number of times before it is actually made available for other threads in the system (this is known as a "recursive mutex").

      This function does not fail; if mutex is NULL, it will return immediately having locked nothing. If the mutex is valid, this function will always block until it can lock the mutex, and return with it locked.

      Parameters:
      mutex - the mutex to lock.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • tryLockMutex

      @NativeType("boolean") public boolean tryLockMutex(@Nullable @Nullable SDL_Mutex mutex)

      Try to lock a mutex without blocking.

      This works just like SDL_LockMutex(), but if the mutex is not available, this function returns false immediately.

      This technique is useful if you need exclusive access to a resource but don't want to wait for it, and will return to it to try again later.

      This function returns true if passed a NULL mutex.

      Parameters:
      mutex - the mutex to try to lock.
      Returns:
      true on success, false if the mutex would block.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unlockMutex

      public void unlockMutex(@Nullable @Nullable SDL_Mutex mutex)

      Unlock the mutex.

      It is legal for the owning thread to lock an already-locked mutex. It must unlock it the same number of times before it is actually made available for other threads in the system (this is known as a "recursive mutex").

      It is illegal to unlock a mutex that has not been locked by the current thread, and doing so results in undefined behavior.

      Parameters:
      mutex - the mutex to unlock.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyMutex

      public void destroyMutex(@Nullable @Nullable SDL_Mutex mutex)

      Destroy a mutex created with SDL_CreateMutex().

      This function must be called on any mutex that is no longer needed. Failure to destroy a mutex will result in a system memory or resource leak. While it is safe to destroy a mutex that is unlocked, it is not safe to attempt to destroy a locked mutex, and may result in undefined behavior depending on the platform.

      Parameters:
      mutex - the mutex to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createRWLock

      public SDL_RWLock createRWLock()

      Create a new read/write lock.

      A read/write lock is useful for situations where you have multiple threads trying to access a resource that is rarely updated. All threads requesting a read-only lock will be allowed to run in parallel; if a thread requests a write lock, it will be provided exclusive access. This makes it safe for multiple threads to use a resource at the same time if they promise not to change it, and when it has to be changed, the rwlock will serve as a gateway to make sure those changes can be made safely.

      In the right situation, a rwlock can be more efficient than a mutex, which only lets a single thread proceed at a time, even if it won't be modifying the data.

      All newly-created read/write locks begin in the unlocked state.

      Calls to SDL_LockRWLockForReading() and SDL_LockRWLockForWriting will not return while the rwlock is locked for writing by another thread. See SDL_TryLockRWLockForReading() and SDL_TryLockRWLockForWriting() to attempt to lock without blocking.

      SDL read/write locks are only recursive for read-only locks! They are not guaranteed to be fair, or provide access in a FIFO manner! They are not guaranteed to favor writers. You may not lock a rwlock for both read-only and write access at the same time from the same thread (so you can't promote your read-only lock to a write lock without unlocking first).

      Returns:
      the initialized and unlocked read/write lock or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lockRWLockForReading

      public void lockRWLockForReading(@Nullable @Nullable SDL_RWLock rwlock)

      Lock the read/write lock for read only operations.

      This will block until the rwlock is available, which is to say it is not locked for writing by any other thread. Of all threads waiting to lock the rwlock, all may do so at the same time as long as they are requesting read-only access; if a thread wants to lock for writing, only one may do so at a time, and no other threads, read-only or not, may hold the lock at the same time.

      It is legal for the owning thread to lock an already-locked rwlock for reading. It must unlock it the same number of times before it is actually made available for other threads in the system (this is known as a "recursive rwlock").

      Note that locking for writing is not recursive (this is only available to read-only locks).

      It is illegal to request a read-only lock from a thread that already holds the write lock. Doing so results in undefined behavior. Unlock the write lock before requesting a read-only lock. (But, of course, if you have the write lock, you don't need further locks to read in any case.)

      This function does not fail; if rwlock is NULL, it will return immediately having locked nothing. If the rwlock is valid, this function will always block until it can lock the mutex, and return with it locked.

      Parameters:
      rwlock - the read/write lock to lock.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lockRWLockForWriting

      public void lockRWLockForWriting(@Nullable @Nullable SDL_RWLock rwlock)

      Lock the read/write lock for write operations.

      This will block until the rwlock is available, which is to say it is not locked for reading or writing by any other thread. Only one thread may hold the lock when it requests write access; all other threads, whether they also want to write or only want read-only access, must wait until the writer thread has released the lock.

      It is illegal for the owning thread to lock an already-locked rwlock for writing (read-only may be locked recursively, writing can not). Doing so results in undefined behavior.

      It is illegal to request a write lock from a thread that already holds a read-only lock. Doing so results in undefined behavior. Unlock the read-only lock before requesting a write lock.

      This function does not fail; if rwlock is NULL, it will return immediately having locked nothing. If the rwlock is valid, this function will always block until it can lock the mutex, and return with it locked.

      Parameters:
      rwlock - the read/write lock to lock.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • tryLockRWLockForReading

      @NativeType("boolean") public boolean tryLockRWLockForReading(@Nullable @Nullable SDL_RWLock rwlock)

      Try to lock a read/write lock for reading without blocking.

      This works just like SDL_LockRWLockForReading(), but if the rwlock is not available, then this function returns false immediately.

      This technique is useful if you need access to a resource but don't want to wait for it, and will return to it to try again later.

      Trying to lock for read-only access can succeed if other threads are holding read-only locks, as this won't prevent access.

      This function returns true if passed a NULL rwlock.

      Parameters:
      rwlock - the rwlock to try to lock.
      Returns:
      true on success, false if the lock would block.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • tryLockRWLockForWriting

      @NativeType("boolean") public boolean tryLockRWLockForWriting(@Nullable @Nullable SDL_RWLock rwlock)

      Try to lock a read/write lock for writing without blocking.

      This works just like SDL_LockRWLockForWriting(), but if the rwlock is not available, then this function returns false immediately.

      This technique is useful if you need exclusive access to a resource but don't want to wait for it, and will return to it to try again later.

      It is illegal for the owning thread to lock an already-locked rwlock for writing (read-only may be locked recursively, writing can not). Doing so results in undefined behavior.

      It is illegal to request a write lock from a thread that already holds a read-only lock. Doing so results in undefined behavior. Unlock the read-only lock before requesting a write lock.

      This function returns true if passed a NULL rwlock.

      Parameters:
      rwlock - the rwlock to try to lock.
      Returns:
      true on success, false if the lock would block.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unlockRWLock

      public void unlockRWLock(@Nullable @Nullable SDL_RWLock rwlock)

      Unlock the read/write lock.

      Use this function to unlock the rwlock, whether it was locked for read-only or write operations.

      It is legal for the owning thread to lock an already-locked read-only lock. It must unlock it the same number of times before it is actually made available for other threads in the system (this is known as a "recursive rwlock").

      It is illegal to unlock a rwlock that has not been locked by the current thread, and doing so results in undefined behavior.

      Parameters:
      rwlock - the rwlock to unlock.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyRWLock

      public void destroyRWLock(@Nullable @Nullable SDL_RWLock rwlock)

      Destroy a read/write lock created with SDL_CreateRWLock().

      This function must be called on any read/write lock that is no longer needed. Failure to destroy a rwlock will result in a system memory or resource leak. While it is safe to destroy a rwlock that is unlocked, it is not safe to attempt to destroy a locked rwlock, and may result in undefined behavior depending on the platform.

      Parameters:
      rwlock - the rwlock to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createSemaphore

      public SDL_Semaphore createSemaphore(@NativeType("Uint32") @Unsigned int initial_value)

      Create a semaphore.

      This function creates a new semaphore and initializes it with the value initial_value. Each wait operation on the semaphore will atomically decrement the semaphore value and potentially block if the semaphore value is 0. Each post operation will atomically increment the semaphore value and wake waiting threads and allow them to retry the wait operation.

      Parameters:
      initial_value - the starting value of the semaphore.
      Returns:
      a new semaphore or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroySemaphore

      public void destroySemaphore(@Nullable @Nullable SDL_Semaphore sem)

      Destroy a semaphore.

      It is not safe to destroy a semaphore if there are threads currently waiting on it.

      Parameters:
      sem - the semaphore to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitSemaphore

      public void waitSemaphore(@Nullable @Nullable SDL_Semaphore sem)

      Wait until a semaphore has a positive value and then decrements it.

      This function suspends the calling thread until the semaphore pointed to by sem has a positive value, and then atomically decrement the semaphore value.

      This function is the equivalent of calling SDL_WaitSemaphoreTimeout() with a time length of -1.

      Parameters:
      sem - the semaphore wait on.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • tryWaitSemaphore

      @NativeType("boolean") public boolean tryWaitSemaphore(@Nullable @Nullable SDL_Semaphore sem)

      See if a semaphore has a positive value and decrement it if it does.

      This function checks to see if the semaphore pointed to by sem has a positive value and atomically decrements the semaphore value if it does. If the semaphore doesn't have a positive value, the function immediately returns false.

      Parameters:
      sem - the semaphore to wait on.
      Returns:
      true if the wait succeeds, false if the wait would block.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitSemaphoreTimeout

      @NativeType("boolean") public boolean waitSemaphoreTimeout(@Nullable @Nullable SDL_Semaphore sem, @NativeType("Sint32") int timeoutMS)

      Wait until a semaphore has a positive value and then decrements it.

      This function suspends the calling thread until either the semaphore pointed to by sem has a positive value or the specified time has elapsed. If the call is successful it will atomically decrement the semaphore value.

      Parameters:
      sem - the semaphore to wait on.
      timeoutMS - the length of the timeout, in milliseconds, or -1 to wait indefinitely.
      Returns:
      true if the wait succeeds or false if the wait times out.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • signalSemaphore

      public void signalSemaphore(@Nullable @Nullable SDL_Semaphore sem)
      Atomically increment a semaphore's value and wake waiting threads.
      Parameters:
      sem - the semaphore to increment.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSemaphoreValue

      @NativeType("Uint32") @Unsigned public int getSemaphoreValue(@Nullable @Nullable SDL_Semaphore sem)
      Get the current value of a semaphore.
      Parameters:
      sem - the semaphore to query.
      Returns:
      the current value of the semaphore.
      Since:
      This function is available since SDL 3.2.0.
    • createCondition

    • destroyCondition

      public void destroyCondition(@Nullable @Nullable SDL_Condition cond)
      Destroy a condition variable.
      Parameters:
      cond - the condition variable to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • signalCondition

      public void signalCondition(@Nullable @Nullable SDL_Condition cond)
      Restart one of the threads that are waiting on the condition variable.
      Parameters:
      cond - the condition variable to signal.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • broadcastCondition

      public void broadcastCondition(@Nullable @Nullable SDL_Condition cond)
      Restart all threads that are waiting on the condition variable.
      Parameters:
      cond - the condition variable to signal.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitCondition

      public void waitCondition(@Nullable @Nullable SDL_Condition cond, @Nullable @Nullable SDL_Mutex mutex)

      Wait until a condition variable is signaled.

      This function unlocks the specified mutex and waits for another thread to call SDL_SignalCondition() or SDL_BroadcastCondition() on the condition variable cond. Once the condition variable is signaled, the mutex is re-locked and the function returns.

      The mutex must be locked before calling this function. Locking the mutex recursively (more than once) is not supported and leads to undefined behavior.

      This function is the equivalent of calling SDL_WaitConditionTimeout() with a time length of -1.

      Parameters:
      cond - the condition variable to wait on.
      mutex - the mutex used to coordinate thread access.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitConditionTimeout

      @NativeType("boolean") public boolean waitConditionTimeout(@Nullable @Nullable SDL_Condition cond, @Nullable @Nullable SDL_Mutex mutex, @NativeType("Sint32") int timeoutMS)

      Wait until a condition variable is signaled or a certain time has passed.

      This function unlocks the specified mutex and waits for another thread to call SDL_SignalCondition() or SDL_BroadcastCondition() on the condition variable cond, or for the specified time to elapse. Once the condition variable is signaled or the time elapsed, the mutex is re-locked and the function returns.

      The mutex must be locked before calling this function. Locking the mutex recursively (more than once) is not supported and leads to undefined behavior.

      Parameters:
      cond - the condition variable to wait on.
      mutex - the mutex used to coordinate thread access.
      timeoutMS - the maximum time to wait, in milliseconds, or -1 to wait indefinitely.
      Returns:
      true if the condition variable is signaled, false if the condition is not signaled in the allotted time.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • shouldInit

      @NativeType("boolean") public boolean shouldInit(@Nullable @Pointer @Nullable ISDL_InitState state)

      Return whether initialization should be done.

      This function checks the passed in state and if initialization should be done, sets the status to SDL_INIT_STATUS_INITIALIZING and returns true. If another thread is already modifying this state, it will wait until that's done before returning.

      If this function returns true, the calling code must call SDL_SetInitialized() to complete the initialization.

      Parameters:
      state - the initialization state to check.
      Returns:
      true if initialization needs to be done, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • shouldQuit

      @NativeType("boolean") public boolean shouldQuit(@Nullable @Pointer @Nullable ISDL_InitState state)

      Return whether cleanup should be done.

      This function checks the passed in state and if cleanup should be done, sets the status to SDL_INIT_STATUS_UNINITIALIZING and returns true.

      If this function returns true, the calling code must call SDL_SetInitialized() to complete the cleanup.

      Parameters:
      state - the initialization state to check.
      Returns:
      true if cleanup needs to be done, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setInitialized

      public void setInitialized(@Nullable @Pointer @Nullable ISDL_InitState state, @NativeType("boolean") boolean initialized)

      Finish an initialization state transition.

      This function sets the status of the passed in state to SDL_INIT_STATUS_INITIALIZED or SDL_INIT_STATUS_UNINITIALIZED and allows any threads waiting for the status to proceed.

      Parameters:
      state - the initialization state to check.
      initialized - the new initialization state.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPixelFormatName

      public BytePtr getPixelFormatName(@EnumType(SDL_PixelFormat.class) int format)
      Get the human readable name of a pixel format.
      Parameters:
      format - the pixel format to query.
      Returns:
      the human readable name of the specified pixel format or "SDL_PIXELFORMAT_UNKNOWN" if the format isn't recognized.
      Since:
      This function is available since SDL 3.2.0.
    • getMasksForPixelFormat

      @NativeType("boolean") public boolean getMasksForPixelFormat(@EnumType(SDL_PixelFormat.class) int format, @Nullable @Nullable IntPtr bpp, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr Rmask, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr Gmask, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr Bmask, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr Amask)
      Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
      Parameters:
      format - one of the SDL_PixelFormat values.
      bpp - a bits per pixel value; usually 15, 16, or 32.
      Rmask - a pointer filled in with the red mask for the format.
      Gmask - a pointer filled in with the green mask for the format.
      Bmask - a pointer filled in with the blue mask for the format.
      Amask - a pointer filled in with the alpha mask for the format.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPixelFormatForMasks

      @EnumType(SDL_PixelFormat.class) public int getPixelFormatForMasks(int bpp, @NativeType("Uint32") @Unsigned int Rmask, @NativeType("Uint32") @Unsigned int Gmask, @NativeType("Uint32") @Unsigned int Bmask, @NativeType("Uint32") @Unsigned int Amask)

      Convert a bpp value and RGBA masks to an enumerated pixel format.

      This will return SDL_PIXELFORMAT_UNKNOWN if the conversion wasn't possible.

      Parameters:
      bpp - a bits per pixel value; usually 15, 16, or 32.
      Rmask - the red mask for the format.
      Gmask - the green mask for the format.
      Bmask - the blue mask for the format.
      Amask - the alpha mask for the format.
      Returns:
      the SDL_PixelFormat value corresponding to the format masks, or SDL_PIXELFORMAT_UNKNOWN if there isn't a match.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPixelFormatDetails

      @Pointer public ISDL_PixelFormatDetails getPixelFormatDetails(@EnumType(SDL_PixelFormat.class) int format)

      Create an SDL_PixelFormatDetails structure corresponding to a pixel format.

      Returned structure may come from a shared global cache (i.e. not newly allocated), and hence should not be modified, especially the palette. Weird errors such as Blit combination not supported may occur.

      Parameters:
      format - one of the SDL_PixelFormat values.
      Returns:
      a pointer to a SDL_PixelFormatDetails structure or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • createPalette

      @Pointer public ISDL_Palette createPalette(int ncolors)

      Create a palette structure with the specified number of color entries.

      The palette entries are initialized to white.

      Parameters:
      ncolors - represents the number of color entries in the color palette.
      Returns:
      a new SDL_Palette structure on success or NULL on failure (e.g. if there wasn't enough memory); call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setPaletteColors

      @NativeType("boolean") public boolean setPaletteColors(@Nullable @Pointer @Nullable ISDL_Palette palette, @Nullable @Pointer @Nullable ISDL_Color colors, int firstcolor, int ncolors)
      Set a range of colors in a palette.
      Parameters:
      palette - the SDL_Palette structure to modify.
      colors - an array of SDL_Color structures to copy into the palette.
      firstcolor - the index of the first palette entry to modify.
      ncolors - the number of entries to modify.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • destroyPalette

      public void destroyPalette(@Nullable @Pointer @Nullable ISDL_Palette palette)
      Free a palette created with SDL_CreatePalette().
      Parameters:
      palette - the SDL_Palette structure to be freed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • mapRGB

      @NativeType("Uint32") @Unsigned public int mapRGB(@Nullable @Pointer @Nullable ISDL_PixelFormatDetails format, @Nullable @Pointer @Nullable ISDL_Palette palette, @NativeType("Uint8") @Unsigned byte r, @NativeType("Uint8") @Unsigned byte g, @NativeType("Uint8") @Unsigned byte b)

      Map an RGB triple to an opaque pixel value for a given pixel format.

      This function maps the RGB color value to the specified pixel format and returns the pixel value best approximating the given RGB color value for the given pixel format.

      If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.

      If the specified pixel format has an alpha component it will be returned as all 1 bits (fully opaque).

      If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

      Parameters:
      format - a pointer to SDL_PixelFormatDetails describing the pixel format.
      palette - an optional palette for indexed formats, may be NULL.
      r - the red component of the pixel in the range 0-255.
      g - the green component of the pixel in the range 0-255.
      b - the blue component of the pixel in the range 0-255.
      Returns:
      a pixel value.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • mapRGBA

      @NativeType("Uint32") @Unsigned public int mapRGBA(@Nullable @Pointer @Nullable ISDL_PixelFormatDetails format, @Nullable @Pointer @Nullable ISDL_Palette palette, @NativeType("Uint8") @Unsigned byte r, @NativeType("Uint8") @Unsigned byte g, @NativeType("Uint8") @Unsigned byte b, @NativeType("Uint8") @Unsigned byte a)

      Map an RGBA quadruple to a pixel value for a given pixel format.

      This function maps the RGBA color value to the specified pixel format and returns the pixel value best approximating the given RGBA color value for the given pixel format.

      If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).

      If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.

      If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

      Parameters:
      format - a pointer to SDL_PixelFormatDetails describing the pixel format.
      palette - an optional palette for indexed formats, may be NULL.
      r - the red component of the pixel in the range 0-255.
      g - the green component of the pixel in the range 0-255.
      b - the blue component of the pixel in the range 0-255.
      a - the alpha component of the pixel in the range 0-255.
      Returns:
      a pixel value.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRGB

      public void getRGB(@NativeType("Uint32") @Unsigned int pixel, @Nullable @Pointer @Nullable ISDL_PixelFormatDetails format, @Nullable @Pointer @Nullable ISDL_Palette palette, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr r, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr g, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr b)

      Get RGB values from a pixel in the specified format.

      This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).

      Parameters:
      pixel - a pixel value.
      format - a pointer to SDL_PixelFormatDetails describing the pixel format.
      palette - an optional palette for indexed formats, may be NULL.
      r - a pointer filled in with the red component, may be NULL.
      g - a pointer filled in with the green component, may be NULL.
      b - a pointer filled in with the blue component, may be NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRGBA

      public void getRGBA(@NativeType("Uint32") @Unsigned int pixel, @Nullable @Pointer @Nullable ISDL_PixelFormatDetails format, @Nullable @Pointer @Nullable ISDL_Palette palette, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr r, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr g, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr b, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr a)

      Get RGBA values from a pixel in the specified format.

      This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).

      If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque).

      Parameters:
      pixel - a pixel value.
      format - a pointer to SDL_PixelFormatDetails describing the pixel format.
      palette - an optional palette for indexed formats, may be NULL.
      r - a pointer filled in with the red component, may be NULL.
      g - a pointer filled in with the green component, may be NULL.
      b - a pointer filled in with the blue component, may be NULL.
      a - a pointer filled in with the alpha component, may be NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPlatform

      public BytePtr getPlatform()

      Get the name of the platform.

      Here are the names returned for some (but not all) supported platforms:

      • "Windows"
      • "macOS"
      • "Linux"
      • "iOS"
      • "Android"
      Returns:
      the name of the platform. If the correct platform name is not available, returns a string beginning with the text "Unknown".
      Since:
      This function is available since SDL 3.2.0.
    • getPowerInfo

      @EnumType(SDL_PowerState.class) public int getPowerInfo(@Nullable @Nullable IntPtr seconds, @Nullable @Nullable IntPtr percent)

      Get the current power supply details.

      You should never take a battery status as absolute truth. Batteries (especially failing batteries) are delicate hardware, and the values reported here are best estimates based on what that hardware reports. It's not uncommon for older batteries to lose stored power much faster than it reports, or completely drain when reporting it has 20 percent left, etc.

      Battery status can change at any time; if you are concerned with power state, you should call this function frequently, and perhaps ignore changes until they seem to be stable for a few seconds.

      It's possible a platform can only report battery percentage or time left but not both.

      On some platforms, retrieving power supply details might be expensive. If you want to display continuous status you could call this function every minute or so.

      Parameters:
      seconds - a pointer filled in with the seconds of battery life left, or NULL to ignore. This will be filled in with -1 if we can't determine a value or there is no battery.
      percent - a pointer filled in with the percentage of battery life left, between 0 and 100, or NULL to ignore. This will be filled in with -1 we can't determine a value or there is no battery.
      Returns:
      the current battery state or SDL_POWERSTATE_ERROR on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • createProcess

      public SDL_Process createProcess(@Nullable @Nullable PointerPtr args, @NativeType("boolean") boolean pipe_stdio)

      Create a new process.

      The path to the executable is supplied in args[0]. args[1..N] are additional arguments passed on the command line of the new process, and the argument list should be terminated with a NULL, e.g.:

      const char *args[] = { "myprogram", "argument", NULL };
      

      Setting pipe_stdio to true is equivalent to setting SDL_PROP_PROCESS_CREATE_STDIN_NUMBER and SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER to SDL_PROCESS_STDIO_APP, and will allow the use of SDL_ReadProcess() or SDL_GetProcessInput() and SDL_GetProcessOutput().

      See SDL_CreateProcessWithProperties() for more details.

      Parameters:
      args - the path and arguments for the new process.
      pipe_stdio - true to create pipes to the process's standard input and from the process's standard output, false for the process to have no input and inherit the application's standard output.
      Returns:
      the newly created and running process, or NULL if the process couldn't be created.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createProcessWithProperties

      public SDL_Process createProcessWithProperties(@NativeType("SDL_PropertiesID") @Unsigned int props)

      Create a new process with the specified properties.

      These are the supported properties:

      • SDL_PROP_PROCESS_CREATE_ARGS_POINTER: an array of strings containing the program to run, any arguments, and a NULL pointer, e.g. const char *args[] = { "myprogram", "argument", NULL }. This is a required property.
      • SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER: an SDL_Environment pointer. If this property is set, it will be the entire environment for the process, otherwise the current environment is used.
      • SDL_PROP_PROCESS_CREATE_STDIN_NUMBER: an SDL_ProcessIO value describing where standard input for the process comes from, defaults to SDL_PROCESS_STDIO_NULL.
      • SDL_PROP_PROCESS_CREATE_STDIN_POINTER: an SDL_IOStream pointer used for standard input when SDL_PROP_PROCESS_CREATE_STDIN_NUMBER is set to SDL_PROCESS_STDIO_REDIRECT.
      • SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER: an SDL_ProcessIO value describing where standard output for the process goes to, defaults to SDL_PROCESS_STDIO_INHERITED.
      • SDL_PROP_PROCESS_CREATE_STDOUT_POINTER: an SDL_IOStream pointer used for standard output when SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER is set to SDL_PROCESS_STDIO_REDIRECT.
      • SDL_PROP_PROCESS_CREATE_STDERR_NUMBER: an SDL_ProcessIO value describing where standard error for the process goes to, defaults to SDL_PROCESS_STDIO_INHERITED.
      • SDL_PROP_PROCESS_CREATE_STDERR_POINTER: an SDL_IOStream pointer used for standard error when SDL_PROP_PROCESS_CREATE_STDERR_NUMBER is set to SDL_PROCESS_STDIO_REDIRECT.
      • SDL_PROP_PROCESS_CREATE_STDERR_TO_STDOUT_BOOLEAN: true if the error output of the process should be redirected into the standard output of the process. This property has no effect if SDL_PROP_PROCESS_CREATE_STDERR_NUMBER is set.
      • SDL_PROP_PROCESS_CREATE_BACKGROUND_BOOLEAN: true if the process should run in the background. In this case the default input and output is SDL_PROCESS_STDIO_NULL and the exitcode of the process is not available, and will always be 0.

      On POSIX platforms, wait() and waitpid(-1, ...) should not be called, and SIGCHLD should not be ignored or handled because those would prevent SDL from properly tracking the lifetime of the underlying process. You should use SDL_WaitProcess() instead.

      Parameters:
      props - the properties to use.
      Returns:
      the newly created and running process, or NULL if the process couldn't be created.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getProcessProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getProcessProperties(@Nullable @Nullable SDL_Process process)

      Get the properties associated with a process.

      The following read-only properties are provided by SDL:

      • SDL_PROP_PROCESS_PID_NUMBER: the process ID of the process.
      • SDL_PROP_PROCESS_STDIN_POINTER: an SDL_IOStream that can be used to write input to the process, if it was created with SDL_PROP_PROCESS_CREATE_STDIN_NUMBER set to SDL_PROCESS_STDIO_APP.
      • SDL_PROP_PROCESS_STDOUT_POINTER: a non-blocking SDL_IOStream that can be used to read output from the process, if it was created with SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER set to SDL_PROCESS_STDIO_APP.
      • SDL_PROP_PROCESS_STDERR_POINTER: a non-blocking SDL_IOStream that can be used to read error output from the process, if it was created with SDL_PROP_PROCESS_CREATE_STDERR_NUMBER set to SDL_PROCESS_STDIO_APP.
      • SDL_PROP_PROCESS_BACKGROUND_BOOLEAN: true if the process is running in the background.
      Parameters:
      process - the process to query.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • readProcess

      @Pointer(comment="void*") public MemorySegment readProcess(@Nullable @Nullable SDL_Process process, @Nullable @Nullable PointerPtr datasize, @Nullable @Nullable IntPtr exitcode)

      Read all the output from a process.

      If a process was created with I/O enabled, you can use this function to read the output. This function blocks until the process is complete, capturing all output, and providing the process exit code.

      The data is allocated with a zero byte at the end (null terminated) for convenience. This extra byte is not included in the value reported via datasize.

      The data should be freed with SDL_free().

      Parameters:
      process - The process to read.
      datasize - a pointer filled in with the number of bytes read, may be NULL.
      exitcode - a pointer filled in with the process exit code if the process has exited, may be NULL.
      Returns:
      the data or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getProcessInput

      public SDL_IOStream getProcessInput(@Nullable @Nullable SDL_Process process)

      Get the SDL_IOStream associated with process standard input.

      The process must have been created with SDL_CreateProcess() and pipe_stdio set to true, or with SDL_CreateProcessWithProperties() and SDL_PROP_PROCESS_CREATE_STDIN_NUMBER set to SDL_PROCESS_STDIO_APP.

      Writing to this stream can return less data than expected if the process hasn't read its input. It may be blocked waiting for its output to be read, if so you may need to call SDL_GetProcessOutput() and read the output in parallel with writing input.

      Parameters:
      process - The process to get the input stream for.
      Returns:
      the input stream or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getProcessOutput

      public SDL_IOStream getProcessOutput(@Nullable @Nullable SDL_Process process)

      Get the SDL_IOStream associated with process standard output.

      The process must have been created with SDL_CreateProcess() and pipe_stdio set to true, or with SDL_CreateProcessWithProperties() and SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER set to SDL_PROCESS_STDIO_APP.

      Reading from this stream can return 0 with SDL_GetIOStatus() returning SDL_IO_STATUS_NOT_READY if no output is available yet.

      Parameters:
      process - The process to get the output stream for.
      Returns:
      the output stream or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • killProcess

      @NativeType("boolean") public boolean killProcess(@Nullable @Nullable SDL_Process process, @NativeType("boolean") boolean force)
      Stop a process.
      Parameters:
      process - The process to stop.
      force - true to terminate the process immediately, false to try to stop the process gracefully. In general you should try to stop the process gracefully first as terminating a process may leave it with half-written data or in some other unstable state.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • waitProcess

      @NativeType("boolean") public boolean waitProcess(@Nullable @Nullable SDL_Process process, @NativeType("boolean") boolean block, @Nullable @Nullable IntPtr exitcode)

      Wait for a process to finish.

      This can be called multiple times to get the status of a process.

      The exit code will be the exit code of the process if it terminates normally, a negative signal if it terminated due to a signal, or -255 otherwise. It will not be changed if the process is still running.

      If you create a process with standard output piped to the application (pipe_stdio being true) then you should read all of the process output before calling SDL_WaitProcess(). If you don't do this the process might be blocked indefinitely waiting for output to be read and SDL_WaitProcess() will never return true;

      Parameters:
      process - The process to wait for.
      block - If true, block until the process finishes; otherwise, report on the process' status.
      exitcode - a pointer filled in with the process exit code if the process has exited, may be NULL.
      Returns:
      true if the process exited, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyProcess

      public void destroyProcess(@Nullable @Nullable SDL_Process process)

      Destroy a previously created process object.

      Note that this does not stop the process, just destroys the SDL object used to track it. If you want to stop the process you should use SDL_KillProcess().

      Parameters:
      process - The process object to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGlobalProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getGlobalProperties()
      Get the global SDL properties.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • createProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int createProperties()

      Create a group of properties.

      All properties are automatically destroyed when SDL_Quit() is called.

      Returns:
      an ID for a new group of properties, or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • copyProperties

      @NativeType("boolean") public boolean copyProperties(@NativeType("SDL_PropertiesID") @Unsigned int src, @NativeType("SDL_PropertiesID") @Unsigned int dst)

      Copy a group of properties.

      Copy all the properties from one group of properties to another, with the exception of properties requiring cleanup (set using SDL_SetPointerPropertyWithCleanup()), which will not be copied. Any property that already exists on dst will be overwritten.

      Parameters:
      src - the properties to copy.
      dst - the destination properties.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • lockProperties

      @NativeType("boolean") public boolean lockProperties(@NativeType("SDL_PropertiesID") @Unsigned int props)

      Lock a group of properties.

      Obtain a multi-threaded lock for these properties. Other threads will wait while trying to lock these properties until they are unlocked. Properties must be unlocked before they are destroyed.

      The lock is automatically taken when setting individual properties, this function is only needed when you want to set several properties atomically or want to guarantee that properties being queried aren't freed in another thread.

      Parameters:
      props - the properties to lock.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unlockProperties

      public void unlockProperties(@NativeType("SDL_PropertiesID") @Unsigned int props)
      Unlock a group of properties.
      Parameters:
      props - the properties to unlock.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setPointerPropertyWithCleanup

      @NativeType("boolean") public boolean setPointerPropertyWithCleanup(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, @Pointer(comment="void*") MemorySegment value, @Pointer(comment="SDL_CleanupPropertyCallback") MemorySegment cleanup, @Pointer(comment="void*") MemorySegment userdata)

      Set a pointer property in a group of properties with a cleanup function that is called when the property is deleted.

      The cleanup function is also called if setting the property fails for any reason.

      For simply setting basic data types, like numbers, bools, or strings, use SDL_SetNumberProperty, SDL_SetBooleanProperty, or SDL_SetStringProperty instead, as those functions will handle cleanup on your behalf. This function is only for more complex, custom data.

      Parameters:
      props - the properties to modify.
      name - the name of the property to modify.
      value - the new value of the property, or NULL to delete the property.
      cleanup - the function to call when this property is deleted, or NULL if no cleanup is necessary.
      userdata - a pointer that is passed to the cleanup function.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setPointerProperty

      @NativeType("boolean") public boolean setPointerProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, @Pointer(comment="void*") MemorySegment value)
      Set a pointer property in a group of properties.
      Parameters:
      props - the properties to modify.
      name - the name of the property to modify.
      value - the new value of the property, or NULL to delete the property.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setStringProperty

      @NativeType("boolean") public boolean setStringProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, @Nullable @Nullable BytePtr value)

      Set a string property in a group of properties.

      This function makes a copy of the string; the caller does not have to preserve the data after this call completes.

      Parameters:
      props - the properties to modify.
      name - the name of the property to modify.
      value - the new value of the property, or NULL to delete the property.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setNumberProperty

      @NativeType("boolean") public boolean setNumberProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, @NativeType("Sint64") long value)
      Set an integer property in a group of properties.
      Parameters:
      props - the properties to modify.
      name - the name of the property to modify.
      value - the new value of the property.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setFloatProperty

      @NativeType("boolean") public boolean setFloatProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, float value)
      Set a floating point property in a group of properties.
      Parameters:
      props - the properties to modify.
      name - the name of the property to modify.
      value - the new value of the property.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setBooleanProperty

      @NativeType("boolean") public boolean setBooleanProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, @NativeType("boolean") boolean value)
      Set a boolean property in a group of properties.
      Parameters:
      props - the properties to modify.
      name - the name of the property to modify.
      value - the new value of the property.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasProperty

      @NativeType("boolean") public boolean hasProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name)
      Return whether a property exists in a group of properties.
      Parameters:
      props - the properties to query.
      name - the name of the property to query.
      Returns:
      true if the property exists, or false if it doesn't.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPropertyType

      @EnumType(SDL_PropertyType.class) public int getPropertyType(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name)
      Get the type of a property in a group of properties.
      Parameters:
      props - the properties to query.
      name - the name of the property to query.
      Returns:
      the type of the property, or SDL_PROPERTY_TYPE_INVALID if it is not set.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPointerProperty

      @Pointer(comment="void*") public MemorySegment getPointerProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, @Pointer(comment="void*") MemorySegment default_value)

      Get a pointer property from a group of properties.

      By convention, the names of properties that SDL exposes on objects will start with "SDL.", and properties that SDL uses internally will start with "SDL.internal.". These should be considered read-only and should not be modified by applications.

      Parameters:
      props - the properties to query.
      name - the name of the property to query.
      default_value - the default value of the property.
      Returns:
      the value of the property, or default_value if it is not set or not a pointer property.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getStringProperty

      public BytePtr getStringProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, @Nullable @Nullable BytePtr default_value)
      Get a string property from a group of properties.
      Parameters:
      props - the properties to query.
      name - the name of the property to query.
      default_value - the default value of the property.
      Returns:
      the value of the property, or default_value if it is not set or not a string property.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumberProperty

      @NativeType("Sint64") public long getNumberProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, @NativeType("Sint64") long default_value)

      Get a number property from a group of properties.

      You can use SDL_GetPropertyType() to query whether the property exists and is a number property.

      Parameters:
      props - the properties to query.
      name - the name of the property to query.
      default_value - the default value of the property.
      Returns:
      the value of the property, or default_value if it is not set or not a number property.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getFloatProperty

      public float getFloatProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, float default_value)

      Get a floating point property from a group of properties.

      You can use SDL_GetPropertyType() to query whether the property exists and is a floating point property.

      Parameters:
      props - the properties to query.
      name - the name of the property to query.
      default_value - the default value of the property.
      Returns:
      the value of the property, or default_value if it is not set or not a float property.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getBooleanProperty

      @NativeType("boolean") public boolean getBooleanProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name, @NativeType("boolean") boolean default_value)

      Get a boolean property from a group of properties.

      You can use SDL_GetPropertyType() to query whether the property exists and is a boolean property.

      Parameters:
      props - the properties to query.
      name - the name of the property to query.
      default_value - the default value of the property.
      Returns:
      the value of the property, or default_value if it is not set or not a boolean property.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • clearProperty

      @NativeType("boolean") public boolean clearProperty(@NativeType("SDL_PropertiesID") @Unsigned int props, @Nullable @Nullable BytePtr name)
      Clear a property from a group of properties.
      Parameters:
      props - the properties to modify.
      name - the name of the property to clear.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • enumerateProperties

      @NativeType("boolean") public boolean enumerateProperties(@NativeType("SDL_PropertiesID") @Unsigned int props, @Pointer(comment="SDL_EnumeratePropertiesCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Enumerate the properties contained in a group of properties.

      The callback function is called for each property in the group of properties. The properties are locked during enumeration.

      Parameters:
      props - the properties to query.
      callback - the function to call for each property.
      userdata - a pointer that is passed to callback.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • destroyProperties

      public void destroyProperties(@NativeType("SDL_PropertiesID") @Unsigned int props)

      Destroy a group of properties.

      All properties are deleted and their cleanup functions will be called, if any.

      Parameters:
      props - the properties to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hasRectIntersection

      @NativeType("boolean") public boolean hasRectIntersection(@Nullable @Pointer @Nullable ISDL_Rect A, @Nullable @Pointer @Nullable ISDL_Rect B)

      Determine whether two rectangles intersect.

      If either pointer is NULL the function will return false.

      Parameters:
      A - an SDL_Rect structure representing the first rectangle.
      B - an SDL_Rect structure representing the second rectangle.
      Returns:
      true if there is an intersection, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRectIntersection

      @NativeType("boolean") public boolean getRectIntersection(@Nullable @Pointer @Nullable ISDL_Rect A, @Nullable @Pointer @Nullable ISDL_Rect B, @Nullable @Pointer @Nullable ISDL_Rect result)

      Calculate the intersection of two rectangles.

      If result is NULL then this function will return false.

      Parameters:
      A - an SDL_Rect structure representing the first rectangle.
      B - an SDL_Rect structure representing the second rectangle.
      result - an SDL_Rect structure filled in with the intersection of rectangles A and B.
      Returns:
      true if there is an intersection, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRectUnion

      @NativeType("boolean") public boolean getRectUnion(@Nullable @Pointer @Nullable ISDL_Rect A, @Nullable @Pointer @Nullable ISDL_Rect B, @Nullable @Pointer @Nullable ISDL_Rect result)
      Calculate the union of two rectangles.
      Parameters:
      A - an SDL_Rect structure representing the first rectangle.
      B - an SDL_Rect structure representing the second rectangle.
      result - an SDL_Rect structure filled in with the union of rectangles A and B.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getRectEnclosingPoints

      @NativeType("boolean") public boolean getRectEnclosingPoints(@Nullable @Pointer @Nullable ISDL_Point points, int count, @Nullable @Pointer @Nullable ISDL_Rect clip, @Nullable @Pointer @Nullable ISDL_Rect result)

      Calculate a minimal rectangle enclosing a set of points.

      If clip is not NULL then only points inside of the clipping rectangle are considered.

      Parameters:
      points - an array of SDL_Point structures representing points to be enclosed.
      count - the number of structures in the points array.
      clip - an SDL_Rect used for clipping or NULL to enclose all points.
      result - an SDL_Rect structure filled in with the minimal enclosing rectangle.
      Returns:
      true if any points were enclosed or false if all the points were outside of the clipping rectangle.
      Since:
      This function is available since SDL 3.2.0.
    • getRectAndLineIntersection

      @NativeType("boolean") public boolean getRectAndLineIntersection(@Nullable @Pointer @Nullable ISDL_Rect rect, @Nullable @Nullable IntPtr X1, @Nullable @Nullable IntPtr Y1, @Nullable @Nullable IntPtr X2, @Nullable @Nullable IntPtr Y2)

      Calculate the intersection of a rectangle and line segment.

      This function is used to clip a line segment to a rectangle. A line segment contained entirely within the rectangle or that does not intersect will remain unchanged. A line segment that crosses the rectangle at either or both ends will be clipped to the boundary of the rectangle and the new coordinates saved in X1, Y1, X2, and/or Y2 as necessary.

      Parameters:
      rect - an SDL_Rect structure representing the rectangle to intersect.
      X1 - a pointer to the starting X-coordinate of the line.
      Y1 - a pointer to the starting Y-coordinate of the line.
      X2 - a pointer to the ending X-coordinate of the line.
      Y2 - a pointer to the ending Y-coordinate of the line.
      Returns:
      true if there is an intersection, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • hasRectIntersectionFloat

      @NativeType("boolean") public boolean hasRectIntersectionFloat(@Nullable @Pointer @Nullable ISDL_FRect A, @Nullable @Pointer @Nullable ISDL_FRect B)

      Determine whether two rectangles intersect with float precision.

      If either pointer is NULL the function will return false.

      Parameters:
      A - an SDL_FRect structure representing the first rectangle.
      B - an SDL_FRect structure representing the second rectangle.
      Returns:
      true if there is an intersection, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRectIntersectionFloat

      @NativeType("boolean") public boolean getRectIntersectionFloat(@Nullable @Pointer @Nullable ISDL_FRect A, @Nullable @Pointer @Nullable ISDL_FRect B, @Nullable @Pointer @Nullable ISDL_FRect result)

      Calculate the intersection of two rectangles with float precision.

      If result is NULL then this function will return false.

      Parameters:
      A - an SDL_FRect structure representing the first rectangle.
      B - an SDL_FRect structure representing the second rectangle.
      result - an SDL_FRect structure filled in with the intersection of rectangles A and B.
      Returns:
      true if there is an intersection, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRectUnionFloat

      @NativeType("boolean") public boolean getRectUnionFloat(@Nullable @Pointer @Nullable ISDL_FRect A, @Nullable @Pointer @Nullable ISDL_FRect B, @Nullable @Pointer @Nullable ISDL_FRect result)
      Calculate the union of two rectangles with float precision.
      Parameters:
      A - an SDL_FRect structure representing the first rectangle.
      B - an SDL_FRect structure representing the second rectangle.
      result - an SDL_FRect structure filled in with the union of rectangles A and B.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getRectEnclosingPointsFloat

      @NativeType("boolean") public boolean getRectEnclosingPointsFloat(@Nullable @Pointer @Nullable ISDL_FPoint points, int count, @Nullable @Pointer @Nullable ISDL_FRect clip, @Nullable @Pointer @Nullable ISDL_FRect result)

      Calculate a minimal rectangle enclosing a set of points with float precision.

      If clip is not NULL then only points inside of the clipping rectangle are considered.

      Parameters:
      points - an array of SDL_FPoint structures representing points to be enclosed.
      count - the number of structures in the points array.
      clip - an SDL_FRect used for clipping or NULL to enclose all points.
      result - an SDL_FRect structure filled in with the minimal enclosing rectangle.
      Returns:
      true if any points were enclosed or false if all the points were outside of the clipping rectangle.
      Since:
      This function is available since SDL 3.2.0.
    • getRectAndLineIntersectionFloat

      @NativeType("boolean") public boolean getRectAndLineIntersectionFloat(@Nullable @Pointer @Nullable ISDL_FRect rect, @Nullable @Nullable FloatPtr X1, @Nullable @Nullable FloatPtr Y1, @Nullable @Nullable FloatPtr X2, @Nullable @Nullable FloatPtr Y2)

      Calculate the intersection of a rectangle and line segment with float precision.

      This function is used to clip a line segment to a rectangle. A line segment contained entirely within the rectangle or that does not intersect will remain unchanged. A line segment that crosses the rectangle at either or both ends will be clipped to the boundary of the rectangle and the new coordinates saved in X1, Y1, X2, and/or Y2 as necessary.

      Parameters:
      rect - an SDL_FRect structure representing the rectangle to intersect.
      X1 - a pointer to the starting X-coordinate of the line.
      Y1 - a pointer to the starting Y-coordinate of the line.
      X2 - a pointer to the ending X-coordinate of the line.
      Y2 - a pointer to the ending Y-coordinate of the line.
      Returns:
      true if there is an intersection, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • getNumRenderDrivers

      public int getNumRenderDrivers()

      Get the number of 2D rendering drivers available for the current display.

      A render driver is a set of code that handles rendering and texture management on a particular display. Normally there is only one, but some drivers may have several available with different capabilities.

      There may be none if SDL was compiled without render support.

      Returns:
      the number of built in render drivers.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderDriver

      public BytePtr getRenderDriver(int index)

      Use this function to get the name of a built in 2D rendering driver.

      The list of rendering drivers is given in the order that they are normally initialized by default; the drivers that seem more reasonable to choose first (as far as the SDL developers believe) are earlier in the list.

      The names of drivers are all simple, low-ASCII identifiers, like "opengl", "direct3d12" or "metal". These never have Unicode characters, and are not meant to be proper names.

      Parameters:
      index - the index of the rendering driver; the value ranges from 0 to SDL_GetNumRenderDrivers() - 1.
      Returns:
      the name of the rendering driver at the requested index, or NULL if an invalid index was specified.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createWindowAndRenderer

      @NativeType("boolean") public boolean createWindowAndRenderer(@Nullable @Nullable BytePtr title, int width, int height, @EnumType(SDL_WindowFlags.class) long window_flags, @Nullable @Pointer SDL_Window.Ptr window, @Nullable @Pointer SDL_Renderer.Ptr renderer)
      Create a window and default renderer.
      Parameters:
      title - the title of the window, in UTF-8 encoding.
      width - the width of the window.
      height - the height of the window.
      window_flags - the flags used to create the window (see SDL_CreateWindow()).
      window - a pointer filled with the window, or NULL on error.
      renderer - a pointer filled with the renderer, or NULL on error.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createRenderer

      public SDL_Renderer createRenderer(@Nullable @Nullable SDL_Window window, @Nullable @Nullable BytePtr name)

      Create a 2D rendering context for a window.

      If you want a specific renderer, you can specify its name here. A list of available renderers can be obtained by calling SDL_GetRenderDriver() multiple times, with indices from 0 to SDL_GetNumRenderDrivers()-1. If you don't need a specific renderer, specify NULL and SDL will attempt to choose the best option for you, based on what is available on the user's system.

      If name is a comma-separated list, SDL will try each name, in the order listed, until one succeeds or all of them fail.

      By default the rendering size matches the window size in pixels, but you can call SDL_SetRenderLogicalPresentation() to change the content size and scaling options.

      Parameters:
      window - the window where rendering is displayed.
      name - the name of the rendering driver to initialize, or NULL to let SDL choose one.
      Returns:
      a valid rendering context or NULL if there was an error; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createRendererWithProperties

      public SDL_Renderer createRendererWithProperties(@NativeType("SDL_PropertiesID") @Unsigned int props)

      Create a 2D rendering context for a window, with the specified properties.

      These are the supported properties:

      • SDL_PROP_RENDERER_CREATE_NAME_STRING: the name of the rendering driver to use, if a specific one is desired
      • SDL_PROP_RENDERER_CREATE_WINDOW_POINTER: the window where rendering is displayed, required if this isn't a software renderer using a surface
      • SDL_PROP_RENDERER_CREATE_SURFACE_POINTER: the surface where rendering is displayed, if you want a software renderer without a window
      • SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER: an SDL_Colorspace value describing the colorspace for output to the display, defaults to SDL_COLORSPACE_SRGB. The direct3d11, direct3d12, and metal renderers support SDL_COLORSPACE_SRGB_LINEAR, which is a linear color space and supports HDR output. If you select SDL_COLORSPACE_SRGB_LINEAR, drawing still uses the sRGB colorspace, but values can go beyond 1.0 and float (linear) format textures can be used for HDR content.
      • SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER: non-zero if you want present synchronized with the refresh rate. This property can take any value that is supported by SDL_SetRenderVSync() for the renderer.

      With the vulkan renderer:

      • SDL_PROP_RENDERER_CREATE_VULKAN_INSTANCE_POINTER: the VkInstance to use with the renderer, optional.
      • SDL_PROP_RENDERER_CREATE_VULKAN_SURFACE_NUMBER: the VkSurfaceKHR to use with the renderer, optional.
      • SDL_PROP_RENDERER_CREATE_VULKAN_PHYSICAL_DEVICE_POINTER: the VkPhysicalDevice to use with the renderer, optional.
      • SDL_PROP_RENDERER_CREATE_VULKAN_DEVICE_POINTER: the VkDevice to use with the renderer, optional.
      • SDL_PROP_RENDERER_CREATE_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER: the queue family index used for rendering.
      • SDL_PROP_RENDERER_CREATE_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER: the queue family index used for presentation.
      Parameters:
      props - the properties to use.
      Returns:
      a valid rendering context or NULL if there was an error; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createSoftwareRenderer

      public SDL_Renderer createSoftwareRenderer(@Nullable @Nullable SDL_Surface surface)

      Create a 2D software rendering context for a surface.

      Two other API which can be used to create SDL_Renderer: SDL_CreateRenderer() and SDL_CreateWindowAndRenderer(). These can also create a software renderer, but they are intended to be used with an SDL_Window as the final destination and not an SDL_Surface.

      Parameters:
      surface - the SDL_Surface structure representing the surface where rendering is done.
      Returns:
      a valid rendering context or NULL if there was an error; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderer

      public SDL_Renderer getRenderer(@Nullable @Nullable SDL_Window window)
      Get the renderer associated with a window.
      Parameters:
      window - the window to query.
      Returns:
      the rendering context on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getRenderWindow

      public SDL_Window getRenderWindow(@Nullable @Nullable SDL_Renderer renderer)
      Get the window associated with a renderer.
      Parameters:
      renderer - the renderer to query.
      Returns:
      the window on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getRendererName

      public BytePtr getRendererName(@Nullable @Nullable SDL_Renderer renderer)
      Get the name of a renderer.
      Parameters:
      renderer - the rendering context.
      Returns:
      the name of the selected renderer, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRendererProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getRendererProperties(@Nullable @Nullable SDL_Renderer renderer)

      Get the properties associated with a renderer.

      The following read-only properties are provided by SDL:

      • SDL_PROP_RENDERER_NAME_STRING: the name of the rendering driver
      • SDL_PROP_RENDERER_WINDOW_POINTER: the window where rendering is displayed, if any
      • SDL_PROP_RENDERER_SURFACE_POINTER: the surface where rendering is displayed, if this is a software renderer without a window
      • SDL_PROP_RENDERER_VSYNC_NUMBER: the current vsync setting
      • SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER: the maximum texture width and height
      • SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER: a (const SDL_PixelFormat *) array of pixel formats, terminated with SDL_PIXELFORMAT_UNKNOWN, representing the available texture formats for this renderer.
      • SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER: an SDL_Colorspace value describing the colorspace for output to the display, defaults to SDL_COLORSPACE_SRGB.
      • SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN: true if the output colorspace is SDL_COLORSPACE_SRGB_LINEAR and the renderer is showing on a display with HDR enabled. This property can change dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
      • SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT: the value of SDR white in the SDL_COLORSPACE_SRGB_LINEAR colorspace. When HDR is enabled, this value is automatically multiplied into the color scale. This property can change dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
      • SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT: the additional high dynamic range that can be displayed, in terms of the SDR white point. When HDR is not enabled, this will be 1.0. This property can change dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.

      With the direct3d renderer:

      • SDL_PROP_RENDERER_D3D9_DEVICE_POINTER: the IDirect3DDevice9 associated with the renderer

      With the direct3d11 renderer:

      • SDL_PROP_RENDERER_D3D11_DEVICE_POINTER: the ID3D11Device associated with the renderer
      • SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER: the IDXGISwapChain1 associated with the renderer. This may change when the window is resized.

      With the direct3d12 renderer:

      • SDL_PROP_RENDERER_D3D12_DEVICE_POINTER: the ID3D12Device associated with the renderer
      • SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER: the IDXGISwapChain4 associated with the renderer.
      • SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER: the ID3D12CommandQueue associated with the renderer

      With the vulkan renderer:

      • SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER: the VkInstance associated with the renderer
      • SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER: the VkSurfaceKHR associated with the renderer
      • SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER: the VkPhysicalDevice associated with the renderer
      • SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER: the VkDevice associated with the renderer
      • SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER: the queue family index used for rendering
      • SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER: the queue family index used for presentation
      • SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER: the number of swapchain images, or potential frames in flight, used by the Vulkan renderer

      With the gpu renderer:

      • SDL_PROP_RENDERER_GPU_DEVICE_POINTER: the SDL_GPUDevice associated with the renderer
      Parameters:
      renderer - the rendering context.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getRenderOutputSize

      @NativeType("boolean") public boolean getRenderOutputSize(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable IntPtr w, @Nullable @Nullable IntPtr h)

      Get the output size in pixels of a rendering context.

      This returns the true output size in pixels, ignoring any render targets or logical size and presentation.

      For the output size of the current rendering target, with logical size adjustments, use SDL_GetCurrentRenderOutputSize() instead.

      Parameters:
      renderer - the rendering context.
      w - a pointer filled in with the width in pixels.
      h - a pointer filled in with the height in pixels.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCurrentRenderOutputSize

      @NativeType("boolean") public boolean getCurrentRenderOutputSize(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable IntPtr w, @Nullable @Nullable IntPtr h)

      Get the current output size in pixels of a rendering context.

      If a rendering target is active, this will return the size of the rendering target in pixels, otherwise return the value of SDL_GetRenderOutputSize().

      Rendering target or not, the output will be adjusted by the current logical presentation state, dictated by SDL_SetRenderLogicalPresentation().

      Parameters:
      renderer - the rendering context.
      w - a pointer filled in with the current width.
      h - a pointer filled in with the current height.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createTexture

      public SDL_Texture createTexture(@Nullable @Nullable SDL_Renderer renderer, @EnumType(SDL_PixelFormat.class) int format, @EnumType(SDL_TextureAccess.class) int access, int w, int h)

      Create a texture for a rendering context.

      The contents of a texture when first created are not defined.

      Parameters:
      renderer - the rendering context.
      format - one of the enumerated values in SDL_PixelFormat.
      access - one of the enumerated values in SDL_TextureAccess.
      w - the width of the texture in pixels.
      h - the height of the texture in pixels.
      Returns:
      the created texture or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createTextureFromSurface

      public SDL_Texture createTextureFromSurface(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable SDL_Surface surface)

      Create a texture from an existing surface.

      The surface is not modified or freed by this function.

      The SDL_TextureAccess hint for the created texture is SDL_TEXTUREACCESS_STATIC.

      The pixel format of the created texture may be different from the pixel format of the surface, and can be queried using the SDL_PROP_TEXTURE_FORMAT_NUMBER property.

      Parameters:
      renderer - the rendering context.
      surface - the SDL_Surface structure containing pixel data used to fill the texture.
      Returns:
      the created texture or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createTextureWithProperties

      public SDL_Texture createTextureWithProperties(@Nullable @Nullable SDL_Renderer renderer, @NativeType("SDL_PropertiesID") @Unsigned int props)

      Create a texture for a rendering context with the specified properties.

      These are the supported properties:

      • SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER: an SDL_Colorspace value describing the texture colorspace, defaults to SDL_COLORSPACE_SRGB_LINEAR for floating point textures, SDL_COLORSPACE_HDR10 for 10-bit textures, SDL_COLORSPACE_SRGB for other RGB textures and SDL_COLORSPACE_JPEG for YUV textures.
      • SDL_PROP_TEXTURE_CREATE_FORMAT_NUMBER: one of the enumerated values in SDL_PixelFormat, defaults to the best RGBA format for the renderer
      • SDL_PROP_TEXTURE_CREATE_ACCESS_NUMBER: one of the enumerated values in SDL_TextureAccess, defaults to SDL_TEXTUREACCESS_STATIC
      • SDL_PROP_TEXTURE_CREATE_WIDTH_NUMBER: the width of the texture in pixels, required
      • SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER: the height of the texture in pixels, required
      • SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT: for HDR10 and floating point textures, this defines the value of 100% diffuse white, with higher values being displayed in the High Dynamic Range headroom. This defaults to 100 for HDR10 textures and 1.0 for floating point textures.
      • SDL_PROP_TEXTURE_CREATE_HDR_HEADROOM_FLOAT: for HDR10 and floating point textures, this defines the maximum dynamic range used by the content, in terms of the SDR white point. This would be equivalent to maxCLL / SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT for HDR10 content. If this is defined, any values outside the range supported by the display will be scaled into the available HDR headroom, otherwise they are clipped.

      With the direct3d11 renderer:

      • SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_POINTER: the ID3D11Texture2D associated with the texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_U_POINTER: the ID3D11Texture2D associated with the U plane of a YUV texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_V_POINTER: the ID3D11Texture2D associated with the V plane of a YUV texture, if you want to wrap an existing texture.

      With the direct3d12 renderer:

      • SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_POINTER: the ID3D12Resource associated with the texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_U_POINTER: the ID3D12Resource associated with the U plane of a YUV texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_V_POINTER: the ID3D12Resource associated with the V plane of a YUV texture, if you want to wrap an existing texture.

      With the metal renderer:

      • SDL_PROP_TEXTURE_CREATE_METAL_PIXELBUFFER_POINTER: the CVPixelBufferRef associated with the texture, if you want to create a texture from an existing pixel buffer.

      With the opengl renderer:

      • SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_NUMBER: the GLuint texture associated with the texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_UV_NUMBER: the GLuint texture associated with the UV plane of an NV12 texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_U_NUMBER: the GLuint texture associated with the U plane of a YUV texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_V_NUMBER: the GLuint texture associated with the V plane of a YUV texture, if you want to wrap an existing texture.

      With the opengles2 renderer:

      • SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER: the GLuint texture associated with the texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER: the GLuint texture associated with the texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_UV_NUMBER: the GLuint texture associated with the UV plane of an NV12 texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_U_NUMBER: the GLuint texture associated with the U plane of a YUV texture, if you want to wrap an existing texture.
      • SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_V_NUMBER: the GLuint texture associated with the V plane of a YUV texture, if you want to wrap an existing texture.

      With the vulkan renderer:

      • SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER: the VkImage with layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL associated with the texture, if you want to wrap an existing texture.
      Parameters:
      renderer - the rendering context.
      props - the properties to use.
      Returns:
      the created texture or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTextureProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getTextureProperties(@Nullable @Nullable SDL_Texture texture)

      Get the properties associated with a texture.

      The following read-only properties are provided by SDL:

      • SDL_PROP_TEXTURE_COLORSPACE_NUMBER: an SDL_Colorspace value describing the texture colorspace.
      • SDL_PROP_TEXTURE_FORMAT_NUMBER: one of the enumerated values in SDL_PixelFormat.
      • SDL_PROP_TEXTURE_ACCESS_NUMBER: one of the enumerated values in SDL_TextureAccess.
      • SDL_PROP_TEXTURE_WIDTH_NUMBER: the width of the texture in pixels.
      • SDL_PROP_TEXTURE_HEIGHT_NUMBER: the height of the texture in pixels.
      • SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT: for HDR10 and floating point textures, this defines the value of 100% diffuse white, with higher values being displayed in the High Dynamic Range headroom. This defaults to 100 for HDR10 textures and 1.0 for other textures.
      • SDL_PROP_TEXTURE_HDR_HEADROOM_FLOAT: for HDR10 and floating point textures, this defines the maximum dynamic range used by the content, in terms of the SDR white point. If this is defined, any values outside the range supported by the display will be scaled into the available HDR headroom, otherwise they are clipped. This defaults to 1.0 for SDR textures, 4.0 for HDR10 textures, and no default for floating point textures.

      With the direct3d11 renderer:

      • SDL_PROP_TEXTURE_D3D11_TEXTURE_POINTER: the ID3D11Texture2D associated with the texture
      • SDL_PROP_TEXTURE_D3D11_TEXTURE_U_POINTER: the ID3D11Texture2D associated with the U plane of a YUV texture
      • SDL_PROP_TEXTURE_D3D11_TEXTURE_V_POINTER: the ID3D11Texture2D associated with the V plane of a YUV texture

      With the direct3d12 renderer:

      • SDL_PROP_TEXTURE_D3D12_TEXTURE_POINTER: the ID3D12Resource associated with the texture
      • SDL_PROP_TEXTURE_D3D12_TEXTURE_U_POINTER: the ID3D12Resource associated with the U plane of a YUV texture
      • SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER: the ID3D12Resource associated with the V plane of a YUV texture

      With the vulkan renderer:

      • SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER: the VkImage associated with the texture

      With the opengl renderer:

      • SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER: the GLuint texture associated with the texture
      • SDL_PROP_TEXTURE_OPENGL_TEXTURE_UV_NUMBER: the GLuint texture associated with the UV plane of an NV12 texture
      • SDL_PROP_TEXTURE_OPENGL_TEXTURE_U_NUMBER: the GLuint texture associated with the U plane of a YUV texture
      • SDL_PROP_TEXTURE_OPENGL_TEXTURE_V_NUMBER: the GLuint texture associated with the V plane of a YUV texture
      • SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET_NUMBER: the GLenum for the texture target (GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB, etc)
      • SDL_PROP_TEXTURE_OPENGL_TEX_W_FLOAT: the texture coordinate width of the texture (0.0 - 1.0)
      • SDL_PROP_TEXTURE_OPENGL_TEX_H_FLOAT: the texture coordinate height of the texture (0.0 - 1.0)

      With the opengles2 renderer:

      • SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER: the GLuint texture associated with the texture
      • SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_UV_NUMBER: the GLuint texture associated with the UV plane of an NV12 texture
      • SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER: the GLuint texture associated with the U plane of a YUV texture
      • SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER: the GLuint texture associated with the V plane of a YUV texture
      • SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER: the GLenum for the texture target (GL_TEXTURE_2D, GL_TEXTURE_EXTERNAL_OES, etc)
      Parameters:
      texture - the texture to query.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getRendererFromTexture

      public SDL_Renderer getRendererFromTexture(@Nullable @Nullable SDL_Texture texture)
      Get the renderer that created an SDL_Texture.
      Parameters:
      texture - the texture to query.
      Returns:
      a pointer to the SDL_Renderer that created the texture, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getTextureSize

      @NativeType("boolean") public boolean getTextureSize(@Nullable @Nullable SDL_Texture texture, @Nullable @Nullable FloatPtr w, @Nullable @Nullable FloatPtr h)
      Get the size of a texture, as floating point values.
      Parameters:
      texture - the texture to query.
      w - a pointer filled in with the width of the texture in pixels. This argument can be NULL if you don't need this information.
      h - a pointer filled in with the height of the texture in pixels. This argument can be NULL if you don't need this information.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setTextureColorMod

      @NativeType("boolean") public boolean setTextureColorMod(@Nullable @Nullable SDL_Texture texture, @NativeType("Uint8") @Unsigned byte r, @NativeType("Uint8") @Unsigned byte g, @NativeType("Uint8") @Unsigned byte b)

      Set an additional color value multiplied into render copy operations.

      When this texture is rendered, during the copy operation each source color channel is modulated by the appropriate color value according to the following formula:

      srcC = srcC * (color / 255)

      Color modulation is not always supported by the renderer; it will return false if color modulation is not supported.

      Parameters:
      texture - the texture to update.
      r - the red color value multiplied into copy operations.
      g - the green color value multiplied into copy operations.
      b - the blue color value multiplied into copy operations.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTextureColorModFloat

      @NativeType("boolean") public boolean setTextureColorModFloat(@Nullable @Nullable SDL_Texture texture, float r, float g, float b)

      Set an additional color value multiplied into render copy operations.

      When this texture is rendered, during the copy operation each source color channel is modulated by the appropriate color value according to the following formula:

      srcC = srcC * color

      Color modulation is not always supported by the renderer; it will return false if color modulation is not supported.

      Parameters:
      texture - the texture to update.
      r - the red color value multiplied into copy operations.
      g - the green color value multiplied into copy operations.
      b - the blue color value multiplied into copy operations.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTextureColorMod

      @NativeType("boolean") public boolean getTextureColorMod(@Nullable @Nullable SDL_Texture texture, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr r, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr g, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr b)
      Get the additional color value multiplied into render copy operations.
      Parameters:
      texture - the texture to query.
      r - a pointer filled in with the current red color value.
      g - a pointer filled in with the current green color value.
      b - a pointer filled in with the current blue color value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTextureColorModFloat

      @NativeType("boolean") public boolean getTextureColorModFloat(@Nullable @Nullable SDL_Texture texture, @Nullable @Nullable FloatPtr r, @Nullable @Nullable FloatPtr g, @Nullable @Nullable FloatPtr b)
      Get the additional color value multiplied into render copy operations.
      Parameters:
      texture - the texture to query.
      r - a pointer filled in with the current red color value.
      g - a pointer filled in with the current green color value.
      b - a pointer filled in with the current blue color value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTextureAlphaMod

      @NativeType("boolean") public boolean setTextureAlphaMod(@Nullable @Nullable SDL_Texture texture, @NativeType("Uint8") @Unsigned byte alpha)

      Set an additional alpha value multiplied into render copy operations.

      When this texture is rendered, during the copy operation the source alpha value is modulated by this alpha value according to the following formula:

      srcA = srcA * (alpha / 255)

      Alpha modulation is not always supported by the renderer; it will return false if alpha modulation is not supported.

      Parameters:
      texture - the texture to update.
      alpha - the source alpha value multiplied into copy operations.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTextureAlphaModFloat

      @NativeType("boolean") public boolean setTextureAlphaModFloat(@Nullable @Nullable SDL_Texture texture, float alpha)

      Set an additional alpha value multiplied into render copy operations.

      When this texture is rendered, during the copy operation the source alpha value is modulated by this alpha value according to the following formula:

      srcA = srcA * alpha

      Alpha modulation is not always supported by the renderer; it will return false if alpha modulation is not supported.

      Parameters:
      texture - the texture to update.
      alpha - the source alpha value multiplied into copy operations.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTextureAlphaMod

      @NativeType("boolean") public boolean getTextureAlphaMod(@Nullable @Nullable SDL_Texture texture, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr alpha)
      Get the additional alpha value multiplied into render copy operations.
      Parameters:
      texture - the texture to query.
      alpha - a pointer filled in with the current alpha value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTextureAlphaModFloat

      @NativeType("boolean") public boolean getTextureAlphaModFloat(@Nullable @Nullable SDL_Texture texture, @Nullable @Nullable FloatPtr alpha)
      Get the additional alpha value multiplied into render copy operations.
      Parameters:
      texture - the texture to query.
      alpha - a pointer filled in with the current alpha value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTextureBlendMode

      @NativeType("boolean") public boolean setTextureBlendMode(@Nullable @Nullable SDL_Texture texture, @EnumType(SDL_BlendMode.class) int blendMode)

      Set the blend mode for a texture, used by SDL_RenderTexture().

      If the blend mode is not supported, the closest supported mode is chosen and this function returns false.

      Parameters:
      texture - the texture to update.
      blendMode - the SDL_BlendMode to use for texture blending.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTextureBlendMode

      @NativeType("boolean") public boolean getTextureBlendMode(@Nullable @Nullable SDL_Texture texture, @Nullable @EnumType(SDL_BlendMode.class) @Nullable IntPtr blendMode)
      Get the blend mode used for texture copy operations.
      Parameters:
      texture - the texture to query.
      blendMode - a pointer filled in with the current SDL_BlendMode.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTextureScaleMode

      @NativeType("boolean") public boolean setTextureScaleMode(@Nullable @Nullable SDL_Texture texture, @EnumType(SDL_ScaleMode.class) int scaleMode)

      Set the scale mode used for texture scale operations.

      The default texture scale mode is SDL_SCALEMODE_LINEAR.

      If the scale mode is not supported, the closest supported mode is chosen.

      Parameters:
      texture - the texture to update.
      scaleMode - the SDL_ScaleMode to use for texture scaling.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTextureScaleMode

      @NativeType("boolean") public boolean getTextureScaleMode(@Nullable @Nullable SDL_Texture texture, @Nullable @EnumType(SDL_ScaleMode.class) @Nullable IntPtr scaleMode)
      Get the scale mode used for texture scale operations.
      Parameters:
      texture - the texture to query.
      scaleMode - a pointer filled in with the current scale mode.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • updateTexture

      @NativeType("boolean") public boolean updateTexture(@Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_Rect rect, @Pointer(comment="void*") MemorySegment pixels, int pitch)

      Update the given texture rectangle with new pixel data.

      The pixel data must be in the pixel format of the texture, which can be queried using the SDL_PROP_TEXTURE_FORMAT_NUMBER property.

      This is a fairly slow function, intended for use with static textures that do not change often.

      If the texture is intended to be updated often, it is preferred to create the texture as streaming and use the locking functions referenced below. While this function will work with streaming textures, for optimization reasons you may not get the pixels back if you lock the texture afterward.

      Parameters:
      texture - the texture to update.
      rect - an SDL_Rect structure representing the area to update, or NULL to update the entire texture.
      pixels - the raw pixel data in the format of the texture.
      pitch - the number of bytes in a row of pixel data, including padding between lines.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • updateYUVTexture

      @NativeType("boolean") public boolean updateYUVTexture(@Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_Rect rect, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr Yplane, int Ypitch, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr Uplane, int Upitch, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr Vplane, int Vpitch)

      Update a rectangle within a planar YV12 or IYUV texture with new pixel data.

      You can use SDL_UpdateTexture() as long as your pixel data is a contiguous block of Y and U/V planes in the proper order, but this function is available if your pixel data is not contiguous.

      Parameters:
      texture - the texture to update.
      rect - a pointer to the rectangle of pixels to update, or NULL to update the entire texture.
      Yplane - the raw pixel data for the Y plane.
      Ypitch - the number of bytes between rows of pixel data for the Y plane.
      Uplane - the raw pixel data for the U plane.
      Upitch - the number of bytes between rows of pixel data for the U plane.
      Vplane - the raw pixel data for the V plane.
      Vpitch - the number of bytes between rows of pixel data for the V plane.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • updateNVTexture

      @NativeType("boolean") public boolean updateNVTexture(@Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_Rect rect, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr Yplane, int Ypitch, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr UVplane, int UVpitch)

      Update a rectangle within a planar NV12 or NV21 texture with new pixels.

      You can use SDL_UpdateTexture() as long as your pixel data is a contiguous block of NV12/21 planes in the proper order, but this function is available if your pixel data is not contiguous.

      Parameters:
      texture - the texture to update.
      rect - a pointer to the rectangle of pixels to update, or NULL to update the entire texture.
      Yplane - the raw pixel data for the Y plane.
      Ypitch - the number of bytes between rows of pixel data for the Y plane.
      UVplane - the raw pixel data for the UV plane.
      UVpitch - the number of bytes between rows of pixel data for the UV plane.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lockTexture

      @NativeType("boolean") public boolean lockTexture(@Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_Rect rect, @Nullable @Nullable PointerPtr pixels, @Nullable @Nullable IntPtr pitch)

      Lock a portion of the texture for write-only pixel access.

      As an optimization, the pixels made available for editing don't necessarily contain the old texture data. This is a write-only operation, and if you need to keep a copy of the texture data you should do that at the application level.

      You must use SDL_UnlockTexture() to unlock the pixels and apply any changes.

      Parameters:
      texture - the texture to lock for access, which was created with SDL_TEXTUREACCESS_STREAMING.
      rect - an SDL_Rect structure representing the area to lock for access; NULL to lock the entire texture.
      pixels - this is filled in with a pointer to the locked pixels, appropriately offset by the locked area.
      pitch - this is filled in with the pitch of the locked pixels; the pitch is the length of one row in bytes.
      Returns:
      true on success or false if the texture is not valid or was not created with SDL_TEXTUREACCESS_STREAMING; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lockTextureToSurface

      @NativeType("boolean") public boolean lockTextureToSurface(@Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_Rect rect, @Nullable @Pointer SDL_Surface.Ptr surface)

      Lock a portion of the texture for write-only pixel access, and expose it as a SDL surface.

      Besides providing an SDL_Surface instead of raw pixel data, this function operates like SDL_LockTexture.

      As an optimization, the pixels made available for editing don't necessarily contain the old texture data. This is a write-only operation, and if you need to keep a copy of the texture data you should do that at the application level.

      You must use SDL_UnlockTexture() to unlock the pixels and apply any changes.

      The returned surface is freed internally after calling SDL_UnlockTexture() or SDL_DestroyTexture(). The caller should not free it.

      Parameters:
      texture - the texture to lock for access, which must be created with SDL_TEXTUREACCESS_STREAMING.
      rect - a pointer to the rectangle to lock for access. If the rect is NULL, the entire texture will be locked.
      surface - a pointer to an SDL surface of size rect. Don't assume any specific pixel content.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unlockTexture

      public void unlockTexture(@Nullable @Nullable SDL_Texture texture)

      Unlock a texture, uploading the changes to video memory, if needed.

      Warning: Please note that SDL_LockTexture() is intended to be write-only; it will not guarantee the previous contents of the texture will be provided. You must fully initialize any area of a texture that you lock before unlocking it, as the pixels might otherwise be uninitialized memory.

      Which is to say: locking and immediately unlocking a texture can result in corrupted textures, depending on the renderer in use.

      Parameters:
      texture - a texture locked by SDL_LockTexture().
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setRenderTarget

      @NativeType("boolean") public boolean setRenderTarget(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable SDL_Texture texture)

      Set a texture as the current rendering target.

      The default render target is the window for which the renderer was created. To stop rendering to a texture and render to the window again, call this function with a NULL texture.

      Viewport, cliprect, scale, and logical presentation are unique to each render target. Get and set functions for these states apply to the current render target set by this function, and those states persist on each target when the current render target changes.

      Parameters:
      renderer - the rendering context.
      texture - the targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL to render to the window instead of a texture.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderTarget

      public SDL_Texture getRenderTarget(@Nullable @Nullable SDL_Renderer renderer)

      Get the current render target.

      The default render target is the window for which the renderer was created, and is reported a NULL here.

      Parameters:
      renderer - the rendering context.
      Returns:
      the current render target or NULL for the default render target.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setRenderLogicalPresentation

      @NativeType("boolean") public boolean setRenderLogicalPresentation(@Nullable @Nullable SDL_Renderer renderer, int w, int h, @EnumType(SDL_RendererLogicalPresentation.class) int mode)

      Set a device-independent resolution and presentation mode for rendering.

      This function sets the width and height of the logical rendering output. The renderer will act as if the current render target is always the requested dimensions, scaling to the actual resolution as necessary.

      This can be useful for games that expect a fixed size, but would like to scale the output to whatever is available, regardless of how a user resizes a window, or if the display is high DPI.

      Logical presentation can be used with both render target textures and the renderer's window; the state is unique to each render target, and this function sets the state for the current render target. It might be useful to draw to a texture that matches the window dimensions with logical presentation enabled, and then draw that texture across the entire window with logical presentation disabled. Be careful not to render both with logical presentation enabled, however, as this could produce double-letterboxing, etc.

      You can disable logical coordinates by setting the mode to SDL_LOGICAL_PRESENTATION_DISABLED, and in that case you get the full pixel resolution of the render target; it is safe to toggle logical presentation during the rendering of a frame: perhaps most of the rendering is done to specific dimensions but to make fonts look sharp, the app turns off logical presentation while drawing text, for example.

      For the renderer's window, letterboxing is drawn into the framebuffer if logical presentation is enabled during SDL_RenderPresent; be sure to reenable it before presenting if you were toggling it, otherwise the letterbox areas might have artifacts from previous frames (or artifacts from external overlays, etc). Letterboxing is never drawn into texture render targets; be sure to call SDL_RenderClear() before drawing into the texture so the letterboxing areas are cleared, if appropriate.

      You can convert coordinates in an event into rendering coordinates using SDL_ConvertEventToRenderCoordinates().

      Parameters:
      renderer - the rendering context.
      w - the width of the logical resolution.
      h - the height of the logical resolution.
      mode - the presentation mode used.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderLogicalPresentation

      @NativeType("boolean") public boolean getRenderLogicalPresentation(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable IntPtr w, @Nullable @Nullable IntPtr h, @Nullable @EnumType(SDL_RendererLogicalPresentation.class) @Nullable IntPtr mode)

      Get device independent resolution and presentation mode for rendering.

      This function gets the width and height of the logical rendering output, or the output size in pixels if a logical resolution is not enabled.

      Each render target has its own logical presentation state. This function gets the state for the current render target.

      Parameters:
      renderer - the rendering context.
      w - an int to be filled with the width.
      h - an int to be filled with the height.
      mode - the presentation mode used.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderLogicalPresentationRect

      @NativeType("boolean") public boolean getRenderLogicalPresentationRect(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_FRect rect)

      Get the final presentation rectangle for rendering.

      This function returns the calculated rectangle used for logical presentation, based on the presentation mode and output size. If logical presentation is disabled, it will fill the rectangle with the output size, in pixels.

      Each render target has its own logical presentation state. This function gets the rectangle for the current render target.

      Parameters:
      renderer - the rendering context.
      rect - a pointer filled in with the final presentation rectangle, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderCoordinatesFromWindow

      @NativeType("boolean") public boolean renderCoordinatesFromWindow(@Nullable @Nullable SDL_Renderer renderer, float window_x, float window_y, @Nullable @Nullable FloatPtr x, @Nullable @Nullable FloatPtr y)

      Get a point in render coordinates when given a point in window coordinates.

      This takes into account several states:

      • The window dimensions.
      • The logical presentation settings (SDL_SetRenderLogicalPresentation)
      • The scale (SDL_SetRenderScale)
      • The viewport (SDL_SetRenderViewport)
      Parameters:
      renderer - the rendering context.
      window_x - the x coordinate in window coordinates.
      window_y - the y coordinate in window coordinates.
      x - a pointer filled with the x coordinate in render coordinates.
      y - a pointer filled with the y coordinate in render coordinates.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderCoordinatesToWindow

      @NativeType("boolean") public boolean renderCoordinatesToWindow(@Nullable @Nullable SDL_Renderer renderer, float x, float y, @Nullable @Nullable FloatPtr window_x, @Nullable @Nullable FloatPtr window_y)

      Get a point in window coordinates when given a point in render coordinates.

      This takes into account several states:

      • The window dimensions.
      • The logical presentation settings (SDL_SetRenderLogicalPresentation)
      • The scale (SDL_SetRenderScale)
      • The viewport (SDL_SetRenderViewport)
      Parameters:
      renderer - the rendering context.
      x - the x coordinate in render coordinates.
      y - the y coordinate in render coordinates.
      window_x - a pointer filled with the x coordinate in window coordinates.
      window_y - a pointer filled with the y coordinate in window coordinates.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • convertEventToRenderCoordinates

      @NativeType("boolean") public boolean convertEventToRenderCoordinates(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_Event event)

      Convert the coordinates in an event to render coordinates.

      This takes into account several states:

      • The window dimensions.
      • The logical presentation settings (SDL_SetRenderLogicalPresentation)
      • The scale (SDL_SetRenderScale)
      • The viewport (SDL_SetRenderViewport)

      Various event types are converted with this function: mouse, touch, pen, etc.

      Touch coordinates are converted from normalized coordinates in the window to non-normalized rendering coordinates.

      Relative mouse coordinates (xrel and yrel event fields) are also converted. Applications that do not want these fields converted should use SDL_RenderCoordinatesFromWindow() on the specific event fields instead of converting the entire event structure.

      Once converted, coordinates may be outside the rendering area.

      Parameters:
      renderer - the rendering context.
      event - the event to modify.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setRenderViewport

      @NativeType("boolean") public boolean setRenderViewport(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Set the drawing area for rendering on the current target.

      Drawing will clip to this area (separately from any clipping done with SDL_SetRenderClipRect), and the top left of the area will become coordinate (0, 0) for future drawing commands.

      The area's width and height must be >= 0.

      Each render target has its own viewport. This function sets the viewport for the current render target.

      Parameters:
      renderer - the rendering context.
      rect - the SDL_Rect structure representing the drawing area, or NULL to set the viewport to the entire target.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderViewport

      @NativeType("boolean") public boolean getRenderViewport(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Get the drawing area for the current target.

      Each render target has its own viewport. This function gets the viewport for the current render target.

      Parameters:
      renderer - the rendering context.
      rect - an SDL_Rect structure filled in with the current drawing area.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderViewportSet

      @NativeType("boolean") public boolean renderViewportSet(@Nullable @Nullable SDL_Renderer renderer)

      Return whether an explicit rectangle was set as the viewport.

      This is useful if you're saving and restoring the viewport and want to know whether you should restore a specific rectangle or NULL.

      Each render target has its own viewport. This function checks the viewport for the current render target.

      Parameters:
      renderer - the rendering context.
      Returns:
      true if the viewport was set to a specific rectangle, or false if it was set to NULL (the entire target).
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderSafeArea

      @NativeType("boolean") public boolean getRenderSafeArea(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Get the safe area for rendering within the current viewport.

      Some devices have portions of the screen which are partially obscured or not interactive, possibly due to on-screen controls, curved edges, camera notches, TV overscan, etc. This function provides the area of the current viewport which is safe to have interactible content. You should continue rendering into the rest of the render target, but it should not contain visually important or interactible content.

      Parameters:
      renderer - the rendering context.
      rect - a pointer filled in with the area that is safe for interactive content.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setRenderClipRect

      @NativeType("boolean") public boolean setRenderClipRect(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Set the clip rectangle for rendering on the specified target.

      Each render target has its own clip rectangle. This function sets the cliprect for the current render target.

      Parameters:
      renderer - the rendering context.
      rect - an SDL_Rect structure representing the clip area, relative to the viewport, or NULL to disable clipping.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderClipRect

      @NativeType("boolean") public boolean getRenderClipRect(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Get the clip rectangle for the current target.

      Each render target has its own clip rectangle. This function gets the cliprect for the current render target.

      Parameters:
      renderer - the rendering context.
      rect - an SDL_Rect structure filled in with the current clipping area or an empty rectangle if clipping is disabled.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderClipEnabled

      @NativeType("boolean") public boolean renderClipEnabled(@Nullable @Nullable SDL_Renderer renderer)

      Get whether clipping is enabled on the given render target.

      Each render target has its own clip rectangle. This function checks the cliprect for the current render target.

      Parameters:
      renderer - the rendering context.
      Returns:
      true if clipping is enabled or false if not; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setRenderScale

      @NativeType("boolean") public boolean setRenderScale(@Nullable @Nullable SDL_Renderer renderer, float scaleX, float scaleY)

      Set the drawing scale for rendering on the current target.

      The drawing coordinates are scaled by the x/y scaling factors before they are used by the renderer. This allows resolution independent drawing with a single coordinate system.

      If this results in scaling or subpixel drawing by the rendering backend, it will be handled using the appropriate quality hints. For best results use integer scaling factors.

      Each render target has its own scale. This function sets the scale for the current render target.

      Parameters:
      renderer - the rendering context.
      scaleX - the horizontal scaling factor.
      scaleY - the vertical scaling factor.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderScale

      @NativeType("boolean") public boolean getRenderScale(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable FloatPtr scaleX, @Nullable @Nullable FloatPtr scaleY)

      Get the drawing scale for the current target.

      Each render target has its own scale. This function gets the scale for the current render target.

      Parameters:
      renderer - the rendering context.
      scaleX - a pointer filled in with the horizontal scaling factor.
      scaleY - a pointer filled in with the vertical scaling factor.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setRenderDrawColor

      @NativeType("boolean") public boolean setRenderDrawColor(@Nullable @Nullable SDL_Renderer renderer, @NativeType("Uint8") @Unsigned byte r, @NativeType("Uint8") @Unsigned byte g, @NativeType("Uint8") @Unsigned byte b, @NativeType("Uint8") @Unsigned byte a)

      Set the color used for drawing operations.

      Set the color for drawing or filling rectangles, lines, and points, and for SDL_RenderClear().

      Parameters:
      renderer - the rendering context.
      r - the red value used to draw on the rendering target.
      g - the green value used to draw on the rendering target.
      b - the blue value used to draw on the rendering target.
      a - the alpha value used to draw on the rendering target; usually SDL_ALPHA_OPAQUE (255). Use SDL_SetRenderDrawBlendMode to specify how the alpha channel is used.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setRenderDrawColorFloat

      @NativeType("boolean") public boolean setRenderDrawColorFloat(@Nullable @Nullable SDL_Renderer renderer, float r, float g, float b, float a)

      Set the color used for drawing operations (Rect, Line and Clear).

      Set the color for drawing or filling rectangles, lines, and points, and for SDL_RenderClear().

      Parameters:
      renderer - the rendering context.
      r - the red value used to draw on the rendering target.
      g - the green value used to draw on the rendering target.
      b - the blue value used to draw on the rendering target.
      a - the alpha value used to draw on the rendering target. Use SDL_SetRenderDrawBlendMode to specify how the alpha channel is used.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderDrawColor

      @NativeType("boolean") public boolean getRenderDrawColor(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr r, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr g, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr b, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr a)
      Get the color used for drawing operations (Rect, Line and Clear).
      Parameters:
      renderer - the rendering context.
      r - a pointer filled in with the red value used to draw on the rendering target.
      g - a pointer filled in with the green value used to draw on the rendering target.
      b - a pointer filled in with the blue value used to draw on the rendering target.
      a - a pointer filled in with the alpha value used to draw on the rendering target; usually SDL_ALPHA_OPAQUE (255).
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderDrawColorFloat

      @NativeType("boolean") public boolean getRenderDrawColorFloat(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable FloatPtr r, @Nullable @Nullable FloatPtr g, @Nullable @Nullable FloatPtr b, @Nullable @Nullable FloatPtr a)
      Get the color used for drawing operations (Rect, Line and Clear).
      Parameters:
      renderer - the rendering context.
      r - a pointer filled in with the red value used to draw on the rendering target.
      g - a pointer filled in with the green value used to draw on the rendering target.
      b - a pointer filled in with the blue value used to draw on the rendering target.
      a - a pointer filled in with the alpha value used to draw on the rendering target.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setRenderColorScale

      @NativeType("boolean") public boolean setRenderColorScale(@Nullable @Nullable SDL_Renderer renderer, float scale)

      Set the color scale used for render operations.

      The color scale is an additional scale multiplied into the pixel color value while rendering. This can be used to adjust the brightness of colors during HDR rendering, or changing HDR video brightness when playing on an SDR display.

      The color scale does not affect the alpha channel, only the color brightness.

      Parameters:
      renderer - the rendering context.
      scale - the color scale value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderColorScale

      @NativeType("boolean") public boolean getRenderColorScale(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable FloatPtr scale)
      Get the color scale used for render operations.
      Parameters:
      renderer - the rendering context.
      scale - a pointer filled in with the current color scale value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setRenderDrawBlendMode

      @NativeType("boolean") public boolean setRenderDrawBlendMode(@Nullable @Nullable SDL_Renderer renderer, @EnumType(SDL_BlendMode.class) int blendMode)

      Set the blend mode used for drawing operations (Fill and Line).

      If the blend mode is not supported, the closest supported mode is chosen.

      Parameters:
      renderer - the rendering context.
      blendMode - the SDL_BlendMode to use for blending.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderDrawBlendMode

      @NativeType("boolean") public boolean getRenderDrawBlendMode(@Nullable @Nullable SDL_Renderer renderer, @Nullable @EnumType(SDL_BlendMode.class) @Nullable IntPtr blendMode)
      Get the blend mode used for drawing operations.
      Parameters:
      renderer - the rendering context.
      blendMode - a pointer filled in with the current SDL_BlendMode.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderClear

      @NativeType("boolean") public boolean renderClear(@Nullable @Nullable SDL_Renderer renderer)

      Clear the current rendering target with the drawing color.

      This function clears the entire rendering target, ignoring the viewport and the clip rectangle. Note, that clearing will also set/fill all pixels of the rendering target to current renderer draw color, so make sure to invoke SDL_SetRenderDrawColor() when needed.

      Parameters:
      renderer - the rendering context.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderPoint

      @NativeType("boolean") public boolean renderPoint(@Nullable @Nullable SDL_Renderer renderer, float x, float y)
      Draw a point on the current rendering target at subpixel precision.
      Parameters:
      renderer - the renderer which should draw a point.
      x - the x coordinate of the point.
      y - the y coordinate of the point.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderPoints

      @NativeType("boolean") public boolean renderPoints(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_FPoint points, int count)
      Draw multiple points on the current rendering target at subpixel precision.
      Parameters:
      renderer - the renderer which should draw multiple points.
      points - the points to draw.
      count - the number of points to draw.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderLine

      @NativeType("boolean") public boolean renderLine(@Nullable @Nullable SDL_Renderer renderer, float x1, float y1, float x2, float y2)
      Draw a line on the current rendering target at subpixel precision.
      Parameters:
      renderer - the renderer which should draw a line.
      x1 - the x coordinate of the start point.
      y1 - the y coordinate of the start point.
      x2 - the x coordinate of the end point.
      y2 - the y coordinate of the end point.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderLines

      @NativeType("boolean") public boolean renderLines(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_FPoint points, int count)
      Draw a series of connected lines on the current rendering target at subpixel precision.
      Parameters:
      renderer - the renderer which should draw multiple lines.
      points - the points along the lines.
      count - the number of points, drawing count-1 lines.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderRect

      @NativeType("boolean") public boolean renderRect(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_FRect rect)
      Draw a rectangle on the current rendering target at subpixel precision.
      Parameters:
      renderer - the renderer which should draw a rectangle.
      rect - a pointer to the destination rectangle, or NULL to outline the entire rendering target.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderRects

      @NativeType("boolean") public boolean renderRects(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_FRect rects, int count)
      Draw some number of rectangles on the current rendering target at subpixel precision.
      Parameters:
      renderer - the renderer which should draw multiple rectangles.
      rects - a pointer to an array of destination rectangles.
      count - the number of rectangles.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderFillRect

      @NativeType("boolean") public boolean renderFillRect(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_FRect rect)
      Fill a rectangle on the current rendering target with the drawing color at subpixel precision.
      Parameters:
      renderer - the renderer which should fill a rectangle.
      rect - a pointer to the destination rectangle, or NULL for the entire rendering target.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderFillRects

      @NativeType("boolean") public boolean renderFillRects(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_FRect rects, int count)
      Fill some number of rectangles on the current rendering target with the drawing color at subpixel precision.
      Parameters:
      renderer - the renderer which should fill multiple rectangles.
      rects - a pointer to an array of destination rectangles.
      count - the number of rectangles.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderTexture

      @NativeType("boolean") public boolean renderTexture(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_FRect srcrect, @Nullable @Pointer @Nullable ISDL_FRect dstrect)
      Copy a portion of the texture to the current rendering target at subpixel precision.
      Parameters:
      renderer - the renderer which should copy parts of a texture.
      texture - the source texture.
      srcrect - a pointer to the source rectangle, or NULL for the entire texture.
      dstrect - a pointer to the destination rectangle, or NULL for the entire rendering target.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderTextureRotated

      @NativeType("boolean") public boolean renderTextureRotated(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_FRect srcrect, @Nullable @Pointer @Nullable ISDL_FRect dstrect, double angle, @Nullable @Pointer @Nullable ISDL_FPoint center, @EnumType(SDL_FlipMode.class) int flip)
      Copy a portion of the source texture to the current rendering target, with rotation and flipping, at subpixel precision.
      Parameters:
      renderer - the renderer which should copy parts of a texture.
      texture - the source texture.
      srcrect - a pointer to the source rectangle, or NULL for the entire texture.
      dstrect - a pointer to the destination rectangle, or NULL for the entire rendering target.
      angle - an angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction.
      center - a pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).
      flip - an SDL_FlipMode value stating which flipping actions should be performed on the texture.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderTextureAffine

      @NativeType("boolean") public boolean renderTextureAffine(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_FRect srcrect, @Nullable @Pointer @Nullable ISDL_FPoint origin, @Nullable @Pointer @Nullable ISDL_FPoint right, @Nullable @Pointer @Nullable ISDL_FPoint down)
      Copy a portion of the source texture to the current rendering target, with affine transform, at subpixel precision.
      Parameters:
      renderer - the renderer which should copy parts of a texture.
      texture - the source texture.
      srcrect - a pointer to the source rectangle, or NULL for the entire texture.
      origin - a pointer to a point indicating where the top-left corner of srcrect should be mapped to, or NULL for the rendering target's origin.
      right - a pointer to a point indicating where the top-right corner of srcrect should be mapped to, or NULL for the rendering target's top-right corner.
      down - a pointer to a point indicating where the bottom-left corner of srcrect should be mapped to, or NULL for the rendering target's bottom-left corner.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderTextureTiled

      @NativeType("boolean") public boolean renderTextureTiled(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_FRect srcrect, float scale, @Nullable @Pointer @Nullable ISDL_FRect dstrect)

      Tile a portion of the texture to the current rendering target at subpixel precision.

      The pixels in srcrect will be repeated as many times as needed to completely fill dstrect.

      Parameters:
      renderer - the renderer which should copy parts of a texture.
      texture - the source texture.
      srcrect - a pointer to the source rectangle, or NULL for the entire texture.
      scale - the scale used to transform srcrect into the destination rectangle, e.g. a 32x32 texture with a scale of 2 would fill 64x64 tiles.
      dstrect - a pointer to the destination rectangle, or NULL for the entire rendering target.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderTexture9Grid

      @NativeType("boolean") public boolean renderTexture9Grid(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_FRect srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, @Nullable @Pointer @Nullable ISDL_FRect dstrect)

      Perform a scaled copy using the 9-grid algorithm to the current rendering target at subpixel precision.

      The pixels in the texture are split into a 3x3 grid, using the different corner sizes for each corner, and the sides and center making up the remaining pixels. The corners are then scaled using scale and fit into the corners of the destination rectangle. The sides and center are then stretched into place to cover the remaining destination rectangle.

      Parameters:
      renderer - the renderer which should copy parts of a texture.
      texture - the source texture.
      srcrect - the SDL_Rect structure representing the rectangle to be used for the 9-grid, or NULL to use the entire texture.
      left_width - the width, in pixels, of the left corners in srcrect.
      right_width - the width, in pixels, of the right corners in srcrect.
      top_height - the height, in pixels, of the top corners in srcrect.
      bottom_height - the height, in pixels, of the bottom corners in srcrect.
      scale - the scale used to transform the corner of srcrect into the corner of dstrect, or 0.0f for an unscaled copy.
      dstrect - a pointer to the destination rectangle, or NULL for the entire rendering target.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderGeometry

      @NativeType("boolean") public boolean renderGeometry(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable SDL_Texture texture, @Nullable @Pointer @Nullable ISDL_Vertex vertices, int num_vertices, @Nullable @Nullable IntPtr indices, int num_indices)
      Render a list of triangles, optionally using a texture and indices into the vertex array Color and alpha modulation is done per vertex (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
      Parameters:
      renderer - the rendering context.
      texture - (optional) The SDL texture to use.
      vertices - vertices.
      num_vertices - number of vertices.
      indices - (optional) An array of integer indices into the 'vertices' array, if NULL all vertices will be rendered in sequential order.
      num_indices - number of indices.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderGeometryRaw

      @NativeType("boolean") public boolean renderGeometryRaw(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable SDL_Texture texture, @Nullable @Nullable FloatPtr xy, int xy_stride, @Nullable @Pointer @Nullable ISDL_FColor color, int color_stride, @Nullable @Nullable FloatPtr uv, int uv_stride, int num_vertices, @Pointer(comment="void*") MemorySegment indices, int num_indices, int size_indices)
      Render a list of triangles, optionally using a texture and indices into the vertex arrays Color and alpha modulation is done per vertex (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
      Parameters:
      renderer - the rendering context.
      texture - (optional) The SDL texture to use.
      xy - vertex positions.
      xy_stride - byte size to move from one element to the next element.
      color - vertex colors (as SDL_FColor).
      color_stride - byte size to move from one element to the next element.
      uv - vertex normalized texture coordinates.
      uv_stride - byte size to move from one element to the next element.
      num_vertices - number of vertices.
      indices - (optional) An array of indices into the 'vertices' arrays, if NULL all vertices will be rendered in sequential order.
      num_indices - number of indices.
      size_indices - index size: 1 (byte), 2 (short), 4 (int).
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderReadPixels

      public SDL_Surface renderReadPixels(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Read pixels from the current rendering target.

      The returned surface contains pixels inside the desired area clipped to the current viewport, and should be freed with SDL_DestroySurface().

      Note that this returns the actual pixels on the screen, so if you are using logical presentation you should use SDL_GetRenderLogicalPresentationRect() to get the area containing your content.

      WARNING: This is a very slow operation, and should not be used frequently. If you're using this on the main rendering target, it should be called after rendering and before SDL_RenderPresent().

      Parameters:
      renderer - the rendering context.
      rect - an SDL_Rect structure representing the area to read, which will be clipped to the current viewport, or NULL for the entire viewport.
      Returns:
      a new SDL_Surface on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • renderPresent

      @NativeType("boolean") public boolean renderPresent(@Nullable @Nullable SDL_Renderer renderer)

      Update the screen with any rendering performed since the previous call.

      SDL's rendering functions operate on a backbuffer; that is, calling a rendering function such as SDL_RenderLine() does not directly put a line on the screen, but rather updates the backbuffer. As such, you compose your entire scene and present the composed backbuffer to the screen as a complete picture.

      Therefore, when using SDL's rendering API, one does all drawing intended for the frame, and then calls this function once per frame to present the final drawing to the user.

      The backbuffer should be considered invalidated after each present; do not assume that previous contents will exist between frames. You are strongly encouraged to call SDL_RenderClear() to initialize the backbuffer before starting each new frame's drawing, even if you plan to overwrite every pixel.

      Please note, that in case of rendering to a texture - there is no need to call SDL_RenderPresent after drawing needed objects to a texture, and should not be done; you are only required to change back the rendering target to default via SDL_SetRenderTarget(renderer, NULL) afterwards, as textures by themselves do not have a concept of backbuffers. Calling SDL_RenderPresent while rendering to a texture will still update the screen with any current drawing that has been done to the window itself.

      Parameters:
      renderer - the rendering context.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyTexture

      public void destroyTexture(@Nullable @Nullable SDL_Texture texture)

      Destroy the specified texture.

      Passing NULL or an otherwise invalid texture will set the SDL error message to "Invalid texture".

      Parameters:
      texture - the texture to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyRenderer

      public void destroyRenderer(@Nullable @Nullable SDL_Renderer renderer)

      Destroy the rendering context for a window and free all associated textures.

      This should be called before destroying the associated window.

      Parameters:
      renderer - the rendering context.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • flushRenderer

      @NativeType("boolean") public boolean flushRenderer(@Nullable @Nullable SDL_Renderer renderer)

      Force the rendering context to flush any pending commands and state.

      You do not need to (and in fact, shouldn't) call this function unless you are planning to call into OpenGL/Direct3D/Metal/whatever directly, in addition to using an SDL_Renderer.

      This is for a very-specific case: if you are using SDL's render API, and you plan to make OpenGL/D3D/whatever calls in addition to SDL render API calls. If this applies, you should call this function between calls to SDL's render API and the low-level API you're using in cooperation.

      In all other cases, you can ignore this function.

      This call makes SDL flush any pending rendering work it was queueing up to do later in a single batch, and marks any internal cached state as invalid, so it'll prepare all its state again later, from scratch.

      This means you do not need to save state in your rendering code to protect the SDL renderer. However, there lots of arbitrary pieces of Direct3D and OpenGL state that can confuse things; you should use your best judgment and be prepared to make changes if specific state needs to be protected.

      Parameters:
      renderer - the rendering context.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getRenderMetalLayer

      @Pointer(comment="void*") public MemorySegment getRenderMetalLayer(@Nullable @Nullable SDL_Renderer renderer)

      Get the CAMetalLayer associated with the given Metal renderer.

      This function returns void *, so SDL doesn't have to include Metal's headers, but it can be safely cast to a CAMetalLayer *.

      Parameters:
      renderer - the renderer to query.
      Returns:
      a CAMetalLayer * on success, or NULL if the renderer isn't a Metal renderer.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderMetalCommandEncoder

      @Pointer(comment="void*") public MemorySegment getRenderMetalCommandEncoder(@Nullable @Nullable SDL_Renderer renderer)

      Get the Metal command encoder for the current frame.

      This function returns void *, so SDL doesn't have to include Metal's headers, but it can be safely cast to an id<MTLRenderCommandEncoder>.

      This will return NULL if Metal refuses to give SDL a drawable to render to, which might happen if the window is hidden/minimized/offscreen. This doesn't apply to command encoders for render targets, just the window's backbuffer. Check your return values!

      Parameters:
      renderer - the renderer to query.
      Returns:
      an id<MTLRenderCommandEncoder> on success, or NULL if the renderer isn't a Metal renderer or there was an error.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • addVulkanRenderSemaphores

      @NativeType("boolean") public boolean addVulkanRenderSemaphores(@Nullable @Nullable SDL_Renderer renderer, @NativeType("Uint32") @Unsigned int wait_stage_mask, @NativeType("Sint64") long wait_semaphore, @NativeType("Sint64") long signal_semaphore)

      Add a set of synchronization semaphores for the current frame.

      The Vulkan renderer will wait for wait_semaphore before submitting rendering commands and signal signal_semaphore after rendering commands are complete for this frame.

      This should be called each frame that you want semaphore synchronization. The Vulkan renderer may have multiple frames in flight on the GPU, so you should have multiple semaphores that are used for synchronization. Querying SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER will give you the maximum number of semaphores you'll need.

      Parameters:
      renderer - the rendering context.
      wait_stage_mask - the VkPipelineStageFlags for the wait.
      wait_semaphore - a VkSempahore to wait on before rendering the current frame, or 0 if not needed.
      signal_semaphore - a VkSempahore that SDL will signal when rendering for the current frame is complete, or 0 if not needed.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setRenderVSync

      @NativeType("boolean") public boolean setRenderVSync(@Nullable @Nullable SDL_Renderer renderer, int vsync)

      Toggle VSync of the given renderer.

      When a renderer is created, vsync defaults to SDL_RENDERER_VSYNC_DISABLED.

      The vsync parameter can be 1 to synchronize present with every vertical refresh, 2 to synchronize present with every second vertical refresh, etc., SDL_RENDERER_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), or SDL_RENDERER_VSYNC_DISABLED to disable. Not every value is supported by every driver, so you should check the return value to see whether the requested setting is supported.

      Parameters:
      renderer - the renderer to toggle.
      vsync - the vertical refresh sync interval.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRenderVSync

      @NativeType("boolean") public boolean getRenderVSync(@Nullable @Nullable SDL_Renderer renderer, @Nullable @Nullable IntPtr vsync)
      Get VSync of the given renderer.
      Parameters:
      renderer - the renderer to toggle.
      vsync - an int filled with the current vertical refresh sync interval. See SDL_SetRenderVSync() for the meaning of the value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renderDebugText

      @NativeType("boolean") public boolean renderDebugText(@Nullable @Nullable SDL_Renderer renderer, float x, float y, @Nullable @Nullable BytePtr str)

      Draw debug text to an SDL_Renderer.

      This function will render a string of text to an SDL_Renderer. Note that this is a convenience function for debugging, with severe limitations, and not intended to be used for production apps and games.

      Among these limitations:

      • It accepts UTF-8 strings, but will only renders ASCII characters.
      • It has a single, tiny size (8x8 pixels). One can use logical presentation or scaling to adjust it, but it will be blurry.
      • It uses a simple, hardcoded bitmap font. It does not allow different font selections and it does not support truetype, for proper scaling.
      • It does no word-wrapping and does not treat newline characters as a line break. If the text goes out of the window, it's gone.

      For serious text rendering, there are several good options, such as SDL_ttf, stb_truetype, or other external libraries.

      On first use, this will create an internal texture for rendering glyphs. This texture will live until the renderer is destroyed.

      The text is drawn in the color specified by SDL_SetRenderDrawColor().

      Parameters:
      renderer - the renderer which should draw a line of text.
      x - the x coordinate where the top-left corner of the text will draw.
      y - the y coordinate where the top-left corner of the text will draw.
      str - the string to render.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSensors

      @Pointer(comment="SDL_SensorID") @Unsigned public IntPtr getSensors(@Nullable @Nullable IntPtr count)
      Get a list of currently connected sensors.
      Parameters:
      count - a pointer filled in with the number of sensors returned, may be NULL.
      Returns:
      a 0 terminated array of sensor instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorNameForID

      public BytePtr getSensorNameForID(@NativeType("SDL_SensorID") @Unsigned int instance_id)

      Get the implementation dependent name of a sensor.

      This can be called before any sensors are opened.

      Parameters:
      instance_id - the sensor instance ID.
      Returns:
      the sensor name, or NULL if instance_id is not valid.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorTypeForID

      @EnumType(SDL_SensorType.class) public int getSensorTypeForID(@NativeType("SDL_SensorID") @Unsigned int instance_id)

      Get the type of a sensor.

      This can be called before any sensors are opened.

      Parameters:
      instance_id - the sensor instance ID.
      Returns:
      the SDL_SensorType, or SDL_SENSOR_INVALID if instance_id is not valid.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorNonPortableTypeForID

      public int getSensorNonPortableTypeForID(@NativeType("SDL_SensorID") @Unsigned int instance_id)

      Get the platform dependent type of a sensor.

      This can be called before any sensors are opened.

      Parameters:
      instance_id - the sensor instance ID.
      Returns:
      the sensor platform dependent type, or -1 if instance_id is not valid.
      Since:
      This function is available since SDL 3.2.0.
    • openSensor

      public SDL_Sensor openSensor(@NativeType("SDL_SensorID") @Unsigned int instance_id)
      Open a sensor for use.
      Parameters:
      instance_id - the sensor instance ID.
      Returns:
      an SDL_Sensor object or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorFromID

      public SDL_Sensor getSensorFromID(@NativeType("SDL_SensorID") @Unsigned int instance_id)
      Return the SDL_Sensor associated with an instance ID.
      Parameters:
      instance_id - the sensor instance ID.
      Returns:
      an SDL_Sensor object or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getSensorProperties(@Nullable @Nullable SDL_Sensor sensor)
      Get the properties associated with a sensor.
      Parameters:
      sensor - the SDL_Sensor object.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorName

      public BytePtr getSensorName(@Nullable @Nullable SDL_Sensor sensor)
      Get the implementation dependent name of a sensor.
      Parameters:
      sensor - the SDL_Sensor object.
      Returns:
      the sensor name or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorType

      @EnumType(SDL_SensorType.class) public int getSensorType(@Nullable @Nullable SDL_Sensor sensor)
      Get the type of a sensor.
      Parameters:
      sensor - the SDL_Sensor object to inspect.
      Returns:
      the SDL_SensorType type, or SDL_SENSOR_INVALID if sensor is NULL.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorNonPortableType

      public int getSensorNonPortableType(@Nullable @Nullable SDL_Sensor sensor)
      Get the platform dependent type of a sensor.
      Parameters:
      sensor - the SDL_Sensor object to inspect.
      Returns:
      the sensor platform dependent type, or -1 if sensor is NULL.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorID

      @NativeType("SDL_SensorID") @Unsigned public int getSensorID(@Nullable @Nullable SDL_Sensor sensor)
      Get the instance ID of a sensor.
      Parameters:
      sensor - the SDL_Sensor object to inspect.
      Returns:
      the sensor instance ID, or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getSensorData

      @NativeType("boolean") public boolean getSensorData(@Nullable @Nullable SDL_Sensor sensor, @Nullable @Nullable FloatPtr data, int num_values)

      Get the current state of an opened sensor.

      The number of values and interpretation of the data is sensor dependent.

      Parameters:
      sensor - the SDL_Sensor object to query.
      data - a pointer filled with the current sensor state.
      num_values - the number of values to write to data.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • closeSensor

      public void closeSensor(@Nullable @Nullable SDL_Sensor sensor)
      Close a sensor previously opened with SDL_OpenSensor().
      Parameters:
      sensor - the SDL_Sensor object to close.
      Since:
      This function is available since SDL 3.2.0.
    • updateSensors

      public void updateSensors()

      Update the current state of the open sensors.

      This is called automatically by the event loop if sensor events are enabled.

      This needs to be called from the thread that initialized the sensor subsystem.

      Since:
      This function is available since SDL 3.2.0.
    • openTitleStorage

      public SDL_Storage openTitleStorage(@Nullable @Nullable BytePtr override, @NativeType("SDL_PropertiesID") @Unsigned int props)
      Opens up a read-only container for the application's filesystem.
      Parameters:
      override - a path to override the backend's default title root.
      props - a property list that may contain backend-specific information.
      Returns:
      a title storage container on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openUserStorage

      public SDL_Storage openUserStorage(@Nullable @Nullable BytePtr org, @Nullable @Nullable BytePtr app, @NativeType("SDL_PropertiesID") @Unsigned int props)

      Opens up a container for a user's unique read/write filesystem.

      While title storage can generally be kept open throughout runtime, user storage should only be opened when the client is ready to read/write files. This allows the backend to properly batch file operations and flush them when the container has been closed; ensuring safe and optimal save I/O.

      Parameters:
      org - the name of your organization.
      app - the name of your application.
      props - a property list that may contain backend-specific information.
      Returns:
      a user storage container on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openFileStorage

      public SDL_Storage openFileStorage(@Nullable @Nullable BytePtr path)

      Opens up a container for local filesystem storage.

      This is provided for development and tools. Portable applications should use SDL_OpenTitleStorage() for access to game data and SDL_OpenUserStorage() for access to user data.

      Parameters:
      path - the base path prepended to all storage paths, or NULL for no base path.
      Returns:
      a filesystem storage container on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • openStorage

      public SDL_Storage openStorage(@Nullable @Pointer @Nullable ISDL_StorageInterface iface, @Pointer(comment="void*") MemorySegment userdata)

      Opens up a container using a client-provided storage interface.

      Applications do not need to use this function unless they are providing their own SDL_Storage implementation. If you just need an SDL_Storage, you should use the built-in implementations in SDL, like SDL_OpenTitleStorage() or SDL_OpenUserStorage().

      This function makes a copy of iface and the caller does not need to keep it around after this call.

      Parameters:
      iface - the interface that implements this storage, initialized using SDL_INIT_INTERFACE().
      userdata - the pointer that will be passed to the interface functions.
      Returns:
      a storage container on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • closeStorage

      @NativeType("boolean") public boolean closeStorage(@Nullable @Nullable SDL_Storage storage)
      Closes and frees a storage container.
      Parameters:
      storage - a storage container to close.
      Returns:
      true if the container was freed with no errors, false otherwise; call SDL_GetError() for more information. Even if the function returns an error, the container data will be freed; the error is only for informational purposes.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • storageReady

      @NativeType("boolean") public boolean storageReady(@Nullable @Nullable SDL_Storage storage)

      Checks if the storage container is ready to use.

      This function should be called in regular intervals until it returns true - however, it is not recommended to spinwait on this call, as the backend may depend on a synchronous message loop. You might instead poll this in your game's main loop while processing events and drawing a loading screen.

      Parameters:
      storage - a storage container to query.
      Returns:
      true if the container is ready, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • getStorageFileSize

      @NativeType("boolean") public boolean getStorageFileSize(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr path, @Nullable @Pointer(comment="Uint64") @Unsigned @Nullable LongPtr length)
      Query the size of a file within a storage container.
      Parameters:
      storage - a storage container to query.
      path - the relative path of the file to query.
      length - a pointer to be filled with the file's length.
      Returns:
      true if the file could be queried or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • readStorageFile

      @NativeType("boolean") public boolean readStorageFile(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr path, @Pointer(comment="void*") MemorySegment destination, @NativeType("Uint64") @Unsigned long length)

      Synchronously read a file from a storage container into a client-provided buffer.

      The value of length must match the length of the file exactly; call SDL_GetStorageFileSize() to get this value. This behavior may be relaxed in a future release.

      Parameters:
      storage - a storage container to read from.
      path - the relative path of the file to read.
      destination - a client-provided buffer to read the file into.
      length - the length of the destination buffer.
      Returns:
      true if the file was read or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • writeStorageFile

      @NativeType("boolean") public boolean writeStorageFile(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr path, @Pointer(comment="void*") MemorySegment source, @NativeType("Uint64") @Unsigned long length)
      Synchronously write a file from client memory into a storage container.
      Parameters:
      storage - a storage container to write to.
      path - the relative path of the file to write.
      source - a client-provided buffer to write from.
      length - the length of the source buffer.
      Returns:
      true if the file was written or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createStorageDirectory

      @NativeType("boolean") public boolean createStorageDirectory(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr path)
      Create a directory in a writable storage container.
      Parameters:
      storage - a storage container.
      path - the path of the directory to create.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • enumerateStorageDirectory

      @NativeType("boolean") public boolean enumerateStorageDirectory(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr path, @Pointer(comment="SDL_EnumerateDirectoryCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Enumerate a directory in a storage container through a callback function.

      This function provides every directory entry through an app-provided callback, called once for each directory entry, until all results have been provided or the callback returns either SDL_ENUM_SUCCESS or SDL_ENUM_FAILURE.

      This will return false if there was a system problem in general, or if a callback returns SDL_ENUM_FAILURE. A successful return means a callback returned SDL_ENUM_SUCCESS to halt enumeration, or all directory entries were enumerated.

      If path is NULL, this is treated as a request to enumerate the root of the storage container's tree. An empty string also works for this.

      Parameters:
      storage - a storage container.
      path - the path of the directory to enumerate, or NULL for the root.
      callback - a function that is called for each entry in the directory.
      userdata - a pointer that is passed to callback.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • removeStoragePath

      @NativeType("boolean") public boolean removeStoragePath(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr path)
      Remove a file or an empty directory in a writable storage container.
      Parameters:
      storage - a storage container.
      path - the path of the directory to enumerate.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • renameStoragePath

      @NativeType("boolean") public boolean renameStoragePath(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr oldpath, @Nullable @Nullable BytePtr newpath)
      Rename a file or directory in a writable storage container.
      Parameters:
      storage - a storage container.
      oldpath - the old path.
      newpath - the new path.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • copyStorageFile

      @NativeType("boolean") public boolean copyStorageFile(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr oldpath, @Nullable @Nullable BytePtr newpath)
      Copy a file in a writable storage container.
      Parameters:
      storage - a storage container.
      oldpath - the old path.
      newpath - the new path.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getStoragePathInfo

      @NativeType("boolean") public boolean getStoragePathInfo(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr path, @Nullable @Pointer @Nullable ISDL_PathInfo info)
      Get information about a filesystem path in a storage container.
      Parameters:
      storage - a storage container.
      path - the path to query.
      info - a pointer filled in with information about the path, or NULL to check for the existence of a file.
      Returns:
      true on success or false if the file doesn't exist, or another failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getStorageSpaceRemaining

      @NativeType("Uint64") @Unsigned public long getStorageSpaceRemaining(@Nullable @Nullable SDL_Storage storage)
      Queries the remaining space in a storage container.
      Parameters:
      storage - a storage container to query.
      Returns:
      the amount of remaining space, in bytes.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • globStorageDirectory

      public PointerPtr globStorageDirectory(@Nullable @Nullable SDL_Storage storage, @Nullable @Nullable BytePtr path, @Nullable @Nullable BytePtr pattern, @EnumType(SDL_GlobFlags.class) int flags, @Nullable @Nullable IntPtr count)

      Enumerate a directory tree, filtered by pattern, and return a list.

      Files are filtered out if they don't match the string in pattern, which may contain wildcard characters * (match everything) and ? (match one character). If pattern is NULL, no filtering is done and all results are returned. Subdirectories are permitted, and are specified with a path separator of '/'. Wildcard characters * and ? never match a path separator.

      flags may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern matching case-insensitive.

      The returned array is always NULL-terminated, for your iterating convenience, but if count is non-NULL, on return it will contain the number of items in the array, not counting the NULL terminator.

      If path is NULL, this is treated as a request to enumerate the root of the storage container's tree. An empty string also works for this.

      Parameters:
      storage - a storage container.
      path - the path of the directory to enumerate, or NULL for the root.
      pattern - the pattern that files in the directory must match. Can be NULL.
      flags - SDL_GLOB_* bitflags that affect this search.
      count - on return, will be set to the number of items in the returned array. Can be NULL.
      Returns:
      an array of strings on success or NULL on failure; call SDL_GetError() for more information. The caller should pass the returned pointer to SDL_free when done with it. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • createSurface

      public SDL_Surface createSurface(int width, int height, @EnumType(SDL_PixelFormat.class) int format)

      Allocate a new surface with a specific pixel format.

      The pixels of the new surface are initialized to zero.

      Parameters:
      width - the width of the surface.
      height - the height of the surface.
      format - the SDL_PixelFormat for the new surface's pixel format.
      Returns:
      the new SDL_Surface structure that is created or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createSurfaceFrom

      public SDL_Surface createSurfaceFrom(int width, int height, @EnumType(SDL_PixelFormat.class) int format, @Pointer(comment="void*") MemorySegment pixels, int pitch)

      Allocate a new surface with a specific pixel format and existing pixel data.

      No copy is made of the pixel data. Pixel data is not managed automatically; you must free the surface before you free the pixel data.

      Pitch is the offset in bytes from one row of pixels to the next, e.g. width*4 for SDL_PIXELFORMAT_RGBA8888.

      You may pass NULL for pixels and 0 for pitch to create a surface that you will fill in with valid values later.

      Parameters:
      width - the width of the surface.
      height - the height of the surface.
      format - the SDL_PixelFormat for the new surface's pixel format.
      pixels - a pointer to existing pixel data.
      pitch - the number of bytes between each row, including padding.
      Returns:
      the new SDL_Surface structure that is created or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroySurface

      public void destroySurface(@Nullable @Nullable SDL_Surface surface)

      Free a surface.

      It is safe to pass NULL to this function.

      Parameters:
      surface - the SDL_Surface to free.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSurfaceProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getSurfaceProperties(@Nullable @Nullable SDL_Surface surface)

      Get the properties associated with a surface.

      The following properties are understood by SDL:

      • SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT: for HDR10 and floating point surfaces, this defines the value of 100% diffuse white, with higher values being displayed in the High Dynamic Range headroom. This defaults to 203 for HDR10 surfaces and 1.0 for floating point surfaces.
      • SDL_PROP_SURFACE_HDR_HEADROOM_FLOAT: for HDR10 and floating point surfaces, this defines the maximum dynamic range used by the content, in terms of the SDR white point. This defaults to 0.0, which disables tone mapping.
      • SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING: the tone mapping operator used when compressing from a surface with high dynamic range to another with lower dynamic range. Currently this supports "chrome", which uses the same tone mapping that Chrome uses for HDR content, the form "*=N", where N is a floating point scale factor applied in linear space, and "none", which disables tone mapping. This defaults to "chrome".
      • SDL_PROP_SURFACE_HOTSPOT_X_NUMBER: the hotspot pixel offset from the left edge of the image, if this surface is being used as a cursor.
      • SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER: the hotspot pixel offset from the top edge of the image, if this surface is being used as a cursor.
      Parameters:
      surface - the SDL_Surface structure to query.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setSurfaceColorspace

      @NativeType("boolean") public boolean setSurfaceColorspace(@Nullable @Nullable SDL_Surface surface, @EnumType(SDL_Colorspace.class) int colorspace)

      Set the colorspace used by a surface.

      Setting the colorspace doesn't change the pixels, only how they are interpreted in color operations.

      Parameters:
      surface - the SDL_Surface structure to update.
      colorspace - an SDL_Colorspace value describing the surface colorspace.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSurfaceColorspace

      @EnumType(SDL_Colorspace.class) public int getSurfaceColorspace(@Nullable @Nullable SDL_Surface surface)

      Get the colorspace used by a surface.

      The colorspace defaults to SDL_COLORSPACE_SRGB_LINEAR for floating point formats, SDL_COLORSPACE_HDR10 for 10-bit formats, SDL_COLORSPACE_SRGB for other RGB surfaces and SDL_COLORSPACE_BT709_FULL for YUV textures.

      Parameters:
      surface - the SDL_Surface structure to query.
      Returns:
      the colorspace used by the surface, or SDL_COLORSPACE_UNKNOWN if the surface is NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createSurfacePalette

      @Pointer public ISDL_Palette createSurfacePalette(@Nullable @Nullable SDL_Surface surface)

      Create a palette and associate it with a surface.

      This function creates a palette compatible with the provided surface. The palette is then returned for you to modify, and the surface will automatically use the new palette in future operations. You do not need to destroy the returned palette, it will be freed when the reference count reaches 0, usually when the surface is destroyed.

      Bitmap surfaces (with format SDL_PIXELFORMAT_INDEX1LSB or SDL_PIXELFORMAT_INDEX1MSB) will have the palette initialized with 0 as white and 1 as black. Other surfaces will get a palette initialized with white in every entry.

      If this function is called for a surface that already has a palette, a new palette will be created to replace it.

      Parameters:
      surface - the SDL_Surface structure to update.
      Returns:
      a new SDL_Palette structure on success or NULL on failure (e.g. if the surface didn't have an index format); call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setSurfacePalette

      @NativeType("boolean") public boolean setSurfacePalette(@Nullable @Nullable SDL_Surface surface, @Nullable @Pointer @Nullable ISDL_Palette palette)

      Set the palette used by a surface.

      A single palette can be shared with many surfaces.

      Parameters:
      surface - the SDL_Surface structure to update.
      palette - the SDL_Palette structure to use.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSurfacePalette

      @Pointer public ISDL_Palette getSurfacePalette(@Nullable @Nullable SDL_Surface surface)
      Get the palette used by a surface.
      Parameters:
      surface - the SDL_Surface structure to query.
      Returns:
      a pointer to the palette used by the surface, or NULL if there is no palette used.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • addSurfaceAlternateImage

      @NativeType("boolean") public boolean addSurfaceAlternateImage(@Nullable @Nullable SDL_Surface surface, @Nullable @Nullable SDL_Surface image)

      Add an alternate version of a surface.

      This function adds an alternate version of this surface, usually used for content with high DPI representations like cursors or icons. The size, format, and content do not need to match the original surface, and these alternate versions will not be updated when the original surface changes.

      This function adds a reference to the alternate version, so you should call SDL_DestroySurface() on the image after this call.

      Parameters:
      surface - the SDL_Surface structure to update.
      image - a pointer to an alternate SDL_Surface to associate with this surface.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • surfaceHasAlternateImages

      @NativeType("boolean") public boolean surfaceHasAlternateImages(@Nullable @Nullable SDL_Surface surface)
      Return whether a surface has alternate versions available.
      Parameters:
      surface - the SDL_Surface structure to query.
      Returns:
      true if alternate versions are available or false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSurfaceImages

      @Pointer public SDL_Surface.Ptr getSurfaceImages(@Nullable @Nullable SDL_Surface surface, @Nullable @Nullable IntPtr count)

      Get an array including all versions of a surface.

      This returns all versions of a surface, with the surface being queried as the first element in the returned array.

      Freeing the array of surfaces does not affect the surfaces in the array. They are still referenced by the surface being queried and will be cleaned up normally.

      Parameters:
      surface - the SDL_Surface structure to query.
      count - a pointer filled in with the number of surface pointers returned, may be NULL.
      Returns:
      a NULL terminated array of SDL_Surface pointers or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • removeSurfaceAlternateImages

      public void removeSurfaceAlternateImages(@Nullable @Nullable SDL_Surface surface)

      Remove all alternate versions of a surface.

      This function removes a reference from all the alternative versions, destroying them if this is the last reference to them.

      Parameters:
      surface - the SDL_Surface structure to update.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • lockSurface

      @NativeType("boolean") public boolean lockSurface(@Nullable @Nullable SDL_Surface surface)

      Set up a surface for directly accessing the pixels.

      Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write to and read from surface->pixels, using the pixel format stored in surface->format. Once you are done accessing the surface, you should use SDL_UnlockSurface() to release it.

      Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates to 0, then you can read and write to the surface at any time, and the pixel format of the surface will not change.

      Parameters:
      surface - the SDL_Surface structure to be locked.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • unlockSurface

      public void unlockSurface(@Nullable @Nullable SDL_Surface surface)
      Release a surface after directly accessing the pixels.
      Parameters:
      surface - the SDL_Surface structure to be unlocked.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • loadBMP_IO

      public SDL_Surface loadBMP_IO(@Nullable @Nullable SDL_IOStream src, @NativeType("boolean") boolean closeio)

      Load a BMP image from a seekable SDL data stream.

      The new surface should be freed with SDL_DestroySurface(). Not doing so will result in a memory leak.

      Parameters:
      src - the data stream for the surface.
      closeio - if true, calls SDL_CloseIO() on src before returning, even in the case of an error.
      Returns:
      a pointer to a new SDL_Surface structure or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • loadBMP

      public SDL_Surface loadBMP(@Nullable @Nullable BytePtr file)

      Load a BMP image from a file.

      The new surface should be freed with SDL_DestroySurface(). Not doing so will result in a memory leak.

      Parameters:
      file - the BMP file to load.
      Returns:
      a pointer to a new SDL_Surface structure or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • saveBMP_IO

      @NativeType("boolean") public boolean saveBMP_IO(@Nullable @Nullable SDL_Surface surface, @Nullable @Nullable SDL_IOStream dst, @NativeType("boolean") boolean closeio)

      Save a surface to a seekable SDL data stream in BMP format.

      Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the BMP directly. Other RGB formats with 8-bit or higher get converted to a 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit surface before they are saved. YUV and paletted 1-bit and 4-bit formats are not supported.

      Parameters:
      surface - the SDL_Surface structure containing the image to be saved.
      dst - a data stream to save to.
      closeio - if true, calls SDL_CloseIO() on dst before returning, even in the case of an error.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • saveBMP

      @NativeType("boolean") public boolean saveBMP(@Nullable @Nullable SDL_Surface surface, @Nullable @Nullable BytePtr file)

      Save a surface to a file.

      Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the BMP directly. Other RGB formats with 8-bit or higher get converted to a 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit surface before they are saved. YUV and paletted 1-bit and 4-bit formats are not supported.

      Parameters:
      surface - the SDL_Surface structure containing the image to be saved.
      file - a file to save to.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setSurfaceRLE

      @NativeType("boolean") public boolean setSurfaceRLE(@Nullable @Nullable SDL_Surface surface, @NativeType("boolean") boolean enabled)

      Set the RLE acceleration hint for a surface.

      If RLE is enabled, color key and alpha blending blits are much faster, but the surface must be locked before directly accessing the pixels.

      Parameters:
      surface - the SDL_Surface structure to optimize.
      enabled - true to enable RLE acceleration, false to disable it.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • surfaceHasRLE

      @NativeType("boolean") public boolean surfaceHasRLE(@Nullable @Nullable SDL_Surface surface)

      Returns whether the surface is RLE enabled.

      It is safe to pass a NULL surface here; it will return false.

      Parameters:
      surface - the SDL_Surface structure to query.
      Returns:
      true if the surface is RLE enabled, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setSurfaceColorKey

      @NativeType("boolean") public boolean setSurfaceColorKey(@Nullable @Nullable SDL_Surface surface, @NativeType("boolean") boolean enabled, @NativeType("Uint32") @Unsigned int key)

      Set the color key (transparent pixel) in a surface.

      The color key defines a pixel value that will be treated as transparent in a blit. For example, one can use this to specify that cyan pixels should be considered transparent, and therefore not rendered.

      It is a pixel of the format used by the surface, as generated by SDL_MapRGB().

      Parameters:
      surface - the SDL_Surface structure to update.
      enabled - true to enable color key, false to disable color key.
      key - the transparent pixel.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • surfaceHasColorKey

      @NativeType("boolean") public boolean surfaceHasColorKey(@Nullable @Nullable SDL_Surface surface)

      Returns whether the surface has a color key.

      It is safe to pass a NULL surface here; it will return false.

      Parameters:
      surface - the SDL_Surface structure to query.
      Returns:
      true if the surface has a color key, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSurfaceColorKey

      @NativeType("boolean") public boolean getSurfaceColorKey(@Nullable @Nullable SDL_Surface surface, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr key)

      Get the color key (transparent pixel) for a surface.

      The color key is a pixel of the format used by the surface, as generated by SDL_MapRGB().

      If the surface doesn't have color key enabled this function returns false.

      Parameters:
      surface - the SDL_Surface structure to query.
      key - a pointer filled in with the transparent pixel.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setSurfaceColorMod

      @NativeType("boolean") public boolean setSurfaceColorMod(@Nullable @Nullable SDL_Surface surface, @NativeType("Uint8") @Unsigned byte r, @NativeType("Uint8") @Unsigned byte g, @NativeType("Uint8") @Unsigned byte b)

      Set an additional color value multiplied into blit operations.

      When this surface is blitted, during the blit operation each source color channel is modulated by the appropriate color value according to the following formula:

      srcC = srcC * (color / 255)

      Parameters:
      surface - the SDL_Surface structure to update.
      r - the red color value multiplied into blit operations.
      g - the green color value multiplied into blit operations.
      b - the blue color value multiplied into blit operations.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSurfaceColorMod

      @NativeType("boolean") public boolean getSurfaceColorMod(@Nullable @Nullable SDL_Surface surface, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr r, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr g, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr b)
      Get the additional color value multiplied into blit operations.
      Parameters:
      surface - the SDL_Surface structure to query.
      r - a pointer filled in with the current red color value.
      g - a pointer filled in with the current green color value.
      b - a pointer filled in with the current blue color value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setSurfaceAlphaMod

      @NativeType("boolean") public boolean setSurfaceAlphaMod(@Nullable @Nullable SDL_Surface surface, @NativeType("Uint8") @Unsigned byte alpha)

      Set an additional alpha value used in blit operations.

      When this surface is blitted, during the blit operation the source alpha value is modulated by this alpha value according to the following formula:

      srcA = srcA * (alpha / 255)

      Parameters:
      surface - the SDL_Surface structure to update.
      alpha - the alpha value multiplied into blit operations.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSurfaceAlphaMod

      @NativeType("boolean") public boolean getSurfaceAlphaMod(@Nullable @Nullable SDL_Surface surface, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr alpha)
      Get the additional alpha value used in blit operations.
      Parameters:
      surface - the SDL_Surface structure to query.
      alpha - a pointer filled in with the current alpha value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setSurfaceBlendMode

      @NativeType("boolean") public boolean setSurfaceBlendMode(@Nullable @Nullable SDL_Surface surface, @EnumType(SDL_BlendMode.class) int blendMode)

      Set the blend mode used for blit operations.

      To copy a surface to another surface (or texture) without blending with the existing data, the blendmode of the SOURCE surface should be set to SDL_BLENDMODE_NONE.

      Parameters:
      surface - the SDL_Surface structure to update.
      blendMode - the SDL_BlendMode to use for blit blending.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSurfaceBlendMode

      @NativeType("boolean") public boolean getSurfaceBlendMode(@Nullable @Nullable SDL_Surface surface, @Nullable @EnumType(SDL_BlendMode.class) @Nullable IntPtr blendMode)
      Get the blend mode used for blit operations.
      Parameters:
      surface - the SDL_Surface structure to query.
      blendMode - a pointer filled in with the current SDL_BlendMode.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setSurfaceClipRect

      @NativeType("boolean") public boolean setSurfaceClipRect(@Nullable @Nullable SDL_Surface surface, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Set the clipping rectangle for a surface.

      When surface is the destination of a blit, only the area within the clip rectangle is drawn into.

      Note that blits are automatically clipped to the edges of the source and destination surfaces.

      Parameters:
      surface - the SDL_Surface structure to be clipped.
      rect - the SDL_Rect structure representing the clipping rectangle, or NULL to disable clipping.
      Returns:
      true if the rectangle intersects the surface, otherwise false and blits will be completely clipped.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSurfaceClipRect

      @NativeType("boolean") public boolean getSurfaceClipRect(@Nullable @Nullable SDL_Surface surface, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Get the clipping rectangle for a surface.

      When surface is the destination of a blit, only the area within the clip rectangle is drawn into.

      Parameters:
      surface - the SDL_Surface structure representing the surface to be clipped.
      rect - an SDL_Rect structure filled in with the clipping rectangle for the surface.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • flipSurface

      @NativeType("boolean") public boolean flipSurface(@Nullable @Nullable SDL_Surface surface, @EnumType(SDL_FlipMode.class) int flip)
      Flip a surface vertically or horizontally.
      Parameters:
      surface - the surface to flip.
      flip - the direction to flip.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • duplicateSurface

      public SDL_Surface duplicateSurface(@Nullable @Nullable SDL_Surface surface)

      Creates a new surface identical to the existing surface.

      If the original surface has alternate images, the new surface will have a reference to them as well.

      The returned surface should be freed with SDL_DestroySurface().

      Parameters:
      surface - the surface to duplicate.
      Returns:
      a copy of the surface or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • scaleSurface

      public SDL_Surface scaleSurface(@Nullable @Nullable SDL_Surface surface, int width, int height, @EnumType(SDL_ScaleMode.class) int scaleMode)

      Creates a new surface identical to the existing surface, scaled to the desired size.

      The returned surface should be freed with SDL_DestroySurface().

      Parameters:
      surface - the surface to duplicate and scale.
      width - the width of the new surface.
      height - the height of the new surface.
      scaleMode - the SDL_ScaleMode to be used.
      Returns:
      a copy of the surface or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • convertSurface

      public SDL_Surface convertSurface(@Nullable @Nullable SDL_Surface surface, @EnumType(SDL_PixelFormat.class) int format)

      Copy an existing surface to a new surface of the specified format.

      This function is used to optimize images for faster repeat blitting. This is accomplished by converting the original and storing the result as a new surface. The new, optimized surface can then be used as the source for future blits, making them faster.

      If you are converting to an indexed surface and want to map colors to a palette, you can use SDL_ConvertSurfaceAndColorspace() instead.

      If the original surface has alternate images, the new surface will have a reference to them as well.

      Parameters:
      surface - the existing SDL_Surface structure to convert.
      format - the new pixel format.
      Returns:
      the new SDL_Surface structure that is created or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • convertSurfaceAndColorspace

      public SDL_Surface convertSurfaceAndColorspace(@Nullable @Nullable SDL_Surface surface, @EnumType(SDL_PixelFormat.class) int format, @Nullable @Pointer @Nullable ISDL_Palette palette, @EnumType(SDL_Colorspace.class) int colorspace, @NativeType("SDL_PropertiesID") @Unsigned int props)

      Copy an existing surface to a new surface of the specified format and colorspace.

      This function converts an existing surface to a new format and colorspace and returns the new surface. This will perform any pixel format and colorspace conversion needed.

      If the original surface has alternate images, the new surface will have a reference to them as well.

      Parameters:
      surface - the existing SDL_Surface structure to convert.
      format - the new pixel format.
      palette - an optional palette to use for indexed formats, may be NULL.
      colorspace - the new colorspace.
      props - an SDL_PropertiesID with additional color properties, or 0.
      Returns:
      the new SDL_Surface structure that is created or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • convertPixels

      @NativeType("boolean") public boolean convertPixels(int width, int height, @EnumType(SDL_PixelFormat.class) int src_format, @Pointer(comment="void*") MemorySegment src, int src_pitch, @EnumType(SDL_PixelFormat.class) int dst_format, @Pointer(comment="void*") MemorySegment dst, int dst_pitch)
      Copy a block of pixels of one format to another format.
      Parameters:
      width - the width of the block to copy, in pixels.
      height - the height of the block to copy, in pixels.
      src_format - an SDL_PixelFormat value of the src pixels format.
      src - a pointer to the source pixels.
      src_pitch - the pitch of the source pixels, in bytes.
      dst_format - an SDL_PixelFormat value of the dst pixels format.
      dst - a pointer to be filled in with new pixel data.
      dst_pitch - the pitch of the destination pixels, in bytes.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • convertPixelsAndColorspace

      @NativeType("boolean") public boolean convertPixelsAndColorspace(int width, int height, @EnumType(SDL_PixelFormat.class) int src_format, @EnumType(SDL_Colorspace.class) int src_colorspace, @NativeType("SDL_PropertiesID") @Unsigned int src_properties, @Pointer(comment="void*") MemorySegment src, int src_pitch, @EnumType(SDL_PixelFormat.class) int dst_format, @EnumType(SDL_Colorspace.class) int dst_colorspace, @NativeType("SDL_PropertiesID") @Unsigned int dst_properties, @Pointer(comment="void*") MemorySegment dst, int dst_pitch)
      Copy a block of pixels of one format and colorspace to another format and colorspace.
      Parameters:
      width - the width of the block to copy, in pixels.
      height - the height of the block to copy, in pixels.
      src_format - an SDL_PixelFormat value of the src pixels format.
      src_colorspace - an SDL_Colorspace value describing the colorspace of the src pixels.
      src_properties - an SDL_PropertiesID with additional source color properties, or 0.
      src - a pointer to the source pixels.
      src_pitch - the pitch of the source pixels, in bytes.
      dst_format - an SDL_PixelFormat value of the dst pixels format.
      dst_colorspace - an SDL_Colorspace value describing the colorspace of the dst pixels.
      dst_properties - an SDL_PropertiesID with additional destination color properties, or 0.
      dst - a pointer to be filled in with new pixel data.
      dst_pitch - the pitch of the destination pixels, in bytes.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • premultiplyAlpha

      @NativeType("boolean") public boolean premultiplyAlpha(int width, int height, @EnumType(SDL_PixelFormat.class) int src_format, @Pointer(comment="void*") MemorySegment src, int src_pitch, @EnumType(SDL_PixelFormat.class) int dst_format, @Pointer(comment="void*") MemorySegment dst, int dst_pitch, @NativeType("boolean") boolean linear)

      Premultiply the alpha on a block of pixels.

      This is safe to use with src == dst, but not for other overlapping areas.

      Parameters:
      width - the width of the block to convert, in pixels.
      height - the height of the block to convert, in pixels.
      src_format - an SDL_PixelFormat value of the src pixels format.
      src - a pointer to the source pixels.
      src_pitch - the pitch of the source pixels, in bytes.
      dst_format - an SDL_PixelFormat value of the dst pixels format.
      dst - a pointer to be filled in with premultiplied pixel data.
      dst_pitch - the pitch of the destination pixels, in bytes.
      linear - true to convert from sRGB to linear space for the alpha multiplication, false to do multiplication in sRGB space.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • premultiplySurfaceAlpha

      @NativeType("boolean") public boolean premultiplySurfaceAlpha(@Nullable @Nullable SDL_Surface surface, @NativeType("boolean") boolean linear)

      Premultiply the alpha in a surface.

      This is safe to use with src == dst, but not for other overlapping areas.

      Parameters:
      surface - the surface to modify.
      linear - true to convert from sRGB to linear space for the alpha multiplication, false to do multiplication in sRGB space.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • clearSurface

      @NativeType("boolean") public boolean clearSurface(@Nullable @Nullable SDL_Surface surface, float r, float g, float b, float a)

      Clear a surface with a specific color, with floating point precision.

      This function handles all surface formats, and ignores any clip rectangle.

      If the surface is YUV, the color is assumed to be in the sRGB colorspace, otherwise the color is assumed to be in the colorspace of the suface.

      Parameters:
      surface - the SDL_Surface to clear.
      r - the red component of the pixel, normally in the range 0-1.
      g - the green component of the pixel, normally in the range 0-1.
      b - the blue component of the pixel, normally in the range 0-1.
      a - the alpha component of the pixel, normally in the range 0-1.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • fillSurfaceRect

      @NativeType("boolean") public boolean fillSurfaceRect(@Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect rect, @NativeType("Uint32") @Unsigned int color)

      Perform a fast fill of a rectangle with a specific color.

      color should be a pixel of the format used by the surface, and can be generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an alpha component then the destination is simply filled with that alpha information, no blending takes place.

      If there is a clip rectangle set on the destination (set via SDL_SetSurfaceClipRect()), then this function will fill based on the intersection of the clip rectangle and rect.

      Parameters:
      dst - the SDL_Surface structure that is the drawing target.
      rect - the SDL_Rect structure representing the rectangle to fill, or NULL to fill the entire surface.
      color - the color to fill with.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • fillSurfaceRects

      @NativeType("boolean") public boolean fillSurfaceRects(@Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect rects, int count, @NativeType("Uint32") @Unsigned int color)

      Perform a fast fill of a set of rectangles with a specific color.

      color should be a pixel of the format used by the surface, and can be generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an alpha component then the destination is simply filled with that alpha information, no blending takes place.

      If there is a clip rectangle set on the destination (set via SDL_SetSurfaceClipRect()), then this function will fill based on the intersection of the clip rectangle and rect.

      Parameters:
      dst - the SDL_Surface structure that is the drawing target.
      rects - an array of SDL_Rects representing the rectangles to fill.
      count - the number of rectangles in the array.
      color - the color to fill with.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • blitSurface

      @NativeType("boolean") public boolean blitSurface(@Nullable @Nullable SDL_Surface src, @Nullable @Pointer @Nullable ISDL_Rect srcrect, @Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect dstrect)

      Performs a fast blit from the source surface to the destination surface with clipping.

      If either srcrect or dstrect are NULL, the entire surface (src or dst) is copied while ensuring clipping to dst->clip_rect.

      The blit function should not be called on a locked surface.

      The blit semantics for surfaces with and without blending and colorkey are defined as follows:

      RGBA->RGB:
      Source surface blend mode set to SDL_BLENDMODE_BLEND:
      alpha-blend (using the source alpha-channel and per-surface alpha)
      SDL_SRCCOLORKEY ignored.
      Source surface blend mode set to SDL_BLENDMODE_NONE:
      copy RGB.
      if SDL_SRCCOLORKEY set, only copy the pixels that do not match the
      RGB values of the source color key, ignoring alpha in the
      comparison.
      
      RGB->RGBA:
      Source surface blend mode set to SDL_BLENDMODE_BLEND:
      alpha-blend (using the source per-surface alpha)
      Source surface blend mode set to SDL_BLENDMODE_NONE:
      copy RGB, set destination alpha to source per-surface alpha value.
      both:
      if SDL_SRCCOLORKEY set, only copy the pixels that do not match the
      source color key.
      
      RGBA->RGBA:
      Source surface blend mode set to SDL_BLENDMODE_BLEND:
      alpha-blend (using the source alpha-channel and per-surface alpha)
      SDL_SRCCOLORKEY ignored.
      Source surface blend mode set to SDL_BLENDMODE_NONE:
      copy all of RGBA to the destination.
      if SDL_SRCCOLORKEY set, only copy the pixels that do not match the
      RGB values of the source color key, ignoring alpha in the
      comparison.
      
      RGB->RGB:
      Source surface blend mode set to SDL_BLENDMODE_BLEND:
      alpha-blend (using the source per-surface alpha)
      Source surface blend mode set to SDL_BLENDMODE_NONE:
      copy RGB.
      both:
      if SDL_SRCCOLORKEY set, only copy the pixels that do not match the
      source color key.
      
      Parameters:
      src - the SDL_Surface structure to be copied from.
      srcrect - the SDL_Rect structure representing the rectangle to be copied, or NULL to copy the entire surface.
      dst - the SDL_Surface structure that is the blit target.
      dstrect - the SDL_Rect structure representing the x and y position in the destination surface, or NULL for (0,0). The width and height are ignored, and are copied from srcrect. If you want a specific width and height, you should use SDL_BlitSurfaceScaled().
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • blitSurfaceUnchecked

      @NativeType("boolean") public boolean blitSurfaceUnchecked(@Nullable @Nullable SDL_Surface src, @Nullable @Pointer @Nullable ISDL_Rect srcrect, @Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect dstrect)

      Perform low-level surface blitting only.

      This is a semi-private blit function and it performs low-level surface blitting, assuming the input rectangles have already been clipped.

      Parameters:
      src - the SDL_Surface structure to be copied from.
      srcrect - the SDL_Rect structure representing the rectangle to be copied, may not be NULL.
      dst - the SDL_Surface structure that is the blit target.
      dstrect - the SDL_Rect structure representing the target rectangle in the destination surface, may not be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • blitSurfaceScaled

      @NativeType("boolean") public boolean blitSurfaceScaled(@Nullable @Nullable SDL_Surface src, @Nullable @Pointer @Nullable ISDL_Rect srcrect, @Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect dstrect, @EnumType(SDL_ScaleMode.class) int scaleMode)
      Perform a scaled blit to a destination surface, which may be of a different format.
      Parameters:
      src - the SDL_Surface structure to be copied from.
      srcrect - the SDL_Rect structure representing the rectangle to be copied, or NULL to copy the entire surface.
      dst - the SDL_Surface structure that is the blit target.
      dstrect - the SDL_Rect structure representing the target rectangle in the destination surface, or NULL to fill the entire destination surface.
      scaleMode - the SDL_ScaleMode to be used.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • blitSurfaceUncheckedScaled

      @NativeType("boolean") public boolean blitSurfaceUncheckedScaled(@Nullable @Nullable SDL_Surface src, @Nullable @Pointer @Nullable ISDL_Rect srcrect, @Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect dstrect, @EnumType(SDL_ScaleMode.class) int scaleMode)

      Perform low-level surface scaled blitting only.

      This is a semi-private function and it performs low-level surface blitting, assuming the input rectangles have already been clipped.

      Parameters:
      src - the SDL_Surface structure to be copied from.
      srcrect - the SDL_Rect structure representing the rectangle to be copied, may not be NULL.
      dst - the SDL_Surface structure that is the blit target.
      dstrect - the SDL_Rect structure representing the target rectangle in the destination surface, may not be NULL.
      scaleMode - the SDL_ScaleMode to be used.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • stretchSurface

      @NativeType("boolean") public boolean stretchSurface(@Nullable @Nullable SDL_Surface src, @Nullable @Pointer @Nullable ISDL_Rect srcrect, @Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect dstrect, @EnumType(SDL_ScaleMode.class) int scaleMode)
      Perform a stretched pixel copy from one surface to another.
      Parameters:
      src - the SDL_Surface structure to be copied from.
      srcrect - the SDL_Rect structure representing the rectangle to be copied, may not be NULL.
      dst - the SDL_Surface structure that is the blit target.
      dstrect - the SDL_Rect structure representing the target rectangle in the destination surface, may not be NULL.
      scaleMode - the SDL_ScaleMode to be used.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.4.0.
      See Also:
    • blitSurfaceTiled

      @NativeType("boolean") public boolean blitSurfaceTiled(@Nullable @Nullable SDL_Surface src, @Nullable @Pointer @Nullable ISDL_Rect srcrect, @Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect dstrect)

      Perform a tiled blit to a destination surface, which may be of a different format.

      The pixels in srcrect will be repeated as many times as needed to completely fill dstrect.

      Parameters:
      src - the SDL_Surface structure to be copied from.
      srcrect - the SDL_Rect structure representing the rectangle to be copied, or NULL to copy the entire surface.
      dst - the SDL_Surface structure that is the blit target.
      dstrect - the SDL_Rect structure representing the target rectangle in the destination surface, or NULL to fill the entire surface.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • blitSurfaceTiledWithScale

      @NativeType("boolean") public boolean blitSurfaceTiledWithScale(@Nullable @Nullable SDL_Surface src, @Nullable @Pointer @Nullable ISDL_Rect srcrect, float scale, @EnumType(SDL_ScaleMode.class) int scaleMode, @Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect dstrect)

      Perform a scaled and tiled blit to a destination surface, which may be of a different format.

      The pixels in srcrect will be scaled and repeated as many times as needed to completely fill dstrect.

      Parameters:
      src - the SDL_Surface structure to be copied from.
      srcrect - the SDL_Rect structure representing the rectangle to be copied, or NULL to copy the entire surface.
      scale - the scale used to transform srcrect into the destination rectangle, e.g. a 32x32 texture with a scale of 2 would fill 64x64 tiles.
      scaleMode - scale algorithm to be used.
      dst - the SDL_Surface structure that is the blit target.
      dstrect - the SDL_Rect structure representing the target rectangle in the destination surface, or NULL to fill the entire surface.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • blitSurface9Grid

      @NativeType("boolean") public boolean blitSurface9Grid(@Nullable @Nullable SDL_Surface src, @Nullable @Pointer @Nullable ISDL_Rect srcrect, int left_width, int right_width, int top_height, int bottom_height, float scale, @EnumType(SDL_ScaleMode.class) int scaleMode, @Nullable @Nullable SDL_Surface dst, @Nullable @Pointer @Nullable ISDL_Rect dstrect)

      Perform a scaled blit using the 9-grid algorithm to a destination surface, which may be of a different format.

      The pixels in the source surface are split into a 3x3 grid, using the different corner sizes for each corner, and the sides and center making up the remaining pixels. The corners are then scaled using scale and fit into the corners of the destination rectangle. The sides and center are then stretched into place to cover the remaining destination rectangle.

      Parameters:
      src - the SDL_Surface structure to be copied from.
      srcrect - the SDL_Rect structure representing the rectangle to be used for the 9-grid, or NULL to use the entire surface.
      left_width - the width, in pixels, of the left corners in srcrect.
      right_width - the width, in pixels, of the right corners in srcrect.
      top_height - the height, in pixels, of the top corners in srcrect.
      bottom_height - the height, in pixels, of the bottom corners in srcrect.
      scale - the scale used to transform the corner of srcrect into the corner of dstrect, or 0.0f for an unscaled blit.
      scaleMode - scale algorithm to be used.
      dst - the SDL_Surface structure that is the blit target.
      dstrect - the SDL_Rect structure representing the target rectangle in the destination surface, or NULL to fill the entire surface.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • mapSurfaceRGB

      @NativeType("Uint32") @Unsigned public int mapSurfaceRGB(@Nullable @Nullable SDL_Surface surface, @NativeType("Uint8") @Unsigned byte r, @NativeType("Uint8") @Unsigned byte g, @NativeType("Uint8") @Unsigned byte b)

      Map an RGB triple to an opaque pixel value for a surface.

      This function maps the RGB color value to the specified pixel format and returns the pixel value best approximating the given RGB color value for the given pixel format.

      If the surface has a palette, the index of the closest matching color in the palette will be returned.

      If the surface pixel format has an alpha component it will be returned as all 1 bits (fully opaque).

      If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

      Parameters:
      surface - the surface to use for the pixel format and palette.
      r - the red component of the pixel in the range 0-255.
      g - the green component of the pixel in the range 0-255.
      b - the blue component of the pixel in the range 0-255.
      Returns:
      a pixel value.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • mapSurfaceRGBA

      @NativeType("Uint32") @Unsigned public int mapSurfaceRGBA(@Nullable @Nullable SDL_Surface surface, @NativeType("Uint8") @Unsigned byte r, @NativeType("Uint8") @Unsigned byte g, @NativeType("Uint8") @Unsigned byte b, @NativeType("Uint8") @Unsigned byte a)

      Map an RGBA quadruple to a pixel value for a surface.

      This function maps the RGBA color value to the specified pixel format and returns the pixel value best approximating the given RGBA color value for the given pixel format.

      If the surface pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).

      If the surface has a palette, the index of the closest matching color in the palette will be returned.

      If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).

      Parameters:
      surface - the surface to use for the pixel format and palette.
      r - the red component of the pixel in the range 0-255.
      g - the green component of the pixel in the range 0-255.
      b - the blue component of the pixel in the range 0-255.
      a - the alpha component of the pixel in the range 0-255.
      Returns:
      a pixel value.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • readSurfacePixel

      @NativeType("boolean") public boolean readSurfacePixel(@Nullable @Nullable SDL_Surface surface, int x, int y, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr r, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr g, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr b, @Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr a)

      Retrieves a single pixel from a surface.

      This function prioritizes correctness over speed: it is suitable for unit tests, but is not intended for use in a game engine.

      Like SDL_GetRGBA, this uses the entire 0..255 range when converting color components from pixel formats with less than 8 bits per RGB component.

      Parameters:
      surface - the surface to read.
      x - the horizontal coordinate, 0 <= x < width.
      y - the vertical coordinate, 0 <= y < height.
      r - a pointer filled in with the red channel, 0-255, or NULL to ignore this channel.
      g - a pointer filled in with the green channel, 0-255, or NULL to ignore this channel.
      b - a pointer filled in with the blue channel, 0-255, or NULL to ignore this channel.
      a - a pointer filled in with the alpha channel, 0-255, or NULL to ignore this channel.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • readSurfacePixelFloat

      @NativeType("boolean") public boolean readSurfacePixelFloat(@Nullable @Nullable SDL_Surface surface, int x, int y, @Nullable @Nullable FloatPtr r, @Nullable @Nullable FloatPtr g, @Nullable @Nullable FloatPtr b, @Nullable @Nullable FloatPtr a)

      Retrieves a single pixel from a surface.

      This function prioritizes correctness over speed: it is suitable for unit tests, but is not intended for use in a game engine.

      Parameters:
      surface - the surface to read.
      x - the horizontal coordinate, 0 <= x < width.
      y - the vertical coordinate, 0 <= y < height.
      r - a pointer filled in with the red channel, normally in the range 0-1, or NULL to ignore this channel.
      g - a pointer filled in with the green channel, normally in the range 0-1, or NULL to ignore this channel.
      b - a pointer filled in with the blue channel, normally in the range 0-1, or NULL to ignore this channel.
      a - a pointer filled in with the alpha channel, normally in the range 0-1, or NULL to ignore this channel.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeSurfacePixel

      @NativeType("boolean") public boolean writeSurfacePixel(@Nullable @Nullable SDL_Surface surface, int x, int y, @NativeType("Uint8") @Unsigned byte r, @NativeType("Uint8") @Unsigned byte g, @NativeType("Uint8") @Unsigned byte b, @NativeType("Uint8") @Unsigned byte a)

      Writes a single pixel to a surface.

      This function prioritizes correctness over speed: it is suitable for unit tests, but is not intended for use in a game engine.

      Like SDL_MapRGBA, this uses the entire 0..255 range when converting color components from pixel formats with less than 8 bits per RGB component.

      Parameters:
      surface - the surface to write.
      x - the horizontal coordinate, 0 <= x < width.
      y - the vertical coordinate, 0 <= y < height.
      r - the red channel value, 0-255.
      g - the green channel value, 0-255.
      b - the blue channel value, 0-255.
      a - the alpha channel value, 0-255.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • writeSurfacePixelFloat

      @NativeType("boolean") public boolean writeSurfacePixelFloat(@Nullable @Nullable SDL_Surface surface, int x, int y, float r, float g, float b, float a)

      Writes a single pixel to a surface.

      This function prioritizes correctness over speed: it is suitable for unit tests, but is not intended for use in a game engine.

      Parameters:
      surface - the surface to write.
      x - the horizontal coordinate, 0 <= x < width.
      y - the vertical coordinate, 0 <= y < height.
      r - the red channel value, normally in the range 0-1.
      g - the green channel value, normally in the range 0-1.
      b - the blue channel value, normally in the range 0-1.
      a - the alpha channel value, normally in the range 0-1.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setWindowsMessageHook

      public void setWindowsMessageHook(@Pointer(comment="SDL_WindowsMessageHook") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Set a callback for every Windows message, run before TranslateMessage().

      The callback may modify the message, and should return true if the message should continue to be processed, or false to prevent further processing.

      Parameters:
      callback - the SDL_WindowsMessageHook function to call.
      userdata - a pointer to pass to every iteration of callback.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDirect3D9AdapterIndex

      public int getDirect3D9AdapterIndex(@NativeType("SDL_DisplayID") @Unsigned int displayID)

      Get the D3D9 adapter index that matches the specified display.

      The returned adapter index can be passed to IDirect3D9::CreateDevice and controls on which monitor a full screen application will appear.

      Parameters:
      displayID - the instance of the display to query.
      Returns:
      the D3D9 adapter index on success or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getDXGIOutputInfo

      @NativeType("boolean") public boolean getDXGIOutputInfo(@NativeType("SDL_DisplayID") @Unsigned int displayID, @Nullable @Nullable IntPtr adapterIndex, @Nullable @Nullable IntPtr outputIndex)

      Get the DXGI Adapter and Output indices for the specified display.

      The DXGI Adapter and Output indices can be passed to EnumAdapters and EnumOutputs respectively to get the objects required to create a DX10 or DX11 device and swap chain.

      Parameters:
      displayID - the instance of the display to query.
      adapterIndex - a pointer to be filled in with the adapter index.
      outputIndex - a pointer to be filled in with the output index.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setX11EventHook

      public void setX11EventHook(@Pointer(comment="SDL_X11EventHook") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Set a callback for every X11 event.

      The callback may modify the event, and should return true if the event should continue to be processed, or false to prevent further processing.

      Parameters:
      callback - the SDL_X11EventHook function to call.
      userdata - a pointer to pass to every iteration of callback.
      Since:
      This function is available since SDL 3.2.0.
    • setLinuxThreadPriority

      @NativeType("boolean") public boolean setLinuxThreadPriority(@NativeType("Sint64") long threadID, int priority)

      Sets the UNIX nice value for a thread.

      This uses setpriority() if possible, and RealtimeKit if available.

      Parameters:
      threadID - the Unix thread ID to change priority of.
      priority - the new, Unix-specific, priority value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setLinuxThreadPriorityAndPolicy

      @NativeType("boolean") public boolean setLinuxThreadPriorityAndPolicy(@NativeType("Sint64") long threadID, int sdlPriority, int schedPolicy)

      Sets the priority (not nice level) and scheduling policy for a thread.

      This uses setpriority() if possible, and RealtimeKit if available.

      Parameters:
      threadID - the Unix thread ID to change priority of.
      sdlPriority - the new SDL_ThreadPriority value.
      schedPolicy - the new scheduling policy (SCHED_FIFO, SCHED_RR, SCHED_OTHER, etc...).
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setiOSAnimationCallback

      @NativeType("boolean") public boolean setiOSAnimationCallback(@Nullable @Nullable SDL_Window window, int interval, @Pointer(comment="SDL_iOSAnimationCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment callbackParam)

      Use this function to set the animation callback on Apple iOS.

      The function prototype for callback is:

      void callback(void *callbackParam);
      

      Where its parameter, callbackParam, is what was passed as callbackParam to SDL_SetiOSAnimationCallback().

      This function is only available on Apple iOS.

      For more information see:

      https://wiki.libsdl.org/SDL3/README/ios

      Note that if you use the "main callbacks" instead of a standard C main function, you don't have to use this API, as SDL will manage this for you.

      Details on main callbacks are here:

      https://wiki.libsdl.org/SDL3/README/main-functions

      Parameters:
      window - the window for which the animation callback should be set.
      interval - the number of frames after which callback will be called.
      callback - the function to call for every frame.
      callbackParam - a pointer that is passed to callback.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setiOSEventPump

      public void setiOSEventPump(@NativeType("boolean") boolean enabled)

      Use this function to enable or disable the SDL event pump on Apple iOS.

      This function is only available on Apple iOS.

      Parameters:
      enabled - true to enable the event pump, false to disable it.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAndroidJNIEnv

      @Pointer(comment="void*") public MemorySegment getAndroidJNIEnv()

      Get the Android Java Native Interface Environment of the current thread.

      This is the JNIEnv one needs to access the Java virtual machine from native code, and is needed for many Android APIs to be usable from C.

      The prototype of the function in SDL's code actually declare a void* return type, even if the implementation returns a pointer to a JNIEnv. The rationale being that the SDL headers can avoid including jni.h.

      Returns:
      a pointer to Java native interface object (JNIEnv) to which the current thread is attached, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAndroidActivity

      @Pointer(comment="void*") public MemorySegment getAndroidActivity()

      Retrieve the Java instance of the Android activity class.

      The prototype of the function in SDL's code actually declares a void* return type, even if the implementation returns a jobject. The rationale being that the SDL headers can avoid including jni.h.

      The jobject returned by the function is a local reference and must be released by the caller. See the PushLocalFrame() and PopLocalFrame() or DeleteLocalRef() functions of the Java native interface:

      https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html

      Returns:
      the jobject representing the instance of the Activity class of the Android application, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAndroidSDKVersion

      public int getAndroidSDKVersion()

      Query Android API level of the current device.

      • API level 35: Android 15 (VANILLA_ICE_CREAM)
      • API level 34: Android 14 (UPSIDE_DOWN_CAKE)
      • API level 33: Android 13 (TIRAMISU)
      • API level 32: Android 12L (S_V2)
      • API level 31: Android 12 (S)
      • API level 30: Android 11 (R)
      • API level 29: Android 10 (Q)
      • API level 28: Android 9 (P)
      • API level 27: Android 8.1 (O_MR1)
      • API level 26: Android 8.0 (O)
      • API level 25: Android 7.1 (N_MR1)
      • API level 24: Android 7.0 (N)
      • API level 23: Android 6.0 (M)
      • API level 22: Android 5.1 (LOLLIPOP_MR1)
      • API level 21: Android 5.0 (LOLLIPOP, L)
      • API level 20: Android 4.4W (KITKAT_WATCH)
      • API level 19: Android 4.4 (KITKAT)
      • API level 18: Android 4.3 (JELLY_BEAN_MR2)
      • API level 17: Android 4.2 (JELLY_BEAN_MR1)
      • API level 16: Android 4.1 (JELLY_BEAN)
      • API level 15: Android 4.0.3 (ICE_CREAM_SANDWICH_MR1)
      • API level 14: Android 4.0 (ICE_CREAM_SANDWICH)
      • API level 13: Android 3.2 (HONEYCOMB_MR2)
      • API level 12: Android 3.1 (HONEYCOMB_MR1)
      • API level 11: Android 3.0 (HONEYCOMB)
      • API level 10: Android 2.3.3 (GINGERBREAD_MR1)
      Returns:
      the Android API level.
      Since:
      This function is available since SDL 3.2.0.
    • isChromebook

      @NativeType("boolean") public boolean isChromebook()
      Query if the application is running on a Chromebook.
      Returns:
      true if this is a Chromebook, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • isDeXMode

      @NativeType("boolean") public boolean isDeXMode()
      Query if the application is running on a Samsung DeX docking station.
      Returns:
      true if this is a DeX docking station, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • sendAndroidBackButton

      public void sendAndroidBackButton()
      Trigger the Android system back button behavior.
      Since:
      This function is available since SDL 3.2.0.
    • getAndroidInternalStoragePath

      public BytePtr getAndroidInternalStoragePath()

      Get the path used for internal storage for this Android application.

      This path is unique to your application and cannot be written to by other applications.

      Your internal storage path is typically: /data/data/your.app.package/files.

      This is a C wrapper over android.content.Context.getFilesDir():

      https://developer.android.com/reference/android/content/ContextgetFilesDir()

      Returns:
      the path used for internal storage or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAndroidExternalStorageState

      @NativeType("Uint32") @Unsigned public int getAndroidExternalStorageState()

      Get the current state of external storage for this Android application.

      The current state of external storage, a bitmask of these values: SDL_ANDROID_EXTERNAL_STORAGE_READ, SDL_ANDROID_EXTERNAL_STORAGE_WRITE.

      If external storage is currently unavailable, this will return 0.

      Returns:
      the current state of external storage, or 0 if external storage is currently unavailable.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAndroidExternalStoragePath

      public BytePtr getAndroidExternalStoragePath()

      Get the path used for external storage for this Android application.

      This path is unique to your application, but is public and can be written to by other applications.

      Your external storage path is typically: /storage/sdcard0/Android/data/your.app.package/files.

      This is a C wrapper over android.content.Context.getExternalFilesDir():

      https://developer.android.com/reference/android/content/ContextgetExternalFilesDir()

      Returns:
      the path used for external storage for this application on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getAndroidCachePath

      public BytePtr getAndroidCachePath()

      Get the path used for caching data for this Android application.

      This path is unique to your application, but is public and can be written to by other applications.

      Your cache path is typically: /data/data/your.app.package/cache/.

      This is a C wrapper over android.content.Context.getCacheDir():

      https://developer.android.com/reference/android/content/ContextgetCacheDir()

      Returns:
      the path used for caches for this application on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • requestAndroidPermission

      @NativeType("boolean") public boolean requestAndroidPermission(@Nullable @Nullable BytePtr permission, @Pointer(comment="SDL_RequestAndroidPermissionCallback") MemorySegment cb, @Pointer(comment="void*") MemorySegment userdata)

      Request permissions at runtime, asynchronously.

      You do not need to call this for built-in functionality of SDL; recording from a microphone or reading images from a camera, using standard SDL APIs, will manage permission requests for you.

      This function never blocks. Instead, the app-supplied callback will be called when a decision has been made. This callback may happen on a different thread, and possibly much later, as it might wait on a user to respond to a system dialog. If permission has already been granted for a specific entitlement, the callback will still fire, probably on the current thread and before this function returns.

      If the request submission fails, this function returns -1 and the callback will NOT be called, but this should only happen in catastrophic conditions, like memory running out. Normally there will be a yes or no to the request through the callback.

      For the permission parameter, choose a value from here:

      https://developer.android.com/reference/android/Manifest.permission

      Parameters:
      permission - the permission to request.
      cb - the callback to trigger when the request has a response.
      userdata - an app-controlled pointer that is passed to the callback.
      Returns:
      true if the request was submitted, false if there was an error submitting. The result of the request is only ever reported through the callback, not this return value.
      Since:
      This function is available since SDL 3.2.0.
    • showAndroidToast

      @NativeType("boolean") public boolean showAndroidToast(@Nullable @Nullable BytePtr message, int duration, int gravity, int xoffset, int yoffset)

      Shows an Android toast notification.

      Toasts are a sort of lightweight notification that are unique to Android.

      https://developer.android.com/guide/topics/ui/notifiers/toasts

      Shows toast in UI thread.

      For the gravity parameter, choose a value from here, or -1 if you don't have a preference:

      https://developer.android.com/reference/android/view/Gravity

      Parameters:
      message - text message to be shown.
      duration - 0=short, 1=long.
      gravity - where the notification should appear on the screen.
      xoffset - set this parameter only when gravity >=0.
      yoffset - set this parameter only when gravity >=0.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • sendAndroidMessage

      @NativeType("boolean") public boolean sendAndroidMessage(@NativeType("Uint32") @Unsigned int command, int param)

      Send a user command to SDLActivity.

      Override "boolean onUnhandledMessage(Message msg)" to handle the message.

      Parameters:
      command - user command that must be greater or equal to 0x8000.
      param - user parameter.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • isTablet

      @NativeType("boolean") public boolean isTablet()

      Query if the current device is a tablet.

      If SDL can't determine this, it will return false.

      Returns:
      true if the device is a tablet, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • isTV

      @NativeType("boolean") public boolean isTV()

      Query if the current device is a TV.

      If SDL can't determine this, it will return false.

      Returns:
      true if the device is a TV, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • getSandbox

      @EnumType(SDL_Sandbox.class) public int getSandbox()
      Get the application sandbox environment, if any.
      Returns:
      the application sandbox environment or SDL_SANDBOX_NONE if the application is not running in a sandbox environment.
      Since:
      This function is available since SDL 3.2.0.
    • onApplicationWillTerminate

      public void onApplicationWillTerminate()

      Let iOS apps with external event handling report onApplicationWillTerminate.

      This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by SDL_CreateWindow!

      Since:
      This function is available since SDL 3.2.0.
    • onApplicationDidReceiveMemoryWarning

      public void onApplicationDidReceiveMemoryWarning()

      Let iOS apps with external event handling report onApplicationDidReceiveMemoryWarning.

      This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by SDL_CreateWindow!

      Since:
      This function is available since SDL 3.2.0.
    • onApplicationWillEnterBackground

      public void onApplicationWillEnterBackground()

      Let iOS apps with external event handling report onApplicationWillResignActive.

      This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by SDL_CreateWindow!

      Since:
      This function is available since SDL 3.2.0.
    • onApplicationDidEnterBackground

      public void onApplicationDidEnterBackground()

      Let iOS apps with external event handling report onApplicationDidEnterBackground.

      This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by SDL_CreateWindow!

      Since:
      This function is available since SDL 3.2.0.
    • onApplicationWillEnterForeground

      public void onApplicationWillEnterForeground()

      Let iOS apps with external event handling report onApplicationWillEnterForeground.

      This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by SDL_CreateWindow!

      Since:
      This function is available since SDL 3.2.0.
    • onApplicationDidEnterForeground

      public void onApplicationDidEnterForeground()

      Let iOS apps with external event handling report onApplicationDidBecomeActive.

      This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by SDL_CreateWindow!

      Since:
      This function is available since SDL 3.2.0.
    • onApplicationDidChangeStatusBarOrientation

      public void onApplicationDidChangeStatusBarOrientation()

      Let iOS apps with external event handling report onApplicationDidChangeStatusBarOrientation.

      This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by SDL_CreateWindow!

      Since:
      This function is available since SDL 3.2.0.
    • getGDKTaskQueue

      @NativeType("boolean") public boolean getGDKTaskQueue(@Nullable @Pointer XTaskQueueHandle.Ptr outTaskQueue)

      Gets a reference to the global async task queue handle for GDK, initializing if needed.

      Once you are done with the task queue, you should call XTaskQueueCloseHandle to reduce the reference count to avoid a resource leak.

      Parameters:
      outTaskQueue - a pointer to be filled in with task queue handle.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getGDKDefaultUser

      @NativeType("boolean") public boolean getGDKDefaultUser(@Nullable @Pointer XUserHandle.Ptr outUserHandle)

      Gets a reference to the default user handle for GDK.

      This is effectively a synchronous version of XUserAddAsync, which always prefers the default user and allows a sign-in UI.

      Parameters:
      outUserHandle - a pointer to be filled in with the default user handle.
      Returns:
      true if success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • createThread

      public SDL_Thread createThread(@Pointer(comment="SDL_ThreadFunction") MemorySegment fn, @Nullable @Nullable BytePtr name, @Pointer(comment="void*") MemorySegment data)

      Create a new thread with a default stack size.

      This is a convenience function, equivalent to calling SDL_CreateThreadWithProperties with the following properties set:

      • SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER: fn
      • SDL_PROP_THREAD_CREATE_NAME_STRING: name
      • SDL_PROP_THREAD_CREATE_USERDATA_POINTER: data

      Note that this "function" is actually a macro that calls an internal function with two extra parameters not listed here; they are hidden through preprocessor macros and are needed to support various C runtimes at the point of the function call. Language bindings that aren't using the C headers will need to deal with this.

      Usually, apps should just call this function the same way on every platform and let the macros hide the details.

      Parameters:
      fn - the SDL_ThreadFunction function to call in the new thread.
      name - the name of the thread.
      data - a pointer that is passed to fn.
      Returns:
      an opaque pointer to the new thread object on success, NULL if the new thread could not be created; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createThreadWithProperties

      public SDL_Thread createThreadWithProperties(@NativeType("SDL_PropertiesID") @Unsigned int props)

      Create a new thread with with the specified properties.

      These are the supported properties:

      • SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER: an SDL_ThreadFunction value that will be called at the start of the new thread's life. Required.
      • SDL_PROP_THREAD_CREATE_NAME_STRING: the name of the new thread, which might be available to debuggers. Optional, defaults to NULL.
      • SDL_PROP_THREAD_CREATE_USERDATA_POINTER: an arbitrary app-defined pointer, which is passed to the entry function on the new thread, as its only parameter. Optional, defaults to NULL.
      • SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER: the size, in bytes, of the new thread's stack. Optional, defaults to 0 (system-defined default).

      SDL makes an attempt to report SDL_PROP_THREAD_CREATE_NAME_STRING to the system, so that debuggers can display it. Not all platforms support this.

      Thread naming is a little complicated: Most systems have very small limits for the string length (Haiku has 32 bytes, Linux currently has 16, Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll have to see what happens with your system's debugger. The name should be UTF-8 (but using the naming limits of C identifiers is a better bet). There are no requirements for thread naming conventions, so long as the string is null-terminated UTF-8, but these guidelines are helpful in choosing a name:

      https://stackoverflow.com/questions/149932/naming-conventions-for-threads

      If a system imposes requirements, SDL will try to munge the string for it (truncate, etc), but the original string contents will be available from SDL_GetThreadName().

      The size (in bytes) of the new stack can be specified with SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER. Zero means "use the system default" which might be wildly different between platforms. x86 Linux generally defaults to eight megabytes, an embedded device might be a few kilobytes instead. You generally need to specify a stack that is a multiple of the system's page size (in many cases, this is 4 kilobytes, but check your system documentation).

      Note that this "function" is actually a macro that calls an internal function with two extra parameters not listed here; they are hidden through preprocessor macros and are needed to support various C runtimes at the point of the function call. Language bindings that aren't using the C headers will need to deal with this.

      The actual symbol in SDL is SDL_CreateThreadWithPropertiesRuntime, so there is no symbol clash, but trying to load an SDL shared library and look for "SDL_CreateThreadWithProperties" will fail.

      Usually, apps should just call this function the same way on every platform and let the macros hide the details.

      Parameters:
      props - the properties to use.
      Returns:
      an opaque pointer to the new thread object on success, NULL if the new thread could not be created; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createThreadRuntime

      public SDL_Thread createThreadRuntime(@Pointer(comment="SDL_ThreadFunction") MemorySegment fn, @Nullable @Nullable BytePtr name, @Pointer(comment="void*") MemorySegment data, @Pointer(comment="SDL_FunctionPointer") MemorySegment pfnBeginThread, @Pointer(comment="SDL_FunctionPointer") MemorySegment pfnEndThread)
      The actual entry point for SDL_CreateThread.
      Parameters:
      fn - the SDL_ThreadFunction function to call in the new thread
      name - the name of the thread
      data - a pointer that is passed to fn
      pfnBeginThread - the C runtime's _beginthreadex (or whatnot). Can be NULL.
      pfnEndThread - the C runtime's _endthreadex (or whatnot). Can be NULL.
      Returns:
      an opaque pointer to the new thread object on success, NULL if the new thread could not be created; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • createThreadWithPropertiesRuntime

      public SDL_Thread createThreadWithPropertiesRuntime(@NativeType("SDL_PropertiesID") @Unsigned int props, @Pointer(comment="SDL_FunctionPointer") MemorySegment pfnBeginThread, @Pointer(comment="SDL_FunctionPointer") MemorySegment pfnEndThread)
      The actual entry point for SDL_CreateThreadWithProperties.
      Parameters:
      props - the properties to use
      pfnBeginThread - the C runtime's _beginthreadex (or whatnot). Can be NULL.
      pfnEndThread - the C runtime's _endthreadex (or whatnot). Can be NULL.
      Returns:
      an opaque pointer to the new thread object on success, NULL if the new thread could not be created; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getThreadName

      public BytePtr getThreadName(@Nullable @Nullable SDL_Thread thread)
      Get the thread name as it was specified in SDL_CreateThread().
      Parameters:
      thread - the thread to query.
      Returns:
      a pointer to a UTF-8 string that names the specified thread, or NULL if it doesn't have a name.
      Since:
      This function is available since SDL 3.2.0.
    • getCurrentThreadID

      @NativeType("SDL_ThreadID") @Unsigned public long getCurrentThreadID()

      Get the thread identifier for the current thread.

      This thread identifier is as reported by the underlying operating system. If SDL is running on a platform that does not support threads the return value will always be zero.

      This function also returns a valid thread ID when called from the main thread.

      Returns:
      the ID of the current thread.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getThreadID

      @NativeType("SDL_ThreadID") @Unsigned public long getThreadID(@Nullable @Nullable SDL_Thread thread)

      Get the thread identifier for the specified thread.

      This thread identifier is as reported by the underlying operating system. If SDL is running on a platform that does not support threads the return value will always be zero.

      Parameters:
      thread - the thread to query.
      Returns:
      the ID of the specified thread, or the ID of the current thread if thread is NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setCurrentThreadPriority

      @NativeType("boolean") public boolean setCurrentThreadPriority(@EnumType(SDL_ThreadPriority.class) int priority)

      Set the priority for the current thread.

      Note that some platforms will not let you alter the priority (or at least, promote the thread to a higher priority) at all, and some require you to be an administrator account. Be prepared for this to fail.

      Parameters:
      priority - the SDL_ThreadPriority to set.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • waitThread

      public void waitThread(@Nullable @Nullable SDL_Thread thread, @Nullable @Nullable IntPtr status)

      Wait for a thread to finish.

      Threads that haven't been detached will remain until this function cleans them up. Not doing so is a resource leak.

      Once a thread has been cleaned up through this function, the SDL_Thread that references it becomes invalid and should not be referenced again. As such, only one thread may call SDL_WaitThread() on another.

      The return code from the thread function is placed in the area pointed to by status, if status is not NULL.

      You may not wait on a thread that has been used in a call to SDL_DetachThread(). Use either that function or this one, but not both, or behavior is undefined.

      It is safe to pass a NULL thread to this function; it is a no-op.

      Note that the thread pointer is freed by this function and is not valid afterward.

      Parameters:
      thread - the SDL_Thread pointer that was returned from the SDL_CreateThread() call that started this thread.
      status - a pointer filled in with the value returned from the thread function by its 'return', or -1 if the thread has been detached or isn't valid, may be NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getThreadState

      @EnumType(SDL_ThreadState.class) public int getThreadState(@Nullable @Nullable SDL_Thread thread)
      Get the current state of a thread.
      Parameters:
      thread - the thread to query.
      Returns:
      the current state of a thread, or SDL_THREAD_UNKNOWN if the thread isn't valid.
      Since:
      This function is available since SDL 3.2.0.
    • detachThread

      public void detachThread(@Nullable @Nullable SDL_Thread thread)

      Let a thread clean up on exit without intervention.

      A thread may be "detached" to signify that it should not remain until another thread has called SDL_WaitThread() on it. Detaching a thread is useful for long-running threads that nothing needs to synchronize with or further manage. When a detached thread is done, it simply goes away.

      There is no way to recover the return code of a detached thread. If you need this, don't detach the thread and instead use SDL_WaitThread().

      Once a thread is detached, you should usually assume the SDL_Thread isn't safe to reference again, as it will become invalid immediately upon the detached thread's exit, instead of remaining until someone has called SDL_WaitThread() to finally clean it up. As such, don't detach the same thread more than once.

      If a thread has already exited when passed to SDL_DetachThread(), it will stop waiting for a call to SDL_WaitThread() and clean up immediately. It is not safe to detach a thread that might be used with SDL_WaitThread().

      You may not call SDL_WaitThread() on a thread that has been detached. Use either that function or this one, but not both, or behavior is undefined.

      It is safe to pass NULL to this function; it is a no-op.

      Parameters:
      thread - the SDL_Thread pointer that was returned from the SDL_CreateThread() call that started this thread.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTLS

      @Pointer(comment="void*") public MemorySegment getTLS(@Nullable @Pointer @Nullable ISDL_AtomicInt id)
      Get the current thread's value associated with a thread local storage ID.
      Parameters:
      id - a pointer to the thread local storage ID, may not be NULL.
      Returns:
      the value associated with the ID for the current thread or NULL if no value has been set; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTLS

      @NativeType("boolean") public boolean setTLS(@Nullable @Pointer @Nullable ISDL_AtomicInt id, @Pointer(comment="void*") MemorySegment value, @Pointer(comment="SDL_TLSDestructorCallback") MemorySegment destructor)

      Set the current thread's value associated with a thread local storage ID.

      If the thread local storage ID is not initialized (the value is 0), a new ID will be created in a thread-safe way, so all calls using a pointer to the same ID will refer to the same local storage.

      Note that replacing a value from a previous call to this function on the same thread does not call the previous value's destructor!

      destructor can be NULL; it is assumed that value does not need to be cleaned up if so.

      Parameters:
      id - a pointer to the thread local storage ID, may not be NULL.
      value - the value to associate with the ID for the current thread.
      destructor - a function called when the thread exits, to free the value, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • cleanupTLS

      public void cleanupTLS()

      Cleanup all TLS data for this thread.

      If you are creating your threads outside of SDL and then calling SDL functions, you should call this function before your thread exits, to properly clean up SDL memory.

      Since:
      This function is available since SDL 3.2.0.
    • getDateTimeLocalePreferences

      @NativeType("boolean") public boolean getDateTimeLocalePreferences(@Nullable @EnumType(SDL_DateFormat.class) @Nullable IntPtr dateFormat, @Nullable @EnumType(SDL_TimeFormat.class) @Nullable IntPtr timeFormat)

      Gets the current preferred date and time format for the system locale.

      This might be a "slow" call that has to query the operating system. It's best to ask for this once and save the results. However, the preferred formats can change, usually because the user has changed a system preference outside of your program.

      Parameters:
      dateFormat - a pointer to the SDL_DateFormat to hold the returned date format, may be NULL.
      timeFormat - a pointer to the SDL_TimeFormat to hold the returned time format, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getCurrentTime

      @NativeType("boolean") public boolean getCurrentTime(@Nullable @Pointer(comment="SDL_Time") @Nullable LongPtr ticks)
      Gets the current value of the system realtime clock in nanoseconds since Jan 1, 1970 in Universal Coordinated Time (UTC).
      Parameters:
      ticks - the SDL_Time to hold the returned tick count.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • timeToDateTime

      @NativeType("boolean") public boolean timeToDateTime(@NativeType("SDL_Time") long ticks, @Nullable @Pointer @Nullable ISDL_DateTime dt, @NativeType("boolean") boolean localTime)
      Converts an SDL_Time in nanoseconds since the epoch to a calendar time in the SDL_DateTime format.
      Parameters:
      ticks - the SDL_Time to be converted.
      dt - the resulting SDL_DateTime.
      localTime - the resulting SDL_DateTime will be expressed in local time if true, otherwise it will be in Universal Coordinated Time (UTC).
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • dateTimeToTime

      @NativeType("boolean") public boolean dateTimeToTime(@Nullable @Pointer @Nullable ISDL_DateTime dt, @Nullable @Pointer(comment="SDL_Time") @Nullable LongPtr ticks)

      Converts a calendar time to an SDL_Time in nanoseconds since the epoch.

      This function ignores the day_of_week member of the SDL_DateTime struct, so it may remain unset.

      Parameters:
      dt - the source SDL_DateTime.
      ticks - the resulting SDL_Time.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • timeToWindows

      public void timeToWindows(@NativeType("SDL_Time") long ticks, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr dwLowDateTime, @Nullable @Pointer(comment="Uint32") @Unsigned @Nullable IntPtr dwHighDateTime)

      Converts an SDL time into a Windows FILETIME (100-nanosecond intervals since January 1, 1601).

      This function fills in the two 32-bit values of the FILETIME structure.

      Parameters:
      ticks - the time to convert.
      dwLowDateTime - a pointer filled in with the low portion of the Windows FILETIME value.
      dwHighDateTime - a pointer filled in with the high portion of the Windows FILETIME value.
      Since:
      This function is available since SDL 3.2.0.
    • timeFromWindows

      @NativeType("SDL_Time") public long timeFromWindows(@NativeType("Uint32") @Unsigned int dwLowDateTime, @NativeType("Uint32") @Unsigned int dwHighDateTime)

      Converts a Windows FILETIME (100-nanosecond intervals since January 1, 1601) to an SDL time.

      This function takes the two 32-bit values of the FILETIME structure as parameters.

      Parameters:
      dwLowDateTime - the low portion of the Windows FILETIME value.
      dwHighDateTime - the high portion of the Windows FILETIME value.
      Returns:
      the converted SDL time.
      Since:
      This function is available since SDL 3.2.0.
    • getDaysInMonth

      public int getDaysInMonth(int year, int month)
      Get the number of days in a month for a given year.
      Parameters:
      year - the year.
      month - the month [1-12].
      Returns:
      the number of days in the requested month or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getDayOfYear

      public int getDayOfYear(int year, int month, int day)
      Get the day of year for a calendar date.
      Parameters:
      year - the year component of the date.
      month - the month component of the date.
      day - the day component of the date.
      Returns:
      the day of year [0-365] if the date is valid or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getDayOfWeek

      public int getDayOfWeek(int year, int month, int day)
      Get the day of week for a calendar date.
      Parameters:
      year - the year component of the date.
      month - the month component of the date.
      day - the day component of the date.
      Returns:
      a value between 0 and 6 (0 being Sunday) if the date is valid or -1 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getTicks

      @NativeType("Uint64") @Unsigned public long getTicks()
      Get the number of milliseconds since SDL library initialization.
      Returns:
      an unsigned 64-bit value representing the number of milliseconds since the SDL library initialized.
      Since:
      This function is available since SDL 3.2.0.
    • getTicksNS

      @NativeType("Uint64") @Unsigned public long getTicksNS()
      Get the number of nanoseconds since SDL library initialization.
      Returns:
      an unsigned 64-bit value representing the number of nanoseconds since the SDL library initialized.
      Since:
      This function is available since SDL 3.2.0.
    • getPerformanceCounter

      @NativeType("Uint64") @Unsigned public long getPerformanceCounter()

      Get the current value of the high resolution counter.

      This function is typically used for profiling.

      The counter values are only meaningful relative to each other. Differences between values can be converted to times by using SDL_GetPerformanceFrequency().

      Returns:
      the current counter value.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getPerformanceFrequency

      @NativeType("Uint64") @Unsigned public long getPerformanceFrequency()
      Get the count per second of the high resolution counter.
      Returns:
      a platform-specific count per second.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • delay

      public void delay(@NativeType("Uint32") @Unsigned int ms)

      Wait a specified number of milliseconds before returning.

      This function waits a specified number of milliseconds before returning. It waits at least the specified time, but possibly longer due to OS scheduling.

      Parameters:
      ms - the number of milliseconds to delay.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • delayNS

      public void delayNS(@NativeType("Uint64") @Unsigned long ns)

      Wait a specified number of nanoseconds before returning.

      This function waits a specified number of nanoseconds before returning. It waits at least the specified time, but possibly longer due to OS scheduling.

      Parameters:
      ns - the number of nanoseconds to delay.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • delayPrecise

      public void delayPrecise(@NativeType("Uint64") @Unsigned long ns)

      Wait a specified number of nanoseconds before returning.

      This function waits a specified number of nanoseconds before returning. It will attempt to wait as close to the requested time as possible, busy waiting if necessary, but could return later due to OS scheduling.

      Parameters:
      ns - the number of nanoseconds to delay.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • addTimer

      @NativeType("SDL_TimerID") @Unsigned public int addTimer(@NativeType("Uint32") @Unsigned int interval, @Pointer(comment="SDL_TimerCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Call a callback function at a future time.

      The callback function is passed the current timer interval and the user supplied parameter from the SDL_AddTimer() call and should return the next timer interval. If the value returned from the callback is 0, the timer is canceled and will be removed.

      The callback is run on a separate thread, and for short timeouts can potentially be called before this function returns.

      Timers take into account the amount of time it took to execute the callback. For example, if the callback took 250 ms to execute and returned 1000 (ms), the timer would only wait another 750 ms before its next iteration.

      Timing may be inexact due to OS scheduling. Be sure to note the current time with SDL_GetTicksNS() or SDL_GetPerformanceCounter() in case your callback needs to adjust for variances.

      Parameters:
      interval - the timer delay, in milliseconds, passed to callback.
      callback - the SDL_TimerCallback function to call when the specified interval elapses.
      userdata - a pointer that is passed to callback.
      Returns:
      a timer ID or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • addTimerNS

      @NativeType("SDL_TimerID") @Unsigned public int addTimerNS(@NativeType("Uint64") @Unsigned long interval, @Pointer(comment="SDL_NSTimerCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)

      Call a callback function at a future time.

      The callback function is passed the current timer interval and the user supplied parameter from the SDL_AddTimerNS() call and should return the next timer interval. If the value returned from the callback is 0, the timer is canceled and will be removed.

      The callback is run on a separate thread, and for short timeouts can potentially be called before this function returns.

      Timers take into account the amount of time it took to execute the callback. For example, if the callback took 250 ns to execute and returned 1000 (ns), the timer would only wait another 750 ns before its next iteration.

      Timing may be inexact due to OS scheduling. Be sure to note the current time with SDL_GetTicksNS() or SDL_GetPerformanceCounter() in case your callback needs to adjust for variances.

      Parameters:
      interval - the timer delay, in nanoseconds, passed to callback.
      callback - the SDL_TimerCallback function to call when the specified interval elapses.
      userdata - a pointer that is passed to callback.
      Returns:
      a timer ID or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • removeTimer

      @NativeType("boolean") public boolean removeTimer(@NativeType("SDL_TimerID") @Unsigned int id)
      Remove a timer created with SDL_AddTimer().
      Parameters:
      id - the ID of the timer to remove.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createTray

      public SDL_Tray createTray(@Nullable @Nullable SDL_Surface icon, @Nullable @Nullable BytePtr tooltip)

      Create an icon to be placed in the operating system's tray, or equivalent.

      Many platforms advise not using a system tray unless persistence is a necessary feature. Avoid needlessly creating a tray icon, as the user may feel like it clutters their interface.

      Using tray icons require the video subsystem.

      Parameters:
      icon - a surface to be used as icon. May be NULL.
      tooltip - a tooltip to be displayed when the mouse hovers the icon in UTF-8 encoding. Not supported on all platforms. May be NULL.
      Returns:
      The newly created system tray icon.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTrayIcon

      public void setTrayIcon(@Nullable @Nullable SDL_Tray tray, @Nullable @Nullable SDL_Surface icon)
      Updates the system tray icon's icon.
      Parameters:
      tray - the tray icon to be updated.
      icon - the new icon. May be NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTrayTooltip

      public void setTrayTooltip(@Nullable @Nullable SDL_Tray tray, @Nullable @Nullable BytePtr tooltip)
      Updates the system tray icon's tooltip.
      Parameters:
      tray - the tray icon to be updated.
      tooltip - the new tooltip in UTF-8 encoding. May be NULL.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createTrayMenu

      public SDL_TrayMenu createTrayMenu(@Nullable @Nullable SDL_Tray tray)

      Create a menu for a system tray.

      This should be called at most once per tray icon.

      This function does the same thing as SDL_CreateTraySubmenu(), except that it takes a SDL_Tray instead of a SDL_TrayEntry.

      A menu does not need to be destroyed; it will be destroyed with the tray.

      Parameters:
      tray - the tray to bind the menu to.
      Returns:
      the newly created menu.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createTraySubmenu

      public SDL_TrayMenu createTraySubmenu(@Nullable @Nullable SDL_TrayEntry entry)

      Create a submenu for a system tray entry.

      This should be called at most once per tray entry.

      This function does the same thing as SDL_CreateTrayMenu, except that it takes a SDL_TrayEntry instead of a SDL_Tray.

      A menu does not need to be destroyed; it will be destroyed with the tray.

      Parameters:
      entry - the tray entry to bind the menu to.
      Returns:
      the newly created menu.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTrayMenu

      public SDL_TrayMenu getTrayMenu(@Nullable @Nullable SDL_Tray tray)

      Gets a previously created tray menu.

      You should have called SDL_CreateTrayMenu() on the tray object. This function allows you to fetch it again later.

      This function does the same thing as SDL_GetTraySubmenu(), except that it takes a SDL_Tray instead of a SDL_TrayEntry.

      A menu does not need to be destroyed; it will be destroyed with the tray.

      Parameters:
      tray - the tray entry to bind the menu to.
      Returns:
      the newly created menu.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTraySubmenu

      public SDL_TrayMenu getTraySubmenu(@Nullable @Nullable SDL_TrayEntry entry)

      Gets a previously created tray entry submenu.

      You should have called SDL_CreateTraySubmenu() on the entry object. This function allows you to fetch it again later.

      This function does the same thing as SDL_GetTrayMenu(), except that it takes a SDL_TrayEntry instead of a SDL_Tray.

      A menu does not need to be destroyed; it will be destroyed with the tray.

      Parameters:
      entry - the tray entry to bind the menu to.
      Returns:
      the newly created menu.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTrayEntries

      @Pointer public SDL_TrayEntry.Ptr getTrayEntries(@Nullable @Nullable SDL_TrayMenu menu, @Nullable @Nullable IntPtr count)
      Returns a list of entries in the menu, in order.
      Parameters:
      menu - The menu to get entries from.
      count - An optional pointer to obtain the number of entries in the menu.
      Returns:
      a NULL-terminated list of entries within the given menu. The pointer becomes invalid when any function that inserts or deletes entries in the menu is called.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • removeTrayEntry

      public void removeTrayEntry(@Nullable @Nullable SDL_TrayEntry entry)
      Removes a tray entry.
      Parameters:
      entry - The entry to be deleted.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • insertTrayEntryAt

      public SDL_TrayEntry insertTrayEntryAt(@Nullable @Nullable SDL_TrayMenu menu, int pos, @Nullable @Nullable BytePtr label, @EnumType(SDL_TrayEntryFlags.class) int flags)

      Insert a tray entry at a given position.

      If label is NULL, the entry will be a separator. Many functions won't work for an entry that is a separator.

      An entry does not need to be destroyed; it will be destroyed with the tray.

      Parameters:
      menu - the menu to append the entry to.
      pos - the desired position for the new entry. Entries at or following this place will be moved. If pos is -1, the entry is appended.
      label - the text to be displayed on the entry, in UTF-8 encoding, or NULL for a separator.
      flags - a combination of flags, some of which are mandatory.
      Returns:
      the newly created entry, or NULL if pos is out of bounds.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTrayEntryLabel

      public void setTrayEntryLabel(@Nullable @Nullable SDL_TrayEntry entry, @Nullable @Nullable BytePtr label)

      Sets the label of an entry.

      An entry cannot change between a separator and an ordinary entry; that is, it is not possible to set a non-NULL label on an entry that has a NULL label (separators), or to set a NULL label to an entry that has a non-NULL label. The function will silently fail if that happens.

      Parameters:
      entry - the entry to be updated.
      label - the new label for the entry in UTF-8 encoding.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTrayEntryLabel

      public BytePtr getTrayEntryLabel(@Nullable @Nullable SDL_TrayEntry entry)

      Gets the label of an entry.

      If the returned value is NULL, the entry is a separator.

      Parameters:
      entry - the entry to be read.
      Returns:
      the label of the entry in UTF-8 encoding.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTrayEntryChecked

      public void setTrayEntryChecked(@Nullable @Nullable SDL_TrayEntry entry, @NativeType("boolean") boolean checked)

      Sets whether or not an entry is checked.

      The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.

      Parameters:
      entry - the entry to be updated.
      checked - true if the entry should be checked; false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTrayEntryChecked

      @NativeType("boolean") public boolean getTrayEntryChecked(@Nullable @Nullable SDL_TrayEntry entry)

      Gets whether or not an entry is checked.

      The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.

      Parameters:
      entry - the entry to be read.
      Returns:
      true if the entry is checked; false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTrayEntryEnabled

      public void setTrayEntryEnabled(@Nullable @Nullable SDL_TrayEntry entry, @NativeType("boolean") boolean enabled)
      Sets whether or not an entry is enabled.
      Parameters:
      entry - the entry to be updated.
      enabled - true if the entry should be enabled; false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTrayEntryEnabled

      @NativeType("boolean") public boolean getTrayEntryEnabled(@Nullable @Nullable SDL_TrayEntry entry)
      Gets whether or not an entry is enabled.
      Parameters:
      entry - the entry to be read.
      Returns:
      true if the entry is enabled; false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setTrayEntryCallback

      public void setTrayEntryCallback(@Nullable @Nullable SDL_TrayEntry entry, @Pointer(comment="SDL_TrayCallback") MemorySegment callback, @Pointer(comment="void*") MemorySegment userdata)
      Sets a callback to be invoked when the entry is selected.
      Parameters:
      entry - the entry to be updated.
      callback - a callback to be invoked when the entry is selected.
      userdata - an optional pointer to pass extra data to the callback when it will be invoked.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • clickTrayEntry

      public void clickTrayEntry(@Nullable @Nullable SDL_TrayEntry entry)
      Simulate a click on a tray entry.
      Parameters:
      entry - The entry to activate.
      Since:
      This function is available since SDL 3.2.0.
    • destroyTray

      public void destroyTray(@Nullable @Nullable SDL_Tray tray)

      Destroys a tray object.

      This also destroys all associated menus and entries.

      Parameters:
      tray - the tray icon to be destroyed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTrayEntryParent

      public SDL_TrayMenu getTrayEntryParent(@Nullable @Nullable SDL_TrayEntry entry)
      Gets the menu containing a certain tray entry.
      Parameters:
      entry - the entry for which to get the parent menu.
      Returns:
      the parent menu.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTrayMenuParentEntry

      public SDL_TrayEntry getTrayMenuParentEntry(@Nullable @Nullable SDL_TrayMenu menu)

      Gets the entry for which the menu is a submenu, if the current menu is a submenu.

      Either this function or SDL_GetTrayMenuParentTray() will return non-NULL for any given menu.

      Parameters:
      menu - the menu for which to get the parent entry.
      Returns:
      the parent entry, or NULL if this menu is not a submenu.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getTrayMenuParentTray

      public SDL_Tray getTrayMenuParentTray(@Nullable @Nullable SDL_TrayMenu menu)

      Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu.

      Either this function or SDL_GetTrayMenuParentEntry() will return non-NULL for any given menu.

      Parameters:
      menu - the menu for which to get the parent enttrayry.
      Returns:
      the parent tray, or NULL if this menu is a submenu.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • updateTrays

      public void updateTrays()

      Update the trays.

      This is called automatically by the event loop and is only needed if you're using trays but aren't handling SDL events.

      Since:
      This function is available since SDL 3.2.0.
    • getTouchDevices

      @Pointer(comment="SDL_TouchID") @Unsigned public LongPtr getTouchDevices(@Nullable @Nullable IntPtr count)

      Get a list of registered touch devices.

      On some platforms SDL first sees the touch device if it was actually used. Therefore the returned list might be empty, although devices are available. After using all devices at least once the number will be correct.

      Parameters:
      count - a pointer filled in with the number of devices returned, may be NULL.
      Returns:
      a 0 terminated array of touch device IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • getTouchDeviceName

      public BytePtr getTouchDeviceName(@NativeType("SDL_TouchID") @Unsigned long touchID)
      Get the touch device name as reported from the driver.
      Parameters:
      touchID - the touch device instance ID.
      Returns:
      touch device name, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getTouchDeviceType

      @EnumType(SDL_TouchDeviceType.class) public int getTouchDeviceType(@NativeType("SDL_TouchID") @Unsigned long touchID)
      Get the type of the given touch device.
      Parameters:
      touchID - the ID of a touch device.
      Returns:
      touch device type.
      Since:
      This function is available since SDL 3.2.0.
    • getTouchFingers

      public PointerPtr getTouchFingers(@NativeType("SDL_TouchID") @Unsigned long touchID, @Nullable @Nullable IntPtr count)
      Get a list of active fingers for a given touch device.
      Parameters:
      touchID - the ID of a touch device.
      count - a pointer filled in with the number of fingers returned, can be NULL.
      Returns:
      a NULL terminated array of SDL_Finger pointers or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • getVersion

      public int getVersion()

      Get the version of SDL that is linked against your program.

      If you are linking to SDL dynamically, then it is possible that the current version will be different than the version you compiled against. This function returns the current version, while SDL_VERSION is the version you compiled with.

      This function may be called safely at any time, even before SDL_Init().

      Returns:
      the version of the linked library.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getRevision

      public BytePtr getRevision()

      Get the code revision of SDL that is linked against your program.

      This value is the revision of the code you are linked with and may be different from the code you are compiling with, which is found in the constant SDL_REVISION.

      The revision is arbitrary string (a hash value) uniquely identifying the exact revision of the SDL library in use, and is only useful in comparing against other revisions. It is NOT an incrementing number.

      If SDL wasn't built from a git repository with the appropriate tools, this will return an empty string.

      You shouldn't use this function for anything but logging it for debugging purposes. The string is not intended to be reliable in any way.

      Returns:
      an arbitrary string, uniquely identifying the exact revision of the SDL library in use.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNumVideoDrivers

      public int getNumVideoDrivers()
      Get the number of video drivers compiled into SDL.
      Returns:
      the number of built in video drivers.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getVideoDriver

      public BytePtr getVideoDriver(int index)

      Get the name of a built in video driver.

      The video drivers are presented in the order in which they are normally checked during initialization.

      The names of drivers are all simple, low-ASCII identifiers, like "cocoa", "x11" or "windows". These never have Unicode characters, and are not meant to be proper names.

      Parameters:
      index - the index of a video driver.
      Returns:
      the name of the video driver with the given index.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCurrentVideoDriver

      public BytePtr getCurrentVideoDriver()

      Get the name of the currently initialized video driver.

      The names of drivers are all simple, low-ASCII identifiers, like "cocoa", "x11" or "windows". These never have Unicode characters, and are not meant to be proper names.

      Returns:
      the name of the current video driver or NULL if no driver has been initialized.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getSystemTheme

      @EnumType(SDL_SystemTheme.class) public int getSystemTheme()
      Get the current system theme.
      Returns:
      the current system theme, light, dark, or unknown.
      Since:
      This function is available since SDL 3.2.0.
    • getDisplays

      @Pointer(comment="SDL_DisplayID") @Unsigned public IntPtr getDisplays(@Nullable @Nullable IntPtr count)
      Get a list of currently connected displays.
      Parameters:
      count - a pointer filled in with the number of displays returned, may be NULL.
      Returns:
      a 0 terminated array of display instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • getPrimaryDisplay

      @NativeType("SDL_DisplayID") @Unsigned public int getPrimaryDisplay()
      Return the primary display.
      Returns:
      the instance ID of the primary display on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDisplayProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getDisplayProperties(@NativeType("SDL_DisplayID") @Unsigned int displayID)

      Get the properties associated with a display.

      The following read-only properties are provided by SDL:

      • SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN: true if the display has HDR headroom above the SDR white point. This is for informational and diagnostic purposes only, as not all platforms provide this information at the display level.

      On KMS/DRM:

      • SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER: the "panel orientation" property for the display in degrees of clockwise rotation. Note that this is provided only as a hint, and the application is responsible for any coordinate transformations needed to conform to the requested display orientation.
      Parameters:
      displayID - the instance ID of the display to query.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getDisplayName

      public BytePtr getDisplayName(@NativeType("SDL_DisplayID") @Unsigned int displayID)
      Get the name of a display in UTF-8 encoding.
      Parameters:
      displayID - the instance ID of the display to query.
      Returns:
      the name of a display or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDisplayBounds

      @NativeType("boolean") public boolean getDisplayBounds(@NativeType("SDL_DisplayID") @Unsigned int displayID, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Get the desktop area represented by a display.

      The primary display is often located at (0,0), but may be placed at a different location depending on monitor layout.

      Parameters:
      displayID - the instance ID of the display to query.
      rect - the SDL_Rect structure filled in with the display bounds.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDisplayUsableBounds

      @NativeType("boolean") public boolean getDisplayUsableBounds(@NativeType("SDL_DisplayID") @Unsigned int displayID, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Get the usable desktop area represented by a display, in screen coordinates.

      This is the same area as SDL_GetDisplayBounds() reports, but with portions reserved by the system removed. For example, on Apple's macOS, this subtracts the area occupied by the menu bar and dock.

      Setting a window to be fullscreen generally bypasses these unusable areas, so these are good guidelines for the maximum space available to a non-fullscreen window.

      Parameters:
      displayID - the instance ID of the display to query.
      rect - the SDL_Rect structure filled in with the display bounds.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getNaturalDisplayOrientation

      @EnumType(SDL_DisplayOrientation.class) public int getNaturalDisplayOrientation(@NativeType("SDL_DisplayID") @Unsigned int displayID)
      Get the orientation of a display when it is unrotated.
      Parameters:
      displayID - the instance ID of the display to query.
      Returns:
      the SDL_DisplayOrientation enum value of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCurrentDisplayOrientation

      @EnumType(SDL_DisplayOrientation.class) public int getCurrentDisplayOrientation(@NativeType("SDL_DisplayID") @Unsigned int displayID)
      Get the orientation of a display.
      Parameters:
      displayID - the instance ID of the display to query.
      Returns:
      the SDL_DisplayOrientation enum value of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDisplayContentScale

      public float getDisplayContentScale(@NativeType("SDL_DisplayID") @Unsigned int displayID)

      Get the content scale of a display.

      The content scale is the expected scale for content based on the DPI settings of the display. For example, a 4K display might have a 2.0 (200%) display scale, which means that the user expects UI elements to be twice as big on this display, to aid in readability.

      After window creation, SDL_GetWindowDisplayScale() should be used to query the content scale factor for individual windows instead of querying the display for a window and calling this function, as the per-window content scale factor may differ from the base value of the display it is on, particularly on high-DPI and/or multi-monitor desktop configurations.

      Parameters:
      displayID - the instance ID of the display to query.
      Returns:
      the content scale of the display, or 0.0f on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getFullscreenDisplayModes

      public PointerPtr getFullscreenDisplayModes(@NativeType("SDL_DisplayID") @Unsigned int displayID, @Nullable @Nullable IntPtr count)

      Get a list of fullscreen display modes available on a display.

      The display modes are sorted in this priority:

      • w -> largest to smallest
      • h -> largest to smallest
      • bits per pixel -> more colors to fewer colors
      • packed pixel layout -> largest to smallest
      • refresh rate -> highest to lowest
      • pixel density -> lowest to highest
      Parameters:
      displayID - the instance ID of the display to query.
      count - a pointer filled in with the number of display modes returned, may be NULL.
      Returns:
      a NULL terminated array of display mode pointers or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getClosestFullscreenDisplayMode

      @NativeType("boolean") public boolean getClosestFullscreenDisplayMode(@NativeType("SDL_DisplayID") @Unsigned int displayID, int w, int h, float refresh_rate, @NativeType("boolean") boolean include_high_density_modes, @Nullable @Pointer @Nullable ISDL_DisplayMode closest)

      Get the closest match to the requested display mode.

      The available display modes are scanned and closest is filled in with the closest mode matching the requested mode and returned. The mode format and refresh rate default to the desktop mode if they are set to 0. The modes are scanned with size being first priority, format being second priority, and finally checking the refresh rate. If all the available modes are too small, then false is returned.

      Parameters:
      displayID - the instance ID of the display to query.
      w - the width in pixels of the desired display mode.
      h - the height in pixels of the desired display mode.
      refresh_rate - the refresh rate of the desired display mode, or 0.0f for the desktop refresh rate.
      include_high_density_modes - boolean to include high density modes in the search.
      closest - a pointer filled in with the closest display mode equal to or larger than the desired mode.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDesktopDisplayMode

      @Pointer public ISDL_DisplayMode getDesktopDisplayMode(@NativeType("SDL_DisplayID") @Unsigned int displayID)

      Get information about the desktop's display mode.

      There's a difference between this function and SDL_GetCurrentDisplayMode() when SDL runs fullscreen and has changed the resolution. In that case this function will return the previous native display mode, and not the current display mode.

      Parameters:
      displayID - the instance ID of the display to query.
      Returns:
      a pointer to the desktop display mode or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getCurrentDisplayMode

      @Pointer public ISDL_DisplayMode getCurrentDisplayMode(@NativeType("SDL_DisplayID") @Unsigned int displayID)

      Get information about the current display mode.

      There's a difference between this function and SDL_GetDesktopDisplayMode() when SDL runs fullscreen and has changed the resolution. In that case this function will return the current display mode, and not the previous native display mode.

      Parameters:
      displayID - the instance ID of the display to query.
      Returns:
      a pointer to the desktop display mode or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDisplayForPoint

      @NativeType("SDL_DisplayID") @Unsigned public int getDisplayForPoint(@Nullable @Pointer @Nullable ISDL_Point point)
      Get the display containing a point.
      Parameters:
      point - the point to query.
      Returns:
      the instance ID of the display containing the point or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDisplayForRect

      @NativeType("SDL_DisplayID") @Unsigned public int getDisplayForRect(@Nullable @Pointer @Nullable ISDL_Rect rect)
      Get the display primarily containing a rect.
      Parameters:
      rect - the rect to query.
      Returns:
      the instance ID of the display entirely containing the rect or closest to the center of the rect on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getDisplayForWindow

      @NativeType("SDL_DisplayID") @Unsigned public int getDisplayForWindow(@Nullable @Nullable SDL_Window window)
      Get the display associated with a window.
      Parameters:
      window - the window to query.
      Returns:
      the instance ID of the display containing the center of the window on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowPixelDensity

      public float getWindowPixelDensity(@Nullable @Nullable SDL_Window window)

      Get the pixel density of a window.

      This is a ratio of pixel size to window size. For example, if the window is 1920x1080 and it has a high density back buffer of 3840x2160 pixels, it would have a pixel density of 2.0.

      Parameters:
      window - the window to query.
      Returns:
      the pixel density or 0.0f on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowDisplayScale

      public float getWindowDisplayScale(@Nullable @Nullable SDL_Window window)

      Get the content display scale relative to a window's pixel size.

      This is a combination of the window pixel density and the display content scale, and is the expected scale for displaying content in this window. For example, if a 3840x2160 window had a display scale of 2.0, the user expects the content to take twice as many pixels and be the same physical size as if it were being displayed in a 1920x1080 window with a display scale of 1.0.

      Conceptually this value corresponds to the scale display setting, and is updated when that setting is changed, or the window moves to a display with a different scale setting.

      Parameters:
      window - the window to query.
      Returns:
      the display scale, or 0.0f on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setWindowFullscreenMode

      @NativeType("boolean") public boolean setWindowFullscreenMode(@Nullable @Nullable SDL_Window window, @Nullable @Pointer @Nullable ISDL_DisplayMode mode)

      Set the display mode to use when a window is visible and fullscreen.

      This only affects the display mode used when the window is fullscreen. To change the window size when the window is not fullscreen, use SDL_SetWindowSize().

      If the window is currently in the fullscreen state, this request is asynchronous on some windowing systems and the new mode dimensions may not be applied immediately upon the return of this function. If an immediate change is required, call SDL_SyncWindow() to block until the changes have taken effect.

      When the new mode takes effect, an SDL_EVENT_WINDOW_RESIZED and/or an SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event will be emitted with the new mode dimensions.

      Parameters:
      window - the window to affect.
      mode - a pointer to the display mode to use, which can be NULL for borderless fullscreen desktop mode, or one of the fullscreen modes returned by SDL_GetFullscreenDisplayModes() to set an exclusive fullscreen mode.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowFullscreenMode

      @Pointer public ISDL_DisplayMode getWindowFullscreenMode(@Nullable @Nullable SDL_Window window)
      Query the display mode to use when a window is visible at fullscreen.
      Parameters:
      window - the window to query.
      Returns:
      a pointer to the exclusive fullscreen mode to use or NULL for borderless fullscreen desktop mode.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowICCProfile

      @Pointer(comment="void*") public MemorySegment getWindowICCProfile(@Nullable @Nullable SDL_Window window, @Nullable @Nullable PointerPtr size)
      Get the raw ICC profile data for the screen the window is currently on.
      Parameters:
      window - the window to query.
      size - the size of the ICC profile.
      Returns:
      the raw ICC profile data on success or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • getWindowPixelFormat

      @EnumType(SDL_PixelFormat.class) public int getWindowPixelFormat(@Nullable @Nullable SDL_Window window)
      Get the pixel format associated with the window.
      Parameters:
      window - the window to query.
      Returns:
      the pixel format of the window on success or SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getWindows

      @Pointer public SDL_Window.Ptr getWindows(@Nullable @Nullable IntPtr count)
      Get a list of valid windows.
      Parameters:
      count - a pointer filled in with the number of windows returned, may be NULL.
      Returns:
      a NULL terminated array of SDL_Window pointers or NULL on failure; call SDL_GetError() for more information. This is a single allocation that should be freed with SDL_free() when it is no longer needed.
      Since:
      This function is available since SDL 3.2.0.
    • createWindow

      public SDL_Window createWindow(@Nullable @Nullable BytePtr title, int w, int h, @EnumType(SDL_WindowFlags.class) long flags)

      Create a window with the specified dimensions and flags.

      The window size is a request and may be different than expected based on the desktop layout and window manager policies. Your application should be prepared to handle a window of any size.

      flags may be any of the following OR'd together:

      • SDL_WINDOW_FULLSCREEN: fullscreen window at desktop resolution
      • SDL_WINDOW_OPENGL: window usable with an OpenGL context
      • SDL_WINDOW_OCCLUDED: window partially or completely obscured by another window
      • SDL_WINDOW_HIDDEN: window is not visible
      • SDL_WINDOW_BORDERLESS: no window decoration
      • SDL_WINDOW_RESIZABLE: window can be resized
      • SDL_WINDOW_MINIMIZED: window is minimized
      • SDL_WINDOW_MAXIMIZED: window is maximized
      • SDL_WINDOW_MOUSE_GRABBED: window has grabbed mouse focus
      • SDL_WINDOW_INPUT_FOCUS: window has input focus
      • SDL_WINDOW_MOUSE_FOCUS: window has mouse focus
      • SDL_WINDOW_EXTERNAL: window not created by SDL
      • SDL_WINDOW_MODAL: window is modal
      • SDL_WINDOW_HIGH_PIXEL_DENSITY: window uses high pixel density back buffer if possible
      • SDL_WINDOW_MOUSE_CAPTURE: window has mouse captured (unrelated to MOUSE_GRABBED)
      • SDL_WINDOW_ALWAYS_ON_TOP: window should always be above others
      • SDL_WINDOW_UTILITY: window should be treated as a utility window, not showing in the task bar and window list
      • SDL_WINDOW_TOOLTIP: window should be treated as a tooltip and does not get mouse or keyboard focus, requires a parent window
      • SDL_WINDOW_POPUP_MENU: window should be treated as a popup menu, requires a parent window
      • SDL_WINDOW_KEYBOARD_GRABBED: window has grabbed keyboard input
      • SDL_WINDOW_VULKAN: window usable with a Vulkan instance
      • SDL_WINDOW_METAL: window usable with a Metal instance
      • SDL_WINDOW_TRANSPARENT: window with transparent buffer
      • SDL_WINDOW_NOT_FOCUSABLE: window should not be focusable

      The SDL_Window is implicitly shown if SDL_WINDOW_HIDDEN is not set.

      On Apple's macOS, you must set the NSHighResolutionCapable Info.plist property to YES, otherwise you will not receive a High-DPI OpenGL canvas.

      The window pixel size may differ from its window coordinate size if the window is on a high pixel density display. Use SDL_GetWindowSize() to query the client area's size in window coordinates, and SDL_GetWindowSizeInPixels() or SDL_GetRenderOutputSize() to query the drawable size in pixels. Note that the drawable size can vary after the window is created and should be queried again if you get an SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event.

      If the window is created with any of the SDL_WINDOW_OPENGL or SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the corresponding UnloadLibrary function is called by SDL_DestroyWindow().

      If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver, SDL_CreateWindow() will fail, because SDL_Vulkan_LoadLibrary() will fail.

      If SDL_WINDOW_METAL is specified on an OS that does not support Metal, SDL_CreateWindow() will fail.

      If you intend to use this window with an SDL_Renderer, you should use SDL_CreateWindowAndRenderer() instead of this function, to avoid window flicker.

      On non-Apple devices, SDL requires you to either not link to the Vulkan loader or link to a dynamic library version. This limitation may be removed in a future version of SDL.

      Parameters:
      title - the title of the window, in UTF-8 encoding.
      w - the width of the window.
      h - the height of the window.
      flags - 0, or one or more SDL_WindowFlags OR'd together.
      Returns:
      the window that was created or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createPopupWindow

      public SDL_Window createPopupWindow(@Nullable @Nullable SDL_Window parent, int offset_x, int offset_y, int w, int h, @EnumType(SDL_WindowFlags.class) long flags)

      Create a child popup window of the specified parent window.

      The window size is a request and may be different than expected based on the desktop layout and window manager policies. Your application should be prepared to handle a window of any size.

      The flags parameter must contain at least one of the following:

      • SDL_WINDOW_TOOLTIP: The popup window is a tooltip and will not pass any input events.
      • SDL_WINDOW_POPUP_MENU: The popup window is a popup menu. The topmost popup menu will implicitly gain the keyboard focus.

      The following flags are not relevant to popup window creation and will be ignored:

      • SDL_WINDOW_MINIMIZED
      • SDL_WINDOW_MAXIMIZED
      • SDL_WINDOW_FULLSCREEN
      • SDL_WINDOW_BORDERLESS

      The following flags are incompatible with popup window creation and will cause it to fail:

      • SDL_WINDOW_UTILITY
      • SDL_WINDOW_MODAL

      The parent parameter must be non-null and a valid window. The parent of a popup window can be either a regular, toplevel window, or another popup window.

      Popup windows cannot be minimized, maximized, made fullscreen, raised, flash, be made a modal window, be the parent of a toplevel window, or grab the mouse and/or keyboard. Attempts to do so will fail.

      Popup windows implicitly do not have a border/decorations and do not appear on the taskbar/dock or in lists of windows such as alt-tab menus.

      If a parent window is hidden or destroyed, any child popup windows will be recursively hidden or destroyed as well. Child popup windows not explicitly hidden will be restored when the parent is shown.

      Parameters:
      parent - the parent of the window, must not be NULL.
      offset_x - the x position of the popup window relative to the origin of the parent.
      offset_y - the y position of the popup window relative to the origin of the parent window.
      w - the width of the window.
      h - the height of the window.
      flags - SDL_WINDOW_TOOLTIP or SDL_WINDOW_POPUP_MENU, and zero or more additional SDL_WindowFlags OR'd together.
      Returns:
      the window that was created or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • createWindowWithProperties

      public SDL_Window createWindowWithProperties(@NativeType("SDL_PropertiesID") @Unsigned int props)

      Create a window with the specified properties.

      The window size is a request and may be different than expected based on the desktop layout and window manager policies. Your application should be prepared to handle a window of any size.

      These are the supported properties:

      • SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN: true if the window should be always on top
      • SDL_PROP_WINDOW_CREATE_BORDERLESS_BOOLEAN: true if the window has no window decoration
      • SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN: true if the window will be used with an externally managed graphics context.
      • SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN: true if the window should accept keyboard input (defaults true)
      • SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN: true if the window should start in fullscreen mode at desktop resolution
      • SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER: the height of the window
      • SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN: true if the window should start hidden
      • SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN: true if the window uses a high pixel density buffer if possible
      • SDL_PROP_WINDOW_CREATE_MAXIMIZED_BOOLEAN: true if the window should start maximized
      • SDL_PROP_WINDOW_CREATE_MENU_BOOLEAN: true if the window is a popup menu
      • SDL_PROP_WINDOW_CREATE_METAL_BOOLEAN: true if the window will be used with Metal rendering
      • SDL_PROP_WINDOW_CREATE_MINIMIZED_BOOLEAN: true if the window should start minimized
      • SDL_PROP_WINDOW_CREATE_MODAL_BOOLEAN: true if the window is modal to its parent
      • SDL_PROP_WINDOW_CREATE_MOUSE_GRABBED_BOOLEAN: true if the window starts with grabbed mouse focus
      • SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN: true if the window will be used with OpenGL rendering
      • SDL_PROP_WINDOW_CREATE_PARENT_POINTER: an SDL_Window that will be the parent of this window, required for windows with the "tooltip", "menu", and "modal" properties
      • SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN: true if the window should be resizable
      • SDL_PROP_WINDOW_CREATE_TITLE_STRING: the title of the window, in UTF-8 encoding
      • SDL_PROP_WINDOW_CREATE_TRANSPARENT_BOOLEAN: true if the window show transparent in the areas with alpha of 0
      • SDL_PROP_WINDOW_CREATE_TOOLTIP_BOOLEAN: true if the window is a tooltip
      • SDL_PROP_WINDOW_CREATE_UTILITY_BOOLEAN: true if the window is a utility window, not showing in the task bar and window list
      • SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN: true if the window will be used with Vulkan rendering
      • SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER: the width of the window
      • SDL_PROP_WINDOW_CREATE_X_NUMBER: the x position of the window, or SDL_WINDOWPOS_CENTERED, defaults to SDL_WINDOWPOS_UNDEFINED. This is relative to the parent for windows with the "tooltip" or "menu" property set.
      • SDL_PROP_WINDOW_CREATE_Y_NUMBER: the y position of the window, or SDL_WINDOWPOS_CENTERED, defaults to SDL_WINDOWPOS_UNDEFINED. This is relative to the parent for windows with the "tooltip" or "menu" property set.

      These are additional supported properties on macOS:

      • SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER: the (__unsafe_unretained) NSWindow associated with the window, if you want to wrap an existing window.
      • SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER: the (__unsafe_unretained) NSView associated with the window, defaults to [window contentView]

      These are additional supported properties on Wayland:

      • SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN - true if the application wants to use the Wayland surface for a custom role and does not want it attached to an XDG toplevel window. See README/wayland for more information on using custom surfaces.
      • SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN - true if the application wants an associated wl_egl_window object to be created and attached to the window, even if the window does not have the OpenGL property or SDL_WINDOW_OPENGL flag set.
      • SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER - the wl_surface associated with the window, if you want to wrap an existing window. See README/wayland for more information.

      These are additional supported properties on Windows:

      • SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER: the HWND associated with the window, if you want to wrap an existing window.
      • SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER: optional, another window to share pixel format with, useful for OpenGL windows

      These are additional supported properties with X11:

      • SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER: the X11 Window associated with the window, if you want to wrap an existing window.

      The window is implicitly shown if the "hidden" property is not set.

      Windows with the "tooltip" and "menu" properties are popup windows and have the behaviors and guidelines outlined in SDL_CreatePopupWindow().

      If this window is being created to be used with an SDL_Renderer, you should not add a graphics API specific property (SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN, etc), as SDL will handle that internally when it chooses a renderer. However, SDL might need to recreate your window at that point, which may cause the window to appear briefly, and then flicker as it is recreated. The correct approach to this is to create the window with the SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN property set to true, then create the renderer, then show the window with SDL_ShowWindow().

      Parameters:
      props - the properties to use.
      Returns:
      the window that was created or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowID

      @NativeType("SDL_WindowID") @Unsigned public int getWindowID(@Nullable @Nullable SDL_Window window)

      Get the numeric ID of a window.

      The numeric ID is what SDL_WindowEvent references, and is necessary to map these events to specific SDL_Window objects.

      Parameters:
      window - the window to query.
      Returns:
      the ID of the window on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowFromID

      public SDL_Window getWindowFromID(@NativeType("SDL_WindowID") @Unsigned int id)

      Get a window from a stored ID.

      The numeric ID is what SDL_WindowEvent references, and is necessary to map these events to specific SDL_Window objects.

      Parameters:
      id - the ID of the window.
      Returns:
      the window associated with id or NULL if it doesn't exist; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowParent

      public SDL_Window getWindowParent(@Nullable @Nullable SDL_Window window)
      Get parent of a window.
      Parameters:
      window - the window to query.
      Returns:
      the parent of the window on success or NULL if the window has no parent.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowProperties

      @NativeType("SDL_PropertiesID") @Unsigned public int getWindowProperties(@Nullable @Nullable SDL_Window window)

      Get the properties associated with a window.

      The following read-only properties are provided by SDL:

      • SDL_PROP_WINDOW_SHAPE_POINTER: the surface associated with a shaped window
      • SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN: true if the window has HDR headroom above the SDR white point. This property can change dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
      • SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT: the value of SDR white in the SDL_COLORSPACE_SRGB_LINEAR colorspace. On Windows this corresponds to the SDR white level in scRGB colorspace, and on Apple platforms this is always 1.0 for EDR content. This property can change dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.
      • SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT: the additional high dynamic range that can be displayed, in terms of the SDR white point. When HDR is not enabled, this will be 1.0. This property can change dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.

      On Android:

      • SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER: the ANativeWindow associated with the window
      • SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER: the EGLSurface associated with the window

      On iOS:

      • SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER: the (__unsafe_unretained) UIWindow associated with the window
      • SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER: the NSInteger tag associated with metal views on the window
      • SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER: the OpenGL view's framebuffer object. It must be bound when rendering to the screen using OpenGL.
      • SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER: the OpenGL view's renderbuffer object. It must be bound when SDL_GL_SwapWindow is called.
      • SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER: the OpenGL view's resolve framebuffer, when MSAA is used.

      On KMS/DRM:

      • SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER: the device index associated with the window (e.g. the X in /dev/dri/cardX)
      • SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER: the DRM FD associated with the window
      • SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER: the GBM device associated with the window

      On macOS:

      • SDL_PROP_WINDOW_COCOA_WINDOW_POINTER: the (__unsafe_unretained) NSWindow associated with the window
      • SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER: the NSInteger tag assocated with metal views on the window

      On OpenVR:

      • SDL_PROP_WINDOW_OPENVR_OVERLAY_ID: the OpenVR Overlay Handle ID for the associated overlay window.

      On Vivante:

      • SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER: the EGLNativeDisplayType associated with the window
      • SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER: the EGLNativeWindowType associated with the window
      • SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER: the EGLSurface associated with the window

      On Windows:

      • SDL_PROP_WINDOW_WIN32_HWND_POINTER: the HWND associated with the window
      • SDL_PROP_WINDOW_WIN32_HDC_POINTER: the HDC associated with the window
      • SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER: the HINSTANCE associated with the window

      On Wayland:

      Note: The xdg_* window objects do not internally persist across window show/hide calls. They will be null if the window is hidden and must be queried each time it is shown.

      • SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER: the wl_display associated with the window
      • SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER: the wl_surface associated with the window
      • SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER: the wp_viewport associated with the window
      • SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER: the wl_egl_window associated with the window
      • SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER: the xdg_surface associated with the window
      • SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER: the xdg_toplevel role associated with the window
      • 'SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING': the export handle associated with the window
      • SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER: the xdg_popup role associated with the window
      • SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER: the xdg_positioner associated with the window, in popup mode

      On X11:

      • SDL_PROP_WINDOW_X11_DISPLAY_POINTER: the X11 Display associated with the window
      • SDL_PROP_WINDOW_X11_SCREEN_NUMBER: the screen number associated with the window
      • SDL_PROP_WINDOW_X11_WINDOW_NUMBER: the X11 Window associated with the window
      Parameters:
      window - the window to query.
      Returns:
      a valid property ID on success or 0 on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • getWindowFlags

    • setWindowTitle

      @NativeType("boolean") public boolean setWindowTitle(@Nullable @Nullable SDL_Window window, @Nullable @Nullable BytePtr title)

      Set the title of a window.

      This string is expected to be in UTF-8 encoding.

      Parameters:
      window - the window to change.
      title - the desired window title in UTF-8 format.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowTitle

      public BytePtr getWindowTitle(@Nullable @Nullable SDL_Window window)
      Get the title of a window.
      Parameters:
      window - the window to query.
      Returns:
      the title of the window in UTF-8 format or "" if there is no title.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowIcon

      @NativeType("boolean") public boolean setWindowIcon(@Nullable @Nullable SDL_Window window, @Nullable @Nullable SDL_Surface icon)

      Set the icon for a window.

      If this function is passed a surface with alternate representations, the surface will be interpreted as the content to be used for 100% display scale, and the alternate representations will be used for high DPI situations. For example, if the original surface is 32x32, then on a 2x macOS display or 200% display scale on Windows, a 64x64 version of the image will be used, if available. If a matching version of the image isn't available, the closest larger size image will be downscaled to the appropriate size and be used instead, if available. Otherwise, the closest smaller image will be upscaled and be used instead.

      Parameters:
      window - the window to change.
      icon - an SDL_Surface structure containing the icon for the window.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setWindowPosition

      @NativeType("boolean") public boolean setWindowPosition(@Nullable @Nullable SDL_Window window, int x, int y)

      Request that the window's position be set.

      If the window is in an exclusive fullscreen or maximized state, this request has no effect.

      This can be used to reposition fullscreen-desktop windows onto a different display, however, as exclusive fullscreen windows are locked to a specific display, they can only be repositioned programmatically via SDL_SetWindowFullscreenMode().

      On some windowing systems this request is asynchronous and the new coordinates may not have have been applied immediately upon the return of this function. If an immediate change is required, call SDL_SyncWindow() to block until the changes have taken effect.

      When the window position changes, an SDL_EVENT_WINDOW_MOVED event will be emitted with the window's new coordinates. Note that the new coordinates may not match the exact coordinates requested, as some windowing systems can restrict the position of the window in certain scenarios (e.g. constraining the position so the window is always within desktop bounds). Additionally, as this is just a request, it can be denied by the windowing system.

      Parameters:
      window - the window to reposition.
      x - the x coordinate of the window, or SDL_WINDOWPOS_CENTERED or SDL_WINDOWPOS_UNDEFINED.
      y - the y coordinate of the window, or SDL_WINDOWPOS_CENTERED or SDL_WINDOWPOS_UNDEFINED.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowPosition

      @NativeType("boolean") public boolean getWindowPosition(@Nullable @Nullable SDL_Window window, @Nullable @Nullable IntPtr x, @Nullable @Nullable IntPtr y)

      Get the position of a window.

      This is the current position of the window as last reported by the windowing system.

      If you do not need the value for one of the positions a NULL may be passed in the x or y parameter.

      Parameters:
      window - the window to query.
      x - a pointer filled in with the x position of the window, may be NULL.
      y - a pointer filled in with the y position of the window, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowSize

      @NativeType("boolean") public boolean setWindowSize(@Nullable @Nullable SDL_Window window, int w, int h)

      Request that the size of a window's client area be set.

      If the window is in a fullscreen or maximized state, this request has no effect.

      To change the exclusive fullscreen mode of a window, use SDL_SetWindowFullscreenMode().

      On some windowing systems, this request is asynchronous and the new window size may not have have been applied immediately upon the return of this function. If an immediate change is required, call SDL_SyncWindow() to block until the changes have taken effect.

      When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be emitted with the new window dimensions. Note that the new dimensions may not match the exact size requested, as some windowing systems can restrict the window size in certain scenarios (e.g. constraining the size of the content area to remain within the usable desktop bounds). Additionally, as this is just a request, it can be denied by the windowing system.

      Parameters:
      window - the window to change.
      w - the width of the window, must be > 0.
      h - the height of the window, must be > 0.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowSize

      @NativeType("boolean") public boolean getWindowSize(@Nullable @Nullable SDL_Window window, @Nullable @Nullable IntPtr w, @Nullable @Nullable IntPtr h)

      Get the size of a window's client area.

      The window pixel size may differ from its window coordinate size if the window is on a high pixel density display. Use SDL_GetWindowSizeInPixels() or SDL_GetRenderOutputSize() to get the real client area size in pixels.

      Parameters:
      window - the window to query the width and height from.
      w - a pointer filled in with the width of the window, may be NULL.
      h - a pointer filled in with the height of the window, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowSafeArea

      @NativeType("boolean") public boolean getWindowSafeArea(@Nullable @Nullable SDL_Window window, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Get the safe area for this window.

      Some devices have portions of the screen which are partially obscured or not interactive, possibly due to on-screen controls, curved edges, camera notches, TV overscan, etc. This function provides the area of the window which is safe to have interactable content. You should continue rendering into the rest of the window, but it should not contain visually important or interactible content.

      Parameters:
      window - the window to query.
      rect - a pointer filled in with the client area that is safe for interactive content.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setWindowAspectRatio

      @NativeType("boolean") public boolean setWindowAspectRatio(@Nullable @Nullable SDL_Window window, float min_aspect, float max_aspect)

      Request that the aspect ratio of a window's client area be set.

      The aspect ratio is the ratio of width divided by height, e.g. 2560x1600 would be 1.6. Larger aspect ratios are wider and smaller aspect ratios are narrower.

      If, at the time of this request, the window in a fixed-size state, such as maximized or fullscreen, the request will be deferred until the window exits this state and becomes resizable again.

      On some windowing systems, this request is asynchronous and the new window aspect ratio may not have have been applied immediately upon the return of this function. If an immediate change is required, call SDL_SyncWindow() to block until the changes have taken effect.

      When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be emitted with the new window dimensions. Note that the new dimensions may not match the exact aspect ratio requested, as some windowing systems can restrict the window size in certain scenarios (e.g. constraining the size of the content area to remain within the usable desktop bounds). Additionally, as this is just a request, it can be denied by the windowing system.

      Parameters:
      window - the window to change.
      min_aspect - the minimum aspect ratio of the window, or 0.0f for no limit.
      max_aspect - the maximum aspect ratio of the window, or 0.0f for no limit.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowAspectRatio

      @NativeType("boolean") public boolean getWindowAspectRatio(@Nullable @Nullable SDL_Window window, @Nullable @Nullable FloatPtr min_aspect, @Nullable @Nullable FloatPtr max_aspect)
      Get the size of a window's client area.
      Parameters:
      window - the window to query the width and height from.
      min_aspect - a pointer filled in with the minimum aspect ratio of the window, may be NULL.
      max_aspect - a pointer filled in with the maximum aspect ratio of the window, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowBordersSize

      @NativeType("boolean") public boolean getWindowBordersSize(@Nullable @Nullable SDL_Window window, @Nullable @Nullable IntPtr top, @Nullable @Nullable IntPtr left, @Nullable @Nullable IntPtr bottom, @Nullable @Nullable IntPtr right)

      Get the size of a window's borders (decorations) around the client area.

      Note: If this function fails (returns false), the size values will be initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the window in question was borderless.

      Note: This function may fail on systems where the window has not yet been decorated by the display server (for example, immediately after calling SDL_CreateWindow). It is recommended that you wait at least until the window has been presented and composited, so that the window system has a chance to decorate the window and provide the border dimensions to SDL.

      This function also returns false if getting the information is not supported.

      Parameters:
      window - the window to query the size values of the border (decorations) from.
      top - pointer to variable for storing the size of the top border; NULL is permitted.
      left - pointer to variable for storing the size of the left border; NULL is permitted.
      bottom - pointer to variable for storing the size of the bottom border; NULL is permitted.
      right - pointer to variable for storing the size of the right border; NULL is permitted.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowSizeInPixels

      @NativeType("boolean") public boolean getWindowSizeInPixels(@Nullable @Nullable SDL_Window window, @Nullable @Nullable IntPtr w, @Nullable @Nullable IntPtr h)
      Get the size of a window's client area, in pixels.
      Parameters:
      window - the window from which the drawable size should be queried.
      w - a pointer to variable for storing the width in pixels, may be NULL.
      h - a pointer to variable for storing the height in pixels, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowMinimumSize

      @NativeType("boolean") public boolean setWindowMinimumSize(@Nullable @Nullable SDL_Window window, int min_w, int min_h)
      Set the minimum size of a window's client area.
      Parameters:
      window - the window to change.
      min_w - the minimum width of the window, or 0 for no limit.
      min_h - the minimum height of the window, or 0 for no limit.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowMinimumSize

      @NativeType("boolean") public boolean getWindowMinimumSize(@Nullable @Nullable SDL_Window window, @Nullable @Nullable IntPtr w, @Nullable @Nullable IntPtr h)
      Get the minimum size of a window's client area.
      Parameters:
      window - the window to query.
      w - a pointer filled in with the minimum width of the window, may be NULL.
      h - a pointer filled in with the minimum height of the window, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowMaximumSize

      @NativeType("boolean") public boolean setWindowMaximumSize(@Nullable @Nullable SDL_Window window, int max_w, int max_h)
      Set the maximum size of a window's client area.
      Parameters:
      window - the window to change.
      max_w - the maximum width of the window, or 0 for no limit.
      max_h - the maximum height of the window, or 0 for no limit.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowMaximumSize

      @NativeType("boolean") public boolean getWindowMaximumSize(@Nullable @Nullable SDL_Window window, @Nullable @Nullable IntPtr w, @Nullable @Nullable IntPtr h)
      Get the maximum size of a window's client area.
      Parameters:
      window - the window to query.
      w - a pointer filled in with the maximum width of the window, may be NULL.
      h - a pointer filled in with the maximum height of the window, may be NULL.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowBordered

      @NativeType("boolean") public boolean setWindowBordered(@Nullable @Nullable SDL_Window window, @NativeType("boolean") boolean bordered)

      Set the border state of a window.

      This will add or remove the window's SDL_WINDOW_BORDERLESS flag and add or remove the border from the actual window. This is a no-op if the window's border already matches the requested state.

      You can't change the border state of a fullscreen window.

      Parameters:
      window - the window of which to change the border state.
      bordered - false to remove border, true to add border.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowResizable

      @NativeType("boolean") public boolean setWindowResizable(@Nullable @Nullable SDL_Window window, @NativeType("boolean") boolean resizable)

      Set the user-resizable state of a window.

      This will add or remove the window's SDL_WINDOW_RESIZABLE flag and allow/disallow user resizing of the window. This is a no-op if the window's resizable state already matches the requested state.

      You can't change the resizable state of a fullscreen window.

      Parameters:
      window - the window of which to change the resizable state.
      resizable - true to allow resizing, false to disallow.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowAlwaysOnTop

      @NativeType("boolean") public boolean setWindowAlwaysOnTop(@Nullable @Nullable SDL_Window window, @NativeType("boolean") boolean on_top)

      Set the window to always be above the others.

      This will add or remove the window's SDL_WINDOW_ALWAYS_ON_TOP flag. This will bring the window to the front and keep the window above the rest.

      Parameters:
      window - the window of which to change the always on top state.
      on_top - true to set the window always on top, false to disable.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • showWindow

      @NativeType("boolean") public boolean showWindow(@Nullable @Nullable SDL_Window window)
      Show a window.
      Parameters:
      window - the window to show.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • hideWindow

      @NativeType("boolean") public boolean hideWindow(@Nullable @Nullable SDL_Window window)
      Hide a window.
      Parameters:
      window - the window to hide.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • raiseWindow

      @NativeType("boolean") public boolean raiseWindow(@Nullable @Nullable SDL_Window window)

      Request that a window be raised above other windows and gain the input focus.

      The result of this request is subject to desktop window manager policy, particularly if raising the requested window would result in stealing focus from another application. If the window is successfully raised and gains input focus, an SDL_EVENT_WINDOW_FOCUS_GAINED event will be emitted, and the window will have the SDL_WINDOW_INPUT_FOCUS flag set.

      Parameters:
      window - the window to raise.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • maximizeWindow

      @NativeType("boolean") public boolean maximizeWindow(@Nullable @Nullable SDL_Window window)

      Request that the window be made as large as possible.

      Non-resizable windows can't be maximized. The window must have the SDL_WINDOW_RESIZABLE flag set, or this will have no effect.

      On some windowing systems this request is asynchronous and the new window state may not have have been applied immediately upon the return of this function. If an immediate change is required, call SDL_SyncWindow() to block until the changes have taken effect.

      When the window state changes, an SDL_EVENT_WINDOW_MAXIMIZED event will be emitted. Note that, as this is just a request, the windowing system can deny the state change.

      When maximizing a window, whether the constraints set via SDL_SetWindowMaximumSize() are honored depends on the policy of the window manager. Win32 and macOS enforce the constraints when maximizing, while X11 and Wayland window managers may vary.

      Parameters:
      window - the window to maximize.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • minimizeWindow

      @NativeType("boolean") public boolean minimizeWindow(@Nullable @Nullable SDL_Window window)

      Request that the window be minimized to an iconic representation.

      If the window is in a fullscreen state, this request has no direct effect. It may alter the state the window is returned to when leaving fullscreen.

      On some windowing systems this request is asynchronous and the new window state may not have been applied immediately upon the return of this function. If an immediate change is required, call SDL_SyncWindow() to block until the changes have taken effect.

      When the window state changes, an SDL_EVENT_WINDOW_MINIMIZED event will be emitted. Note that, as this is just a request, the windowing system can deny the state change.

      Parameters:
      window - the window to minimize.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • restoreWindow

      @NativeType("boolean") public boolean restoreWindow(@Nullable @Nullable SDL_Window window)

      Request that the size and position of a minimized or maximized window be restored.

      If the window is in a fullscreen state, this request has no direct effect. It may alter the state the window is returned to when leaving fullscreen.

      On some windowing systems this request is asynchronous and the new window state may not have have been applied immediately upon the return of this function. If an immediate change is required, call SDL_SyncWindow() to block until the changes have taken effect.

      When the window state changes, an SDL_EVENT_WINDOW_RESTORED event will be emitted. Note that, as this is just a request, the windowing system can deny the state change.

      Parameters:
      window - the window to restore.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowFullscreen

      @NativeType("boolean") public boolean setWindowFullscreen(@Nullable @Nullable SDL_Window window, @NativeType("boolean") boolean fullscreen)

      Request that the window's fullscreen state be changed.

      By default a window in fullscreen state uses borderless fullscreen desktop mode, but a specific exclusive display mode can be set using SDL_SetWindowFullscreenMode().

      On some windowing systems this request is asynchronous and the new fullscreen state may not have have been applied immediately upon the return of this function. If an immediate change is required, call SDL_SyncWindow() to block until the changes have taken effect.

      When the window state changes, an SDL_EVENT_WINDOW_ENTER_FULLSCREEN or SDL_EVENT_WINDOW_LEAVE_FULLSCREEN event will be emitted. Note that, as this is just a request, it can be denied by the windowing system.

      Parameters:
      window - the window to change.
      fullscreen - true for fullscreen mode, false for windowed mode.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • syncWindow

      @NativeType("boolean") public boolean syncWindow(@Nullable @Nullable SDL_Window window)

      Block until any pending window state is finalized.

      On asynchronous windowing systems, this acts as a synchronization barrier for pending window state. It will attempt to wait until any pending window state has been applied and is guaranteed to return within finite time. Note that for how long it can potentially block depends on the underlying window system, as window state changes may involve somewhat lengthy animations that must complete before the window is in its final requested state.

      On windowing systems where changes are immediate, this does nothing.

      Parameters:
      window - the window for which to wait for the pending state to be applied.
      Returns:
      true on success or false if the operation timed out before the window was in the requested state.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • windowHasSurface

      @NativeType("boolean") public boolean windowHasSurface(@Nullable @Nullable SDL_Window window)
      Return whether the window has a surface associated with it.
      Parameters:
      window - the window to query.
      Returns:
      true if there is a surface associated with the window, or false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowSurface

      public SDL_Surface getWindowSurface(@Nullable @Nullable SDL_Window window)

      Get the SDL surface associated with the window.

      A new surface will be created with the optimal format for the window, if necessary. This surface will be freed when the window is destroyed. Do not free this surface.

      This surface will be invalidated if the window is resized. After resizing a window this function must be called again to return a valid surface.

      You may not combine this with 3D or the rendering API on this window.

      This function is affected by SDL_HINT_FRAMEBUFFER_ACCELERATION.

      Parameters:
      window - the window to query.
      Returns:
      the surface associated with the window, or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowSurfaceVSync

      @NativeType("boolean") public boolean setWindowSurfaceVSync(@Nullable @Nullable SDL_Window window, int vsync)

      Toggle VSync for the window surface.

      When a window surface is created, vsync defaults to SDL_WINDOW_SURFACE_VSYNC_DISABLED.

      The vsync parameter can be 1 to synchronize present with every vertical refresh, 2 to synchronize present with every second vertical refresh, etc., SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), or SDL_WINDOW_SURFACE_VSYNC_DISABLED to disable. Not every value is supported by every driver, so you should check the return value to see whether the requested setting is supported.

      Parameters:
      window - the window.
      vsync - the vertical refresh sync interval.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowSurfaceVSync

      @NativeType("boolean") public boolean getWindowSurfaceVSync(@Nullable @Nullable SDL_Window window, @Nullable @Nullable IntPtr vsync)
      Get VSync for the window surface.
      Parameters:
      window - the window to query.
      vsync - an int filled with the current vertical refresh sync interval. See SDL_SetWindowSurfaceVSync() for the meaning of the value.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • updateWindowSurface

      @NativeType("boolean") public boolean updateWindowSurface(@Nullable @Nullable SDL_Window window)

      Copy the window surface to the screen.

      This is the function you use to reflect any changes to the surface on the screen.

      This function is equivalent to the SDL 1.2 API SDL_Flip().

      Parameters:
      window - the window to update.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • updateWindowSurfaceRects

      @NativeType("boolean") public boolean updateWindowSurfaceRects(@Nullable @Nullable SDL_Window window, @Nullable @Pointer @Nullable ISDL_Rect rects, int numrects)

      Copy areas of the window surface to the screen.

      This is the function you use to reflect changes to portions of the surface on the screen.

      This function is equivalent to the SDL 1.2 API SDL_UpdateRects().

      Note that this function will update at least the rectangles specified, but this is only intended as an optimization; in practice, this might update more of the screen (or all of the screen!), depending on what method SDL uses to send pixels to the system.

      Parameters:
      window - the window to update.
      rects - an array of SDL_Rect structures representing areas of the surface to copy, in pixels.
      numrects - the number of rectangles.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • destroyWindowSurface

      @NativeType("boolean") public boolean destroyWindowSurface(@Nullable @Nullable SDL_Window window)
      Destroy the surface associated with the window.
      Parameters:
      window - the window to update.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowKeyboardGrab

      @NativeType("boolean") public boolean setWindowKeyboardGrab(@Nullable @Nullable SDL_Window window, @NativeType("boolean") boolean grabbed)

      Set a window's keyboard grab mode.

      Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or the Meta/Super key. Note that not all system keyboard shortcuts can be captured by applications (one example is Ctrl+Alt+Del on Windows).

      This is primarily intended for specialized applications such as VNC clients or VM frontends. Normal games should not use keyboard grab.

      When keyboard grab is enabled, SDL will continue to handle Alt+Tab when the window is full-screen to ensure the user is not trapped in your application. If you have a custom keyboard shortcut to exit fullscreen mode, you may suppress this behavior with SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED.

      If the caller enables a grab while another window is currently grabbed, the other window loses its grab in favor of the caller's window.

      Parameters:
      window - the window for which the keyboard grab mode should be set.
      grabbed - this is true to grab keyboard, and false to release.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowMouseGrab

      @NativeType("boolean") public boolean setWindowMouseGrab(@Nullable @Nullable SDL_Window window, @NativeType("boolean") boolean grabbed)

      Set a window's mouse grab mode.

      Mouse grab confines the mouse cursor to the window.

      Parameters:
      window - the window for which the mouse grab mode should be set.
      grabbed - this is true to grab mouse, and false to release.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowKeyboardGrab

      @NativeType("boolean") public boolean getWindowKeyboardGrab(@Nullable @Nullable SDL_Window window)
      Get a window's keyboard grab mode.
      Parameters:
      window - the window to query.
      Returns:
      true if keyboard is grabbed, and false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowMouseGrab

      @NativeType("boolean") public boolean getWindowMouseGrab(@Nullable @Nullable SDL_Window window)
      Get a window's mouse grab mode.
      Parameters:
      window - the window to query.
      Returns:
      true if mouse is grabbed, and false otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getGrabbedWindow

      public SDL_Window getGrabbedWindow()
      Get the window that currently has an input grab enabled.
      Returns:
      the window if input is grabbed or NULL otherwise.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowMouseRect

      @NativeType("boolean") public boolean setWindowMouseRect(@Nullable @Nullable SDL_Window window, @Nullable @Pointer @Nullable ISDL_Rect rect)

      Confines the cursor to the specified area of a window.

      Note that this does NOT grab the cursor, it only defines the area a cursor is restricted to when the window has mouse focus.

      Parameters:
      window - the window that will be associated with the barrier.
      rect - a rectangle area in window-relative coordinates. If NULL the barrier for the specified window will be destroyed.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowMouseRect

      @Pointer public ISDL_Rect getWindowMouseRect(@Nullable @Nullable SDL_Window window)
      Get the mouse confinement rectangle of a window.
      Parameters:
      window - the window to query.
      Returns:
      a pointer to the mouse confinement rectangle of a window, or NULL if there isn't one.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowOpacity

      @NativeType("boolean") public boolean setWindowOpacity(@Nullable @Nullable SDL_Window window, float opacity)

      Set the opacity for a window.

      The parameter opacity will be clamped internally between 0.0f (transparent) and 1.0f (opaque).

      This function also returns false if setting the opacity isn't supported.

      Parameters:
      window - the window which will be made transparent or opaque.
      opacity - the opacity value (0.0f - transparent, 1.0f - opaque).
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • getWindowOpacity

      public float getWindowOpacity(@Nullable @Nullable SDL_Window window)

      Get the opacity of a window.

      If transparency isn't supported on this platform, opacity will be returned as 1.0f without error.

      Parameters:
      window - the window to get the current opacity value from.
      Returns:
      the opacity, (0.0f - transparent, 1.0f - opaque), or -1.0f on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowParent

      @NativeType("boolean") public boolean setWindowParent(@Nullable @Nullable SDL_Window window, @Nullable @Nullable SDL_Window parent)

      Set the window as a child of a parent window.

      If the window is already the child of an existing window, it will be reparented to the new owner. Setting the parent window to NULL unparents the window and removes child window status.

      If a parent window is hidden or destroyed, the operation will be recursively applied to child windows. Child windows hidden with the parent that did not have their hidden status explicitly set will be restored when the parent is shown.

      Attempting to set the parent of a window that is currently in the modal state will fail. Use SDL_SetWindowModal() to cancel the modal status before attempting to change the parent.

      Popup windows cannot change parents and attempts to do so will fail.

      Setting a parent window that is currently the sibling or descendent of the child window results in undefined behavior.

      Parameters:
      window - the window that should become the child of a parent.
      parent - the new parent window for the child window.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowModal

      @NativeType("boolean") public boolean setWindowModal(@Nullable @Nullable SDL_Window window, @NativeType("boolean") boolean modal)

      Toggle the state of the window as modal.

      To enable modal status on a window, the window must currently be the child window of a parent, or toggling modal status on will fail.

      Parameters:
      window - the window on which to set the modal state.
      modal - true to toggle modal status on, false to toggle it off.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • setWindowFocusable

      @NativeType("boolean") public boolean setWindowFocusable(@Nullable @Nullable SDL_Window window, @NativeType("boolean") boolean focusable)
      Set whether the window may have input focus.
      Parameters:
      window - the window to set focusable state.
      focusable - true to allow input focus, false to not allow input focus.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • showWindowSystemMenu

      @NativeType("boolean") public boolean showWindowSystemMenu(@Nullable @Nullable SDL_Window window, int x, int y)

      Display the system-level window menu.

      This default window menu is provided by the system and on some platforms provides functionality for setting or changing privileged state on the window, such as moving it between workspaces or displays, or toggling the always-on-top property.

      On platforms or desktops where this is unsupported, this function does nothing.

      Parameters:
      window - the window for which the menu will be displayed.
      x - the x coordinate of the menu, relative to the origin (top-left) of the client area.
      y - the y coordinate of the menu, relative to the origin (top-left) of the client area.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setWindowHitTest

      @NativeType("boolean") public boolean setWindowHitTest(@Nullable @Nullable SDL_Window window, @Pointer(comment="SDL_HitTest") MemorySegment callback, @Pointer(comment="void*") MemorySegment callback_data)

      Provide a callback that decides if a window region has special properties.

      Normally windows are dragged and resized by decorations provided by the system window manager (a title bar, borders, etc), but for some apps, it makes sense to drag them from somewhere else inside the window itself; for example, one might have a borderless window that wants to be draggable from any part, or simulate its own title bar, etc.

      This function lets the app provide a callback that designates pieces of a given window as special. This callback is run during event processing if we need to tell the OS to treat a region of the window specially; the use of this callback is known as "hit testing."

      Mouse input may not be delivered to your application if it is within a special area; the OS will often apply that input to moving the window or resizing the window and not deliver it to the application.

      Specifying NULL for a callback disables hit-testing. Hit-testing is disabled by default.

      Platforms that don't support this functionality will return false unconditionally, even if you're attempting to disable hit-testing.

      Your callback may fire at any time, and its firing does not indicate any specific behavior (for example, on Windows, this certainly might fire when the OS is deciding whether to drag your window, but it fires for lots of other reasons, too, some unrelated to anything you probably care about and when the mouse isn't actually at the location it is testing). Since this can fire at any time, you should try to keep your callback efficient, devoid of allocations, etc.

      Parameters:
      window - the window to set hit-testing on.
      callback - the function to call when doing a hit-test.
      callback_data - an app-defined void pointer passed to callback.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • setWindowShape

      @NativeType("boolean") public boolean setWindowShape(@Nullable @Nullable SDL_Window window, @Nullable @Nullable SDL_Surface shape)

      Set the shape of a transparent window.

      This sets the alpha channel of a transparent window and any fully transparent areas are also transparent to mouse clicks. If you are using something besides the SDL render API, then you are responsible for drawing the alpha channel of the window to match the shape alpha channel to get consistent cross-platform results.

      The shape is copied inside this function, so you can free it afterwards. If your shape surface changes, you should call SDL_SetWindowShape() again to update the window. This is an expensive operation, so should be done sparingly.

      The window must have been created with the SDL_WINDOW_TRANSPARENT flag.

      Parameters:
      window - the window.
      shape - the surface representing the shape of the window, or NULL to remove any current shape.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • flashWindow

      @NativeType("boolean") public boolean flashWindow(@Nullable @Nullable SDL_Window window, @EnumType(SDL_FlashOperation.class) int operation)
      Request a window to demand attention from the user.
      Parameters:
      window - the window to be flashed.
      operation - the operation to perform.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • destroyWindow

      public void destroyWindow(@Nullable @Nullable SDL_Window window)

      Destroy a window.

      Any child windows owned by the window will be recursively destroyed as well.

      Note that on some platforms, the visible window may not actually be removed from the screen until the SDL event loop is pumped again, even though the SDL_Window is no longer valid after this call.

      Parameters:
      window - the window to destroy.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • screenSaverEnabled

      @NativeType("boolean") public boolean screenSaverEnabled()

      Check whether the screensaver is currently enabled.

      The screensaver is disabled by default.

      The default can also be changed using SDL_HINT_VIDEO_ALLOW_SCREENSAVER.

      Returns:
      true if the screensaver is enabled, false if it is disabled.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • enableScreenSaver

      @NativeType("boolean") public boolean enableScreenSaver()
      Allow the screen to be blanked by a screen saver.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • disableScreenSaver

      @NativeType("boolean") public boolean disableScreenSaver()

      Prevent the screen from being blanked by a screen saver.

      If you disable the screensaver, it is automatically re-enabled when SDL quits.

      The screensaver is disabled by default, but this may by changed by SDL_HINT_VIDEO_ALLOW_SCREENSAVER.

      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_LoadLibrary

      @NativeType("boolean") public boolean GL_LoadLibrary(@Nullable @Nullable BytePtr path)

      Dynamically load an OpenGL library.

      This should be done after initializing the video driver, but before creating any OpenGL windows. If no OpenGL library is loaded, the default library will be loaded upon creation of the first OpenGL window.

      If you do this, you need to retrieve all of the GL functions used in your program from the dynamic library using SDL_GL_GetProcAddress().

      Parameters:
      path - the platform dependent OpenGL library name, or NULL to open the default OpenGL library.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_GetProcAddress

      @Pointer(comment="SDL_FunctionPointer") public MemorySegment GL_GetProcAddress(@Nullable @Nullable BytePtr proc)

      Get an OpenGL function by name.

      If the GL library is loaded at runtime with SDL_GL_LoadLibrary(), then all GL functions must be retrieved this way. Usually this is used to retrieve function pointers to OpenGL extensions.

      There are some quirks to looking up OpenGL functions that require some extra care from the application. If you code carefully, you can handle these quirks without any platform-specific code, though:

      • On Windows, function pointers are specific to the current GL context; this means you need to have created a GL context and made it current before calling SDL_GL_GetProcAddress(). If you recreate your context or create a second context, you should assume that any existing function pointers aren't valid to use with it. This is (currently) a Windows-specific limitation, and in practice lots of drivers don't suffer this limitation, but it is still the way the wgl API is documented to work and you should expect crashes if you don't respect it. Store a copy of the function pointers that comes and goes with context lifespan.
      • On X11, function pointers returned by this function are valid for any context, and can even be looked up before a context is created at all. This means that, for at least some common OpenGL implementations, if you look up a function that doesn't exist, you'll get a non-NULL result that is NOT safe to call. You must always make sure the function is actually available for a given GL context before calling it, by checking for the existence of the appropriate extension with SDL_GL_ExtensionSupported(), or verifying that the version of OpenGL you're using offers the function as core functionality.
      • Some OpenGL drivers, on all platforms, will return NULL if a function isn't supported, but you can't count on this behavior. Check for extensions you use, and if you get a NULL anyway, act as if that extension wasn't available. This is probably a bug in the driver, but you can code defensively for this scenario anyhow.
      • Just because you're on Linux/Unix, don't assume you'll be using X11. Next-gen display servers are waiting to replace it, and may or may not make the same promises about function pointers.
      • OpenGL function pointers must be declared APIENTRY as in the example code. This will ensure the proper calling convention is followed on platforms where this matters (Win32) thereby avoiding stack corruption.
      Parameters:
      proc - the name of an OpenGL function.
      Returns:
      a pointer to the named OpenGL function. The returned pointer should be cast to the appropriate function signature.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • EGL_GetProcAddress

      @Pointer(comment="SDL_FunctionPointer") public MemorySegment EGL_GetProcAddress(@Nullable @Nullable BytePtr proc)

      Get an EGL library function by name.

      If an EGL library is loaded, this function allows applications to get entry points for EGL functions. This is useful to provide to an EGL API and extension loader.

      Parameters:
      proc - the name of an EGL function.
      Returns:
      a pointer to the named EGL function. The returned pointer should be cast to the appropriate function signature.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_UnloadLibrary

      public void GL_UnloadLibrary()
      Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_ExtensionSupported

      @NativeType("boolean") public boolean GL_ExtensionSupported(@Nullable @Nullable BytePtr extension)

      Check if an OpenGL extension is supported for the current context.

      This function operates on the current GL context; you must have created a context and it must be current before calling this function. Do not assume that all contexts you create will have the same set of extensions available, or that recreating an existing context will offer the same extensions again.

      While it's probably not a massive overhead, this function is not an O(1) operation. Check the extensions you care about after creating the GL context and save that information somewhere instead of calling the function every time you need to know.

      Parameters:
      extension - the name of the extension to check.
      Returns:
      true if the extension is supported, false otherwise.
      Since:
      This function is available since SDL 3.2.0.
    • GL_ResetAttributes

      public void GL_ResetAttributes()
      Reset all previously set OpenGL context attributes to their default values.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_SetAttribute

      @NativeType("boolean") public boolean GL_SetAttribute(@EnumType(SDL_GLAttr.class) int attr, int value)

      Set an OpenGL window attribute before window creation.

      This function sets the OpenGL attribute attr to value. The requested attributes should be set before creating an OpenGL window. You should use SDL_GL_GetAttribute() to check the values after creating the OpenGL context, since the values obtained can differ from the requested ones.

      Parameters:
      attr - an SDL_GLAttr enum value specifying the OpenGL attribute to set.
      value - the desired value for the attribute.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_GetAttribute

      @NativeType("boolean") public boolean GL_GetAttribute(@EnumType(SDL_GLAttr.class) int attr, @Nullable @Nullable IntPtr value)
      Get the actual value for an attribute from the current context.
      Parameters:
      attr - an SDL_GLAttr enum value specifying the OpenGL attribute to get.
      value - a pointer filled in with the current value of attr.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_CreateContext

      public SDL_GLContext GL_CreateContext(@Nullable @Nullable SDL_Window window)

      Create an OpenGL context for an OpenGL window, and make it current.

      Windows users new to OpenGL should note that, for historical reasons, GL functions added after OpenGL version 1.1 are not available by default. Those functions must be loaded at run-time, either with an OpenGL extension-handling library or with SDL_GL_GetProcAddress() and its related functions.

      SDL_GLContext is opaque to the application.

      Parameters:
      window - the window to associate with the context.
      Returns:
      the OpenGL context associated with window or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_MakeCurrent

      @NativeType("boolean") public boolean GL_MakeCurrent(@Nullable @Nullable SDL_Window window, @Nullable @Nullable SDL_GLContext context)

      Set up an OpenGL context for rendering into an OpenGL window.

      The context must have been created with a compatible window.

      Parameters:
      window - the window to associate with the context.
      context - the OpenGL context to associate with the window.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_GetCurrentWindow

      public SDL_Window GL_GetCurrentWindow()
      Get the currently active OpenGL window.
      Returns:
      the currently active OpenGL window on success or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • GL_GetCurrentContext

      public SDL_GLContext GL_GetCurrentContext()
      Get the currently active OpenGL context.
      Returns:
      the currently active OpenGL context or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • EGL_GetCurrentDisplay

      @Pointer(comment="SDL_EGLDisplay") public MemorySegment EGL_GetCurrentDisplay()
      Get the currently active EGL display.
      Returns:
      the currently active EGL display or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • EGL_GetCurrentConfig

      @Pointer(comment="SDL_EGLConfig") public MemorySegment EGL_GetCurrentConfig()
      Get the currently active EGL config.
      Returns:
      the currently active EGL config or NULL on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • EGL_GetWindowSurface

      @Pointer(comment="SDL_EGLSurface") public MemorySegment EGL_GetWindowSurface(@Nullable @Nullable SDL_Window window)
      Get the EGL surface associated with the window.
      Parameters:
      window - the window to query.
      Returns:
      the EGLSurface pointer associated with the window, or NULL on failure.
      Since:
      This function is available since SDL 3.2.0.
    • EGL_SetAttributeCallbacks

      public void EGL_SetAttributeCallbacks(@Pointer(comment="SDL_EGLAttribArrayCallback") MemorySegment platformAttribCallback, @Pointer(comment="SDL_EGLIntArrayCallback") MemorySegment surfaceAttribCallback, @Pointer(comment="SDL_EGLIntArrayCallback") MemorySegment contextAttribCallback, @Pointer(comment="void*") MemorySegment userdata)

      Sets the callbacks for defining custom EGLAttrib arrays for EGL initialization.

      Callbacks that aren't needed can be set to NULL.

      NOTE: These callback pointers will be reset after SDL_GL_ResetAttributes.

      Parameters:
      platformAttribCallback - callback for attributes to pass to eglGetPlatformDisplay. May be NULL.
      surfaceAttribCallback - callback for attributes to pass to eglCreateSurface. May be NULL.
      contextAttribCallback - callback for attributes to pass to eglCreateContext. May be NULL.
      userdata - a pointer that is passed to the callbacks.
      Since:
      This function is available since SDL 3.2.0.
    • GL_SetSwapInterval

      @NativeType("boolean") public boolean GL_SetSwapInterval(int interval)

      Set the swap interval for the current OpenGL context.

      Some systems allow specifying -1 for the interval, to enable adaptive vsync. Adaptive vsync works the same as vsync, but if you've already missed the vertical retrace for a given frame, it swaps buffers immediately, which might be less jarring for the user during occasional framerate drops. If an application requests adaptive vsync and the system does not support it, this function will fail and return false. In such a case, you should probably retry the call with 1 for the interval.

      Adaptive vsync is implemented for some glX drivers with GLX_EXT_swap_control_tear, and for some Windows drivers with WGL_EXT_swap_control_tear.

      Read more on the Khronos wiki: https://www.khronos.org/opengl/wiki/Swap_IntervalAdaptive_Vsync

      Parameters:
      interval - 0 for immediate updates, 1 for updates synchronized with the vertical retrace, -1 for adaptive vsync.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_GetSwapInterval

      @NativeType("boolean") public boolean GL_GetSwapInterval(@Nullable @Nullable IntPtr interval)

      Get the swap interval for the current OpenGL context.

      If the system can't determine the swap interval, or there isn't a valid current context, this function will set *interval to 0 as a safe default.

      Parameters:
      interval - output interval value. 0 if there is no vertical retrace synchronization, 1 if the buffer swap is synchronized with the vertical retrace, and -1 if late swaps happen immediately instead of waiting for the next retrace.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also:
    • GL_SwapWindow

      @NativeType("boolean") public boolean GL_SwapWindow(@Nullable @Nullable SDL_Window window)

      Update a window with OpenGL rendering.

      This is used with double-buffered OpenGL contexts, which are the default.

      On macOS, make sure you bind 0 to the draw framebuffer before swapping the window, otherwise nothing will happen. If you aren't using glBindFramebuffer(), this is the default and you won't have to do anything extra.

      Parameters:
      window - the window to change.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
    • GL_DestroyContext

      @NativeType("boolean") public boolean GL_DestroyContext(@Nullable @Nullable SDL_GLContext context)
      Delete an OpenGL context.
      Parameters:
      context - the OpenGL context to be deleted.
      Returns:
      true on success or false on failure; call SDL_GetError() for more information.
      Since:
      This function is available since SDL 3.2.0.
      See Also: