sdl

package
v0.0.0-...-24cf274 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ALPHA_OPAQUE            = 255
	ALPHA_OPAQUE_FLOAT      = 1.
	ALPHA_TRANSPARENT       = 0
	ALPHA_TRANSPARENT_FLOAT = 0.
)
View Source
const (
	HAT_CENTERED  uint8 = 0x00
	HAT_UP        uint8 = 0x01
	HAT_RIGHT     uint8 = 0x02
	HAT_DOWN      uint8 = 0x04
	HAT_LEFT      uint8 = 0x08
	HAT_RIGHTUP   uint8 = HAT_RIGHT | HAT_UP
	HAT_RIGHTDOWN uint8 = HAT_RIGHT | HAT_DOWN
	HAT_LEFTUP    uint8 = HAT_LEFT | HAT_UP
	HAT_LEFTDOWN  uint8 = HAT_LEFT | HAT_DOWN
)
View Source
const (
	WINDOW_SURFACE_VSYNC_DISABLED = 0
	WINDOW_SURFACE_VSYNC_ADAPTIVE = -1
)
View Source
const (
	HINT_ALLOW_ALT_TAB_WHILE_GRABBED             = "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
	HINT_ANDROID_ALLOW_RECREATE_ACTIVITY         = "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"
	HINT_ANDROID_BLOCK_ON_PAUSE                  = "SDL_ANDROID_BLOCK_ON_PAUSE"
	HINT_ANDROID_LOW_LATENCY_AUDIO               = "SDL_ANDROID_LOW_LATENCY_AUDIO"
	HINT_ANDROID_TRAP_BACK_BUTTON                = "SDL_ANDROID_TRAP_BACK_BUTTON"
	HINT_APP_ID                                  = "SDL_APP_ID"
	HINT_APP_NAME                                = "SDL_APP_NAME"
	HINT_APPLE_TV_CONTROLLER_UI_EVENTS           = "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
	HINT_APPLE_TV_REMOTE_ALLOW_ROTATION          = "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
	HINT_AUDIO_ALSA_DEFAULT_DEVICE               = "SDL_AUDIO_ALSA_DEFAULT_DEVICE"
	HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE      = "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE"
	HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE     = "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE"
	HINT_AUDIO_CATEGORY                          = "SDL_AUDIO_CATEGORY"
	HINT_AUDIO_CHANNELS                          = "SDL_AUDIO_CHANNELS"
	HINT_AUDIO_DEVICE_APP_ICON_NAME              = "SDL_AUDIO_DEVICE_APP_ICON_NAME"
	HINT_AUDIO_DEVICE_SAMPLE_FRAMES              = "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"
	HINT_AUDIO_DEVICE_STREAM_NAME                = "SDL_AUDIO_DEVICE_STREAM_NAME"
	HINT_AUDIO_DEVICE_STREAM_ROLE                = "SDL_AUDIO_DEVICE_STREAM_ROLE"
	HINT_AUDIO_DISK_INPUT_FILE                   = "SDL_AUDIO_DISK_INPUT_FILE"
	HINT_AUDIO_DISK_OUTPUT_FILE                  = "SDL_AUDIO_DISK_OUTPUT_FILE"
	HINT_AUDIO_DISK_TIMESCALE                    = "SDL_AUDIO_DISK_TIMESCALE"
	HINT_AUDIO_DRIVER                            = "SDL_AUDIO_DRIVER"
	HINT_AUDIO_DUMMY_TIMESCALE                   = "SDL_AUDIO_DUMMY_TIMESCALE"
	HINT_AUDIO_FORMAT                            = "SDL_AUDIO_FORMAT"
	HINT_AUDIO_FREQUENCY                         = "SDL_AUDIO_FREQUENCY"
	HINT_AUDIO_INCLUDE_MONITORS                  = "SDL_AUDIO_INCLUDE_MONITORS"
	HINT_AUTO_UPDATE_JOYSTICKS                   = "SDL_AUTO_UPDATE_JOYSTICKS"
	HINT_AUTO_UPDATE_SENSORS                     = "SDL_AUTO_UPDATE_SENSORS"
	HINT_BMP_SAVE_LEGACY_FORMAT                  = "SDL_BMP_SAVE_LEGACY_FORMAT"
	HINT_CAMERA_DRIVER                           = "SDL_CAMERA_DRIVER"
	HINT_CPU_FEATURE_MASK                        = "SDL_CPU_FEATURE_MASK"
	HINT_JOYSTICK_DIRECTINPUT                    = "SDL_JOYSTICK_DIRECTINPUT"
	HINT_FILE_DIALOG_DRIVER                      = "SDL_FILE_DIALOG_DRIVER"
	HINT_DISPLAY_USABLE_BOUNDS                   = "SDL_DISPLAY_USABLE_BOUNDS"
	HINT_EMSCRIPTEN_ASYNCIFY                     = "SDL_EMSCRIPTEN_ASYNCIFY"
	HINT_EMSCRIPTEN_CANVAS_SELECTOR              = "SDL_EMSCRIPTEN_CANVAS_SELECTOR"
	HINT_EMSCRIPTEN_KEYBOARD_ELEMENT             = "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
	HINT_ENABLE_SCREEN_KEYBOARD                  = "SDL_ENABLE_SCREEN_KEYBOARD"
	HINT_EVDEV_DEVICES                           = "SDL_EVDEV_DEVICES"
	HINT_EVENT_LOGGING                           = "SDL_EVENT_LOGGING"
	HINT_FORCE_RAISEWINDOW                       = "SDL_FORCE_RAISEWINDOW"
	HINT_FRAMEBUFFER_ACCELERATION                = "SDL_FRAMEBUFFER_ACCELERATION"
	HINT_GAMECONTROLLERCONFIG                    = "SDL_GAMECONTROLLERCONFIG"
	HINT_GAMECONTROLLERCONFIG_FILE               = "SDL_GAMECONTROLLERCONFIG_FILE"
	HINT_GAMECONTROLLERTYPE                      = "SDL_GAMECONTROLLERTYPE"
	HINT_GAMECONTROLLER_IGNORE_DEVICES           = "SDL_GAMECONTROLLER_IGNORE_DEVICES"
	HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT    = "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
	HINT_GAMECONTROLLER_SENSOR_FUSION            = "SDL_GAMECONTROLLER_SENSOR_FUSION"
	HINT_GDK_TEXTINPUT_DEFAULT_TEXT              = "SDL_GDK_TEXTINPUT_DEFAULT_TEXT"
	HINT_GDK_TEXTINPUT_DESCRIPTION               = "SDL_GDK_TEXTINPUT_DESCRIPTION"
	HINT_GDK_TEXTINPUT_MAX_LENGTH                = "SDL_GDK_TEXTINPUT_MAX_LENGTH"
	HINT_GDK_TEXTINPUT_SCOPE                     = "SDL_GDK_TEXTINPUT_SCOPE"
	HINT_GDK_TEXTINPUT_TITLE                     = "SDL_GDK_TEXTINPUT_TITLE"
	HINT_HIDAPI_LIBUSB                           = "SDL_HIDAPI_LIBUSB"
	HINT_HIDAPI_LIBUSB_WHITELIST                 = "SDL_HIDAPI_LIBUSB_WHITELIST"
	HINT_HIDAPI_UDEV                             = "SDL_HIDAPI_UDEV"
	HINT_GPU_DRIVER                              = "SDL_GPU_DRIVER"
	HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS       = "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"
	HINT_HIDAPI_IGNORE_DEVICES                   = "SDL_HIDAPI_IGNORE_DEVICES"
	HINT_IME_IMPLEMENTED_UI                      = "SDL_IME_IMPLEMENTED_UI"
	HINT_IOS_HIDE_HOME_INDICATOR                 = "SDL_IOS_HIDE_HOME_INDICATOR"
	HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS        = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
	HINT_JOYSTICK_ARCADESTICK_DEVICES            = "SDL_JOYSTICK_ARCADESTICK_DEVICES"
	HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED   = "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"
	HINT_JOYSTICK_BLACKLIST_DEVICES              = "SDL_JOYSTICK_BLACKLIST_DEVICES"
	HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED     = "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"
	HINT_JOYSTICK_DEVICE                         = "SDL_JOYSTICK_DEVICE"
	HINT_JOYSTICK_ENHANCED_REPORTS               = "SDL_JOYSTICK_ENHANCED_REPORTS"
	HINT_JOYSTICK_FLIGHTSTICK_DEVICES            = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"
	HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED   = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"
	HINT_JOYSTICK_GAMEINPUT                      = "SDL_JOYSTICK_GAMEINPUT"
	HINT_JOYSTICK_GAMECUBE_DEVICES               = "SDL_JOYSTICK_GAMECUBE_DEVICES"
	HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED      = "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"
	HINT_JOYSTICK_HIDAPI                         = "SDL_JOYSTICK_HIDAPI"
	HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS        = "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
	HINT_JOYSTICK_HIDAPI_GAMECUBE                = "SDL_JOYSTICK_HIDAPI_GAMECUBE"
	HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE   = "SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE"
	HINT_JOYSTICK_HIDAPI_JOY_CONS                = "SDL_JOYSTICK_HIDAPI_JOY_CONS"
	HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED         = "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
	HINT_JOYSTICK_HIDAPI_LUNA                    = "SDL_JOYSTICK_HIDAPI_LUNA"
	HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC        = "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
	HINT_JOYSTICK_HIDAPI_PS3                     = "SDL_JOYSTICK_HIDAPI_PS3"
	HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER      = "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER"
	HINT_JOYSTICK_HIDAPI_PS4                     = "SDL_JOYSTICK_HIDAPI_PS4"
	HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL     = "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL"
	HINT_JOYSTICK_HIDAPI_PS5                     = "SDL_JOYSTICK_HIDAPI_PS5"
	HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED          = "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
	HINT_JOYSTICK_HIDAPI_SHIELD                  = "SDL_JOYSTICK_HIDAPI_SHIELD"
	HINT_JOYSTICK_HIDAPI_STADIA                  = "SDL_JOYSTICK_HIDAPI_STADIA"
	HINT_JOYSTICK_HIDAPI_STEAM                   = "SDL_JOYSTICK_HIDAPI_STEAM"
	HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED          = "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED"
	HINT_JOYSTICK_HIDAPI_STEAMDECK               = "SDL_JOYSTICK_HIDAPI_STEAMDECK"
	HINT_JOYSTICK_HIDAPI_STEAM_HORI              = "SDL_JOYSTICK_HIDAPI_STEAM_HORI"
	HINT_JOYSTICK_HIDAPI_SWITCH                  = "SDL_JOYSTICK_HIDAPI_SWITCH"
	HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED         = "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
	HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED       = "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
	HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS       = "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
	HINT_JOYSTICK_HIDAPI_WII                     = "SDL_JOYSTICK_HIDAPI_WII"
	HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED          = "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
	HINT_JOYSTICK_HIDAPI_XBOX                    = "SDL_JOYSTICK_HIDAPI_XBOX"
	HINT_JOYSTICK_HIDAPI_XBOX_360                = "SDL_JOYSTICK_HIDAPI_XBOX_360"
	HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED     = "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
	HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS       = "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
	HINT_JOYSTICK_HIDAPI_XBOX_ONE                = "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
	HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED       = "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
	HINT_JOYSTICK_IOKIT                          = "SDL_JOYSTICK_IOKIT"
	HINT_JOYSTICK_LINUX_CLASSIC                  = "SDL_JOYSTICK_LINUX_CLASSIC"
	HINT_JOYSTICK_LINUX_DEADZONES                = "SDL_JOYSTICK_LINUX_DEADZONES"
	HINT_JOYSTICK_LINUX_DIGITAL_HATS             = "SDL_JOYSTICK_LINUX_DIGITAL_HATS"
	HINT_JOYSTICK_LINUX_HAT_DEADZONES            = "SDL_JOYSTICK_LINUX_HAT_DEADZONES"
	HINT_JOYSTICK_MFI                            = "SDL_JOYSTICK_MFI"
	HINT_JOYSTICK_RAWINPUT                       = "SDL_JOYSTICK_RAWINPUT"
	HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT      = "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
	HINT_JOYSTICK_ROG_CHAKRAM                    = "SDL_JOYSTICK_ROG_CHAKRAM"
	HINT_JOYSTICK_THREAD                         = "SDL_JOYSTICK_THREAD"
	HINT_JOYSTICK_THROTTLE_DEVICES               = "SDL_JOYSTICK_THROTTLE_DEVICES"
	HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED      = "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"
	HINT_JOYSTICK_WGI                            = "SDL_JOYSTICK_WGI"
	HINT_JOYSTICK_WHEEL_DEVICES                  = "SDL_JOYSTICK_WHEEL_DEVICES"
	HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED         = "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
	HINT_JOYSTICK_ZERO_CENTERED_DEVICES          = "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
	HINT_JOYSTICK_HAPTIC_AXES                    = "SDL_JOYSTICK_HAPTIC_AXES"
	HINT_KEYCODE_OPTIONS                         = "SDL_KEYCODE_OPTIONS"
	HINT_KMSDRM_DEVICE_INDEX                     = "SDL_KMSDRM_DEVICE_INDEX"
	HINT_KMSDRM_REQUIRE_DRM_MASTER               = "SDL_KMSDRM_REQUIRE_DRM_MASTER"
	HINT_LOGGING                                 = "SDL_LOGGING"
	HINT_MAC_BACKGROUND_APP                      = "SDL_MAC_BACKGROUND_APP"
	HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK      = "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
	HINT_MAC_OPENGL_ASYNC_DISPATCH               = "SDL_MAC_OPENGL_ASYNC_DISPATCH"
	HINT_MAC_OPTION_AS_ALT                       = "SDL_MAC_OPTION_AS_ALT"
	HINT_MAC_SCROLL_MOMENTUM                     = "SDL_MAC_SCROLL_MOMENTUM"
	HINT_MAIN_CALLBACK_RATE                      = "SDL_MAIN_CALLBACK_RATE"
	HINT_MOUSE_DOUBLE_CLICK_RADIUS               = "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
	HINT_MOUSE_DOUBLE_CLICK_TIME                 = "SDL_MOUSE_DOUBLE_CLICK_TIME"
	HINT_MOUSE_DEFAULT_SYSTEM_CURSOR             = "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"
	HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE        = "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"
	HINT_MOUSE_FOCUS_CLICKTHROUGH                = "SDL_MOUSE_FOCUS_CLICKTHROUGH"
	HINT_MOUSE_NORMAL_SPEED_SCALE                = "SDL_MOUSE_NORMAL_SPEED_SCALE"
	HINT_MOUSE_RELATIVE_MODE_CENTER              = "SDL_MOUSE_RELATIVE_MODE_CENTER"
	HINT_MOUSE_RELATIVE_SPEED_SCALE              = "SDL_MOUSE_RELATIVE_SPEED_SCALE"
	HINT_MOUSE_RELATIVE_SYSTEM_SCALE             = "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
	HINT_MOUSE_RELATIVE_WARP_MOTION              = "SDL_MOUSE_RELATIVE_WARP_MOTION"
	HINT_MOUSE_RELATIVE_CURSOR_VISIBLE           = "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"
	HINT_MOUSE_TOUCH_EVENTS                      = "SDL_MOUSE_TOUCH_EVENTS"
	HINT_MUTE_CONSOLE_KEYBOARD                   = "SDL_MUTE_CONSOLE_KEYBOARD"
	HINT_NO_SIGNAL_HANDLERS                      = "SDL_NO_SIGNAL_HANDLERS"
	HINT_OPENGL_LIBRARY                          = "SDL_OPENGL_LIBRARY"
	HINT_EGL_LIBRARY                             = "SDL_EGL_LIBRARY"
	HINT_OPENGL_ES_DRIVER                        = "SDL_OPENGL_ES_DRIVER"
	HINT_OPENVR_LIBRARY                          = "SDL_OPENVR_LIBRARY"
	HINT_ORIENTATIONS                            = "SDL_ORIENTATIONS"
	HINT_POLL_SENTINEL                           = "SDL_POLL_SENTINEL"
	HINT_PREFERRED_LOCALES                       = "SDL_PREFERRED_LOCALES"
	HINT_QUIT_ON_LAST_WINDOW_CLOSE               = "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
	HINT_RENDER_DIRECT3D_THREADSAFE              = "SDL_RENDER_DIRECT3D_THREADSAFE"
	HINT_RENDER_DIRECT3D11_DEBUG                 = "SDL_RENDER_DIRECT3D11_DEBUG"
	HINT_RENDER_VULKAN_DEBUG                     = "SDL_RENDER_VULKAN_DEBUG"
	HINT_RENDER_GPU_DEBUG                        = "SDL_RENDER_GPU_DEBUG"
	HINT_RENDER_GPU_LOW_POWER                    = "SDL_RENDER_GPU_LOW_POWER"
	HINT_RENDER_DRIVER                           = "SDL_RENDER_DRIVER"
	HINT_RENDER_LINE_METHOD                      = "SDL_RENDER_LINE_METHOD"
	HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE    = "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
	HINT_RENDER_VSYNC                            = "SDL_RENDER_VSYNC"
	HINT_RETURN_KEY_HIDES_IME                    = "SDL_RETURN_KEY_HIDES_IME"
	HINT_ROG_GAMEPAD_MICE                        = "SDL_ROG_GAMEPAD_MICE"
	HINT_ROG_GAMEPAD_MICE_EXCLUDED               = "SDL_ROG_GAMEPAD_MICE_EXCLUDED"
	HINT_RPI_VIDEO_LAYER                         = "SDL_RPI_VIDEO_LAYER"
	HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME       = "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
	HINT_SHUTDOWN_DBUS_ON_QUIT                   = "SDL_SHUTDOWN_DBUS_ON_QUIT"
	HINT_STORAGE_TITLE_DRIVER                    = "SDL_STORAGE_TITLE_DRIVER"
	HINT_STORAGE_USER_DRIVER                     = "SDL_STORAGE_USER_DRIVER"
	HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL     = "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
	HINT_THREAD_PRIORITY_POLICY                  = "SDL_THREAD_PRIORITY_POLICY"
	HINT_TIMER_RESOLUTION                        = "SDL_TIMER_RESOLUTION"
	HINT_TOUCH_MOUSE_EVENTS                      = "SDL_TOUCH_MOUSE_EVENTS"
	HINT_TRACKPAD_IS_TOUCH_ONLY                  = "SDL_TRACKPAD_IS_TOUCH_ONLY"
	HINT_TV_REMOTE_AS_JOYSTICK                   = "SDL_TV_REMOTE_AS_JOYSTICK"
	HINT_VIDEO_ALLOW_SCREENSAVER                 = "SDL_VIDEO_ALLOW_SCREENSAVER"
	HINT_VIDEO_DISPLAY_PRIORITY                  = "SDL_VIDEO_DISPLAY_PRIORITY"
	HINT_VIDEO_DOUBLE_BUFFER                     = "SDL_VIDEO_DOUBLE_BUFFER"
	HINT_VIDEO_DRIVER                            = "SDL_VIDEO_DRIVER"
	HINT_VIDEO_DUMMY_SAVE_FRAMES                 = "SDL_VIDEO_DUMMY_SAVE_FRAMES"
	HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK     = "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK"
	HINT_VIDEO_FORCE_EGL                         = "SDL_VIDEO_FORCE_EGL"
	HINT_VIDEO_MAC_FULLSCREEN_SPACES             = "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
	HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY    = "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"
	HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS            = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
	HINT_VIDEO_OFFSCREEN_SAVE_FRAMES             = "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES"
	HINT_VIDEO_SYNC_WINDOW_OPERATIONS            = "SDL_VIDEO_SYNC_WINDOW_OPERATIONS"
	HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR            = "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
	HINT_VIDEO_WAYLAND_MODE_EMULATION            = "SDL_VIDEO_WAYLAND_MODE_EMULATION"
	HINT_VIDEO_WAYLAND_MODE_SCALING              = "SDL_VIDEO_WAYLAND_MODE_SCALING"
	HINT_VIDEO_WAYLAND_PREFER_LIBDECOR           = "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
	HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY          = "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY"
	HINT_VIDEO_WIN_D3DCOMPILER                   = "SDL_VIDEO_WIN_D3DCOMPILER"
	HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT         = "SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT"
	HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR      = "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
	HINT_VIDEO_X11_NET_WM_PING                   = "SDL_VIDEO_X11_NET_WM_PING"
	HINT_VIDEO_X11_NODIRECTCOLOR                 = "SDL_VIDEO_X11_NODIRECTCOLOR"
	HINT_VIDEO_X11_SCALING_FACTOR                = "SDL_VIDEO_X11_SCALING_FACTOR"
	HINT_VIDEO_X11_VISUALID                      = "SDL_VIDEO_X11_VISUALID"
	HINT_VIDEO_X11_WINDOW_VISUALID               = "SDL_VIDEO_X11_WINDOW_VISUALID"
	HINT_VIDEO_X11_XRANDR                        = "SDL_VIDEO_X11_XRANDR"
	HINT_VITA_ENABLE_BACK_TOUCH                  = "SDL_VITA_ENABLE_BACK_TOUCH"
	HINT_VITA_ENABLE_FRONT_TOUCH                 = "SDL_VITA_ENABLE_FRONT_TOUCH"
	HINT_VITA_MODULE_PATH                        = "SDL_VITA_MODULE_PATH"
	HINT_VITA_PVR_INIT                           = "SDL_VITA_PVR_INIT"
	HINT_VITA_RESOLUTION                         = "SDL_VITA_RESOLUTION"
	HINT_VITA_PVR_OPENGL                         = "SDL_VITA_PVR_OPENGL"
	HINT_VITA_TOUCH_MOUSE_DEVICE                 = "SDL_VITA_TOUCH_MOUSE_DEVICE"
	HINT_VULKAN_DISPLAY                          = "SDL_VULKAN_DISPLAY"
	HINT_VULKAN_LIBRARY                          = "SDL_VULKAN_LIBRARY"
	HINT_WAVE_FACT_CHUNK                         = "SDL_WAVE_FACT_CHUNK"
	HINT_WAVE_CHUNK_LIMIT                        = "SDL_WAVE_CHUNK_LIMIT"
	HINT_WAVE_RIFF_CHUNK_SIZE                    = "SDL_WAVE_RIFF_CHUNK_SIZE"
	HINT_WAVE_TRUNCATION                         = "SDL_WAVE_TRUNCATION"
	HINT_WINDOW_ACTIVATE_WHEN_RAISED             = "SDL_WINDOW_ACTIVATE_WHEN_RAISED"
	HINT_WINDOW_ACTIVATE_WHEN_SHOWN              = "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"
	HINT_WINDOW_ALLOW_TOPMOST                    = "SDL_WINDOW_ALLOW_TOPMOST"
	HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN = "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
	HINT_WINDOWS_CLOSE_ON_ALT_F4                 = "SDL_WINDOWS_CLOSE_ON_ALT_F4"
	HINT_WINDOWS_ENABLE_MENU_MNEMONICS           = "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
	HINT_WINDOWS_ENABLE_MESSAGELOOP              = "SDL_WINDOWS_ENABLE_MESSAGELOOP"
	HINT_WINDOWS_GAMEINPUT                       = "SDL_WINDOWS_GAMEINPUT"
	HINT_WINDOWS_RAW_KEYBOARD                    = "SDL_WINDOWS_RAW_KEYBOARD"
	HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL          = "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
	HINT_WINDOWS_INTRESOURCE_ICON                = "SDL_WINDOWS_INTRESOURCE_ICON"
	HINT_WINDOWS_INTRESOURCE_ICON_SMALL          = "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
	HINT_WINDOWS_USE_D3D9EX                      = "SDL_WINDOWS_USE_D3D9EX"
	HINT_WINDOWS_ERASE_BACKGROUND_MODE           = "SDL_WINDOWS_ERASE_BACKGROUND_MODE"
	HINT_X11_FORCE_OVERRIDE_REDIRECT             = "SDL_X11_FORCE_OVERRIDE_REDIRECT"
	HINT_X11_WINDOW_TYPE                         = "SDL_X11_WINDOW_TYPE"
	HINT_X11_XCB_LIBRARY                         = "SDL_X11_XCB_LIBRARY"
	HINT_XINPUT_ENABLED                          = "SDL_XINPUT_ENABLED"
	HINT_ASSERT                                  = "SDL_ASSERT"
	HINT_PEN_MOUSE_EVENTS                        = "SDL_PEN_MOUSE_EVENTS"
	HINT_PEN_TOUCH_EVENTS                        = "SDL_PEN_TOUCH_EVENTS"
)
View Source
const (
	PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN          = "SDL.gpu.device.create.debugmode"
	PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN     = "SDL.gpu.device.create.preferlowpower"
	PROP_GPU_DEVICE_CREATE_NAME_STRING                = "SDL.gpu.device.create.name"
	PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN    = "SDL.gpu.device.create.shaders.private"
	PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN      = "SDL.gpu.device.create.shaders.spirv"
	PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN       = "SDL.gpu.device.create.shaders.dxbc"
	PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN       = "SDL.gpu.device.create.shaders.dxil"
	PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN        = "SDL.gpu.device.create.shaders.msl"
	PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN   = "SDL.gpu.device.create.shaders.metallib"
	PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING = "SDL.gpu.device.create.d3d12.semantic"

	PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING = "SDL.gpu.computepipeline.create.name"

	PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING = "SDL.gpu.graphicspipeline.create.name"

	PROP_GPU_SAMPLER_CREATE_NAME_STRING = "SDL.gpu.sampler.create.name"

	PROP_GPU_SHADER_CREATE_NAME_STRING = "SDL.gpu.shader.create.name"

	PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT        = "SDL.gpu.texture.create.d3d12.clear.r"
	PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT        = "SDL.gpu.texture.create.d3d12.clear.g"
	PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT        = "SDL.gpu.texture.create.d3d12.clear.b"
	PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT        = "SDL.gpu.texture.create.d3d12.clear.a"
	PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT    = "SDL.gpu.texture.create.d3d12.clear.depth"
	PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER = "SDL.gpu.texture.create.d3d12.clear.stencil"
	PROP_GPU_TEXTURE_CREATE_NAME_STRING                = "SDL.gpu.texture.create.name"

	PROP_GPU_BUFFER_CREATE_NAME_STRING = "SDL.gpu.buffer.create.name"

	PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING = "SDL.gpu.transferbuffer.create.name"
)
View Source
const (
	GL_CONTEXT_PROFILE_CORE          = 0x0001 /**< OpenGL Core Profile context */
	GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002 /**< OpenGL Compatibility Profile context */
	GL_CONTEXT_PROFILE_ES            = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
)
View Source
const (
	DEBUG_TEXT_FONT_CHARACTER_SIZE = 8
)
View Source
const WINDOWPOS_CENTERED = int32(WINDOWPOS_CENTERED_MASK)

SDL_WINDOWPOS_CENTERED - Used to indicate that the window position should be centered. (https://wiki.libsdl.org/SDL3/SDL_WINDOWPOS_CENTERED)

View Source
const WINDOWPOS_CENTERED_MASK uint32 = 0x2FFF0000

SDL_WINDOWPOS_CENTERED_MASK - A magic value used with SDL_WINDOWPOS_CENTERED. (https://wiki.libsdl.org/SDL3/SDL_WINDOWPOS_CENTERED_MASK)

View Source
const WINDOWPOS_UNDEFINED = int32(WINDOWPOS_UNDEFINED_MASK)

SDL_WINDOWPOS_UNDEFINED - Used to indicate that you don't care what the window position/display is. (https://wiki.libsdl.org/SDL3/SDL_WINDOWPOS_UNDEFINED)

View Source
const WINDOWPOS_UNDEFINED_MASK uint32 = 0x1FFF0000

SDL_WINDOWPOS_UNDEFINED_MASK - A magic value used with SDL_WINDOWPOS_UNDEFINED. (https://wiki.libsdl.org/SDL3/SDL_WINDOWPOS_UNDEFINED_MASK)

Variables

View Source
var EndLoop = errors.New("graceful termination")

Functions

func AddEventWatch

func AddEventWatch(filter EventFilter) error

SDL_AddEventWatch - Add a callback to be triggered when an event is added to the event queue. (https://wiki.libsdl.org/SDL3/SDL_AddEventWatch)

func AddGamepadMapping

func AddGamepadMapping(mapping string) error

SDL_AddGamepadMapping - Add support for gamepads that SDL is unaware of or change the binding of an existing gamepad. (https://wiki.libsdl.org/SDL3/SDL_AddGamepadMapping)

func AddGamepadMappingsFromFile

func AddGamepadMappingsFromFile(file string) error

SDL_AddGamepadMappingsFromFile - Load a set of gamepad mappings from a file. (https://wiki.libsdl.org/SDL3/SDL_AddGamepadMappingsFromFile)

func CaptureMouse

func CaptureMouse(enabled bool) error

SDL_CaptureMouse - Capture the mouse and to track input outside an SDL window. (https://wiki.libsdl.org/SDL3/SDL_CaptureMouse)

func CloseLibrary

func CloseLibrary() error

CloseLibrary releases resources associated with the library.

func ConvertAudioSamples

func ConvertAudioSamples(srcSpec *AudioSpec, srcData []byte, dstSpec *AudioSpec) ([]byte, error)

SDL_ConvertAudioSamples - Convert some audio data of one format to another format. (https://wiki.libsdl.org/SDL3/SDL_ConvertAudioSamples)

func CopyProperties

func CopyProperties(src, dst PropertiesID) error

SDL_CopyProperties - Copy a group of properties. (https://wiki.libsdl.org/SDL3/SDL_CopyProperties)

func CreateWindowAndRenderer

func CreateWindowAndRenderer(title string, width, height int, flags WindowFlags) (*Window, *Renderer, error)

SDL_CreateWindowAndRenderer - Create a window and default renderer. (https://wiki.libsdl.org/SDL3/SDL_CreateWindowAndRenderer)

func CursorVisible

func CursorVisible() bool

SDL_CursorVisible - Return whether the cursor is currently being shown. (https://wiki.libsdl.org/SDL3/SDL_CursorVisible)

func Delay

func Delay(ms uint32)

SDL_Delay - Wait a specified number of milliseconds before returning. (https://wiki.libsdl.org/SDL3/SDL_Delay)

func DelayNS

func DelayNS(ns uint64)

SDL_DelayNS - Wait a specified number of nanoseconds before returning. (https://wiki.libsdl.org/SDL3/SDL_DelayNS)

func DelayPrecise

func DelayPrecise(ns uint64)

SDL_DelayPrecise - Wait a specified number of nanoseconds before returning. (https://wiki.libsdl.org/SDL3/SDL_DelayPrecise)

func DisableScreenSaver

func DisableScreenSaver() error

SDL_DisableScreenSaver - Prevent the screen from being blanked by a screen saver. (https://wiki.libsdl.org/SDL3/SDL_DisableScreenSaver)

func EGL_SetAttributeCallbacks

func EGL_SetAttributeCallbacks(
	platformAttribCallback EGLAttribArrayCallback,
	surfaceAttribCallback EGLIntArrayCallback,
	contextAttribCallback EGLIntArrayCallback,
)

SDL_EGL_SetAttributeCallbacks - Sets the callbacks for defining custom EGLAttrib arrays for EGL initialization. (https://wiki.libsdl.org/SDL3/SDL_EGL_SetAttributeCallbacks)

func EnableScreenSaver

func EnableScreenSaver() error

SDL_EnableScreenSaver - Allow the screen to be blanked by a screen saver. (https://wiki.libsdl.org/SDL3/SDL_EnableScreenSaver)

func EnumerateDirectory

func EnumerateDirectory(path string, callback EnumerateDirectoryCallback) error

SDL_EnumerateDirectory - Enumerate a directory through a callback function. (https://wiki.libsdl.org/SDL3/SDL_EnumerateDirectory)

func EventEnabled

func EventEnabled(typ EventType) bool

SDL_EventEnabled - Query the state of processing events by type. (https://wiki.libsdl.org/SDL3/SDL_EventEnabled)

func FilterEvents

func FilterEvents(filter EventFilter)

SDL_FilterEvents - Run a specific filter function on the current event queue, removing any events for which the filter returns false. (https://wiki.libsdl.org/SDL3/SDL_FilterEvents)

func FlushEvent

func FlushEvent(typ EventType)

SDL_FlushEvent - Clear events of a specific type from the event queue. (https://wiki.libsdl.org/SDL3/SDL_FlushEvent)

func FlushEvents

func FlushEvents(minType, maxType EventType)

SDL_FlushEvents - Clear events of a range of types from the event queue. (https://wiki.libsdl.org/SDL3/SDL_FlushEvents)

func GL_DestroyContext

func GL_DestroyContext(ctx GLContext)

SDL_GL_DestroyContext - Delete an OpenGL context. (https://wiki.libsdl.org/SDL3/SDL_GL_DestroyContext)

func GL_ExtensionSupported

func GL_ExtensionSupported(extension string) bool

SDL_GL_ExtensionSupported - Check if an OpenGL extension is supported for the current context. (https://wiki.libsdl.org/SDL3/SDL_GL_ExtensionSupported)

func GL_GetAttribute

func GL_GetAttribute(attr GLAttr) (int32, error)

SDL_GL_GetAttribute - Get the actual value for an attribute from the current context. (https://wiki.libsdl.org/SDL3/SDL_GL_GetAttribute)

func GL_GetSwapInterval

func GL_GetSwapInterval() (int32, error)

SDL_GL_GetSwapInterval - Get the swap interval for the current OpenGL context. (https://wiki.libsdl.org/SDL3/SDL_GL_GetSwapInterval)

func GL_LoadLibrary

func GL_LoadLibrary(path string) error

SDL_GL_LoadLibrary - Dynamically load an OpenGL library. (https://wiki.libsdl.org/SDL3/SDL_GL_LoadLibrary)

func GL_MakeCurrent

func GL_MakeCurrent(window *Window, ctx GLContext) error

SDL_GL_MakeCurrent - Set up an OpenGL context for rendering into an OpenGL window. (https://wiki.libsdl.org/SDL3/SDL_GL_MakeCurrent)

func GL_ResetAttributes

func GL_ResetAttributes()

SDL_GL_ResetAttributes - Reset all previously set OpenGL context attributes to their default values. (https://wiki.libsdl.org/SDL3/SDL_GL_ResetAttributes)

func GL_SetAttribute

func GL_SetAttribute(attr GLAttr, value int32) error

SDL_GL_SetAttribute - Set an OpenGL window attribute before window creation. (https://wiki.libsdl.org/SDL3/SDL_GL_SetAttribute)

func GL_SetSwapInterval

func GL_SetSwapInterval(interval int32) error

SDL_GL_SetSwapInterval - Set the swap interval for the current OpenGL context. (https://wiki.libsdl.org/SDL3/SDL_GL_SetSwapInterval)

func GL_SwapWindow

func GL_SwapWindow(window *Window) error

SDL_GL_SwapWindow - Update a window with OpenGL rendering. (https://wiki.libsdl.org/SDL3/SDL_GL_SwapWindow)

func GL_UnloadLibrary

func GL_UnloadLibrary()

SDL_GL_UnloadLibrary - Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary(). (https://wiki.libsdl.org/SDL3/SDL_GL_UnloadLibrary)

func GPUSupportShaderFormats

func GPUSupportShaderFormats(formatFlags GPUShaderFormat, name string) bool

SDL_GPUSupportsShaderFormats - Checks for GPU runtime support. (https://wiki.libsdl.org/SDL3/SDL_GPUSupportsShaderFormats)

func GamepadEventsEnabled

func GamepadEventsEnabled() bool

SDL_GamepadEventsEnabled - Query the state of gamepad event processing. (https://wiki.libsdl.org/SDL3/SDL_GamepadEventsEnabled)

func GetAppMetadataProperty

func GetAppMetadataProperty(name string) string

SDL_GetAppMetadataProperty - Get metadata about your app. (https://wiki.libsdl.org/SDL3/SDL_GetAppMetadataProperty)

func GetAudioDriver

func GetAudioDriver(index int) string

SDL_GetAudioDriver - Use this function to get the name of a built in audio driver. (https://wiki.libsdl.org/SDL3/SDL_GetAudioDriver)

func GetCameraDriver

func GetCameraDriver(index int) string

SDL_GetCameraDriver - Use this function to get the name of a built in camera driver. (https://wiki.libsdl.org/SDL3/SDL_GetCameraDriver)

func GetClipboardText

func GetClipboardText() (string, error)

SDL_GetClipboardText - Get UTF-8 text from the clipboard. (https://wiki.libsdl.org/SDL3/SDL_GetClipboardText)

func GetCurrentAudioDriver

func GetCurrentAudioDriver() string

SDL_GetCurrentAudioDriver - Get the name of the current audio driver. (https://wiki.libsdl.org/SDL3/SDL_GetCurrentAudioDriver)

func GetCurrentCameraDriver

func GetCurrentCameraDriver() string

SDL_GetCurrentCameraDriver - Get the name of the current camera driver. (https://wiki.libsdl.org/SDL3/SDL_GetCurrentCameraDriver)

func GetCurrentVideoDriver

func GetCurrentVideoDriver() string

SDL_GetCurrentVideoDriver - Get the name of the currently initialized video driver. (https://wiki.libsdl.org/SDL3/SDL_GetCurrentVideoDriver)

func GetGPUDriver

func GetGPUDriver(index int32) string

SDL_GetGPUDriver - Get the name of a built in GPU driver. (https://wiki.libsdl.org/SDL3/SDL_GetGPUDriver)

func GetGamepadMappings

func GetGamepadMappings() ([]string, error)

SDL_GetGamepadMappings - Get the current gamepad mappings. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadMappings)

func GetHint

func GetHint(name string) string

SDL_GetHint - Get the value of a hint. (https://wiki.libsdl.org/SDL3/SDL_GetHint)

func GetHintBoolean

func GetHintBoolean(name string, defaultValue bool) bool

SDL_GetHintBoolean - Get the boolean value of a hint variable. (https://wiki.libsdl.org/SDL3/SDL_GetHintBoolean)

func GetKeyboardState

func GetKeyboardState() []bool

SDL_GetKeyboardState - Get a snapshot of the current state of the keyboard. (https://wiki.libsdl.org/SDL3/SDL_GetKeyboardState)

func GetNumAudioDrivers

func GetNumAudioDrivers() int

SDL_GetNumAudioDrivers - Use this function to get the number of built-in audio drivers. (https://wiki.libsdl.org/SDL3/SDL_GetNumAudioDrivers)

func GetNumCameraDrivers

func GetNumCameraDrivers() int

SDL_GetNumCameraDrivers - Use this function to get the number of built-in camera drivers. (https://wiki.libsdl.org/SDL3/SDL_GetNumCameraDrivers)

func GetNumRenderDrivers

func GetNumRenderDrivers() int

SDL_GetNumRenderDrivers - Get the number of 2D rendering drivers available for the current display. (https://wiki.libsdl.org/SDL3/SDL_GetNumRenderDrivers)

func GetNumVideoDrivers

func GetNumVideoDrivers() int

SDL_GetNumVideoDrivers - Get the number of video drivers compiled into SDL. (https://wiki.libsdl.org/SDL3/SDL_GetNumVideoDrivers)

func GetPerformanceCounter

func GetPerformanceCounter() uint64

SDL_GetPerformanceCounter - Get the current value of the high resolution counter. (https://wiki.libsdl.org/SDL3/SDL_GetPerformanceCounter)

func GetPerformanceFrequency

func GetPerformanceFrequency() uint64

SDL_GetPerformanceFrequency - Get the count per second of the high resolution counter. (https://wiki.libsdl.org/SDL3/SDL_GetPerformanceFrequency)

func GetRGB

func GetRGB(pixel uint32, format *PixelFormatDetails, palette *Palette) (r, g, b uint8)

SDL_GetRGB - Get RGB values from a pixel in the specified format. (https://wiki.libsdl.org/SDL3/SDL_GetRGB)

func GetRGBA

func GetRGBA(pixel uint32, format *PixelFormatDetails, palette *Palette) (r, g, b, a uint8)

SDL_GetRGBA - Get RGBA values from a pixel in the specified format. (https://wiki.libsdl.org/SDL3/SDL_GetRGBA)

func GetRenderDriver

func GetRenderDriver(index int) string

SDL_GetRenderDriver - Use this function to get the name of a built in 2D rendering driver. (https://wiki.libsdl.org/SDL3/SDL_GetRenderDriver)

func GetVideoDriver

func GetVideoDriver(index int) string

SDL_GetVideoDriver - Get the name of a built in video driver. (https://wiki.libsdl.org/SDL3/SDL_GetVideoDriver)

func HasEvent

func HasEvent(typ EventType) bool

SDL_HasEvent - Check for the existence of a certain event type in the event queue. (https://wiki.libsdl.org/SDL3/SDL_HasEvent)

func HasEvents

func HasEvents(minType, maxType EventType) bool

SDL_HasEvents - Check for the existence of certain event types in the event queue. (https://wiki.libsdl.org/SDL3/SDL_HasEvents)

func HasGamepad

func HasGamepad() bool

SDL_HasGamepad - Return whether a gamepad is currently connected. (https://wiki.libsdl.org/SDL3/SDL_HasGamepad)

func HasJoystick

func HasJoystick() bool

SDL_HasJoystick - Return whether a joystick is currently connected. (https://wiki.libsdl.org/SDL3/SDL_HasJoystick)

func HasKeyboard

func HasKeyboard() bool

SDL_HasKeyboard - Return whether a keyboard is currently connected. (https://wiki.libsdl.org/SDL3/SDL_HasKeyboard)

func HasMouse

func HasMouse() bool

SDL_HasMouse - Return whether a mouse is currently connected. (https://wiki.libsdl.org/SDL3/SDL_HasMouse)

func HasScreenKeyboardSupport

func HasScreenKeyboardSupport() bool

SDL_HasScreenKeyboardSupport - Check whether the platform has screen keyboard support. (https://wiki.libsdl.org/SDL3/SDL_HasScreenKeyboardSupport)

func HideCursor

func HideCursor() error

SDL_HideCursor - Hide the cursor. (https://wiki.libsdl.org/SDL3/SDL_HideCursor)

func Init

func Init(flags InitFlags) error

SDL_Init - Initialize the SDL library. (https://wiki.libsdl.org/SDL3/SDL_Init)

func InitSubSystem

func InitSubSystem(flags InitFlags) error

SDL_InitSubSystem - Compatibility function to initialize the SDL library. (https://wiki.libsdl.org/SDL3/SDL_InitSubSystem)

func IsMainThread

func IsMainThread() bool

SDL_IsMainThread - Return whether this is the main thread. (https://wiki.libsdl.org/SDL3/SDL_IsMainThread)

func IsMouseHaptic

func IsMouseHaptic() bool

SDL_IsMouseHaptic - Query whether or not the current mouse has haptic capabilities. (https://wiki.libsdl.org/SDL3/SDL_IsMouseHaptic)

func JoystickEventsEnabled

func JoystickEventsEnabled() bool

SDL_JoystickEventsEnabled - Query the state of joystick event processing. (https://wiki.libsdl.org/SDL3/SDL_JoystickEventsEnabled)

func LoadLibrary

func LoadLibrary(path string) error

LoadLibrary loads SDL library and initializes all functions.

func LoadWAV

func LoadWAV(path string, spec *AudioSpec) ([]byte, error)

SDL_LoadWAV - Loads a WAV from a file path. (https://wiki.libsdl.org/SDL3/SDL_LoadWAV)

func LoadWAV_IO

func LoadWAV_IO(src *IOStream, closeIO bool, spec *AudioSpec) ([]byte, error)

SDL_LoadWAV_IO - Load the audio data of a WAVE file into memory. (https://wiki.libsdl.org/SDL3/SDL_LoadWAV_IO)

func LockJoysticks

func LockJoysticks()

SDL_LockJoysticks - Locking for atomic access to the joystick API. (https://wiki.libsdl.org/SDL3/SDL_LockJoysticks)

func MapRGB

func MapRGB(format *PixelFormatDetails, palette *Palette, r, g, b byte) uint32

SDL_MapRGB - Map an RGB triple to an opaque pixel value for a given pixel format. (https://wiki.libsdl.org/SDL3/SDL_MapRGB)

func MapRGBA

func MapRGBA(format *PixelFormatDetails, palette *Palette, r, g, b, a byte) uint32

SDL_MapRGBA - Map an RGBA quadruple to a pixel value for a given pixel format. (https://wiki.libsdl.org/SDL3/SDL_MapRGBA)

func MixAudio

func MixAudio(src []byte, format AudioFormat, volume float32) ([]byte, error)

SDL_MixAudio - Mix audio data in a specified format. (https://wiki.libsdl.org/SDL3/SDL_MixAudio)

func NumEvents

func NumEvents() (int32, error)

NumEvents returns the number of messages from the event queue, it is similar to calling SDL_PeepEvents(nil, 0, SDL_PEEKEVENT, SDL_EVENT_FIRST, SDL_EVENT_LAST). You may have to call PumpEvents() before calling this function. https://wiki.libsdl.org/SDL3/SDL_PeepEvents

func NumGPUDrivers

func NumGPUDrivers() int

SDL_GetNumGPUDrivers - Get the number of GPU drivers compiled into SDL. (https://wiki.libsdl.org/SDL3/SDL_GetNumGPUDrivers)

func OutOfMemory

func OutOfMemory() bool

SDL_OutOfMemory - Set an error indicating that memory allocation failed. (https://wiki.libsdl.org/SDL3/SDL_OutOfMemory)

func Path

func Path() string

Path returns the library installation path based on the operating system

func PollEvent

func PollEvent(event *Event) bool

SDL_PollEvent - Poll for currently pending events. (https://wiki.libsdl.org/SDL3/SDL_PollEvent)

func PumpEvents

func PumpEvents()

SDL_PumpEvents - Pump the event loop, gathering events from the input devices. (https://wiki.libsdl.org/SDL3/SDL_PumpEvents)

func PushEvent

func PushEvent(event *Event) error

SDL_PushEvent - Add an event to the event queue. (https://wiki.libsdl.org/SDL3/SDL_PushEvent)

func Quit

func Quit()

SDL_Quit - Clean up all initialized subsystems. (https://wiki.libsdl.org/SDL3/SDL_Quit)

func QuitSubSystem

func QuitSubSystem(flags InitFlags)

SDL_QuitSubSystem - Shut down specific SDL subsystems. (https://wiki.libsdl.org/SDL3/SDL_QuitSubSystem)

func ReloadGamepadMappings

func ReloadGamepadMappings() error

SDL_ReloadGamepadMappings - Reinitialize the SDL mapping database to its initial state. (https://wiki.libsdl.org/SDL3/SDL_ReloadGamepadMappings)

func RemoveEventWatch

func RemoveEventWatch(filter EventFilter)

SDL_RemoveEventWatch - Remove an event watch callback added with [SDL_AddEventWatch](SDL_AddEventWatch)(). (https://wiki.libsdl.org/SDL3/SDL_RemoveEventWatch)

func RemoveTrayEntry

func RemoveTrayEntry(entry *TrayEntry)

SDL_RemoveTrayEntry - Removes a tray entry. (https://wiki.libsdl.org/SDL3/SDL_RemoveTrayEntry)

func ResetHint

func ResetHint(name string) error

SDL_ResetHint - Reset a hint to the default value. (https://wiki.libsdl.org/SDL3/SDL_ResetHint)

func ResetHints

func ResetHints()

SDL_ResetHints - Reset all hints to the default values. (https://wiki.libsdl.org/SDL3/SDL_ResetHints)

func ResetKeyboard

func ResetKeyboard()

SDL_ResetKeyboard - Clear the state of the keyboard. (https://wiki.libsdl.org/SDL3/SDL_ResetKeyboard)

func RunLoop

func RunLoop(updateFunc func() error) error

func ScreenSaverEnabled

func ScreenSaverEnabled() bool

SDL_ScreenSaverEnabled - Check whether the screensaver is currently enabled. (https://wiki.libsdl.org/SDL3/SDL_ScreenSaverEnabled)

func SetAppMetadata

func SetAppMetadata(appName, appVersion, appIdentifier string) error

SDL_SetAppMetadata - Specify basic metadata about your app. (https://wiki.libsdl.org/SDL3/SDL_SetAppMetadata)

func SetAppMetadataProperty

func SetAppMetadataProperty(name, value string) error

SDL_SetAppMetadataProperty - Specify metadata about your app through a set of properties. (https://wiki.libsdl.org/SDL3/SDL_SetAppMetadataProperty)

func SetClipboardData

func SetClipboardData(callback ClipboardDataCallback, cleanup ClipboardCleanupCallback, mime_types []string) error

SDL_SetClipboardData - Offer clipboard data to the OS. (https://wiki.libsdl.org/SDL3/SDL_SetClipboardData)

func SetClipboardText

func SetClipboardText(text string) error

SDL_SetClipboardText - Put UTF-8 text into the clipboard. (https://wiki.libsdl.org/SDL3/SDL_SetClipboardText)

func SetCursor

func SetCursor(cursor *Cursor) error

SDL_SetCursor - Set the active cursor. (https://wiki.libsdl.org/SDL3/SDL_SetCursor)

func SetEventEnabled

func SetEventEnabled(typ EventType, enabled bool)

SDL_SetEventEnabled - Set the state of processing events by type. (https://wiki.libsdl.org/SDL3/SDL_SetEventEnabled)

func SetEventFilter

func SetEventFilter(filter EventFilter)

SDL_SetEventFilter - Set up a filter to process all events before they are added to the internal event queue. (https://wiki.libsdl.org/SDL3/SDL_SetEventFilter)

func SetGamepadEventsEnabled

func SetGamepadEventsEnabled(enabled bool)

SDL_SetGamepadEventsEnabled - Set the state of gamepad event processing. (https://wiki.libsdl.org/SDL3/SDL_SetGamepadEventsEnabled)

func SetHint

func SetHint(name, value string) error

SDL_SetHint - Set a hint with normal priority. (https://wiki.libsdl.org/SDL3/SDL_SetHint)

func SetHintWithPriority

func SetHintWithPriority(name, value string, priority HintPriority) error

SDL_SetHintWithPriority - Set a hint with a specific priority. (https://wiki.libsdl.org/SDL3/SDL_SetHintWithPriority)

func SetJoystickEventsEnabled

func SetJoystickEventsEnabled(enabled bool)

SDL_SetJoystickEventsEnabled - Set the state of joystick event processing. (https://wiki.libsdl.org/SDL3/SDL_SetJoystickEventsEnabled)

func SetModState

func SetModState(state Keymod)

SDL_SetModState - Set the current key modifier state for the keyboard. (https://wiki.libsdl.org/SDL3/SDL_SetModState)

func SetRelativeMouseTransform

func SetRelativeMouseTransform(callback MouseMotionTransformCallback) error

SDL_SetRelativeMouseTransform - Set a user-defined function by which to transform relative mouse inputs. (https://wiki.libsdl.org/SDL3/SDL_SetRelativeMouseTransform)

func ShowCursor

func ShowCursor() error

SDL_ShowCursor - Show the cursor. (https://wiki.libsdl.org/SDL3/SDL_ShowCursor)

func ShowFileDialogWithProperties

func ShowFileDialogWithProperties(callback DialogFileCallback, typ FileDialogType, props PropertiesID)

SDL_ShowFileDialogWithProperties - Create and launch a file dialog with the specified properties. (https://wiki.libsdl.org/SDL3/SDL_ShowFileDialogWithProperties)

func ShowMessageBox

func ShowMessageBox(data *MessageBoxData) (int32, error)

SDL_ShowMessageBox - Create a modal message box. (https://wiki.libsdl.org/SDL3/SDL_ShowMessageBox)

func ShowOpenFileDialog

func ShowOpenFileDialog(callback DialogFileCallback, window *Window, filters []DialogFileFilter, defaultLocation string, allowMany bool)

SDL_ShowOpenFileDialog - Displays a dialog that lets the user select a file on their filesystem. (https://wiki.libsdl.org/SDL3/SDL_ShowOpenFileDialog)

func ShowOpenFolderDialog

func ShowOpenFolderDialog(callback DialogFileCallback, window *Window, defaultLocation string, allowMany bool)

SDL_ShowOpenFolderDialog - Displays a dialog that lets the user select a folder on their filesystem. (https://wiki.libsdl.org/SDL3/SDL_ShowOpenFolderDialog)

func ShowSaveFileDialog

func ShowSaveFileDialog(callback DialogFileCallback, window *Window, filters []DialogFileFilter, defaultLocation string)

SDL_ShowSaveFileDialog - Displays a dialog that lets the user choose a new or existing file on their filesystem. (https://wiki.libsdl.org/SDL3/SDL_ShowSaveFileDialog)

func ShowSimpleMessageBox

func ShowSimpleMessageBox(flags MessageBoxFlags, title, message string, window *Window) error

SDL_ShowSimpleMessageBox - Display a simple modal message box. (https://wiki.libsdl.org/SDL3/SDL_ShowSimpleMessageBox)

func Ticks

func Ticks() uint64

SDL_GetTicks - Get the number of milliseconds since SDL library initialization. (https://wiki.libsdl.org/SDL3/SDL_GetTicks)

func TicksNS

func TicksNS() uint64

SDL_GetTicksNS - Get the number of nanoseconds since SDL library initialization. (https://wiki.libsdl.org/SDL3/SDL_GetTicksNS)

func UnbindAudioStreams

func UnbindAudioStreams(streams []*AudioStream)

SDL_UnbindAudioStreams - Unbind a list of audio streams from their audio devices. (https://wiki.libsdl.org/SDL3/SDL_UnbindAudioStreams)

func UnlockJoysticks

func UnlockJoysticks()

SDL_UnlockJoysticks - Unlocking for atomic access to the joystick API. (https://wiki.libsdl.org/SDL3/SDL_UnlockJoysticks)

func UpdateGamepads

func UpdateGamepads()

SDL_UpdateGamepads - Manually pump gamepad updates if not using the loop. (https://wiki.libsdl.org/SDL3/SDL_UpdateGamepads)

func UpdateJoysticks

func UpdateJoysticks()

SDL_UpdateJoysticks - Update the current state of the open joysticks. (https://wiki.libsdl.org/SDL3/SDL_UpdateJoysticks)

func UpdateSensors

func UpdateSensors()

SDL_UpdateSensors - Update the current state of the open sensors. (https://wiki.libsdl.org/SDL3/SDL_UpdateSensors)

func UpdateTrays

func UpdateTrays()

SDL_UpdateTrays - Update the trays. (https://wiki.libsdl.org/SDL3/SDL_UpdateTrays)

func Vulkan_DestroySurface

func Vulkan_DestroySurface(instance VkInstance, surface VkSurfaceKHR, allocator VkAllocationCallbacksPtr)

SDL_Vulkan_DestroySurface - Destroy the Vulkan rendering surface of a window. (https://wiki.libsdl.org/SDL3/SDL_Vulkan_DestroySurface)

func Vulkan_GetInstanceExtensions

func Vulkan_GetInstanceExtensions() ([]string, error)

SDL_Vulkan_GetInstanceExtensions - Get the Vulkan instance extensions needed for vkCreateInstance. (https://wiki.libsdl.org/SDL3/SDL_Vulkan_GetInstanceExtensions)

func Vulkan_GetPresentationSupport

func Vulkan_GetPresentationSupport(instance VkInstance, physicalDevice VkPhysicalDevice, queueFamilyIndex uint32) (bool, error)

SDL_Vulkan_GetPresentationSupport - Query support for presentation via a given physical device and queue family. (https://wiki.libsdl.org/SDL3/SDL_Vulkan_GetPresentationSupport)

func Vulkan_LoadLibrary

func Vulkan_LoadLibrary(path string) error

SDL_Vulkan_LoadLibrary - Dynamically load the Vulkan loader library. (https://wiki.libsdl.org/SDL3/SDL_Vulkan_LoadLibrary)

func Vulkan_UnloadLibrary

func Vulkan_UnloadLibrary()

SDL_Vulkan_UnloadLibrary - Unload the Vulkan library previously loaded by [SDL_Vulkan_LoadLibrary](SDL_Vulkan_LoadLibrary)(). (https://wiki.libsdl.org/SDL3/SDL_Vulkan_UnloadLibrary)

func WINDOWPOS_CENTERED_DISPLAY

func WINDOWPOS_CENTERED_DISPLAY(X DisplayID) int32

SDL_WINDOWPOS_CENTERED_DISPLAY - Used to indicate that the window position should be centered. (https://wiki.libsdl.org/SDL3/SDL_WINDOWPOS_CENTERED_DISPLAY)

func WINDOWPOS_ISCENTERED

func WINDOWPOS_ISCENTERED(X DisplayID) bool

SDL_WINDOWPOS_ISCENTERED - A macro to test if the window position is marked as "centered." (https://wiki.libsdl.org/SDL3/SDL_WINDOWPOS_ISCENTERED)

func WINDOWPOS_ISUNDEFINED

func WINDOWPOS_ISUNDEFINED(X DisplayID) bool

SDL_WINDOWPOS_ISUNDEFINED - A macro to test if the window position is marked as "undefined." (https://wiki.libsdl.org/SDL3/SDL_WINDOWPOS_ISUNDEFINED)

func WINDOWPOS_UNDEFINED_DISPLAY

func WINDOWPOS_UNDEFINED_DISPLAY(X DisplayID) int32

SDL_WINDOWPOS_UNDEFINED_DISPLAY - Used to indicate that you don't care what the window position is. (https://wiki.libsdl.org/SDL3/SDL_WINDOWPOS_UNDEFINED_DISPLAY)

func WaitEvent

func WaitEvent(event *Event) error

SDL_WaitEvent - Wait indefinitely for the next available event. (https://wiki.libsdl.org/SDL3/SDL_WaitEvent)

func WaitEventTimeout

func WaitEventTimeout(event *Event, timeoutMS int32) bool

SDL_WaitEventTimeout - Wait until the specified timeout (in milliseconds) for the next available event. (https://wiki.libsdl.org/SDL3/SDL_WaitEventTimeout)

func WarpMouseGlobal

func WarpMouseGlobal(x, y float32) error

SDL_WarpMouseGlobal - Move the mouse to the given position in global screen space. (https://wiki.libsdl.org/SDL3/SDL_WarpMouseGlobal)

Types

type AppEvent_func

type AppEvent_func uintptr

SDL_AppEvent_func - Function pointer typedef for [SDL_AppEvent](SDL_AppEvent). (https://wiki.libsdl.org/SDL3/SDL_AppEvent_func)

type AppInit_func

type AppInit_func uintptr

SDL_AppInit_func - Function pointer typedef for [SDL_AppInit](SDL_AppInit). (https://wiki.libsdl.org/SDL3/SDL_AppInit_func)

type AppIterate_func

type AppIterate_func uintptr

SDL_AppIterate_func - Function pointer typedef for [SDL_AppIterate](SDL_AppIterate). (https://wiki.libsdl.org/SDL3/SDL_AppIterate_func)

type AppQuit_func

type AppQuit_func uintptr

SDL_AppQuit_func - Function pointer typedef for [SDL_AppQuit](SDL_AppQuit). (https://wiki.libsdl.org/SDL3/SDL_AppQuit_func)

type AsyncIO

type AsyncIO struct{}

SDL_AsyncIO - The asynchronous I/O operation structure. (https://wiki.libsdl.org/SDL3/SDL_AsyncIO)

func (*AsyncIO) Close

func (asyncio *AsyncIO) Close(flush bool, queue *AsyncIOQueue) error

SDL_CloseAsyncIO - Close and free any allocated resources for an async I/O object. (https://wiki.libsdl.org/SDL3/SDL_CloseAsyncIO)

func (*AsyncIO) Read

func (asyncio *AsyncIO) Read(ptr *byte, offset uint64, size uint64, queue *AsyncIOQueue, userdata *byte) bool

SDL_ReadAsyncIO - Start an async read. (https://wiki.libsdl.org/SDL3/SDL_ReadAsyncIO)

func (*AsyncIO) Size

func (asyncio *AsyncIO) Size() (int64, error)

SDL_GetAsyncIOSize - Use this function to get the size of the data stream in an SDL_AsyncIO. (https://wiki.libsdl.org/SDL3/SDL_GetAsyncIOSize)

func (*AsyncIO) Write

func (asyncio *AsyncIO) Write(ptr *byte, offset uint64, size uint64, queue *AsyncIOQueue, userdata *byte) bool

SDL_WriteAsyncIO - Start an async write. (https://wiki.libsdl.org/SDL3/SDL_WriteAsyncIO)

type AsyncIOOutcome

type AsyncIOOutcome struct {
	Asyncio          *AsyncIO        // what generated this task. This pointer will be invalid if it was closed!
	Type             AsyncIOTaskType // What sort of task was this? Read, write, etc?
	Result           AsyncIOResult   // the result of the work (success, failure, cancellation).
	Buffer           Pointer         // buffer where data was read/written.
	Offset           uint64          // offset in the SDL_AsyncIO where data was read/written.
	BytesRequested   uint64          // number of bytes the task was to read/write.
	BytesTransferred uint64          // actual number of bytes that were read/written.
	Userdata         Pointer         // pointer provided by the app when starting the task
}

SDL_AsyncIOOutcome - Information about a completed asynchronous I/O request. (https://wiki.libsdl.org/SDL3/SDL_AsyncIOOutcome)

type AsyncIOQueue

type AsyncIOQueue struct{}

SDL_AsyncIOQueue - A queue of completed asynchronous I/O tasks. (https://wiki.libsdl.org/SDL3/SDL_AsyncIOQueue)

func (*AsyncIOQueue) Destroy

func (queue *AsyncIOQueue) Destroy()

SDL_DestroyAsyncIOQueue - Destroy a previously-created async I/O task queue. (https://wiki.libsdl.org/SDL3/SDL_DestroyAsyncIOQueue)

func (*AsyncIOQueue) Result

func (queue *AsyncIOQueue) Result() (*AsyncIOOutcome, bool)

SDL_GetAsyncIOResult - Query an async I/O task queue for completed tasks. (https://wiki.libsdl.org/SDL3/SDL_GetAsyncIOResult)

func (*AsyncIOQueue) Signal

func (queue *AsyncIOQueue) Signal()

SDL_SignalAsyncIOQueue - Wake up any threads that are blocking in SDL_WaitAsyncIOResult(). (https://wiki.libsdl.org/SDL3/SDL_SignalAsyncIOQueue)

func (*AsyncIOQueue) WaitAsyncIOResult

func (queue *AsyncIOQueue) WaitAsyncIOResult(timeoutMS int32) (*AsyncIOOutcome, bool)

SDL_WaitAsyncIOResult - Block until an async I/O task queue has a completed task. (https://wiki.libsdl.org/SDL3/SDL_WaitAsyncIOResult)

type AsyncIOResult

type AsyncIOResult uint32

SDL_AsyncIOResult - Possible outcomes of an asynchronous I/O task. (https://wiki.libsdl.org/SDL3/SDL_AsyncIOResult)

const (
	ASYNCIO_COMPLETE AsyncIOResult = 0 // request was completed without error
	ASYNCIO_FAILURE  AsyncIOResult = 1 // request failed for some reason; check SDL_GetError()!
	ASYNCIO_CANCELED AsyncIOResult = 2 // request was canceled before completing.
)

type AsyncIOTaskType

type AsyncIOTaskType uint32

SDL_AsyncIOTaskType - Types of asynchronous I/O tasks. (https://wiki.libsdl.org/SDL3/SDL_AsyncIOTaskType)

const (
	ASYNCIO_TASK_READ  AsyncIOTaskType = 0 // A read operation.
	ASYNCIO_TASK_WRITE AsyncIOTaskType = 1 // A write operation.
	ASYNCIO_TASK_CLOSE AsyncIOTaskType = 2 // A close operation.
)

type AtomicInt

type AtomicInt struct {
	Value int32
}

SDL_AtomicInt - A type representing an atomic integer value. (https://wiki.libsdl.org/SDL3/SDL_AtomicInt)

func (*AtomicInt) Add

func (a *AtomicInt) Add(v int32) int32

SDL_AddAtomicInt - Add to an atomic variable. (https://wiki.libsdl.org/SDL3/SDL_AddAtomicInt)

func (*AtomicInt) CompareAndSwap

func (a *AtomicInt) CompareAndSwap(oldval, newval int32) bool

SDL_CompareAndSwapAtomicInt - Set an atomic variable to a new value if it is currently an old value. (https://wiki.libsdl.org/SDL3/SDL_CompareAndSwapAtomicInt)

func (*AtomicInt) Get

func (a *AtomicInt) Get() int32

SDL_GetAtomicInt - Get the value of an atomic variable. (https://wiki.libsdl.org/SDL3/SDL_GetAtomicInt)

func (*AtomicInt) Set

func (a *AtomicInt) Set(v int32) int32

SDL_SetAtomicInt - Set an atomic variable to a value. (https://wiki.libsdl.org/SDL3/SDL_SetAtomicInt)

type AtomicU32

type AtomicU32 struct {
	Value uint32
}

SDL_AtomicU32 - A type representing an atomic unsigned 32-bit value. (https://wiki.libsdl.org/SDL3/SDL_AtomicU32)

type AudioDeviceEvent

type AudioDeviceEvent struct {
	Type EventType // SDL_EVENT_AUDIO_DEVICE_ADDED, or SDL_EVENT_AUDIO_DEVICE_REMOVED, or SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED

	Timestamp uint64        // In nanoseconds, populated using SDL_GetTicksNS()
	Which     AudioDeviceID // SDL_AudioDeviceID for the device being added or removed or changing
	Recording bool          // false if a playback device, true if a recording device.
	// contains filtered or unexported fields
}

SDL_AudioDeviceEvent - Audio device event structure (event.adevice.*) (https://wiki.libsdl.org/SDL3/SDL_AudioDeviceEvent)

type AudioDeviceID

type AudioDeviceID uint32

SDL_AudioDeviceID - SDL Audio Device instance IDs. (https://wiki.libsdl.org/SDL3/SDL_AudioDeviceID)

const (
	AUDIO_DEVICE_DEFAULT_PLAYBACK  AudioDeviceID = 0xFFFFFFFF
	AUDIO_DEVICE_DEFAULT_RECORDING AudioDeviceID = 0xFFFFFFFE
)

func GetAudioPlaybackDevices

func GetAudioPlaybackDevices() ([]AudioDeviceID, error)

SDL_GetAudioPlaybackDevices - Get a list of currently-connected audio playback devices. (https://wiki.libsdl.org/SDL3/SDL_GetAudioPlaybackDevices)

func GetAudioRecordingDevices

func GetAudioRecordingDevices() ([]AudioDeviceID, error)

SDL_GetAudioRecordingDevices - Get a list of currently-connected audio recording devices. (https://wiki.libsdl.org/SDL3/SDL_GetAudioRecordingDevices)

func (AudioDeviceID) BindAudioStream

func (devid AudioDeviceID) BindAudioStream(stream *AudioStream) error

SDL_BindAudioStream - Bind a single audio stream to an audio device. (https://wiki.libsdl.org/SDL3/SDL_BindAudioStream)

func (AudioDeviceID) BindAudioStreams

func (devid AudioDeviceID) BindAudioStreams(streams []*AudioStream) error

SDL_BindAudioStreams - Bind a list of audio streams to an audio device. (https://wiki.libsdl.org/SDL3/SDL_BindAudioStreams)

func (AudioDeviceID) ChannelMap

func (devid AudioDeviceID) ChannelMap() []int

SDL_GetAudioDeviceChannelMap - Get the current channel map of an audio device. (https://wiki.libsdl.org/SDL3/SDL_GetAudioDeviceChannelMap)

func (AudioDeviceID) Close

func (devid AudioDeviceID) Close()

SDL_CloseAudioDevice - Close a previously-opened audio device. (https://wiki.libsdl.org/SDL3/SDL_CloseAudioDevice)

func (AudioDeviceID) Format

func (devid AudioDeviceID) Format() (*AudioSpec, int32, error)

SDL_GetAudioDeviceFormat - Get the current audio format of a specific audio device. (https://wiki.libsdl.org/SDL3/SDL_GetAudioDeviceFormat)

func (AudioDeviceID) Gain

func (devid AudioDeviceID) Gain() (float32, error)

SDL_GetAudioDeviceGain - Get the gain of an audio device. (https://wiki.libsdl.org/SDL3/SDL_GetAudioDeviceGain)

func (AudioDeviceID) IsPhysical

func (devid AudioDeviceID) IsPhysical() bool

SDL_IsAudioDevicePhysical - Determine if an audio device is physical (instead of logical). (https://wiki.libsdl.org/SDL3/SDL_IsAudioDevicePhysical)

func (AudioDeviceID) IsPlayback

func (devid AudioDeviceID) IsPlayback() bool

SDL_IsAudioDevicePlayback - Determine if an audio device is a playback device (instead of recording). (https://wiki.libsdl.org/SDL3/SDL_IsAudioDevicePlayback)

func (AudioDeviceID) Name

func (devid AudioDeviceID) Name() (string, error)

SDL_GetAudioDeviceName - Get the human-readable name of a specific audio device. (https://wiki.libsdl.org/SDL3/SDL_GetAudioDeviceName)

func (AudioDeviceID) OpenAudioDevice

func (devid AudioDeviceID) OpenAudioDevice(spec *AudioSpec) (AudioDeviceID, error)

SDL_OpenAudioDevice - Open a specific audio device. (https://wiki.libsdl.org/SDL3/SDL_OpenAudioDevice)

func (AudioDeviceID) OpenAudioDeviceStream

func (devid AudioDeviceID) OpenAudioDeviceStream(spec *AudioSpec, callback AudioStreamCallback) *AudioStream

SDL_OpenAudioDeviceStream - Convenience function for straightforward audio init for the common case. (https://wiki.libsdl.org/SDL3/SDL_OpenAudioDeviceStream)

func (AudioDeviceID) Pause

func (devid AudioDeviceID) Pause() error

SDL_PauseAudioDevice - Use this function to pause audio playback on a specified device. (https://wiki.libsdl.org/SDL3/SDL_PauseAudioDevice)

func (AudioDeviceID) Paused

func (devid AudioDeviceID) Paused() bool

SDL_AudioDevicePaused - Use this function to query if an audio device is paused. (https://wiki.libsdl.org/SDL3/SDL_AudioDevicePaused)

func (AudioDeviceID) Resume

func (devid AudioDeviceID) Resume() error

SDL_ResumeAudioDevice - Use this function to unpause audio playback on a specified device. (https://wiki.libsdl.org/SDL3/SDL_ResumeAudioDevice)

func (AudioDeviceID) SetAudioPostmixCallback

func (devid AudioDeviceID) SetAudioPostmixCallback(callback AudioPostmixCallback) bool

SDL_SetAudioPostmixCallback - Set a callback that fires when data is about to be fed to an audio device. (https://wiki.libsdl.org/SDL3/SDL_SetAudioPostmixCallback)

func (AudioDeviceID) SetGain

func (devid AudioDeviceID) SetGain(gain float32) error

SDL_SetAudioDeviceGain - Change the gain of an audio device. (https://wiki.libsdl.org/SDL3/SDL_SetAudioDeviceGain)

type AudioFormat

type AudioFormat uint32

SDL_AudioFormat - Audio format. (https://wiki.libsdl.org/SDL3/SDL_AudioFormat)

const (
	AUDIO_UNKNOWN AudioFormat = 0     // Unspecified audio format
	AUDIO_U8      AudioFormat = 8     // Unsigned 8-bit samples
	AUDIO_S8      AudioFormat = 32776 // Signed 8-bit samples
	AUDIO_S16LE   AudioFormat = 32784 // Signed 16-bit samples
	AUDIO_S16BE   AudioFormat = 36880 // As above, but big-endian byte order
	AUDIO_S32LE   AudioFormat = 32800 // 32-bit integer samples
	AUDIO_S32BE   AudioFormat = 36896 // As above, but big-endian byte order
	AUDIO_F32LE   AudioFormat = 33056 // 32-bit floating point samples
	AUDIO_F32BE   AudioFormat = 37152 // As above, but big-endian byte order
	AUDIO_S16     AudioFormat = 32784
	AUDIO_S32     AudioFormat = 32800
	AUDIO_F32     AudioFormat = 33056
)

func (AudioFormat) Name

func (format AudioFormat) Name() string

SDL_GetAudioFormatName - Get the human readable name of an audio format. (https://wiki.libsdl.org/SDL3/SDL_GetAudioFormatName)

func (AudioFormat) SilenceValueForFormat

func (format AudioFormat) SilenceValueForFormat() int32

SDL_GetSilenceValueForFormat - Get the appropriate memset value for silencing an audio format. (https://wiki.libsdl.org/SDL3/SDL_GetSilenceValueForFormat)

type AudioPostmixCallback

type AudioPostmixCallback uintptr

SDL_AudioPostmixCallback - A callback that fires when data is about to be fed to an audio device. (https://wiki.libsdl.org/SDL3/SDL_AudioPostmixCallback)

func NewAudioPostmixCallback

func NewAudioPostmixCallback(fn func(spec *AudioSpec, buffer []float32)) AudioPostmixCallback

type AudioSpec

type AudioSpec struct {
	Format   AudioFormat // Audio data format
	Channels int32       // Number of channels: 1 mono, 2 stereo, etc
	Freq     int32       // sample rate: sample frames per second
}

SDL_AudioSpec - Format specifier for audio data. (https://wiki.libsdl.org/SDL3/SDL_AudioSpec)

type AudioStream

type AudioStream struct{}

SDL_AudioStream - The opaque handle that represents an audio stream. (https://wiki.libsdl.org/SDL3/SDL_AudioStream)

func CreateAudioStream

func CreateAudioStream(srcSpec *AudioSpec, dstSpec *AudioSpec) (*AudioStream, error)

SDL_CreateAudioStream - Create a new audio stream. (https://wiki.libsdl.org/SDL3/SDL_CreateAudioStream)

func (*AudioStream) Available

func (stream *AudioStream) Available() (int32, error)

SDL_GetAudioStreamAvailable - Get the number of converted/resampled bytes available. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamAvailable)

func (*AudioStream) Clear

func (stream *AudioStream) Clear() error

SDL_ClearAudioStream - Clear any pending data in the stream. (https://wiki.libsdl.org/SDL3/SDL_ClearAudioStream)

func (*AudioStream) Data

func (stream *AudioStream) Data(buf []byte) (int32, error)

SDL_GetAudioStreamData - Get converted/resampled data from the stream. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamData)

func (*AudioStream) Destroy

func (stream *AudioStream) Destroy()

SDL_DestroyAudioStream - Free an audio stream. (https://wiki.libsdl.org/SDL3/SDL_DestroyAudioStream)

func (*AudioStream) Device

func (stream *AudioStream) Device() AudioDeviceID

SDL_GetAudioStreamDevice - Query an audio stream for its currently-bound device. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamDevice)

func (*AudioStream) DevicePaused

func (stream *AudioStream) DevicePaused() bool

SDL_AudioStreamDevicePaused - Use this function to query if an audio device associated with a stream is paused. (https://wiki.libsdl.org/SDL3/SDL_AudioStreamDevicePaused)

func (*AudioStream) Flush

func (stream *AudioStream) Flush() error

SDL_FlushAudioStream - Tell the stream that you're done sending data, and anything being buffered should be converted/resampled and made available immediately. (https://wiki.libsdl.org/SDL3/SDL_FlushAudioStream)

func (*AudioStream) Format

func (stream *AudioStream) Format(src, dst *AudioSpec) error

SDL_GetAudioStreamFormat - Query the current format of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamFormat)

func (*AudioStream) FrequencyRatio

func (stream *AudioStream) FrequencyRatio() (float32, error)

SDL_GetAudioStreamFrequencyRatio - Get the frequency ratio of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamFrequencyRatio)

func (*AudioStream) Gain

func (stream *AudioStream) Gain() (float32, error)

SDL_GetAudioStreamGain - Get the gain of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamGain)

func (*AudioStream) InputChannelMap

func (stream *AudioStream) InputChannelMap() []int

SDL_GetAudioStreamInputChannelMap - Get the current input channel map of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamInputChannelMap)

func (*AudioStream) Lock

func (stream *AudioStream) Lock() error

SDL_LockAudioStream - Lock an audio stream for serialized access. (https://wiki.libsdl.org/SDL3/SDL_LockAudioStream)

func (*AudioStream) OutputChannelMap

func (stream *AudioStream) OutputChannelMap() []int

SDL_GetAudioStreamOutputChannelMap - Get the current output channel map of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamOutputChannelMap)

func (*AudioStream) PauseDevice

func (stream *AudioStream) PauseDevice() error

SDL_PauseAudioStreamDevice - Use this function to pause audio playback on the audio device associated with an audio stream. (https://wiki.libsdl.org/SDL3/SDL_PauseAudioStreamDevice)

func (*AudioStream) Properties

func (stream *AudioStream) Properties() (PropertiesID, error)

SDL_GetAudioStreamProperties - Get the properties associated with an audio stream. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamProperties)

func (*AudioStream) PutData

func (stream *AudioStream) PutData(buf []byte) error

SDL_PutAudioStreamData - Add data to the stream. (https://wiki.libsdl.org/SDL3/SDL_PutAudioStreamData)

func (*AudioStream) Queued

func (stream *AudioStream) Queued() (int32, error)

SDL_GetAudioStreamQueued - Get the number of bytes currently queued. (https://wiki.libsdl.org/SDL3/SDL_GetAudioStreamQueued)

func (*AudioStream) ResumeDevice

func (stream *AudioStream) ResumeDevice() error

SDL_ResumeAudioStreamDevice - Use this function to unpause audio playback on the audio device associated with an audio stream. (https://wiki.libsdl.org/SDL3/SDL_ResumeAudioStreamDevice)

func (*AudioStream) SetFormat

func (stream *AudioStream) SetFormat(src, dst *AudioSpec) error

SDL_SetAudioStreamFormat - Change the input and output formats of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_SetAudioStreamFormat)

func (*AudioStream) SetFrequencyRatio

func (stream *AudioStream) SetFrequencyRatio(ratio float32) error

SDL_SetAudioStreamFrequencyRatio - Change the frequency ratio of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_SetAudioStreamFrequencyRatio)

func (*AudioStream) SetGain

func (stream *AudioStream) SetGain(gain float32) error

SDL_SetAudioStreamGain - Change the gain of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_SetAudioStreamGain)

func (*AudioStream) SetGetCallback

func (stream *AudioStream) SetGetCallback(callback AudioStreamCallback) bool

SDL_SetAudioStreamGetCallback - Set a callback that runs when data is requested from an audio stream. (https://wiki.libsdl.org/SDL3/SDL_SetAudioStreamGetCallback)

func (*AudioStream) SetInputChannelMap

func (stream *AudioStream) SetInputChannelMap(chmap []int32) error

SDL_SetAudioStreamInputChannelMap - Set the current input channel map of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_SetAudioStreamInputChannelMap)

func (*AudioStream) SetOutputChannelMap

func (stream *AudioStream) SetOutputChannelMap(chmap []int32) error

SDL_SetAudioStreamOutputChannelMap - Set the current output channel map of an audio stream. (https://wiki.libsdl.org/SDL3/SDL_SetAudioStreamOutputChannelMap)

func (*AudioStream) SetPutCallback

func (stream *AudioStream) SetPutCallback(callback AudioStreamCallback) bool

SDL_SetAudioStreamPutCallback - Set a callback that runs when data is added to an audio stream. (https://wiki.libsdl.org/SDL3/SDL_SetAudioStreamPutCallback)

func (*AudioStream) Unbind

func (stream *AudioStream) Unbind()

SDL_UnbindAudioStream - Unbind a single audio stream from its audio device. (https://wiki.libsdl.org/SDL3/SDL_UnbindAudioStream)

func (*AudioStream) Unlock

func (stream *AudioStream) Unlock() error

SDL_UnlockAudioStream - Unlock an audio stream for serialized access. (https://wiki.libsdl.org/SDL3/SDL_UnlockAudioStream)

type AudioStreamCallback

type AudioStreamCallback uintptr

SDL_AudioStreamCallback - A callback that fires when data passes through an [SDL_AudioStream](SDL_AudioStream). (https://wiki.libsdl.org/SDL3/SDL_AudioStreamCallback)

func NewAudioStreamCallback

func NewAudioStreamCallback(fn func(stream *AudioStream, additionalAmount, totalAmount int32)) AudioStreamCallback

type AudioStreamDataCompleteCallback

type AudioStreamDataCompleteCallback uintptr

SDL_AudioStreamDataCompleteCallback - A callback that fires for completed [SDL_PutAudioStreamDataNoCopy](SDL_PutAudioStreamDataNoCopy)() data. (https://wiki.libsdl.org/SDL3/SDL_AudioStreamDataCompleteCallback)

type BlendFactor

type BlendFactor uint32

SDL_BlendFactor - The normalized factor used to multiply pixel components. (https://wiki.libsdl.org/SDL3/SDL_BlendFactor)

const (
	BLENDFACTOR_ZERO                BlendFactor = 1  // 0, 0, 0, 0
	BLENDFACTOR_ONE                 BlendFactor = 2  // 1, 1, 1, 1
	BLENDFACTOR_SRC_COLOR           BlendFactor = 3  // srcR, srcG, srcB, srcA
	BLENDFACTOR_ONE_MINUS_SRC_COLOR BlendFactor = 4  // 1-srcR, 1-srcG, 1-srcB, 1-srcA
	BLENDFACTOR_SRC_ALPHA           BlendFactor = 5  // srcA, srcA, srcA, srcA
	BLENDFACTOR_ONE_MINUS_SRC_ALPHA BlendFactor = 6  // 1-srcA, 1-srcA, 1-srcA, 1-srcA
	BLENDFACTOR_DST_COLOR           BlendFactor = 7  // dstR, dstG, dstB, dstA
	BLENDFACTOR_ONE_MINUS_DST_COLOR BlendFactor = 8  // 1-dstR, 1-dstG, 1-dstB, 1-dstA
	BLENDFACTOR_DST_ALPHA           BlendFactor = 9  // dstA, dstA, dstA, dstA
	BLENDFACTOR_ONE_MINUS_DST_ALPHA BlendFactor = 10 // 1-dstA, 1-dstA, 1-dstA, 1-dstA
)

type BlendMode

type BlendMode uint32

SDL_BlendMode - A set of blend modes used in drawing operations. (https://wiki.libsdl.org/SDL3/SDL_BlendMode)

const (
	BLENDMODE_NONE                BlendMode = 0x00000000 /**< no blending: dstRGBA = srcRGBA */
	BLENDMODE_BLEND               BlendMode = 0x00000001 /**< alpha blending: dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)), dstA = srcA + (dstA * (1-srcA)) */
	BLENDMODE_BLEND_PREMULTIPLIED BlendMode = 0x00000010 /**< pre-multiplied alpha blending: dstRGBA = srcRGBA + (dstRGBA * (1-srcA)) */
	BLENDMODE_ADD                 BlendMode = 0x00000002 /**< additive blending: dstRGB = (srcRGB * srcA) + dstRGB, dstA = dstA */
	BLENDMODE_ADD_PREMULTIPLIED   BlendMode = 0x00000020 /**< pre-multiplied additive blending: dstRGB = srcRGB + dstRGB, dstA = dstA */
	BLENDMODE_MOD                 BlendMode = 0x00000004 /**< color modulate: dstRGB = srcRGB * dstRGB, dstA = dstA */
	BLENDMODE_MUL                 BlendMode = 0x00000008 /**< color multiply: dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)), dstA = dstA */
	BLENDMODE_INVALID             BlendMode = 0x7FFFFFFF
)

func ComposeCustomBlendMode

func ComposeCustomBlendMode(srcFactor, dstFactor BlendFactor, colorOp BlendOperation, srcAlphaFactor, dstAlphaFactor BlendFactor, alphaOp BlendOperation) BlendMode

SDL_ComposeCustomBlendMode - Compose a custom blend mode for renderers. (https://wiki.libsdl.org/SDL3/SDL_ComposeCustomBlendMode)

type BlendOperation

type BlendOperation uint32

SDL_BlendOperation - The blend operation used when combining source and destination pixel components. (https://wiki.libsdl.org/SDL3/SDL_BlendOperation)

const (
	BLENDOPERATION_ADD          BlendOperation = 1 // dst + src: supported by all renderers
	BLENDOPERATION_SUBTRACT     BlendOperation = 2 // src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan
	BLENDOPERATION_REV_SUBTRACT BlendOperation = 3 // dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan
	BLENDOPERATION_MINIMUM      BlendOperation = 4 // min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
	BLENDOPERATION_MAXIMUM      BlendOperation = 5 // max(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan
)

type BorderSize

type BorderSize struct {
	Top    int32
	Left   int32
	Bottom int32
	Right  int32
}

type Camera

type Camera struct{}

SDL_Camera - The opaque structure used to identify an opened SDL camera. (https://wiki.libsdl.org/SDL3/SDL_Camera)

func (*Camera) AcquireFrame

func (camera *Camera) AcquireFrame() (*Surface, uint64, error)

SDL_AcquireCameraFrame - Acquire a frame. (https://wiki.libsdl.org/SDL3/SDL_AcquireCameraFrame)

func (*Camera) Close

func (camera *Camera) Close()

SDL_CloseCamera - Use this function to shut down camera processing and close the camera device. (https://wiki.libsdl.org/SDL3/SDL_CloseCamera)

func (*Camera) Format

func (camera *Camera) Format() (*CameraSpec, error)

SDL_GetCameraFormat - Get the spec that a camera is using when generating images. (https://wiki.libsdl.org/SDL3/SDL_GetCameraFormat)

func (*Camera) ID

func (camera *Camera) ID() (CameraID, error)

SDL_GetCameraID - Get the instance ID of an opened camera. (https://wiki.libsdl.org/SDL3/SDL_GetCameraID)

func (*Camera) PermissionState

func (camera *Camera) PermissionState() CameraPermissionState

SDL_GetCameraPermissionState - Query if camera access has been approved by the user. (https://wiki.libsdl.org/SDL3/SDL_GetCameraPermissionState)

func (*Camera) Properties

func (camera *Camera) Properties() (PropertiesID, error)

SDL_GetCameraProperties - Get the properties associated with an opened camera. (https://wiki.libsdl.org/SDL3/SDL_GetCameraProperties)

func (*Camera) ReleaseFrame

func (camera *Camera) ReleaseFrame(frame *Surface)

SDL_ReleaseCameraFrame - Release a frame of video acquired from a camera. (https://wiki.libsdl.org/SDL3/SDL_ReleaseCameraFrame)

type CameraDeviceEvent

type CameraDeviceEvent struct {
	Type EventType // SDL_EVENT_CAMERA_DEVICE_ADDED, SDL_EVENT_CAMERA_DEVICE_REMOVED, SDL_EVENT_CAMERA_DEVICE_APPROVED, SDL_EVENT_CAMERA_DEVICE_DENIED

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	Which     CameraID // SDL_CameraID for the device being added or removed or changing
	// contains filtered or unexported fields
}

SDL_CameraDeviceEvent - Camera device event structure (event.cdevice.*) (https://wiki.libsdl.org/SDL3/SDL_CameraDeviceEvent)

type CameraID

type CameraID uint32

SDL_CameraID - This is a unique ID for a camera device for the time it is connected to the system, and is never reused for the lifetime of the application. (https://wiki.libsdl.org/SDL3/SDL_CameraID)

func GetCameras

func GetCameras() ([]CameraID, error)

SDL_GetCameras - Get a list of currently connected camera devices. (https://wiki.libsdl.org/SDL3/SDL_GetCameras)

func (CameraID) CameraName

func (instance_id CameraID) CameraName() string

SDL_GetCameraName - Get the human-readable device name for a camera. (https://wiki.libsdl.org/SDL3/SDL_GetCameraName)

func (CameraID) CameraPosition

func (instance_id CameraID) CameraPosition() CameraPosition

SDL_GetCameraPosition - Get the position of the camera in relation to the system. (https://wiki.libsdl.org/SDL3/SDL_GetCameraPosition)

func (CameraID) CameraSupportedFormats

func (instance_id CameraID) CameraSupportedFormats() ([]*CameraSpec, error)

SDL_GetCameraSupportedFormats - Get the list of native formats/sizes a camera supports. (https://wiki.libsdl.org/SDL3/SDL_GetCameraSupportedFormats)

func (CameraID) OpenCamera

func (instance_id CameraID) OpenCamera(spec *CameraSpec) (*Camera, error)

SDL_OpenCamera - Open a video recording device (a "camera"). (https://wiki.libsdl.org/SDL3/SDL_OpenCamera)

type CameraPermissionState

type CameraPermissionState uint32

SDL_CameraPermissionState - The current state of a request for camera access. (https://wiki.libsdl.org/SDL3/SDL_CameraPermissionState)

const (
	CAMERA_PERMISSION_STATE_DENIED   CameraPermissionState = 4294967295
	CAMERA_PERMISSION_STATE_PENDING  CameraPermissionState = 0
	CAMERA_PERMISSION_STATE_APPROVED CameraPermissionState = 1
)

type CameraPosition

type CameraPosition uint32

SDL_CameraPosition - The position of camera in relation to system device. (https://wiki.libsdl.org/SDL3/SDL_CameraPosition)

const (
	CAMERA_POSITION_UNKNOWN      CameraPosition = 0
	CAMERA_POSITION_FRONT_FACING CameraPosition = 1
	CAMERA_POSITION_BACK_FACING  CameraPosition = 2
)

type CameraSpec

type CameraSpec struct {
	Format               PixelFormat // Frame format
	Colorspace           Colorspace  // Frame colorspace
	Width                int32       // Frame width
	Height               int32       // Frame height
	FramerateNumerator   int32       // Frame rate numerator ((num / denom) == FPS, (denom / num) == duration in seconds)
	FramerateDenominator int32       // Frame rate denominator ((num / denom) == FPS, (denom / num) == duration in seconds)
}

SDL_CameraSpec - The details of an output format for a camera device. (https://wiki.libsdl.org/SDL3/SDL_CameraSpec)

type CleanupPropertyCallback

type CleanupPropertyCallback uintptr

SDL_CleanupPropertyCallback - A callback used to free resources when a property is deleted. (https://wiki.libsdl.org/SDL3/SDL_CleanupPropertyCallback)

func NewCleanupPropertyCallback

func NewCleanupPropertyCallback(fn func(value uintptr)) CleanupPropertyCallback

type ClipboardCleanupCallback

type ClipboardCleanupCallback uintptr

SDL_ClipboardCleanupCallback - Callback function that will be called when the clipboard is cleared, or new data is set. (https://wiki.libsdl.org/SDL3/SDL_ClipboardCleanupCallback)

func NewClipboardCleanupCallback

func NewClipboardCleanupCallback(fn func()) ClipboardCleanupCallback

type ClipboardDataCallback

type ClipboardDataCallback uintptr

SDL_ClipboardDataCallback - Callback function that will be called when data for the specified mime-type is requested by the OS. (https://wiki.libsdl.org/SDL3/SDL_ClipboardDataCallback)

func NewClipboardDataCallback

func NewClipboardDataCallback(fn func(mimeType string) []byte) ClipboardDataCallback

type ClipboardEvent

type ClipboardEvent struct {
	Type         EventType
	Reserved     uint32
	Timestamp    uint64
	Owner        bool
	NumMimeTypes int32
	MimeTypes    []string
}

SDL_ClipboardEvent - An event triggered when the clipboard contents have changed (event.clipboard.*) (https://wiki.libsdl.org/SDL3/SDL_ClipboardEvent)

type Color

type Color struct {
	R uint8
	G uint8
	B uint8
	A uint8
}

SDL_Color - A structure that represents a color as RGBA components. (https://wiki.libsdl.org/SDL3/SDL_Color)

type Colorspace

type Colorspace uint32

SDL_Colorspace - Colorspace definitions. (https://wiki.libsdl.org/SDL3/SDL_Colorspace)

const (
	COLORSPACE_UNKNOWN        Colorspace = 0
	COLORSPACE_SRGB           Colorspace = 301991328 // Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
	COLORSPACE_SRGB_LINEAR    Colorspace = 301991168 // Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
	COLORSPACE_HDR10          Colorspace = 301999616 // Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
	COLORSPACE_JPEG           Colorspace = 570426566 // Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
	COLORSPACE_BT601_LIMITED  Colorspace = 554703046 // Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
	COLORSPACE_BT601_FULL     Colorspace = 571480262 // Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
	COLORSPACE_BT709_LIMITED  Colorspace = 554697761 // Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
	COLORSPACE_BT709_FULL     Colorspace = 571474977 // Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
	COLORSPACE_BT2020_LIMITED Colorspace = 554706441 // Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
	COLORSPACE_BT2020_FULL    Colorspace = 571483657 // Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
	COLORSPACE_RGB_DEFAULT    Colorspace = 301991328 // The default colorspace for RGB surfaces if no colorspace is specified
	COLORSPACE_YUV_DEFAULT    Colorspace = 554703046 // The default colorspace for YUV surfaces if no colorspace is specified
)

type CommonEvent

type CommonEvent struct {
	Type uint32 // Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration

	Timestamp uint64 // In nanoseconds, populated using SDL_GetTicksNS()
	// contains filtered or unexported fields
}

SDL_CommonEvent - Fields shared by every event (https://wiki.libsdl.org/SDL3/SDL_CommonEvent)

type Condition

type Condition struct{}

SDL_Condition - A means to block multiple threads until a condition is satisfied. (https://wiki.libsdl.org/SDL3/SDL_Condition)

type Cursor

type Cursor struct{}

SDL_Cursor - The structure used to identify an SDL cursor. (https://wiki.libsdl.org/SDL3/SDL_Cursor)

func CreateAnimatedCursor

func CreateAnimatedCursor(frames []CursorFrameInfo, hotX, hotY int32) (*Cursor, error)

SDL_CreateAnimatedCursor - Create an animated color cursor. (https://wiki.libsdl.org/SDL3/SDL_CreateAnimatedCursor)

func CreateCursor

func CreateCursor(data, mask []byte, width, height, hotX, hotY int) (*Cursor, error)

SDL_CreateCursor - Create a cursor using the specified bitmap data and mask (in MSB format). (https://wiki.libsdl.org/SDL3/SDL_CreateCursor)

func CreateSystemCursor

func CreateSystemCursor(id SystemCursor) (*Cursor, error)

SDL_CreateSystemCursor - Create a system cursor. (https://wiki.libsdl.org/SDL3/SDL_CreateSystemCursor)

func GetCursor

func GetCursor() *Cursor

SDL_GetCursor - Get the active cursor. (https://wiki.libsdl.org/SDL3/SDL_GetCursor)

func GetDefaultCursor

func GetDefaultCursor() (*Cursor, error)

SDL_GetDefaultCursor - Get the default cursor. (https://wiki.libsdl.org/SDL3/SDL_GetDefaultCursor)

func (*Cursor) Destroy

func (cursor *Cursor) Destroy()

SDL_DestroyCursor - Free a previously-created cursor. (https://wiki.libsdl.org/SDL3/SDL_DestroyCursor)

type CursorFrameInfo

type CursorFrameInfo struct {
	Surface  *Surface // The surface data for this frame
	Duration uint32   // The frame duration in milliseconds (a duration of 0 is infinite)
}

SDL_CursorFrameInfo - Animated cursor frame info. (https://wiki.libsdl.org/SDL3/SDL_CursorFrameInfo)

type DateFormat

type DateFormat uint32

SDL_DateFormat - The preferred date format of the current system locale. (https://wiki.libsdl.org/SDL3/SDL_DateFormat)

const (
	DATE_FORMAT_YYYYMMDD DateFormat = 0 // Year/Month/Day
	DATE_FORMAT_DDMMYYYY DateFormat = 1 // Day/Month/Year
	DATE_FORMAT_MMDDYYYY DateFormat = 2 // Month/Day/Year
)

type DateTime

type DateTime struct {
	Year       int32 // Year
	Month      int32 // Month [01-12]
	Day        int32 // Day of the month [01-31]
	Hour       int32 // Hour [0-23]
	Minute     int32 // Minute [0-59]
	Second     int32 // Seconds [0-60]
	Nanosecond int32 // Nanoseconds [0-999999999]
	DayOfWeek  int32 // Day of the week [0-6] (0 being Sunday)
	UtcOffset  int32 // Seconds east of UTC
}

SDL_DateTime - A structure holding a calendar date and time broken down into its components. (https://wiki.libsdl.org/SDL3/SDL_DateTime)

func (*DateTime) ToTime

func (dt *DateTime) ToTime() (Time, error)

SDL_DateTimeToTime - Converts a calendar time to an SDL_Time in nanoseconds since the epoch. (https://wiki.libsdl.org/SDL3/SDL_DateTimeToTime)

type DialogFileCallback

type DialogFileCallback uintptr

SDL_DialogFileCallback - Callback used by file dialog functions. (https://wiki.libsdl.org/SDL3/SDL_DialogFileCallback)

func NewDialogFileCallback

func NewDialogFileCallback(fn func(fileList []string, filter int32)) DialogFileCallback

type DialogFileFilter

type DialogFileFilter struct {
	Name    string
	Pattern string
}

SDL_DialogFileFilter - An entry for filters for file dialogs. (https://wiki.libsdl.org/SDL3/SDL_DialogFileFilter)

type DisplayEvent

type DisplayEvent struct {
	Type EventType // SDL_EVENT_DISPLAY_*

	Timestamp uint64    // In nanoseconds, populated using SDL_GetTicksNS()
	DisplayID DisplayID // The associated display
	Data1     int32     // event dependent data
	Data2     int32     // event dependent data
	// contains filtered or unexported fields
}

SDL_DisplayEvent - Display state change event data (event.display.*) (https://wiki.libsdl.org/SDL3/SDL_DisplayEvent)

type DisplayID

type DisplayID uint32

SDL_DisplayID - This is a unique ID for a display for the time it is connected to the system, and is never reused for the lifetime of the application. (https://wiki.libsdl.org/SDL3/SDL_DisplayID)

func GetDisplayForPoint

func GetDisplayForPoint(point *Point) DisplayID

SDL_GetDisplayForPoint - Get the display containing a point. (https://wiki.libsdl.org/SDL3/SDL_GetDisplayForPoint)

func GetDisplayForRect

func GetDisplayForRect(rect *Rect) DisplayID

SDL_GetDisplayForRect - Get the display primarily containing a rect. (https://wiki.libsdl.org/SDL3/SDL_GetDisplayForRect)

func GetDisplayForWindow

func GetDisplayForWindow(window *Window) DisplayID

SDL_GetDisplayForWindow - Get the display associated with a window. (https://wiki.libsdl.org/SDL3/SDL_GetDisplayForWindow)

func GetDisplays

func GetDisplays() ([]DisplayID, error)

SDL_GetDisplays - Get a list of currently connected displays. (https://wiki.libsdl.org/SDL3/SDL_GetDisplays)

func GetPrimaryDisplay

func GetPrimaryDisplay() DisplayID

SDL_GetPrimaryDisplay - Return the primary display. (https://wiki.libsdl.org/SDL3/SDL_GetPrimaryDisplay)

func (DisplayID) Bounds

func (displayID DisplayID) Bounds() (*Rect, error)

SDL_GetDisplayBounds - Get the desktop area represented by a display. (https://wiki.libsdl.org/SDL3/SDL_GetDisplayBounds)

func (DisplayID) ClosestFullscreenDisplayMode

func (displayID DisplayID) ClosestFullscreenDisplayMode(w, h int32, refreshRate float32, includeHighDensityModes bool) (*DisplayMode, error)

SDL_GetClosestFullscreenDisplayMode - Get the closest match to the requested display mode. (https://wiki.libsdl.org/SDL3/SDL_GetClosestFullscreenDisplayMode)

func (DisplayID) ContentScale

func (displayID DisplayID) ContentScale() (float32, error)

SDL_GetDisplayContentScale - Get the content scale of a display. (https://wiki.libsdl.org/SDL3/SDL_GetDisplayContentScale)

func (DisplayID) CurrentDisplayMode

func (displayID DisplayID) CurrentDisplayMode() (*DisplayMode, error)

SDL_GetCurrentDisplayMode - Get information about the current display mode. (https://wiki.libsdl.org/SDL3/SDL_GetCurrentDisplayMode)

func (DisplayID) CurrentDisplayOrientation

func (displayID DisplayID) CurrentDisplayOrientation() DisplayOrientation

SDL_GetCurrentDisplayOrientation - Get the orientation of a display. (https://wiki.libsdl.org/SDL3/SDL_GetCurrentDisplayOrientation)

func (DisplayID) DesktopDisplayMode

func (displayID DisplayID) DesktopDisplayMode() (*DisplayMode, error)

SDL_GetDesktopDisplayMode - Get information about the desktop's display mode. (https://wiki.libsdl.org/SDL3/SDL_GetDesktopDisplayMode)

func (DisplayID) FullscreenDisplayModes

func (displayID DisplayID) FullscreenDisplayModes() ([]*DisplayMode, error)

SDL_GetFullscreenDisplayModes - Get a list of fullscreen display modes available on a display. (https://wiki.libsdl.org/SDL3/SDL_GetFullscreenDisplayModes)

func (DisplayID) Name

func (displayID DisplayID) Name() (string, error)

SDL_GetDisplayName - Get the name of a display in UTF-8 encoding. (https://wiki.libsdl.org/SDL3/SDL_GetDisplayName)

func (DisplayID) NaturalDisplayOrientation

func (displayID DisplayID) NaturalDisplayOrientation() DisplayOrientation

SDL_GetNaturalDisplayOrientation - Get the orientation of a display when it is unrotated. (https://wiki.libsdl.org/SDL3/SDL_GetNaturalDisplayOrientation)

func (DisplayID) Properties

func (displayID DisplayID) Properties() (PropertiesID, error)

SDL_GetDisplayProperties - Get the properties associated with a display. (https://wiki.libsdl.org/SDL3/SDL_GetDisplayProperties)

func (DisplayID) UsableBounds

func (displayID DisplayID) UsableBounds() (*Rect, error)

SDL_GetDisplayUsableBounds - Get the usable desktop area represented by a display, in screen coordinates. (https://wiki.libsdl.org/SDL3/SDL_GetDisplayUsableBounds)

type DisplayMode

type DisplayMode struct {
	DisplayID              DisplayID        // the display this mode is associated with
	Format                 PixelFormat      // pixel format
	W                      int32            // width
	H                      int32            // height
	PixelDensity           float32          // scale converting size to pixels (e.g. a 1920x1080 mode with 2.0 scale would have 3840x2160 pixels)
	RefreshRate            float32          // refresh rate (or 0.0f for unspecified)
	RefreshRateNumerator   int32            // precise refresh rate numerator (or 0 for unspecified)
	RefreshRateDenominator int32            // precise refresh rate denominator
	Internal               *DisplayModeData // Private
}

SDL_DisplayMode - The structure that defines a display mode. (https://wiki.libsdl.org/SDL3/SDL_DisplayMode)

type DisplayModeData

type DisplayModeData struct{}

SDL_DisplayModeData - Internal display mode data. (https://wiki.libsdl.org/SDL3/SDL_DisplayModeData)

type DisplayOrientation

type DisplayOrientation uint32

SDL_DisplayOrientation - Display orientation values; the way a display is rotated. (https://wiki.libsdl.org/SDL3/SDL_DisplayOrientation)

const (
	ORIENTATION_UNKNOWN           DisplayOrientation = 0 // The display orientation can't be determined
	ORIENTATION_LANDSCAPE         DisplayOrientation = 1 // The display is in landscape mode, with the right side up, relative to portrait mode
	ORIENTATION_LANDSCAPE_FLIPPED DisplayOrientation = 2 // The display is in landscape mode, with the left side up, relative to portrait mode
	ORIENTATION_PORTRAIT          DisplayOrientation = 3 // The display is in portrait mode
	ORIENTATION_PORTRAIT_FLIPPED  DisplayOrientation = 4 // The display is in portrait mode, upside down
)

type DropEvent

type DropEvent struct {
	Type EventType // SDL_EVENT_DROP_BEGIN or SDL_EVENT_DROP_FILE or SDL_EVENT_DROP_TEXT or SDL_EVENT_DROP_COMPLETE or SDL_EVENT_DROP_POSITION

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID // The window that was dropped on, if any
	X         float32  // X coordinate, relative to window (not on begin)
	Y         float32  // Y coordinate, relative to window (not on begin)
	Source    string   // The source app that sent this drop event, or NULL if that isn't available
	Data      string   // The text for SDL_EVENT_DROP_TEXT and the file name for SDL_EVENT_DROP_FILE, NULL for other events
	// contains filtered or unexported fields
}

SDL_DropEvent - An event used to drop text or request a file open by the system (event.drop.*) (https://wiki.libsdl.org/SDL3/SDL_DropEvent)

type EGLAttribArrayCallback

type EGLAttribArrayCallback uintptr

SDL_EGLAttribArrayCallback - EGL platform attribute initialization callback. (https://wiki.libsdl.org/SDL3/SDL_EGLAttribArrayCallback)

type EGLConfig

type EGLConfig uintptr

SDL_EGLConfig - Opaque type for an EGL config. (https://wiki.libsdl.org/SDL3/SDL_EGLConfig)

func EGL_GetCurrentConfig

func EGL_GetCurrentConfig() (EGLConfig, error)

SDL_EGL_GetCurrentConfig - Get the currently active EGL config. (https://wiki.libsdl.org/SDL3/SDL_EGL_GetCurrentConfig)

type EGLDisplay

type EGLDisplay uintptr

SDL_EGLDisplay - Opaque type for an EGL display. (https://wiki.libsdl.org/SDL3/SDL_EGLDisplay)

func EGL_GetCurrentDisplay

func EGL_GetCurrentDisplay() (EGLDisplay, error)

SDL_EGL_GetCurrentDisplay - Get the currently active EGL display. (https://wiki.libsdl.org/SDL3/SDL_EGL_GetCurrentDisplay)

type EGLIntArrayCallback

type EGLIntArrayCallback uintptr

SDL_EGLIntArrayCallback - EGL surface/context attribute initialization callback types. (https://wiki.libsdl.org/SDL3/SDL_EGLIntArrayCallback)

type EGLSurface

type EGLSurface uintptr

SDL_EGLSurface - Opaque type for an EGL surface. (https://wiki.libsdl.org/SDL3/SDL_EGLSurface)

func EGL_GetWindowSurface

func EGL_GetWindowSurface(window *Window) EGLSurface

SDL_EGL_GetWindowSurface - Get the EGL surface associated with the window. (https://wiki.libsdl.org/SDL3/SDL_EGL_GetWindowSurface)

type EnumerateDirectoryCallback

type EnumerateDirectoryCallback uintptr

SDL_EnumerateDirectoryCallback - Callback for directory enumeration. (https://wiki.libsdl.org/SDL3/SDL_EnumerateDirectoryCallback)

func NewEnumerateDirectoryCallback

func NewEnumerateDirectoryCallback(fn func(dirname, fname string)) EnumerateDirectoryCallback

type EnumeratePropertiesCallback

type EnumeratePropertiesCallback uintptr

SDL_EnumeratePropertiesCallback - A callback used to enumerate all the properties in a group of properties. (https://wiki.libsdl.org/SDL3/SDL_EnumeratePropertiesCallback)

func NewEnumeratePropertiesCallback

func NewEnumeratePropertiesCallback(fn func(props PropertiesID, name string)) EnumeratePropertiesCallback

type Event

type Event struct {
	Type EventType
	// contains filtered or unexported fields
}

TODO: union type https://github.com/libsdl-org/SDL/blob/release-3.2.2/include/SDL3/SDL_events.h#L986

func AppendEvents

func AppendEvents(events []Event) ([]Event, error)

AppendEvents adds the messages from the event queue to the provided slice and returns it. It is useful to avoid re-allocation, assuming events already has the required capacity, but you may also pass nil as an argument. A good pattern would be to zero the same slice each update: events = events[:0] before calling PumpEvents() and then AppendEvents(). This function calls SDL_PeepEvents with the action GETEVENT, which means that it will remove the messages from the event queue, just like PollEvent. This helper exists to minimize calls to the library, so that there is only a fixed cost of purego/Cgo syscall overhead as opposed to calling PollEvent in a loop.

func (*Event) AudioDeviceEvent

func (e *Event) AudioDeviceEvent() *AudioDeviceEvent

func (*Event) CameraDeviceEvent

func (e *Event) CameraDeviceEvent() *CameraDeviceEvent

func (*Event) ClipboardEvent

func (e *Event) ClipboardEvent() *ClipboardEvent

func (*Event) CommonEvent

func (e *Event) CommonEvent() *CommonEvent

func (*Event) Description

func (event *Event) Description() string

SDL_GetEventDescription - Generate an English description of an event. (https://wiki.libsdl.org/SDL3/SDL_GetEventDescription)

func (*Event) DisplayEvent

func (e *Event) DisplayEvent() *DisplayEvent

func (*Event) DropEvent

func (e *Event) DropEvent() *DropEvent

func (*Event) GamepadAxisEvent

func (e *Event) GamepadAxisEvent() *GamepadAxisEvent

func (*Event) GamepadButtonEvent

func (e *Event) GamepadButtonEvent() *GamepadButtonEvent

func (*Event) GamepadDeviceEvent

func (e *Event) GamepadDeviceEvent() *GamepadDeviceEvent

func (*Event) GamepadSensorEvent

func (e *Event) GamepadSensorEvent() *GamepadSensorEvent

func (*Event) GamepadTouchpadEvent

func (e *Event) GamepadTouchpadEvent() *GamepadTouchpadEvent

func (*Event) JoyAxisEvent

func (e *Event) JoyAxisEvent() *JoyAxisEvent

func (*Event) JoyBallEvent

func (e *Event) JoyBallEvent() *JoyBallEvent

func (*Event) JoyBatteryEvent

func (e *Event) JoyBatteryEvent() *JoyBatteryEvent

func (*Event) JoyButtonEvent

func (e *Event) JoyButtonEvent() *JoyButtonEvent

func (*Event) JoyDeviceEvent

func (e *Event) JoyDeviceEvent() *JoyDeviceEvent

func (*Event) JoyHatEvent

func (e *Event) JoyHatEvent() *JoyHatEvent

func (*Event) KeyboardDeviceEvent

func (e *Event) KeyboardDeviceEvent() *KeyboardDeviceEvent

func (*Event) KeyboardEvent

func (e *Event) KeyboardEvent() *KeyboardEvent

func (*Event) MouseButtonEvent

func (e *Event) MouseButtonEvent() *MouseButtonEvent

func (*Event) MouseMotionEvent

func (e *Event) MouseMotionEvent() *MouseMotionEvent

func (*Event) MouseWheelEvent

func (e *Event) MouseWheelEvent() *MouseWheelEvent

func (*Event) PenAxisEvent

func (e *Event) PenAxisEvent() *PenAxisEvent

func (*Event) PenButtonEvent

func (e *Event) PenButtonEvent() *PenButtonEvent

func (*Event) PenMotionEvent

func (e *Event) PenMotionEvent() *PenMotionEvent

func (*Event) PenProximityEvent

func (e *Event) PenProximityEvent() *PenProximityEvent

func (*Event) PenTouchEvent

func (e *Event) PenTouchEvent() *PenTouchEvent

func (*Event) QuitEvent

func (e *Event) QuitEvent() *QuitEvent

func (*Event) RenderEvent

func (e *Event) RenderEvent() *RenderEvent

func (*Event) SensorEvent

func (e *Event) SensorEvent() *SensorEvent

func (*Event) TextEditingCandidatesEvent

func (e *Event) TextEditingCandidatesEvent() *TextEditingCandidatesEvent

func (*Event) TextEditingEvent

func (e *Event) TextEditingEvent() *TextEditingEvent

func (*Event) TextInputEvent

func (e *Event) TextInputEvent() *TextInputEvent

func (*Event) TouchFingerEvent

func (e *Event) TouchFingerEvent() *TouchFingerEvent

func (*Event) UserEvent

func (e *Event) UserEvent() *UserEvent

func (*Event) Window

func (event *Event) Window() *Window

SDL_GetWindowFromEvent - Get window associated with an event. (https://wiki.libsdl.org/SDL3/SDL_GetWindowFromEvent)

func (*Event) WindowEvent

func (e *Event) WindowEvent() *WindowEvent

type EventAction

type EventAction uint32

SDL_EventAction - The type of action to request from [SDL_PeepEvents](SDL_PeepEvents)(). (https://wiki.libsdl.org/SDL3/SDL_EventAction)

const (
	ADDEVENT  EventAction = 0 // Add events to the back of the queue.
	PEEKEVENT EventAction = 1 // Check but don't remove events from the queue front.
	GETEVENT  EventAction = 2 // Retrieve/remove events from the front of the queue.
)

type EventFilter

type EventFilter uintptr

SDL_EventFilter - A function pointer used for callbacks that watch the event queue. (https://wiki.libsdl.org/SDL3/SDL_EventFilter)

func GetEventFilter

func GetEventFilter() EventFilter

SDL_GetEventFilter - Query the current event filter. (https://wiki.libsdl.org/SDL3/SDL_GetEventFilter)

func NewEventFilter

func NewEventFilter(fn func(event *Event) bool) EventFilter

type EventType

type EventType uint32

SDL_EventType - The types of events that can be delivered. (https://wiki.libsdl.org/SDL3/SDL_EventType)

const (
	EVENT_FIRST                         EventType = 0   // Unused (do not remove)
	EVENT_QUIT                          EventType = 256 // User-requested quit
	EVENT_TERMINATING                   EventType = 257 // The application is being terminated by the OS. This event must be handled in a callback set with SDL_AddEventWatch(). Called on iOS in applicationWillTerminate() Called on Android in onDestroy()
	EVENT_LOW_MEMORY                    EventType = 258 // The application is low on memory, free memory if possible. This event must be handled in a callback set with SDL_AddEventWatch(). Called on iOS in applicationDidReceiveMemoryWarning() Called on Android in onTrimMemory()
	EVENT_WILL_ENTER_BACKGROUND         EventType = 259 // The application is about to enter the background. This event must be handled in a callback set with SDL_AddEventWatch(). Called on iOS in applicationWillResignActive() Called on Android in onPause()
	EVENT_DID_ENTER_BACKGROUND          EventType = 260 // The application did enter the background and may not get CPU for some time. This event must be handled in a callback set with SDL_AddEventWatch(). Called on iOS in applicationDidEnterBackground() Called on Android in onPause()
	EVENT_WILL_ENTER_FOREGROUND         EventType = 261 // The application is about to enter the foreground. This event must be handled in a callback set with SDL_AddEventWatch(). Called on iOS in applicationWillEnterForeground() Called on Android in onResume()
	EVENT_DID_ENTER_FOREGROUND          EventType = 262 // The application is now interactive. This event must be handled in a callback set with SDL_AddEventWatch(). Called on iOS in applicationDidBecomeActive() Called on Android in onResume()
	EVENT_LOCALE_CHANGED                EventType = 263 // The user's locale preferences have changed.
	EVENT_SYSTEM_THEME_CHANGED          EventType = 264 // The system theme changed
	EVENT_DISPLAY_ORIENTATION           EventType = 337 // Display orientation has changed to data1
	EVENT_DISPLAY_ADDED                 EventType = 338 // Display has been added to the system
	EVENT_DISPLAY_REMOVED               EventType = 339 // Display has been removed from the system
	EVENT_DISPLAY_MOVED                 EventType = 340 // Display has changed position
	EVENT_DISPLAY_DESKTOP_MODE_CHANGED  EventType = 341 // Display has changed desktop mode
	EVENT_DISPLAY_CURRENT_MODE_CHANGED  EventType = 342 // Display has changed current mode
	EVENT_DISPLAY_CONTENT_SCALE_CHANGED EventType = 343 // Display has changed content scale
	EVENT_DISPLAY_USABLE_BOUNDS_CHANGED EventType = 344 // Display has changed usable bounds
	EVENT_DISPLAY_FIRST                 EventType = 337
	EVENT_DISPLAY_LAST                  EventType = 344
	EVENT_WINDOW_SHOWN                  EventType = 514 // Window has been shown
	EVENT_WINDOW_HIDDEN                 EventType = 515 // Window has been hidden
	EVENT_WINDOW_EXPOSED                EventType = 516 // Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event. data1 is 1 for live-resize expose events, 0 otherwise.
	EVENT_WINDOW_MOVED                  EventType = 517 // Window has been moved to data1, data2
	EVENT_WINDOW_RESIZED                EventType = 518 // Window has been resized to data1xdata2
	EVENT_WINDOW_PIXEL_SIZE_CHANGED     EventType = 519 // The pixel size of the window has changed to data1xdata2
	EVENT_WINDOW_METAL_VIEW_RESIZED     EventType = 520 // The pixel size of a Metal view associated with the window has changed
	EVENT_WINDOW_MINIMIZED              EventType = 521 // Window has been minimized
	EVENT_WINDOW_MAXIMIZED              EventType = 522 // Window has been maximized
	EVENT_WINDOW_RESTORED               EventType = 523 // Window has been restored to normal size and position
	EVENT_WINDOW_MOUSE_ENTER            EventType = 524 // Window has gained mouse focus
	EVENT_WINDOW_MOUSE_LEAVE            EventType = 525 // Window has lost mouse focus
	EVENT_WINDOW_FOCUS_GAINED           EventType = 526 // Window has gained keyboard focus
	EVENT_WINDOW_FOCUS_LOST             EventType = 527 // Window has lost keyboard focus
	EVENT_WINDOW_CLOSE_REQUESTED        EventType = 528 // The window manager requests that the window be closed
	EVENT_WINDOW_HIT_TEST               EventType = 529 // Window had a hit test that wasn't SDL_HITTEST_NORMAL
	EVENT_WINDOW_ICCPROF_CHANGED        EventType = 530 // The window's ICC profile has changed
	EVENT_WINDOW_DISPLAY_CHANGED        EventType = 531 // Window has been moved to display data1
	EVENT_WINDOW_DISPLAY_SCALE_CHANGED  EventType = 532 // Window display scale has been changed
	EVENT_WINDOW_SAFE_AREA_CHANGED      EventType = 533 // The window safe area has been changed
	EVENT_WINDOW_OCCLUDED               EventType = 534 // The window has been occluded
	EVENT_WINDOW_ENTER_FULLSCREEN       EventType = 535 // The window has entered fullscreen mode
	EVENT_WINDOW_LEAVE_FULLSCREEN       EventType = 536 // The window has left fullscreen mode
	EVENT_WINDOW_DESTROYED              EventType = 537 // The window with the associated ID is being or has been destroyed. If this message is being handled in an event watcher, the window handle is still valid and can still be used to retrieve any properties associated with the window. Otherwise, the handle has already been destroyed and all resources associated with it are invalid
	EVENT_WINDOW_HDR_STATE_CHANGED      EventType = 538 // Window HDR properties have changed
	EVENT_WINDOW_FIRST                  EventType = 514
	EVENT_WINDOW_LAST                   EventType = 538
	EVENT_KEY_DOWN                      EventType = 768  // Key pressed
	EVENT_KEY_UP                        EventType = 769  // Key released
	EVENT_TEXT_EDITING                  EventType = 770  // Keyboard text editing (composition)
	EVENT_TEXT_INPUT                    EventType = 771  // Keyboard text input
	EVENT_KEYMAP_CHANGED                EventType = 772  // Keymap changed due to a system event such as an input language or keyboard layout change.
	EVENT_KEYBOARD_ADDED                EventType = 773  // A new keyboard has been inserted into the system
	EVENT_KEYBOARD_REMOVED              EventType = 774  // A keyboard has been removed
	EVENT_TEXT_EDITING_CANDIDATES       EventType = 775  // Keyboard text editing candidates
	EVENT_SCREEN_KEYBOARD_SHOWN         EventType = 776  // The on-screen keyboard has been shown
	EVENT_SCREEN_KEYBOARD_HIDDEN        EventType = 777  // The on-screen keyboard has been hidden
	EVENT_MOUSE_MOTION                  EventType = 1024 // Mouse moved
	EVENT_MOUSE_BUTTON_DOWN             EventType = 1025 // Mouse button pressed
	EVENT_MOUSE_BUTTON_UP               EventType = 1026 // Mouse button released
	EVENT_MOUSE_WHEEL                   EventType = 1027 // Mouse wheel motion
	EVENT_MOUSE_ADDED                   EventType = 1028 // A new mouse has been inserted into the system
	EVENT_MOUSE_REMOVED                 EventType = 1029 // A mouse has been removed
	EVENT_JOYSTICK_AXIS_MOTION          EventType = 1536 // Joystick axis motion
	EVENT_JOYSTICK_BALL_MOTION          EventType = 1537 // Joystick trackball motion
	EVENT_JOYSTICK_HAT_MOTION           EventType = 1538 // Joystick hat position change
	EVENT_JOYSTICK_BUTTON_DOWN          EventType = 1539 // Joystick button pressed
	EVENT_JOYSTICK_BUTTON_UP            EventType = 1540 // Joystick button released
	EVENT_JOYSTICK_ADDED                EventType = 1541 // A new joystick has been inserted into the system
	EVENT_JOYSTICK_REMOVED              EventType = 1542 // An opened joystick has been removed
	EVENT_JOYSTICK_BATTERY_UPDATED      EventType = 1543 // Joystick battery level change
	EVENT_JOYSTICK_UPDATE_COMPLETE      EventType = 1544 // Joystick update is complete
	EVENT_GAMEPAD_AXIS_MOTION           EventType = 1616 // Gamepad axis motion
	EVENT_GAMEPAD_BUTTON_DOWN           EventType = 1617 // Gamepad button pressed
	EVENT_GAMEPAD_BUTTON_UP             EventType = 1618 // Gamepad button released
	EVENT_GAMEPAD_ADDED                 EventType = 1619 // A new gamepad has been inserted into the system
	EVENT_GAMEPAD_REMOVED               EventType = 1620 // A gamepad has been removed
	EVENT_GAMEPAD_REMAPPED              EventType = 1621 // The gamepad mapping was updated
	EVENT_GAMEPAD_TOUCHPAD_DOWN         EventType = 1622 // Gamepad touchpad was touched
	EVENT_GAMEPAD_TOUCHPAD_MOTION       EventType = 1623 // Gamepad touchpad finger was moved
	EVENT_GAMEPAD_TOUCHPAD_UP           EventType = 1624 // Gamepad touchpad finger was lifted
	EVENT_GAMEPAD_SENSOR_UPDATE         EventType = 1625 // Gamepad sensor was updated
	EVENT_GAMEPAD_UPDATE_COMPLETE       EventType = 1626 // Gamepad update is complete
	EVENT_GAMEPAD_STEAM_HANDLE_UPDATED  EventType = 1627 // Gamepad Steam handle has changed
	EVENT_FINGER_DOWN                   EventType = 1792
	EVENT_FINGER_UP                     EventType = 1793
	EVENT_FINGER_MOTION                 EventType = 1794
	EVENT_FINGER_CANCELED               EventType = 1795
	EVENT_PINCH_BEGIN                   EventType = 1808 // Pinch gesture started
	EVENT_PINCH_UPDATE                  EventType = 1809 // Pinch gesture updated
	EVENT_PINCH_END                     EventType = 1810 // Pinch gesture ended
	EVENT_CLIPBOARD_UPDATE              EventType = 2304 // The clipboard changed
	EVENT_DROP_FILE                     EventType = 4096 // The system requests a file open
	EVENT_DROP_TEXT                     EventType = 4097 // text/plain drag-and-drop event
	EVENT_DROP_BEGIN                    EventType = 4098 // A new set of drops is beginning (NULL filename)
	EVENT_DROP_COMPLETE                 EventType = 4099 // Current set of drops is now complete (NULL filename)
	EVENT_DROP_POSITION                 EventType = 4100 // Position while moving over the window
	EVENT_AUDIO_DEVICE_ADDED            EventType = 4352 // A new audio device is available
	EVENT_AUDIO_DEVICE_REMOVED          EventType = 4353 // An audio device has been removed.
	EVENT_AUDIO_DEVICE_FORMAT_CHANGED   EventType = 4354 // An audio device's format has been changed by the system.
	EVENT_SENSOR_UPDATE                 EventType = 4608 // A sensor was updated
	EVENT_PEN_PROXIMITY_IN              EventType = 4864 // Pressure-sensitive pen has become available
	EVENT_PEN_PROXIMITY_OUT             EventType = 4865 // Pressure-sensitive pen has become unavailable
	EVENT_PEN_DOWN                      EventType = 4866 // Pressure-sensitive pen touched drawing surface
	EVENT_PEN_UP                        EventType = 4867 // Pressure-sensitive pen stopped touching drawing surface
	EVENT_PEN_BUTTON_DOWN               EventType = 4868 // Pressure-sensitive pen button pressed
	EVENT_PEN_BUTTON_UP                 EventType = 4869 // Pressure-sensitive pen button released
	EVENT_PEN_MOTION                    EventType = 4870 // Pressure-sensitive pen is moving on the tablet
	EVENT_PEN_AXIS                      EventType = 4871 // Pressure-sensitive pen angle/pressure/etc changed
	EVENT_CAMERA_DEVICE_ADDED           EventType = 5120 // A new camera device is available
	EVENT_CAMERA_DEVICE_REMOVED         EventType = 5121 // A camera device has been removed.
	EVENT_CAMERA_DEVICE_APPROVED        EventType = 5122 // A camera device has been approved for use by the user.
	EVENT_CAMERA_DEVICE_DENIED          EventType = 5123 // A camera device has been denied for use by the user.
	EVENT_RENDER_TARGETS_RESET          EventType = 8192 // The render targets have been reset and their contents need to be updated
	EVENT_RENDER_DEVICE_RESET           EventType = 8193 // The device has been reset and all textures need to be recreated
	EVENT_RENDER_DEVICE_LOST            EventType = 8194 // The device has been lost and can't be recovered.
	EVENT_PRIVATE0                      EventType = 16384
	EVENT_PRIVATE1                      EventType = 16385
	EVENT_PRIVATE2                      EventType = 16386
	EVENT_PRIVATE3                      EventType = 16387
	EVENT_POLL_SENTINEL                 EventType = 32512 // Signals the end of an event poll cycle
	EVENT_USER                          EventType = 32768
	EVENT_LAST                          EventType = 65535
	EVENT_ENUM_PADDING                  EventType = 2147483647
)

type FColor

type FColor struct {
	R float32
	G float32
	B float32
	A float32
}

SDL_FColor - The bits of this structure can be directly reinterpreted as a float-packed color which uses the [SDL_PIXELFORMAT_RGBA128_FLOAT](SDL_PIXELFORMAT_RGBA128_FLOAT) format (https://wiki.libsdl.org/SDL3/SDL_FColor)

type FPoint

type FPoint struct {
	X float32
	Y float32
}

SDL_FPoint - The structure that defines a point (using floating point values). (https://wiki.libsdl.org/SDL3/SDL_FPoint)

type FRect

type FRect struct {
	X float32
	Y float32
	W float32
	H float32
}

SDL_FRect - A rectangle stored using floating point values. (https://wiki.libsdl.org/SDL3/SDL_FRect)

func (*FRect) HasRectIntersectionFloat

func (A *FRect) HasRectIntersectionFloat(B *FRect) bool

SDL_HasRectIntersectionFloat - Determine whether two rectangles intersect with float precision. (https://wiki.libsdl.org/SDL3/SDL_HasRectIntersectionFloat)

func (*FRect) RectAndLineIntersectionFloat

func (rect *FRect) RectAndLineIntersectionFloat(X1 *float32, Y1 *float32, X2 *float32, Y2 *float32) bool

SDL_GetRectAndLineIntersectionFloat - Calculate the intersection of a rectangle and line segment with float precision. (https://wiki.libsdl.org/SDL3/SDL_GetRectAndLineIntersectionFloat)

func (*FRect) RectIntersectionFloat

func (A *FRect) RectIntersectionFloat(B *FRect, result *FRect) bool

SDL_GetRectIntersectionFloat - Calculate the intersection of two rectangles with float precision. (https://wiki.libsdl.org/SDL3/SDL_GetRectIntersectionFloat)

func (*FRect) RectUnionFloat

func (A *FRect) RectUnionFloat(B *FRect, result *FRect) bool

SDL_GetRectUnionFloat - Calculate the union of two rectangles with float precision. (https://wiki.libsdl.org/SDL3/SDL_GetRectUnionFloat)

type FileDialogType

type FileDialogType uint32

SDL_FileDialogType - Various types of file dialogs. (https://wiki.libsdl.org/SDL3/SDL_FileDialogType)

const (
	FILEDIALOG_OPENFILE   FileDialogType = 0
	FILEDIALOG_SAVEFILE   FileDialogType = 1
	FILEDIALOG_OPENFOLDER FileDialogType = 2
)

type Finger

type Finger struct {
	Id       FingerID // the finger ID
	X        float32  // the x-axis location of the touch event, normalized (0...1)
	Y        float32  // the y-axis location of the touch event, normalized (0...1)
	Pressure float32  // the quantity of pressure applied, normalized (0...1)
}

SDL_Finger - Data about a single finger in a multitouch event. (https://wiki.libsdl.org/SDL3/SDL_Finger)

type FingerID

type FingerID uint64

SDL_FingerID - A unique ID for a single finger on a touch device. (https://wiki.libsdl.org/SDL3/SDL_FingerID)

type FlashOperation

type FlashOperation uint32

SDL_FlashOperation - Window flash operation. (https://wiki.libsdl.org/SDL3/SDL_FlashOperation)

const (
	FLASH_CANCEL        FlashOperation = 0 // Cancel any window flash state
	FLASH_BRIEFLY       FlashOperation = 1 // Flash the window briefly to get attention
	FLASH_UNTIL_FOCUSED FlashOperation = 2 // Flash the window until it gets focus
)

type FlipMode

type FlipMode uint32

SDL_FlipMode - The flip mode. (https://wiki.libsdl.org/SDL3/SDL_FlipMode)

const (
	FLIP_NONE                    FlipMode = 0 // Do not flip
	FLIP_HORIZONTAL              FlipMode = 1 // flip horizontally
	FLIP_VERTICAL                FlipMode = 2 // flip vertically
	FLIP_HORIZONTAL_AND_VERTICAL FlipMode = 3 // flip horizontally and vertically (not a diagonal flip)
)

type Folder

type Folder uint32

SDL_Folder - The type of the OS-provided default folder for a specific purpose. (https://wiki.libsdl.org/SDL3/SDL_Folder)

const (
	FOLDER_HOME        Folder = 0  // The folder which contains all of the current user's data, preferences, and documents. It usually contains most of the other folders. If a requested folder does not exist, the home folder can be considered a safe fallback to store a user's documents.
	FOLDER_DESKTOP     Folder = 1  // The folder of files that are displayed on the desktop. Note that the existence of a desktop folder does not guarantee that the system does show icons on its desktop; certain GNU/Linux distros with a graphical environment may not have desktop icons.
	FOLDER_DOCUMENTS   Folder = 2  // User document files, possibly application-specific. This is a good place to save a user's projects.
	FOLDER_DOWNLOADS   Folder = 3  // Standard folder for user files downloaded from the internet.
	FOLDER_MUSIC       Folder = 4  // Music files that can be played using a standard music player (mp3, ogg...).
	FOLDER_PICTURES    Folder = 5  // Image files that can be displayed using a standard viewer (png, jpg...).
	FOLDER_PUBLICSHARE Folder = 6  // Files that are meant to be shared with other users on the same computer.
	FOLDER_SAVEDGAMES  Folder = 7  // Save files for games.
	FOLDER_SCREENSHOTS Folder = 8  // Application screenshots.
	FOLDER_TEMPLATES   Folder = 9  // Template files to be used when the user requests the desktop environment to create a new file in a certain folder, such as "New Text File.txt".  Any file in the Templates folder can be used as a starting point for a new file.
	FOLDER_VIDEOS      Folder = 10 // Video files that can be played using a standard video player (mp4, webm...).
	FOLDER_COUNT       Folder = 11 // Total number of types in this enum, not a folder type by itself.
)

type FunctionPointer

type FunctionPointer uintptr

SDL_FunctionPointer - A generic function pointer. (https://wiki.libsdl.org/SDL3/SDL_FunctionPointer)

func EGL_GetProcAddress

func EGL_GetProcAddress(proc string) FunctionPointer

SDL_EGL_GetProcAddress - Get an EGL library function by name. (https://wiki.libsdl.org/SDL3/SDL_EGL_GetProcAddress)

func GL_GetProcAddress

func GL_GetProcAddress(proc string) FunctionPointer

SDL_GL_GetProcAddress - Get an OpenGL function by name. (https://wiki.libsdl.org/SDL3/SDL_GL_GetProcAddress)

func Vulkan_GetVkGetInstanceProcAddr

func Vulkan_GetVkGetInstanceProcAddr() (FunctionPointer, error)

SDL_Vulkan_GetVkGetInstanceProcAddr - Get the address of the `vkGetInstanceProcAddr` function. (https://wiki.libsdl.org/SDL3/SDL_Vulkan_GetVkGetInstanceProcAddr)

type GLAttr

type GLAttr uint32

SDL_GLAttr - An enumeration of OpenGL configuration attributes. (https://wiki.libsdl.org/SDL3/SDL_GLAttr)

const (
	GL_RED_SIZE                   GLAttr = 0  // the minimum number of bits for the red channel of the color buffer; defaults to 8.
	GL_GREEN_SIZE                 GLAttr = 1  // the minimum number of bits for the green channel of the color buffer; defaults to 8.
	GL_BLUE_SIZE                  GLAttr = 2  // the minimum number of bits for the blue channel of the color buffer; defaults to 8.
	GL_ALPHA_SIZE                 GLAttr = 3  // the minimum number of bits for the alpha channel of the color buffer; defaults to 8.
	GL_BUFFER_SIZE                GLAttr = 4  // the minimum number of bits for frame buffer size; defaults to 0.
	GL_DOUBLEBUFFER               GLAttr = 5  // whether the output is single or double buffered; defaults to double buffering on.
	GL_DEPTH_SIZE                 GLAttr = 6  // the minimum number of bits in the depth buffer; defaults to 16.
	GL_STENCIL_SIZE               GLAttr = 7  // the minimum number of bits in the stencil buffer; defaults to 0.
	GL_ACCUM_RED_SIZE             GLAttr = 8  // the minimum number of bits for the red channel of the accumulation buffer; defaults to 0.
	GL_ACCUM_GREEN_SIZE           GLAttr = 9  // the minimum number of bits for the green channel of the accumulation buffer; defaults to 0.
	GL_ACCUM_BLUE_SIZE            GLAttr = 10 // the minimum number of bits for the blue channel of the accumulation buffer; defaults to 0.
	GL_ACCUM_ALPHA_SIZE           GLAttr = 11 // the minimum number of bits for the alpha channel of the accumulation buffer; defaults to 0.
	GL_STEREO                     GLAttr = 12 // whether the output is stereo 3D; defaults to off.
	GL_MULTISAMPLEBUFFERS         GLAttr = 13 // the number of buffers used for multisample anti-aliasing; defaults to 0.
	GL_MULTISAMPLESAMPLES         GLAttr = 14 // the number of samples used around the current pixel used for multisample anti-aliasing.
	GL_ACCELERATED_VISUAL         GLAttr = 15 // set to 1 to require hardware acceleration, set to 0 to force software rendering; defaults to allow either.
	GL_RETAINED_BACKING           GLAttr = 16 // not used (deprecated).
	GL_CONTEXT_MAJOR_VERSION      GLAttr = 17 // OpenGL context major version.
	GL_CONTEXT_MINOR_VERSION      GLAttr = 18 // OpenGL context minor version.
	GL_CONTEXT_FLAGS              GLAttr = 19 // some combination of 0 or more of elements of the SDL_GLContextFlag enumeration; defaults to 0.
	GL_CONTEXT_PROFILE_MASK       GLAttr = 20 // type of GL context (Core, Compatibility, ES). See SDL_GLProfile; default value depends on platform.
	GL_SHARE_WITH_CURRENT_CONTEXT GLAttr = 21 // OpenGL context sharing; defaults to 0.
	GL_FRAMEBUFFER_SRGB_CAPABLE   GLAttr = 22 // requests sRGB capable visual; defaults to 0.
	GL_CONTEXT_RELEASE_BEHAVIOR   GLAttr = 23 // sets context the release behavior. See SDL_GLContextReleaseFlag; defaults to FLUSH.
	GL_CONTEXT_RESET_NOTIFICATION GLAttr = 24 // set context reset notification. See SDL_GLContextResetNotification; defaults to NO_NOTIFICATION.
	GL_CONTEXT_NO_ERROR           GLAttr = 25
	GL_FLOATBUFFERS               GLAttr = 26
	GL_EGL_PLATFORM               GLAttr = 27
)

type GLContext

type GLContext *GLContextState

SDL_GLContext - An opaque handle to an OpenGL context. (https://wiki.libsdl.org/SDL3/SDL_GLContext)

func GL_CreateContext

func GL_CreateContext(window *Window) (GLContext, error)

SDL_GL_CreateContext - Create an OpenGL context for an OpenGL window, and make it current. (https://wiki.libsdl.org/SDL3/SDL_GL_CreateContext)

func GL_GetCurrentContext

func GL_GetCurrentContext() (GLContext, error)

SDL_GL_GetCurrentContext - Get the currently active OpenGL context. (https://wiki.libsdl.org/SDL3/SDL_GL_GetCurrentContext)

type GLContextState

type GLContextState struct{}

type GPUBlendFactor

type GPUBlendFactor uint32

SDL_GPUBlendFactor - Specifies a blending factor to be used when pixels in a render target are blended with existing pixels in the texture. (https://wiki.libsdl.org/SDL3/SDL_GPUBlendFactor)

const (
	GPU_BLENDFACTOR_INVALID                  GPUBlendFactor = 0
	GPU_BLENDFACTOR_ZERO                     GPUBlendFactor = 1  // 0
	GPU_BLENDFACTOR_ONE                      GPUBlendFactor = 2  // 1
	GPU_BLENDFACTOR_SRC_COLOR                GPUBlendFactor = 3  // source color
	GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR      GPUBlendFactor = 4  // 1 - source color
	GPU_BLENDFACTOR_DST_COLOR                GPUBlendFactor = 5  // destination color
	GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR      GPUBlendFactor = 6  // 1 - destination color
	GPU_BLENDFACTOR_SRC_ALPHA                GPUBlendFactor = 7  // source alpha
	GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA      GPUBlendFactor = 8  // 1 - source alpha
	GPU_BLENDFACTOR_DST_ALPHA                GPUBlendFactor = 9  // destination alpha
	GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA      GPUBlendFactor = 10 // 1 - destination alpha
	GPU_BLENDFACTOR_CONSTANT_COLOR           GPUBlendFactor = 11 // blend constant
	GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR GPUBlendFactor = 12 // 1 - blend constant
	GPU_BLENDFACTOR_SRC_ALPHA_SATURATE       GPUBlendFactor = 13 // min(source alpha, 1 - destination alpha)
)

type GPUBlendOp

type GPUBlendOp uint32

SDL_GPUBlendOp - Specifies the operator to be used when pixels in a render target are blended with existing pixels in the texture. (https://wiki.libsdl.org/SDL3/SDL_GPUBlendOp)

const (
	GPU_BLENDOP_INVALID          GPUBlendOp = 0
	GPU_BLENDOP_ADD              GPUBlendOp = 1 // (source * source_factor) + (destination * destination_factor)
	GPU_BLENDOP_SUBTRACT         GPUBlendOp = 2 // (source * source_factor) - (destination * destination_factor)
	GPU_BLENDOP_REVERSE_SUBTRACT GPUBlendOp = 3 // (destination * destination_factor) - (source * source_factor)
	GPU_BLENDOP_MIN              GPUBlendOp = 4 // min(source, destination)
	GPU_BLENDOP_MAX              GPUBlendOp = 5 // max(source, destination)
)

type GPUBlitInfo

type GPUBlitInfo struct {
	Source      GPUBlitRegion // The destination region for the blit.
	Destination GPUBlitRegion // What is done with the contents of the destination before the blit.
	LoadOp      GPULoadOp     // The color to clear the destination region to before the blit. Ignored if load_op is not SDL_GPU_LOADOP_CLEAR.
	ClearColor  FColor        // The flip mode for the source region.
	FlipMode    FlipMode      // The filter mode used when blitting.
	Filter      GPUFilter     // true cycles the destination texture if it is already bound.
	Cycle       bool
	// contains filtered or unexported fields
}

SDL_GPUBlitInfo - A structure containing parameters for a blit command. (https://wiki.libsdl.org/SDL3/SDL_GPUBlitInfo)

type GPUBlitRegion

type GPUBlitRegion struct {
	Texture           *GPUTexture // The texture.
	MipLevel          uint32      // The mip level index of the region.
	LayerOrDepthPlane uint32      // The layer index or depth plane of the region. This value is treated as a layer index on 2D array and cube textures, and as a depth plane on 3D textures.
	X                 uint32      // The left offset of the region.
	Y                 uint32      // The top offset of the region.
	W                 uint32      // The width of the region.
	H                 uint32      // The height of the region.
}

SDL_GPUBlitRegion - A structure specifying a region of a texture used in the blit operation. (https://wiki.libsdl.org/SDL3/SDL_GPUBlitRegion)

type GPUBuffer

type GPUBuffer struct{}

SDL_GPUBuffer - An opaque handle representing a buffer. (https://wiki.libsdl.org/SDL3/SDL_GPUBuffer)

type GPUBufferBinding

type GPUBufferBinding struct {
	Buffer *GPUBuffer // The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_VERTEX for SDL_BindGPUVertexBuffers, or SDL_GPU_BUFFERUSAGE_INDEX for SDL_BindGPUIndexBuffer.
	Offset uint32     // The starting byte of the data to bind in the buffer.
}

SDL_GPUBufferBinding - A structure specifying parameters in a buffer binding call. (https://wiki.libsdl.org/SDL3/SDL_GPUBufferBinding)

type GPUBufferCreateInfo

type GPUBufferCreateInfo struct {
	Usage GPUBufferUsageFlags // How the buffer is intended to be used by the client.
	Size  uint32              // The size in bytes of the buffer.
	Props PropertiesID        // A properties ID for extensions. Should be 0 if no extensions are needed.
}

SDL_GPUBufferCreateInfo - A structure specifying the parameters of a buffer. (https://wiki.libsdl.org/SDL3/SDL_GPUBufferCreateInfo)

type GPUBufferLocation

type GPUBufferLocation struct {
	Buffer *GPUBuffer // The buffer.
	Offset uint32     // The starting byte within the buffer.
}

SDL_GPUBufferLocation - A structure specifying a location in a buffer. (https://wiki.libsdl.org/SDL3/SDL_GPUBufferLocation)

type GPUBufferRegion

type GPUBufferRegion struct {
	Buffer *GPUBuffer // The buffer.
	Offset uint32     // The starting byte within the buffer.
	Size   uint32     // The size in bytes of the region.
}

SDL_GPUBufferRegion - A structure specifying a region of a buffer. (https://wiki.libsdl.org/SDL3/SDL_GPUBufferRegion)

type GPUBufferUsageFlags

type GPUBufferUsageFlags uint32

SDL_GPUBufferUsageFlags - Specifies how a buffer is intended to be used by the client. (https://wiki.libsdl.org/SDL3/SDL_GPUBufferUsageFlags)

const (
	GPU_BUFFERUSAGE_VERTEX                GPUBufferUsageFlags = 1 << 0 /**< Buffer is a vertex buffer. */
	GPU_BUFFERUSAGE_INDEX                 GPUBufferUsageFlags = 1 << 1 /**< Buffer is an index buffer. */
	GPU_BUFFERUSAGE_INDIRECT              GPUBufferUsageFlags = 1 << 2 /**< Buffer is an indirect buffer. */
	GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ GPUBufferUsageFlags = 1 << 3 /**< Buffer supports storage reads in graphics stages. */
	GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ  GPUBufferUsageFlags = 1 << 4 /**< Buffer supports storage reads in the compute stage. */
	GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE GPUBufferUsageFlags = 1 << 5 /**< Buffer supports storage writes in the compute stage. */
)

type GPUColorComponentFlags

type GPUColorComponentFlags uint8

SDL_GPUColorComponentFlags - Specifies which color components are written in a graphics pipeline. (https://wiki.libsdl.org/SDL3/SDL_GPUColorComponentFlags)

type GPUColorTargetBlendState

type GPUColorTargetBlendState struct {
	SrcColorBlendfactor  GPUBlendFactor         // The value to be multiplied by the source RGB value.
	DstColorBlendfactor  GPUBlendFactor         // The value to be multiplied by the destination RGB value.
	ColorBlendOp         GPUBlendOp             // The blend operation for the RGB components.
	SrcAlphaBlendfactor  GPUBlendFactor         // The value to be multiplied by the source alpha.
	DstAlphaBlendfactor  GPUBlendFactor         // The value to be multiplied by the destination alpha.
	AlphaBlendOp         GPUBlendOp             // The blend operation for the alpha component.
	ColorWriteMask       GPUColorComponentFlags // A bitmask specifying which of the RGBA components are enabled for writing. Writes to all channels if enable_color_write_mask is false.
	EnableBlend          bool                   // Whether blending is enabled for the color target.
	EnableColorWriteMask bool                   // Whether the color write mask is enabled.
	// contains filtered or unexported fields
}

SDL_GPUColorTargetBlendState - A structure specifying the blend state of a color target. (https://wiki.libsdl.org/SDL3/SDL_GPUColorTargetBlendState)

type GPUColorTargetDescription

type GPUColorTargetDescription struct {
	Format     GPUTextureFormat         // The pixel format of the texture to be used as a color target.
	BlendState GPUColorTargetBlendState // The blend state to be used for the color target.
}

SDL_GPUColorTargetDescription - A structure specifying the parameters of color targets used in a graphics pipeline. (https://wiki.libsdl.org/SDL3/SDL_GPUColorTargetDescription)

type GPUColorTargetInfo

type GPUColorTargetInfo struct {
	Texture             *GPUTexture // The texture that will be used as a color target by a render pass.
	MipLevel            uint32      // The mip level to use as a color target.
	LayerOrDepthPlane   uint32      // The layer index or depth plane to use as a color target. This value is treated as a layer index on 2D array and cube textures, and as a depth plane on 3D textures.
	ClearColor          FColor      // The color to clear the color target to at the start of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used.
	LoadOp              GPULoadOp   // What is done with the contents of the color target at the beginning of the render pass.
	StoreOp             GPUStoreOp  // What is done with the results of the render pass.
	ResolveTexture      *GPUTexture // The texture that will receive the results of a multisample resolve operation. Ignored if a RESOLVE* store_op is not used.
	ResolveMipLevel     uint32      // The mip level of the resolve texture to use for the resolve operation. Ignored if a RESOLVE* store_op is not used.
	ResolveLayer        uint32      // The layer index of the resolve texture to use for the resolve operation. Ignored if a RESOLVE* store_op is not used.
	Cycle               bool        // true cycles the texture if the texture is bound and load_op is not LOAD
	CycleResolveTexture bool        // true cycles the resolve texture if the resolve texture is bound. Ignored if a RESOLVE* store_op is not used.
	// contains filtered or unexported fields
}

SDL_GPUColorTargetInfo - A structure specifying the parameters of a color target used by a render pass. (https://wiki.libsdl.org/SDL3/SDL_GPUColorTargetInfo)

type GPUCommandBuffer

type GPUCommandBuffer struct{}

SDL_GPUCommandBuffer - An opaque handle representing a command buffer. (https://wiki.libsdl.org/SDL3/SDL_GPUCommandBuffer)

func (*GPUCommandBuffer) AcquireGPUSwapchainTexture

func (cb *GPUCommandBuffer) AcquireGPUSwapchainTexture(window *Window) (*SwapchainTexture, error)

SDL_AcquireGPUSwapchainTexture - Acquire a texture to use in presentation. (https://wiki.libsdl.org/SDL3/SDL_AcquireGPUSwapchainTexture)

func (*GPUCommandBuffer) BeginComputePass

func (cb *GPUCommandBuffer) BeginComputePass(storageTextureBindings []GPUStorageTextureReadWriteBinding, storageBufferBindings []GPUStorageBufferReadWriteBinding) *GPUComputePass

SDL_BeginGPUComputePass - Begins a compute pass on a command buffer. (https://wiki.libsdl.org/SDL3/SDL_BeginGPUComputePass)

func (*GPUCommandBuffer) BeginCopyPass

func (cb *GPUCommandBuffer) BeginCopyPass() *GPUCopyPass

SDL_BeginGPUCopyPass - Begins a copy pass on a command buffer. (https://wiki.libsdl.org/SDL3/SDL_BeginGPUCopyPass)

func (*GPUCommandBuffer) BeginRenderPass

func (cb *GPUCommandBuffer) BeginRenderPass(colorTargetInfos []GPUColorTargetInfo, depthStencilTargetInfo *GPUDepthStencilTargetInfo) *GPURenderPass

SDL_BeginGPURenderPass - Begins a render pass on a command buffer. (https://wiki.libsdl.org/SDL3/SDL_BeginGPURenderPass)

func (*GPUCommandBuffer) BlitGPUTexture

func (cb *GPUCommandBuffer) BlitGPUTexture(info *GPUBlitInfo)

SDL_BlitGPUTexture - Blits from a source texture region to a destination texture region. (https://wiki.libsdl.org/SDL3/SDL_BlitGPUTexture)

func (*GPUCommandBuffer) Cancel

func (cb *GPUCommandBuffer) Cancel() error

SDL_CancelGPUCommandBuffer - Cancels a command buffer. (https://wiki.libsdl.org/SDL3/SDL_CancelGPUCommandBuffer)

func (*GPUCommandBuffer) GenerateMipmapsForGPUTexture

func (cb *GPUCommandBuffer) GenerateMipmapsForGPUTexture(texture *GPUTexture)

SDL_GenerateMipmapsForGPUTexture - Generates mipmaps for the given texture. (https://wiki.libsdl.org/SDL3/SDL_GenerateMipmapsForGPUTexture)

func (*GPUCommandBuffer) InsertDebugLabel

func (cb *GPUCommandBuffer) InsertDebugLabel(text string)

SDL_InsertGPUDebugLabel - Inserts an arbitrary string label into the command buffer callstream. (https://wiki.libsdl.org/SDL3/SDL_InsertGPUDebugLabel)

func (*GPUCommandBuffer) PopDebugGroup

func (cb *GPUCommandBuffer) PopDebugGroup()

SDL_PopGPUDebugGroup - Ends the most-recently pushed debug group. (https://wiki.libsdl.org/SDL3/SDL_PopGPUDebugGroup)

func (*GPUCommandBuffer) PushComputeUniformData

func (cb *GPUCommandBuffer) PushComputeUniformData(slotIndex uint32, data []byte)

SDL_PushGPUComputeUniformData - Pushes data to a uniform slot on the command buffer. (https://wiki.libsdl.org/SDL3/SDL_PushGPUComputeUniformData)

func (*GPUCommandBuffer) PushDebugGroup

func (cb *GPUCommandBuffer) PushDebugGroup(name string)

SDL_PushGPUDebugGroup - Begins a debug group with an arbitrary name. (https://wiki.libsdl.org/SDL3/SDL_PushGPUDebugGroup)

func (*GPUCommandBuffer) PushFragmentUniformData

func (cb *GPUCommandBuffer) PushFragmentUniformData(slotIndex uint32, data []byte)

SDL_PushGPUFragmentUniformData - Pushes data to a fragment uniform slot on the command buffer. (https://wiki.libsdl.org/SDL3/SDL_PushGPUFragmentUniformData)

func (*GPUCommandBuffer) PushVertexUniformData

func (cb *GPUCommandBuffer) PushVertexUniformData(slotIndex uint32, data []byte)

SDL_PushGPUVertexUniformData - Pushes data to a vertex uniform slot on the command buffer. (https://wiki.libsdl.org/SDL3/SDL_PushGPUVertexUniformData)

func (*GPUCommandBuffer) Submit

func (cb *GPUCommandBuffer) Submit() error

SDL_SubmitGPUCommandBuffer - Submits a command buffer so its commands can be processed on the GPU. (https://wiki.libsdl.org/SDL3/SDL_SubmitGPUCommandBuffer)

func (*GPUCommandBuffer) SubmitAndAcquireFence

func (cb *GPUCommandBuffer) SubmitAndAcquireFence() (*GPUFence, error)

SDL_SubmitGPUCommandBufferAndAcquireFence - Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated with the command buffer. (https://wiki.libsdl.org/SDL3/SDL_SubmitGPUCommandBufferAndAcquireFence)

func (*GPUCommandBuffer) WaitAndAcquireGPUSwapchainTexture

func (cb *GPUCommandBuffer) WaitAndAcquireGPUSwapchainTexture(window *Window) (*SwapchainTexture, error)

SDL_WaitAndAcquireGPUSwapchainTexture - Blocks the thread until a swapchain texture is available to be acquired, and then acquires it. (https://wiki.libsdl.org/SDL3/SDL_WaitAndAcquireGPUSwapchainTexture)

type GPUCompareOp

type GPUCompareOp uint32

SDL_GPUCompareOp - Specifies a comparison operator for depth, stencil and sampler operations. (https://wiki.libsdl.org/SDL3/SDL_GPUCompareOp)

const (
	GPU_COMPAREOP_INVALID          GPUCompareOp = 0
	GPU_COMPAREOP_NEVER            GPUCompareOp = 1 // The comparison always evaluates false.
	GPU_COMPAREOP_LESS             GPUCompareOp = 2 // The comparison evaluates reference < test.
	GPU_COMPAREOP_EQUAL            GPUCompareOp = 3 // The comparison evaluates reference == test.
	GPU_COMPAREOP_LESS_OR_EQUAL    GPUCompareOp = 4 // The comparison evaluates reference <= test.
	GPU_COMPAREOP_GREATER          GPUCompareOp = 5 // The comparison evaluates reference > test.
	GPU_COMPAREOP_NOT_EQUAL        GPUCompareOp = 6 // The comparison evaluates reference != test.
	GPU_COMPAREOP_GREATER_OR_EQUAL GPUCompareOp = 7 // The comparison evaluates reference >= test.
	GPU_COMPAREOP_ALWAYS           GPUCompareOp = 8 // The comparison always evaluates true.
)

type GPUComputePass

type GPUComputePass struct{}

SDL_GPUComputePass - An opaque handle representing a compute pass. (https://wiki.libsdl.org/SDL3/SDL_GPUComputePass)

func (*GPUComputePass) BindGPUComputePipeline

func (cp *GPUComputePass) BindGPUComputePipeline(pipeline *GPUComputePipeline)

SDL_BindGPUComputePipeline - Binds a compute pipeline on a command buffer for use in compute dispatch. (https://wiki.libsdl.org/SDL3/SDL_BindGPUComputePipeline)

func (*GPUComputePass) BindSamplers

func (cp *GPUComputePass) BindSamplers(bindings []GPUTextureSamplerBinding)

SDL_BindGPUComputeSamplers - Binds texture-sampler pairs for use on the compute shader. (https://wiki.libsdl.org/SDL3/SDL_BindGPUComputeSamplers)

func (*GPUComputePass) BindStorageBuffers

func (cp *GPUComputePass) BindStorageBuffers(buffers []*GPUBuffer)

SDL_BindGPUComputeStorageBuffers - Binds storage buffers as readonly for use on the compute pipeline. (https://wiki.libsdl.org/SDL3/SDL_BindGPUComputeStorageBuffers)

func (*GPUComputePass) BindStorageTextures

func (cp *GPUComputePass) BindStorageTextures(textures []*GPUTexture)

SDL_BindGPUComputeStorageTextures - Binds storage textures as readonly for use on the compute pipeline. (https://wiki.libsdl.org/SDL3/SDL_BindGPUComputeStorageTextures)

func (*GPUComputePass) Dispatch

func (cp *GPUComputePass) Dispatch(groupcountX, groupcountY, groupcountZ uint32)

SDL_DispatchGPUCompute - Dispatches compute work. (https://wiki.libsdl.org/SDL3/SDL_DispatchGPUCompute)

func (*GPUComputePass) DispatchIndirect

func (cp *GPUComputePass) DispatchIndirect(buffer *GPUBuffer, offset uint32)

SDL_DispatchGPUComputeIndirect - Dispatches compute work with parameters set from a buffer. (https://wiki.libsdl.org/SDL3/SDL_DispatchGPUComputeIndirect)

func (*GPUComputePass) End

func (cp *GPUComputePass) End()

SDL_EndGPUComputePass - Ends the current compute pass. (https://wiki.libsdl.org/SDL3/SDL_EndGPUComputePass)

type GPUComputePipeline

type GPUComputePipeline struct{}

SDL_GPUComputePipeline - An opaque handle representing a compute pipeline. (https://wiki.libsdl.org/SDL3/SDL_GPUComputePipeline)

type GPUComputePipelineCreateInfo

type GPUComputePipelineCreateInfo struct {
	Code                        []byte
	Entrypoint                  string
	Format                      GPUShaderFormat // The format of the compute shader code.
	NumSamplers                 uint32          // The number of samplers defined in the shader.
	NumReadonlyStorageTextures  uint32          // The number of readonly storage textures defined in the shader.
	NumReadonlyStorageBuffers   uint32          // The number of readonly storage buffers defined in the shader.
	NumReadwriteStorageTextures uint32          // The number of read-write storage textures defined in the shader.
	NumReadwriteStorageBuffers  uint32          // The number of read-write storage buffers defined in the shader.
	NumUniformBuffers           uint32          // The number of uniform buffers defined in the shader.
	ThreadcountX                uint32          // The number of threads in the X dimension. This should match the value in the shader.
	ThreadcountY                uint32          // The number of threads in the Y dimension. This should match the value in the shader.
	ThreadcountZ                uint32          // The number of threads in the Z dimension. This should match the value in the shader.
	Props                       PropertiesID    // A properties ID for extensions. Should be 0 if no extensions are needed.
}

SDL_GPUComputePipelineCreateInfo - A structure specifying the parameters of a compute pipeline state. (https://wiki.libsdl.org/SDL3/SDL_GPUComputePipelineCreateInfo)

type GPUCopyPass

type GPUCopyPass struct{}

SDL_GPUCopyPass - An opaque handle representing a copy pass. (https://wiki.libsdl.org/SDL3/SDL_GPUCopyPass)

func (*GPUCopyPass) CopyGPUBufferToBuffer

func (copy_pass *GPUCopyPass) CopyGPUBufferToBuffer(source *GPUBufferLocation, destination *GPUBufferLocation, size uint32, cycle bool)

SDL_CopyGPUBufferToBuffer - Performs a buffer-to-buffer copy. (https://wiki.libsdl.org/SDL3/SDL_CopyGPUBufferToBuffer)

func (*GPUCopyPass) CopyGPUTextureToTexture

func (copy_pass *GPUCopyPass) CopyGPUTextureToTexture(source *GPUTextureLocation, destination *GPUTextureLocation, w uint32, h uint32, d uint32, cycle bool)

SDL_CopyGPUTextureToTexture - Performs a texture-to-texture copy. (https://wiki.libsdl.org/SDL3/SDL_CopyGPUTextureToTexture)

func (*GPUCopyPass) DownloadFromGPUBuffer

func (copy_pass *GPUCopyPass) DownloadFromGPUBuffer(source *GPUBufferRegion, destination *GPUTransferBufferLocation)

SDL_DownloadFromGPUBuffer - Copies data from a buffer to a transfer buffer on the GPU timeline. (https://wiki.libsdl.org/SDL3/SDL_DownloadFromGPUBuffer)

func (*GPUCopyPass) DownloadFromGPUTexture

func (copy_pass *GPUCopyPass) DownloadFromGPUTexture(source *GPUTextureRegion, destination *GPUTextureTransferInfo)

SDL_DownloadFromGPUTexture - Copies data from a texture to a transfer buffer on the GPU timeline. (https://wiki.libsdl.org/SDL3/SDL_DownloadFromGPUTexture)

func (*GPUCopyPass) End

func (copy_pass *GPUCopyPass) End()

SDL_EndGPUCopyPass - Ends the current copy pass. (https://wiki.libsdl.org/SDL3/SDL_EndGPUCopyPass)

func (*GPUCopyPass) UploadToGPUBuffer

func (copy_pass *GPUCopyPass) UploadToGPUBuffer(source *GPUTransferBufferLocation, destination *GPUBufferRegion, cycle bool)

SDL_UploadToGPUBuffer - Uploads data from a transfer buffer to a buffer. (https://wiki.libsdl.org/SDL3/SDL_UploadToGPUBuffer)

func (*GPUCopyPass) UploadToGPUTexture

func (copy_pass *GPUCopyPass) UploadToGPUTexture(source *GPUTextureTransferInfo, destination *GPUTextureRegion, cycle bool)

SDL_UploadToGPUTexture - Uploads data from a transfer buffer to a texture. (https://wiki.libsdl.org/SDL3/SDL_UploadToGPUTexture)

type GPUCullMode

type GPUCullMode uint32

SDL_GPUCullMode - Specifies the facing direction in which triangle faces will be culled. (https://wiki.libsdl.org/SDL3/SDL_GPUCullMode)

const (
	GPU_CULLMODE_NONE  GPUCullMode = 0 // No triangles are culled.
	GPU_CULLMODE_FRONT GPUCullMode = 1 // Front-facing triangles are culled.
	GPU_CULLMODE_BACK  GPUCullMode = 2 // Back-facing triangles are culled.
)

type GPUDepthStencilState

type GPUDepthStencilState struct {
	CompareOp         GPUCompareOp      // The comparison operator used for depth testing.
	BackStencilState  GPUStencilOpState // The stencil op state for back-facing triangles.
	FrontStencilState GPUStencilOpState // The stencil op state for front-facing triangles.
	CompareMask       uint8             // Selects the bits of the stencil values participating in the stencil test.
	WriteMask         uint8             // Selects the bits of the stencil values updated by the stencil test.
	EnableDepthTest   bool              // true enables the depth test.
	EnableDepthWrite  bool              // true enables depth writes. Depth writes are always disabled when enable_depth_test is false.
	EnableStencilTest bool              // true enables the stencil test.
	// contains filtered or unexported fields
}

SDL_GPUDepthStencilState - A structure specifying the parameters of the graphics pipeline depth stencil state. (https://wiki.libsdl.org/SDL3/SDL_GPUDepthStencilState)

type GPUDepthStencilTargetInfo

type GPUDepthStencilTargetInfo struct {
	Texture        *GPUTexture // The texture that will be used as the depth stencil target by the render pass.
	ClearDepth     float32     // The value to clear the depth component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used.
	LoadOp         GPULoadOp   // What is done with the depth contents at the beginning of the render pass.
	StoreOp        GPUStoreOp  // What is done with the depth results of the render pass.
	StencilLoadOp  GPULoadOp   // What is done with the stencil contents at the beginning of the render pass.
	StencilStoreOp GPUStoreOp  // What is done with the stencil results of the render pass.
	Cycle          bool        // true cycles the texture if the texture is bound and any load ops are not LOAD
	ClearStencil   uint8       // The value to clear the stencil component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used.
	MipLevel       uint8       // The mip level to use as the depth stencil target.
	Layer          uint8       // The layer index to use as the depth stencil target.
}

SDL_GPUDepthStencilTargetInfo - A structure specifying the parameters of a depth-stencil target used by a render pass. (https://wiki.libsdl.org/SDL3/SDL_GPUDepthStencilTargetInfo)

type GPUDevice

type GPUDevice struct{}

SDL_GPUDevice - An opaque handle representing the [SDL_GPU](SDL_GPU) context. (https://wiki.libsdl.org/SDL3/SDL_GPUDevice)

func CreateGPUDevice

func CreateGPUDevice(formatFlags GPUShaderFormat, debugMode bool, name string) (*GPUDevice, error)

SDL_CreateGPUDevice - Creates a GPU context. (https://wiki.libsdl.org/SDL3/SDL_CreateGPUDevice)

func CreateGPUDeviceWithProperties

func CreateGPUDeviceWithProperties(props PropertiesID) (*GPUDevice, error)

SDL_CreateGPUDeviceWithProperties - Creates a GPU context. (https://wiki.libsdl.org/SDL3/SDL_CreateGPUDeviceWithProperties)

func (*GPUDevice) AcquireCommandBuffer

func (device *GPUDevice) AcquireCommandBuffer() (*GPUCommandBuffer, error)

SDL_AcquireGPUCommandBuffer - Acquire a command buffer. (https://wiki.libsdl.org/SDL3/SDL_AcquireGPUCommandBuffer)

func (*GPUDevice) ClaimWindow

func (device *GPUDevice) ClaimWindow(window *Window) error

SDL_ClaimWindowForGPUDevice - Claims a window, creating a swapchain structure for it. (https://wiki.libsdl.org/SDL3/SDL_ClaimWindowForGPUDevice)

func (*GPUDevice) CreateBuffer

func (device *GPUDevice) CreateBuffer(createinfo *GPUBufferCreateInfo) (*GPUBuffer, error)

SDL_CreateGPUBuffer - Creates a buffer object to be used in graphics or compute workflows. (https://wiki.libsdl.org/SDL3/SDL_CreateGPUBuffer)

func (*GPUDevice) CreateComputePipeline

func (device *GPUDevice) CreateComputePipeline(info *GPUComputePipelineCreateInfo) (*GPUComputePipeline, error)

SDL_CreateGPUComputePipeline - Creates a pipeline object to be used in a compute workflow. (https://wiki.libsdl.org/SDL3/SDL_CreateGPUComputePipeline)

func (*GPUDevice) CreateGPURenderer

func (device *GPUDevice) CreateGPURenderer(window *Window) (*Renderer, error)

SDL_CreateGPURenderer - Create a 2D GPU rendering context. (https://wiki.libsdl.org/SDL3/SDL_CreateGPURenderer)

func (*GPUDevice) CreateGPUShader

func (device *GPUDevice) CreateGPUShader(info *GPUShaderCreateInfo) (*GPUShader, error)

SDL_CreateGPUShader - Creates a shader to be used when creating a graphics pipeline. (https://wiki.libsdl.org/SDL3/SDL_CreateGPUShader)

func (*GPUDevice) CreateGraphicsPipeline

func (device *GPUDevice) CreateGraphicsPipeline(createinfo *GPUGraphicsPipelineCreateInfo) (*GPUGraphicsPipeline, error)

SDL_CreateGPUGraphicsPipeline - Creates a pipeline object to be used in a graphics workflow. (https://wiki.libsdl.org/SDL3/SDL_CreateGPUGraphicsPipeline)

func (*GPUDevice) CreateSampler

func (device *GPUDevice) CreateSampler(createinfo *GPUSamplerCreateInfo) (*GPUSampler, error)

SDL_CreateGPUSampler - Creates a sampler object to be used when binding textures in a graphics workflow. (https://wiki.libsdl.org/SDL3/SDL_CreateGPUSampler)

func (*GPUDevice) CreateTexture

func (device *GPUDevice) CreateTexture(createinfo *GPUTextureCreateInfo) (*GPUTexture, error)

SDL_CreateGPUTexture - Creates a texture object to be used in graphics or compute workflows. (https://wiki.libsdl.org/SDL3/SDL_CreateGPUTexture)

func (*GPUDevice) CreateTransferBuffer

func (device *GPUDevice) CreateTransferBuffer(createinfo *GPUTransferBufferCreateInfo) (*GPUTransferBuffer, error)

SDL_CreateGPUTransferBuffer - Creates a transfer buffer to be used when uploading to or downloading from graphics resources. (https://wiki.libsdl.org/SDL3/SDL_CreateGPUTransferBuffer)

func (*GPUDevice) Destroy

func (device *GPUDevice) Destroy()

SDL_DestroyGPUDevice - Destroys a GPU context previously returned by SDL_CreateGPUDevice. (https://wiki.libsdl.org/SDL3/SDL_DestroyGPUDevice)

func (*GPUDevice) Driver

func (device *GPUDevice) Driver() string

SDL_GetGPUDeviceDriver - Returns the name of the backend used to create this GPU context. (https://wiki.libsdl.org/SDL3/SDL_GetGPUDeviceDriver)

func (*GPUDevice) MapTransferBuffer

func (device *GPUDevice) MapTransferBuffer(buffer *GPUTransferBuffer, cycle bool) (uintptr, error)

SDL_MapGPUTransferBuffer - Maps a transfer buffer into application address space. (https://wiki.libsdl.org/SDL3/SDL_MapGPUTransferBuffer)

func (*GPUDevice) QueryFence

func (device *GPUDevice) QueryFence(fence *GPUFence) bool

SDL_QueryGPUFence - Checks the status of a fence. (https://wiki.libsdl.org/SDL3/SDL_QueryGPUFence)

func (*GPUDevice) ReleaseBuffer

func (device *GPUDevice) ReleaseBuffer(buffer *GPUBuffer)

SDL_ReleaseGPUBuffer - Frees the given buffer as soon as it is safe to do so. (https://wiki.libsdl.org/SDL3/SDL_ReleaseGPUBuffer)

func (*GPUDevice) ReleaseComputePipeline

func (device *GPUDevice) ReleaseComputePipeline(pipeline *GPUComputePipeline)

SDL_ReleaseGPUComputePipeline - Frees the given compute pipeline as soon as it is safe to do so. (https://wiki.libsdl.org/SDL3/SDL_ReleaseGPUComputePipeline)

func (*GPUDevice) ReleaseFence

func (device *GPUDevice) ReleaseFence(fence *GPUFence)

SDL_ReleaseGPUFence - Releases a fence obtained from SDL_SubmitGPUCommandBufferAndAcquireFence. (https://wiki.libsdl.org/SDL3/SDL_ReleaseGPUFence)

func (*GPUDevice) ReleaseGraphicsPipeline

func (device *GPUDevice) ReleaseGraphicsPipeline(pipeline *GPUGraphicsPipeline)

SDL_ReleaseGPUGraphicsPipeline - Frees the given graphics pipeline as soon as it is safe to do so. (https://wiki.libsdl.org/SDL3/SDL_ReleaseGPUGraphicsPipeline)

func (*GPUDevice) ReleaseSampler

func (device *GPUDevice) ReleaseSampler(sampler *GPUSampler)

SDL_ReleaseGPUSampler - Frees the given sampler as soon as it is safe to do so. (https://wiki.libsdl.org/SDL3/SDL_ReleaseGPUSampler)

func (*GPUDevice) ReleaseShader

func (device *GPUDevice) ReleaseShader(shader *GPUShader)

SDL_ReleaseGPUShader - Frees the given shader as soon as it is safe to do so. (https://wiki.libsdl.org/SDL3/SDL_ReleaseGPUShader)

func (*GPUDevice) ReleaseTexture

func (device *GPUDevice) ReleaseTexture(texture *GPUTexture)

SDL_ReleaseGPUTexture - Frees the given texture as soon as it is safe to do so. (https://wiki.libsdl.org/SDL3/SDL_ReleaseGPUTexture)

func (*GPUDevice) ReleaseTransferBuffer

func (device *GPUDevice) ReleaseTransferBuffer(buffer *GPUTransferBuffer)

SDL_ReleaseGPUTransferBuffer - Frees the given transfer buffer as soon as it is safe to do so. (https://wiki.libsdl.org/SDL3/SDL_ReleaseGPUTransferBuffer)

func (*GPUDevice) ReleaseWindow

func (device *GPUDevice) ReleaseWindow(window *Window)

SDL_ReleaseWindowFromGPUDevice - Unclaims a window, destroying its swapchain structure. (https://wiki.libsdl.org/SDL3/SDL_ReleaseWindowFromGPUDevice)

func (*GPUDevice) SetAllowedFramesInFlight

func (device *GPUDevice) SetAllowedFramesInFlight(allowedFramesInFlight uint32) error

SDL_SetGPUAllowedFramesInFlight - Configures the maximum allowed number of frames in flight. (https://wiki.libsdl.org/SDL3/SDL_SetGPUAllowedFramesInFlight)

func (*GPUDevice) SetBufferName

func (device *GPUDevice) SetBufferName(buffer *GPUBuffer, text string)

SDL_SetGPUBufferName - Sets an arbitrary string constant to label a buffer. (https://wiki.libsdl.org/SDL3/SDL_SetGPUBufferName)

func (*GPUDevice) SetSwapchainParameters

func (device *GPUDevice) SetSwapchainParameters(window *Window, swapchainComposition GPUSwapchainComposition, presentMode GPUPresentMode) error

SDL_SetGPUSwapchainParameters - Changes the swapchain parameters for the given claimed window. (https://wiki.libsdl.org/SDL3/SDL_SetGPUSwapchainParameters)

func (*GPUDevice) SetTextureName

func (device *GPUDevice) SetTextureName(texture *GPUTexture, text string)

SDL_SetGPUTextureName - Sets an arbitrary string constant to label a texture. (https://wiki.libsdl.org/SDL3/SDL_SetGPUTextureName)

func (*GPUDevice) ShaderFormats

func (device *GPUDevice) ShaderFormats() GPUShaderFormat

SDL_GetGPUShaderFormats - Returns the supported shader formats for this GPU context. (https://wiki.libsdl.org/SDL3/SDL_GetGPUShaderFormats)

func (*GPUDevice) SwapchainTextureFormat

func (device *GPUDevice) SwapchainTextureFormat(window *Window) GPUTextureFormat

SDL_GetGPUSwapchainTextureFormat - Obtains the texture format of the swapchain for the given window. (https://wiki.libsdl.org/SDL3/SDL_GetGPUSwapchainTextureFormat)

func (*GPUDevice) TextureSupportsFormat

func (device *GPUDevice) TextureSupportsFormat(format GPUTextureFormat, typ GPUTextureType, usage GPUTextureUsageFlags) bool

SDL_GPUTextureSupportsFormat - Determines whether a texture format is supported for a given type and usage. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureSupportsFormat)

func (*GPUDevice) TextureSupportsSampleCount

func (device *GPUDevice) TextureSupportsSampleCount(format GPUTextureFormat, sampleCount GPUSampleCount) bool

SDL_GPUTextureSupportsSampleCount - Determines if a sample count for a texture format is supported. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureSupportsSampleCount)

func (*GPUDevice) UnmapTransferBuffer

func (device *GPUDevice) UnmapTransferBuffer(buffer *GPUTransferBuffer)

SDL_UnmapGPUTransferBuffer - Unmaps a previously mapped transfer buffer. (https://wiki.libsdl.org/SDL3/SDL_UnmapGPUTransferBuffer)

func (*GPUDevice) WaitForFences

func (device *GPUDevice) WaitForFences(waitAll bool, fences []*GPUFence) error

SDL_WaitForGPUFences - Blocks the thread until the given fences are signaled. (https://wiki.libsdl.org/SDL3/SDL_WaitForGPUFences)

func (*GPUDevice) WaitForIdle

func (device *GPUDevice) WaitForIdle() error

SDL_WaitForGPUIdle - Blocks the thread until the GPU is completely idle. (https://wiki.libsdl.org/SDL3/SDL_WaitForGPUIdle)

func (*GPUDevice) WaitForSwapchain

func (device *GPUDevice) WaitForSwapchain(window *Window) error

SDL_WaitForGPUSwapchain - Blocks the thread until a swapchain texture is available to be acquired. (https://wiki.libsdl.org/SDL3/SDL_WaitForGPUSwapchain)

func (*GPUDevice) WindowSupportsPresentMode

func (device *GPUDevice) WindowSupportsPresentMode(window *Window, presentMode GPUPresentMode) bool

SDL_WindowSupportsGPUPresentMode - Determines whether a presentation mode is supported by the window. (https://wiki.libsdl.org/SDL3/SDL_WindowSupportsGPUPresentMode)

func (*GPUDevice) WindowSupportsSwapchainComposition

func (device *GPUDevice) WindowSupportsSwapchainComposition(window *Window, swapchainComposition GPUSwapchainComposition) bool

SDL_WindowSupportsGPUSwapchainComposition - Determines whether a swapchain composition is supported by the window. (https://wiki.libsdl.org/SDL3/SDL_WindowSupportsGPUSwapchainComposition)

type GPUFence

type GPUFence struct{}

SDL_GPUFence - An opaque handle representing a fence. (https://wiki.libsdl.org/SDL3/SDL_GPUFence)

type GPUFillMode

type GPUFillMode uint32

SDL_GPUFillMode - Specifies the fill mode of the graphics pipeline. (https://wiki.libsdl.org/SDL3/SDL_GPUFillMode)

const (
	GPU_FILLMODE_FILL GPUFillMode = 0 // Polygons will be rendered via rasterization.
	GPU_FILLMODE_LINE GPUFillMode = 1 // Polygon edges will be drawn as line segments.
)

type GPUFilter

type GPUFilter uint32

SDL_GPUFilter - Specifies a filter operation used by a sampler. (https://wiki.libsdl.org/SDL3/SDL_GPUFilter)

const (
	GPU_FILTER_NEAREST GPUFilter = 0 // Point filtering.
	GPU_FILTER_LINEAR  GPUFilter = 1 // Linear filtering.
)

type GPUFrontFace

type GPUFrontFace uint32

SDL_GPUFrontFace - Specifies the vertex winding that will cause a triangle to be determined to be front-facing. (https://wiki.libsdl.org/SDL3/SDL_GPUFrontFace)

const (
	GPU_FRONTFACE_COUNTER_CLOCKWISE GPUFrontFace = 0 // A triangle with counter-clockwise vertex winding will be considered front-facing.
	GPU_FRONTFACE_CLOCKWISE         GPUFrontFace = 1 // A triangle with clockwise vertex winding will be considered front-facing.
)

type GPUGraphicsPipeline

type GPUGraphicsPipeline struct{}

SDL_GPUGraphicsPipeline - An opaque handle representing a graphics pipeline. (https://wiki.libsdl.org/SDL3/SDL_GPUGraphicsPipeline)

type GPUGraphicsPipelineCreateInfo

type GPUGraphicsPipelineCreateInfo struct {
	VertexShader      *GPUShader                    // The vertex shader used by the graphics pipeline.
	FragmentShader    *GPUShader                    // The fragment shader used by the graphics pipeline.
	VertexInputState  GPUVertexInputState           // The vertex layout of the graphics pipeline.
	PrimitiveType     GPUPrimitiveType              // The primitive topology of the graphics pipeline.
	RasterizerState   GPURasterizerState            // The rasterizer state of the graphics pipeline.
	MultisampleState  GPUMultisampleState           // The multisample state of the graphics pipeline.
	DepthStencilState GPUDepthStencilState          // The depth-stencil state of the graphics pipeline.
	TargetInfo        GPUGraphicsPipelineTargetInfo // Formats and blend modes for the render targets of the graphics pipeline.
	Props             PropertiesID                  // A properties ID for extensions. Should be 0 if no extensions are needed.
}

SDL_GPUGraphicsPipelineCreateInfo - A structure specifying the parameters of a graphics pipeline state. (https://wiki.libsdl.org/SDL3/SDL_GPUGraphicsPipelineCreateInfo)

type GPUGraphicsPipelineTargetInfo

type GPUGraphicsPipelineTargetInfo struct {
	ColorTargetDescriptions []GPUColorTargetDescription
	DepthStencilFormat      GPUTextureFormat
	HasDepthStencilTarget   bool
}

SDL_GPUGraphicsPipelineTargetInfo - A structure specifying the descriptions of render targets used in a graphics pipeline. (https://wiki.libsdl.org/SDL3/SDL_GPUGraphicsPipelineTargetInfo)

type GPUIndexElementSize

type GPUIndexElementSize uint32

SDL_GPUIndexElementSize - Specifies the size of elements in an index buffer. (https://wiki.libsdl.org/SDL3/SDL_GPUIndexElementSize)

const (
	GPU_INDEXELEMENTSIZE_16BIT GPUIndexElementSize = 0 // The index elements are 16-bit.
	GPU_INDEXELEMENTSIZE_32BIT GPUIndexElementSize = 1 // The index elements are 32-bit.
)

type GPUIndexedIndirectDrawCommand

type GPUIndexedIndirectDrawCommand struct {
	NumIndices    uint32 // The number of indices to draw per instance.
	NumInstances  uint32 // The number of instances to draw.
	FirstIndex    uint32 // The base index within the index buffer.
	VertexOffset  int32  // The value added to the vertex index before indexing into the vertex buffer.
	FirstInstance uint32 // The ID of the first instance to draw.
}

SDL_GPUIndexedIndirectDrawCommand - A structure specifying the parameters of an indexed indirect draw command. (https://wiki.libsdl.org/SDL3/SDL_GPUIndexedIndirectDrawCommand)

type GPUIndirectDispatchCommand

type GPUIndirectDispatchCommand struct {
	GroupcountX uint32 // The number of local workgroups to dispatch in the X dimension.
	GroupcountY uint32 // The number of local workgroups to dispatch in the Y dimension.
	GroupcountZ uint32 // The number of local workgroups to dispatch in the Z dimension.
}

SDL_GPUIndirectDispatchCommand - A structure specifying the parameters of an indexed dispatch command. (https://wiki.libsdl.org/SDL3/SDL_GPUIndirectDispatchCommand)

type GPUIndirectDrawCommand

type GPUIndirectDrawCommand struct {
	NumVertices   uint32 // The number of vertices to draw.
	NumInstances  uint32 // The number of instances to draw.
	FirstVertex   uint32 // The index of the first vertex to draw.
	FirstInstance uint32 // The ID of the first instance to draw.
}

SDL_GPUIndirectDrawCommand - A structure specifying the parameters of an indirect draw command. (https://wiki.libsdl.org/SDL3/SDL_GPUIndirectDrawCommand)

type GPULoadOp

type GPULoadOp uint32

SDL_GPULoadOp - Specifies how the contents of a texture attached to a render pass are treated at the beginning of the render pass. (https://wiki.libsdl.org/SDL3/SDL_GPULoadOp)

const (
	GPU_LOADOP_LOAD      GPULoadOp = 0 // The previous contents of the texture will be preserved.
	GPU_LOADOP_CLEAR     GPULoadOp = 1 // The contents of the texture will be cleared to a color.
	GPU_LOADOP_DONT_CARE GPULoadOp = 2 // The previous contents of the texture need not be preserved. The contents will be undefined.
)

type GPUMultisampleState

type GPUMultisampleState struct {
	SampleCount           GPUSampleCount // The number of samples to be used in rasterization.
	SampleMask            uint32         // Reserved for future use. Must be set to 0.
	EnableMask            bool           // Reserved for future use. Must be set to false.
	EnableAlphaToCoverage bool           // true enables the alpha-to-coverage feature.
	// contains filtered or unexported fields
}

SDL_GPUMultisampleState - A structure specifying the parameters of the graphics pipeline multisample state. (https://wiki.libsdl.org/SDL3/SDL_GPUMultisampleState)

type GPUPresentMode

type GPUPresentMode uint32

SDL_GPUPresentMode - Specifies the timing that will be used to present swapchain textures to the OS. (https://wiki.libsdl.org/SDL3/SDL_GPUPresentMode)

const (
	GPU_PRESENTMODE_VSYNC     GPUPresentMode = 0
	GPU_PRESENTMODE_IMMEDIATE GPUPresentMode = 1
	GPU_PRESENTMODE_MAILBOX   GPUPresentMode = 2
)

type GPUPrimitiveType

type GPUPrimitiveType uint32

SDL_GPUPrimitiveType - Specifies the primitive topology of a graphics pipeline. (https://wiki.libsdl.org/SDL3/SDL_GPUPrimitiveType)

const (
	GPU_PRIMITIVETYPE_TRIANGLELIST  GPUPrimitiveType = 0 // A series of separate triangles.
	GPU_PRIMITIVETYPE_TRIANGLESTRIP GPUPrimitiveType = 1 // A series of connected triangles.
	GPU_PRIMITIVETYPE_LINELIST      GPUPrimitiveType = 2 // A series of separate lines.
	GPU_PRIMITIVETYPE_LINESTRIP     GPUPrimitiveType = 3 // A series of connected lines.
	GPU_PRIMITIVETYPE_POINTLIST     GPUPrimitiveType = 4 // A series of separate points.
)

type GPURasterizerState

type GPURasterizerState struct {
	FillMode                GPUFillMode  // Whether polygons will be filled in or drawn as lines.
	CullMode                GPUCullMode  // The facing direction in which triangles will be culled.
	FrontFace               GPUFrontFace // The vertex winding that will cause a triangle to be determined as front-facing.
	DepthBiasConstantFactor float32      // A scalar factor controlling the depth value added to each fragment.
	DepthBiasClamp          float32      // The maximum depth bias of a fragment.
	DepthBiasSlopeFactor    float32      // A scalar factor applied to a fragment's slope in depth calculations.
	EnableDepthBias         bool         // true to bias fragment depth values.
	EnableDepthClip         bool         // true to enable depth clip, false to enable depth clamp.
	// contains filtered or unexported fields
}

SDL_GPURasterizerState - A structure specifying the parameters of the graphics pipeline rasterizer state. (https://wiki.libsdl.org/SDL3/SDL_GPURasterizerState)

type GPURenderPass

type GPURenderPass struct{}

SDL_GPURenderPass - An opaque handle representing a render pass. (https://wiki.libsdl.org/SDL3/SDL_GPURenderPass)

func (*GPURenderPass) BindFragmentSamplers

func (rp *GPURenderPass) BindFragmentSamplers(bindings []GPUTextureSamplerBinding)

SDL_BindGPUFragmentSamplers - Binds texture-sampler pairs for use on the fragment shader. (https://wiki.libsdl.org/SDL3/SDL_BindGPUFragmentSamplers)

func (*GPURenderPass) BindFragmentStorageBuffers

func (rp *GPURenderPass) BindFragmentStorageBuffers(buffers []*GPUBuffer)

SDL_BindGPUFragmentStorageBuffers - Binds storage buffers for use on the fragment shader. (https://wiki.libsdl.org/SDL3/SDL_BindGPUFragmentStorageBuffers)

func (*GPURenderPass) BindFragmentStorageTextures

func (rp *GPURenderPass) BindFragmentStorageTextures(textures []*GPUTexture)

SDL_BindGPUFragmentStorageTextures - Binds storage textures for use on the fragment shader. (https://wiki.libsdl.org/SDL3/SDL_BindGPUFragmentStorageTextures)

func (*GPURenderPass) BindGraphicsPipeline

func (rp *GPURenderPass) BindGraphicsPipeline(pipeline *GPUGraphicsPipeline)

SDL_BindGPUGraphicsPipeline - Binds a graphics pipeline on a render pass to be used in rendering. (https://wiki.libsdl.org/SDL3/SDL_BindGPUGraphicsPipeline)

func (*GPURenderPass) BindIndexBuffer

func (rp *GPURenderPass) BindIndexBuffer(binding *GPUBufferBinding, indexElementSize GPUIndexElementSize)

SDL_BindGPUIndexBuffer - Binds an index buffer on a command buffer for use with subsequent draw calls. (https://wiki.libsdl.org/SDL3/SDL_BindGPUIndexBuffer)

func (*GPURenderPass) BindVertexBuffers

func (rp *GPURenderPass) BindVertexBuffers(bindings []GPUBufferBinding)

SDL_BindGPUVertexBuffers - Binds vertex buffers on a command buffer for use with subsequent draw calls. (https://wiki.libsdl.org/SDL3/SDL_BindGPUVertexBuffers)

func (*GPURenderPass) BindVertexSamplers

func (rp *GPURenderPass) BindVertexSamplers(bindings []GPUTextureSamplerBinding)

SDL_BindGPUVertexSamplers - Binds texture-sampler pairs for use on the vertex shader. (https://wiki.libsdl.org/SDL3/SDL_BindGPUVertexSamplers)

func (*GPURenderPass) BindVertexStorageBuffers

func (rp *GPURenderPass) BindVertexStorageBuffers(buffers []*GPUBuffer)

SDL_BindGPUVertexStorageBuffers - Binds storage buffers for use on the vertex shader. (https://wiki.libsdl.org/SDL3/SDL_BindGPUVertexStorageBuffers)

func (*GPURenderPass) BindVertexStorageTextures

func (rp *GPURenderPass) BindVertexStorageTextures(textures []*GPUTexture)

SDL_BindGPUVertexStorageTextures - Binds storage textures for use on the vertex shader. (https://wiki.libsdl.org/SDL3/SDL_BindGPUVertexStorageTextures)

func (*GPURenderPass) DrawIndexedPrimitives

func (rp *GPURenderPass) DrawIndexedPrimitives(numIndices, numInstances, firstIndex uint32, vertexOffset int32, firstInstance uint32)

SDL_DrawGPUIndexedPrimitives - Draws data using bound graphics state with an index buffer and instancing enabled. (https://wiki.libsdl.org/SDL3/SDL_DrawGPUIndexedPrimitives)

func (*GPURenderPass) DrawIndexedPrimitivesIndirect

func (rp *GPURenderPass) DrawIndexedPrimitivesIndirect(buffer *GPUBuffer, offset, drawCount uint32)

SDL_DrawGPUIndexedPrimitivesIndirect - Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer. (https://wiki.libsdl.org/SDL3/SDL_DrawGPUIndexedPrimitivesIndirect)

func (*GPURenderPass) DrawPrimitives

func (rp *GPURenderPass) DrawPrimitives(numVertices, numInstances, firstVertex, firstInstance uint32)

SDL_DrawGPUPrimitives - Draws data using bound graphics state. (https://wiki.libsdl.org/SDL3/SDL_DrawGPUPrimitives)

func (*GPURenderPass) DrawPrimitivesIndirect

func (rp *GPURenderPass) DrawPrimitivesIndirect(buffer *GPUBuffer, offset, drawCount uint32)

SDL_DrawGPUPrimitivesIndirect - Draws data using bound graphics state and with draw parameters set from a buffer. (https://wiki.libsdl.org/SDL3/SDL_DrawGPUPrimitivesIndirect)

func (*GPURenderPass) End

func (rp *GPURenderPass) End()

SDL_EndGPURenderPass - Ends the given render pass. (https://wiki.libsdl.org/SDL3/SDL_EndGPURenderPass)

func (*GPURenderPass) SetGPUViewport

func (rp *GPURenderPass) SetGPUViewport(viewport *GPUViewport)

SDL_SetGPUViewport - Sets the current viewport state on a command buffer. (https://wiki.libsdl.org/SDL3/SDL_SetGPUViewport)

func (*GPURenderPass) SetScissor

func (rp *GPURenderPass) SetScissor(scissor *Rect)

SDL_SetGPUScissor - Sets the current scissor state on a command buffer. (https://wiki.libsdl.org/SDL3/SDL_SetGPUScissor)

func (*GPURenderPass) SetStencilReference

func (rp *GPURenderPass) SetStencilReference(reference uint8)

SDL_SetGPUStencilReference - Sets the current stencil reference value on a command buffer. (https://wiki.libsdl.org/SDL3/SDL_SetGPUStencilReference)

type GPURenderState

type GPURenderState struct{}

SDL_GPURenderState - A custom GPU render state. (https://wiki.libsdl.org/SDL3/SDL_GPURenderState)

func (*GPURenderState) Destroy

func (render_state *GPURenderState) Destroy()

SDL_DestroyGPURenderState - Destroy custom GPU render state. (https://wiki.libsdl.org/SDL3/SDL_DestroyGPURenderState)

type GPURenderStateCreateInfo

type GPURenderStateCreateInfo struct {
	FragmentShader  *GPUShader                 // The fragment shader to use when this render state is active
	SamplerBindings []GPUTextureSamplerBinding // Additional fragment samplers to bind when this render state is active
	StorageTextures []*GPUTexture              // Storage textures to bind when this render state is active
	StorageBuffers  []*GPUBuffer               // Storage buffers to bind when this render state is active
	Props           PropertiesID               // A properties ID for extensions. Should be 0 if no extensions are needed.
}

SDL_GPURenderStateCreateInfo - A structure specifying the parameters of a GPU render state. (https://wiki.libsdl.org/SDL3/SDL_GPURenderStateCreateInfo)

type GPUSampleCount

type GPUSampleCount uint32

SDL_GPUSampleCount - Specifies the sample count of a texture. (https://wiki.libsdl.org/SDL3/SDL_GPUSampleCount)

const (
	GPU_SAMPLECOUNT_1 GPUSampleCount = 0 // No multisampling.
	GPU_SAMPLECOUNT_2 GPUSampleCount = 1 // MSAA 2x
	GPU_SAMPLECOUNT_4 GPUSampleCount = 2 // MSAA 4x
	GPU_SAMPLECOUNT_8 GPUSampleCount = 3 // MSAA 8x
)

type GPUSampler

type GPUSampler struct{}

SDL_GPUSampler - An opaque handle representing a sampler. (https://wiki.libsdl.org/SDL3/SDL_GPUSampler)

type GPUSamplerAddressMode

type GPUSamplerAddressMode uint32

SDL_GPUSamplerAddressMode - Specifies behavior of texture sampling when the coordinates exceed the 0-1 range. (https://wiki.libsdl.org/SDL3/SDL_GPUSamplerAddressMode)

const (
	GPU_SAMPLERADDRESSMODE_REPEAT          GPUSamplerAddressMode = 0 // Specifies that the coordinates will wrap around.
	GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT GPUSamplerAddressMode = 1 // Specifies that the coordinates will wrap around mirrored.
	GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE   GPUSamplerAddressMode = 2 // Specifies that the coordinates will clamp to the 0-1 range.
)

type GPUSamplerCreateInfo

type GPUSamplerCreateInfo struct {
	MinFilter        GPUFilter             // The minification filter to apply to lookups.
	MagFilter        GPUFilter             // The magnification filter to apply to lookups.
	MipmapMode       GPUSamplerMipmapMode  // The mipmap filter to apply to lookups.
	AddressModeU     GPUSamplerAddressMode // The addressing mode for U coordinates outside [0, 1).
	AddressModeV     GPUSamplerAddressMode // The addressing mode for V coordinates outside [0, 1).
	AddressModeW     GPUSamplerAddressMode // The addressing mode for W coordinates outside [0, 1).
	MipLodBias       float32               // The bias to be added to mipmap LOD calculation.
	MaxAnisotropy    float32               // The anisotropy value clamp used by the sampler. If enable_anisotropy is false, this is ignored.
	CompareOp        GPUCompareOp          // The comparison operator to apply to fetched data before filtering.
	MinLod           float32               // Clamps the minimum of the computed LOD value.
	MaxLod           float32               // Clamps the maximum of the computed LOD value.
	EnableAnisotropy bool                  // true to enable anisotropic filtering.
	EnableCompare    bool                  // true to enable comparison against a reference value during lookups.

	Props PropertiesID // A properties ID for extensions. Should be 0 if no extensions are needed.
	// contains filtered or unexported fields
}

SDL_GPUSamplerCreateInfo - A structure specifying the parameters of a sampler. (https://wiki.libsdl.org/SDL3/SDL_GPUSamplerCreateInfo)

type GPUSamplerMipmapMode

type GPUSamplerMipmapMode uint32

SDL_GPUSamplerMipmapMode - Specifies a mipmap mode used by a sampler. (https://wiki.libsdl.org/SDL3/SDL_GPUSamplerMipmapMode)

const (
	GPU_SAMPLERMIPMAPMODE_NEAREST GPUSamplerMipmapMode = 0 // Point filtering.
	GPU_SAMPLERMIPMAPMODE_LINEAR  GPUSamplerMipmapMode = 1 // Linear filtering.
)

type GPUShader

type GPUShader struct{}

SDL_GPUShader - An opaque handle representing a compiled shader object. (https://wiki.libsdl.org/SDL3/SDL_GPUShader)

type GPUShaderCreateInfo

type GPUShaderCreateInfo struct {
	Code               []byte
	Entrypoint         string
	Format             GPUShaderFormat // The format of the shader code.
	Stage              GPUShaderStage  // The stage the shader program corresponds to.
	NumSamplers        uint32          // The number of samplers defined in the shader.
	NumStorageTextures uint32          // The number of storage textures defined in the shader.
	NumStorageBuffers  uint32          // The number of storage buffers defined in the shader.
	NumUniformBuffers  uint32          // The number of uniform buffers defined in the shader.
	Props              PropertiesID    // A properties ID for extensions. Should be 0 if no extensions are needed.
}

SDL_GPUShaderCreateInfo - A structure specifying code and metadata for creating a shader object. (https://wiki.libsdl.org/SDL3/SDL_GPUShaderCreateInfo)

type GPUShaderFormat

type GPUShaderFormat uint32

SDL_GPUShaderFormat - Specifies the format of shader code. (https://wiki.libsdl.org/SDL3/SDL_GPUShaderFormat)

const (
	GPU_SHADERFORMAT_INVALID  GPUShaderFormat = 0
	GPU_SHADERFORMAT_PRIVATE  GPUShaderFormat = 1 << 0 /**< Shaders for NDA'd platforms. */
	GPU_SHADERFORMAT_SPIRV    GPUShaderFormat = 1 << 1 /**< SPIR-V shaders for Vulkan. */
	GPU_SHADERFORMAT_DXBC     GPUShaderFormat = 1 << 2 /**< DXBC SM5_1 shaders for D3D12. */
	GPU_SHADERFORMAT_DXIL     GPUShaderFormat = 1 << 3 /**< DXIL SM6_0 shaders for D3D12. */
	GPU_SHADERFORMAT_MSL      GPUShaderFormat = 1 << 4 /**< MSL shaders for Metal. */
	GPU_SHADERFORMAT_METALLIB GPUShaderFormat = 1 << 5 /**< Precompiled metallib shaders for Metal. */
)

type GPUShaderStage

type GPUShaderStage uint32

SDL_GPUShaderStage - Specifies which stage a shader program corresponds to. (https://wiki.libsdl.org/SDL3/SDL_GPUShaderStage)

const (
	GPU_SHADERSTAGE_VERTEX   GPUShaderStage = 0
	GPU_SHADERSTAGE_FRAGMENT GPUShaderStage = 1
)

type GPUStencilOp

type GPUStencilOp uint32

SDL_GPUStencilOp - Specifies what happens to a stored stencil value if stencil tests fail or pass. (https://wiki.libsdl.org/SDL3/SDL_GPUStencilOp)

const (
	GPU_STENCILOP_INVALID             GPUStencilOp = 0
	GPU_STENCILOP_KEEP                GPUStencilOp = 1 // Keeps the current value.
	GPU_STENCILOP_ZERO                GPUStencilOp = 2 // Sets the value to 0.
	GPU_STENCILOP_REPLACE             GPUStencilOp = 3 // Sets the value to reference.
	GPU_STENCILOP_INCREMENT_AND_CLAMP GPUStencilOp = 4 // Increments the current value and clamps to the maximum value.
	GPU_STENCILOP_DECREMENT_AND_CLAMP GPUStencilOp = 5 // Decrements the current value and clamps to 0.
	GPU_STENCILOP_INVERT              GPUStencilOp = 6 // Bitwise-inverts the current value.
	GPU_STENCILOP_INCREMENT_AND_WRAP  GPUStencilOp = 7 // Increments the current value and wraps back to 0.
	GPU_STENCILOP_DECREMENT_AND_WRAP  GPUStencilOp = 8 // Decrements the current value and wraps to the maximum value.
)

type GPUStencilOpState

type GPUStencilOpState struct {
	FailOp      GPUStencilOp // The action performed on samples that fail the stencil test.
	PassOp      GPUStencilOp // The action performed on samples that pass the depth and stencil tests.
	DepthFailOp GPUStencilOp // The action performed on samples that pass the stencil test and fail the depth test.
	CompareOp   GPUCompareOp // The comparison operator used in the stencil test.
}

SDL_GPUStencilOpState - A structure specifying the stencil operation state of a graphics pipeline. (https://wiki.libsdl.org/SDL3/SDL_GPUStencilOpState)

type GPUStorageBufferReadWriteBinding

type GPUStorageBufferReadWriteBinding struct {
	Buffer *GPUBuffer // The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE.
	Cycle  bool       // true cycles the buffer if it is already bound.
	// contains filtered or unexported fields
}

SDL_GPUStorageBufferReadWriteBinding - A structure specifying parameters related to binding buffers in a compute pass. (https://wiki.libsdl.org/SDL3/SDL_GPUStorageBufferReadWriteBinding)

type GPUStorageTextureReadWriteBinding

type GPUStorageTextureReadWriteBinding struct {
	Texture  *GPUTexture // The texture to bind. Must have been created with SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE or SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE.
	MipLevel uint32      // The mip level index to bind.
	Layer    uint32      // The layer index to bind.
	Cycle    bool        // true cycles the texture if it is already bound.
	// contains filtered or unexported fields
}

SDL_GPUStorageTextureReadWriteBinding - A structure specifying parameters related to binding textures in a compute pass. (https://wiki.libsdl.org/SDL3/SDL_GPUStorageTextureReadWriteBinding)

type GPUStoreOp

type GPUStoreOp uint32

SDL_GPUStoreOp - Specifies how the contents of a texture attached to a render pass are treated at the end of the render pass. (https://wiki.libsdl.org/SDL3/SDL_GPUStoreOp)

const (
	GPU_STOREOP_STORE             GPUStoreOp = 0 // The contents generated during the render pass will be written to memory.
	GPU_STOREOP_DONT_CARE         GPUStoreOp = 1 // The contents generated during the render pass are not needed and may be discarded. The contents will be undefined.
	GPU_STOREOP_RESOLVE           GPUStoreOp = 2 // The multisample contents generated during the render pass will be resolved to a non-multisample texture. The contents in the multisample texture may then be discarded and will be undefined.
	GPU_STOREOP_RESOLVE_AND_STORE GPUStoreOp = 3 // The multisample contents generated during the render pass will be resolved to a non-multisample texture. The contents in the multisample texture will be written to memory.
)

type GPUSwapchainComposition

type GPUSwapchainComposition uint32

SDL_GPUSwapchainComposition - Specifies the texture format and colorspace of the swapchain textures. (https://wiki.libsdl.org/SDL3/SDL_GPUSwapchainComposition)

const (
	GPU_SWAPCHAINCOMPOSITION_SDR                 GPUSwapchainComposition = 0
	GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR          GPUSwapchainComposition = 1
	GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR GPUSwapchainComposition = 2
	GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084        GPUSwapchainComposition = 3
)

type GPUTexture

type GPUTexture struct{}

SDL_GPUTexture - An opaque handle representing a texture. (https://wiki.libsdl.org/SDL3/SDL_GPUTexture)

type GPUTextureCreateInfo

type GPUTextureCreateInfo struct {
	Type              GPUTextureType       // The base dimensionality of the texture.
	Format            GPUTextureFormat     // The pixel format of the texture.
	Usage             GPUTextureUsageFlags // How the texture is intended to be used by the client.
	Width             uint32               // The width of the texture.
	Height            uint32               // The height of the texture.
	LayerCountOrDepth uint32               // The layer count or depth of the texture. This value is treated as a layer count on 2D array textures, and as a depth value on 3D textures.
	NumLevels         uint32               // The number of mip levels in the texture.
	SampleCount       GPUSampleCount       // The number of samples per texel. Only applies if the texture is used as a render target.
	Props             PropertiesID         // A properties ID for extensions. Should be 0 if no extensions are needed.
}

SDL_GPUTextureCreateInfo - A structure specifying the parameters of a texture. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureCreateInfo)

type GPUTextureFormat

type GPUTextureFormat uint32

SDL_GPUTextureFormat - Specifies the pixel format of a texture. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureFormat)

const (
	GPU_TEXTUREFORMAT_INVALID               GPUTextureFormat = 0
	GPU_TEXTUREFORMAT_A8_UNORM              GPUTextureFormat = 1
	GPU_TEXTUREFORMAT_R8_UNORM              GPUTextureFormat = 2
	GPU_TEXTUREFORMAT_R8G8_UNORM            GPUTextureFormat = 3
	GPU_TEXTUREFORMAT_R8G8B8A8_UNORM        GPUTextureFormat = 4
	GPU_TEXTUREFORMAT_R16_UNORM             GPUTextureFormat = 5
	GPU_TEXTUREFORMAT_R16G16_UNORM          GPUTextureFormat = 6
	GPU_TEXTUREFORMAT_R16G16B16A16_UNORM    GPUTextureFormat = 7
	GPU_TEXTUREFORMAT_R10G10B10A2_UNORM     GPUTextureFormat = 8
	GPU_TEXTUREFORMAT_B5G6R5_UNORM          GPUTextureFormat = 9
	GPU_TEXTUREFORMAT_B5G5R5A1_UNORM        GPUTextureFormat = 10
	GPU_TEXTUREFORMAT_B4G4R4A4_UNORM        GPUTextureFormat = 11
	GPU_TEXTUREFORMAT_B8G8R8A8_UNORM        GPUTextureFormat = 12
	GPU_TEXTUREFORMAT_BC1_RGBA_UNORM        GPUTextureFormat = 13
	GPU_TEXTUREFORMAT_BC2_RGBA_UNORM        GPUTextureFormat = 14
	GPU_TEXTUREFORMAT_BC3_RGBA_UNORM        GPUTextureFormat = 15
	GPU_TEXTUREFORMAT_BC4_R_UNORM           GPUTextureFormat = 16
	GPU_TEXTUREFORMAT_BC5_RG_UNORM          GPUTextureFormat = 17
	GPU_TEXTUREFORMAT_BC7_RGBA_UNORM        GPUTextureFormat = 18
	GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT        GPUTextureFormat = 19
	GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT       GPUTextureFormat = 20
	GPU_TEXTUREFORMAT_R8_SNORM              GPUTextureFormat = 21
	GPU_TEXTUREFORMAT_R8G8_SNORM            GPUTextureFormat = 22
	GPU_TEXTUREFORMAT_R8G8B8A8_SNORM        GPUTextureFormat = 23
	GPU_TEXTUREFORMAT_R16_SNORM             GPUTextureFormat = 24
	GPU_TEXTUREFORMAT_R16G16_SNORM          GPUTextureFormat = 25
	GPU_TEXTUREFORMAT_R16G16B16A16_SNORM    GPUTextureFormat = 26
	GPU_TEXTUREFORMAT_R16_FLOAT             GPUTextureFormat = 27
	GPU_TEXTUREFORMAT_R16G16_FLOAT          GPUTextureFormat = 28
	GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT    GPUTextureFormat = 29
	GPU_TEXTUREFORMAT_R32_FLOAT             GPUTextureFormat = 30
	GPU_TEXTUREFORMAT_R32G32_FLOAT          GPUTextureFormat = 31
	GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT    GPUTextureFormat = 32
	GPU_TEXTUREFORMAT_R11G11B10_UFLOAT      GPUTextureFormat = 33
	GPU_TEXTUREFORMAT_R8_UINT               GPUTextureFormat = 34
	GPU_TEXTUREFORMAT_R8G8_UINT             GPUTextureFormat = 35
	GPU_TEXTUREFORMAT_R8G8B8A8_UINT         GPUTextureFormat = 36
	GPU_TEXTUREFORMAT_R16_UINT              GPUTextureFormat = 37
	GPU_TEXTUREFORMAT_R16G16_UINT           GPUTextureFormat = 38
	GPU_TEXTUREFORMAT_R16G16B16A16_UINT     GPUTextureFormat = 39
	GPU_TEXTUREFORMAT_R32_UINT              GPUTextureFormat = 40
	GPU_TEXTUREFORMAT_R32G32_UINT           GPUTextureFormat = 41
	GPU_TEXTUREFORMAT_R32G32B32A32_UINT     GPUTextureFormat = 42
	GPU_TEXTUREFORMAT_R8_INT                GPUTextureFormat = 43
	GPU_TEXTUREFORMAT_R8G8_INT              GPUTextureFormat = 44
	GPU_TEXTUREFORMAT_R8G8B8A8_INT          GPUTextureFormat = 45
	GPU_TEXTUREFORMAT_R16_INT               GPUTextureFormat = 46
	GPU_TEXTUREFORMAT_R16G16_INT            GPUTextureFormat = 47
	GPU_TEXTUREFORMAT_R16G16B16A16_INT      GPUTextureFormat = 48
	GPU_TEXTUREFORMAT_R32_INT               GPUTextureFormat = 49
	GPU_TEXTUREFORMAT_R32G32_INT            GPUTextureFormat = 50
	GPU_TEXTUREFORMAT_R32G32B32A32_INT      GPUTextureFormat = 51
	GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB   GPUTextureFormat = 52
	GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB   GPUTextureFormat = 53
	GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB   GPUTextureFormat = 54
	GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB   GPUTextureFormat = 55
	GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB   GPUTextureFormat = 56
	GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB   GPUTextureFormat = 57
	GPU_TEXTUREFORMAT_D16_UNORM             GPUTextureFormat = 58
	GPU_TEXTUREFORMAT_D24_UNORM             GPUTextureFormat = 59
	GPU_TEXTUREFORMAT_D32_FLOAT             GPUTextureFormat = 60
	GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT     GPUTextureFormat = 61
	GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT     GPUTextureFormat = 62
	GPU_TEXTUREFORMAT_ASTC_4x4_UNORM        GPUTextureFormat = 63
	GPU_TEXTUREFORMAT_ASTC_5x4_UNORM        GPUTextureFormat = 64
	GPU_TEXTUREFORMAT_ASTC_5x5_UNORM        GPUTextureFormat = 65
	GPU_TEXTUREFORMAT_ASTC_6x5_UNORM        GPUTextureFormat = 66
	GPU_TEXTUREFORMAT_ASTC_6x6_UNORM        GPUTextureFormat = 67
	GPU_TEXTUREFORMAT_ASTC_8x5_UNORM        GPUTextureFormat = 68
	GPU_TEXTUREFORMAT_ASTC_8x6_UNORM        GPUTextureFormat = 69
	GPU_TEXTUREFORMAT_ASTC_8x8_UNORM        GPUTextureFormat = 70
	GPU_TEXTUREFORMAT_ASTC_10x5_UNORM       GPUTextureFormat = 71
	GPU_TEXTUREFORMAT_ASTC_10x6_UNORM       GPUTextureFormat = 72
	GPU_TEXTUREFORMAT_ASTC_10x8_UNORM       GPUTextureFormat = 73
	GPU_TEXTUREFORMAT_ASTC_10x10_UNORM      GPUTextureFormat = 74
	GPU_TEXTUREFORMAT_ASTC_12x10_UNORM      GPUTextureFormat = 75
	GPU_TEXTUREFORMAT_ASTC_12x12_UNORM      GPUTextureFormat = 76
	GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB   GPUTextureFormat = 77
	GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB   GPUTextureFormat = 78
	GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB   GPUTextureFormat = 79
	GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB   GPUTextureFormat = 80
	GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB   GPUTextureFormat = 81
	GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB   GPUTextureFormat = 82
	GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB   GPUTextureFormat = 83
	GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB   GPUTextureFormat = 84
	GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB  GPUTextureFormat = 85
	GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB  GPUTextureFormat = 86
	GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB  GPUTextureFormat = 87
	GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB GPUTextureFormat = 88
	GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB GPUTextureFormat = 89
	GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB GPUTextureFormat = 90
	GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT        GPUTextureFormat = 91
	GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT        GPUTextureFormat = 92
	GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT        GPUTextureFormat = 93
	GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT        GPUTextureFormat = 94
	GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT        GPUTextureFormat = 95
	GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT        GPUTextureFormat = 96
	GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT        GPUTextureFormat = 97
	GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT        GPUTextureFormat = 98
	GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT       GPUTextureFormat = 99
	GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT       GPUTextureFormat = 100
	GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT       GPUTextureFormat = 101
	GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT      GPUTextureFormat = 102
	GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT      GPUTextureFormat = 103
	GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT      GPUTextureFormat = 104
)

func (GPUTextureFormat) CalculateSize

func (format GPUTextureFormat) CalculateSize(width, height, depthOrLayerCount uint32) uint32

SDL_CalculateGPUTextureFormatSize - Calculate the size in bytes of a texture format with dimensions. (https://wiki.libsdl.org/SDL3/SDL_CalculateGPUTextureFormatSize)

func (GPUTextureFormat) TexelBlockSize

func (format GPUTextureFormat) TexelBlockSize() uint32

SDL_GPUTextureFormatTexelBlockSize - Obtains the texel block size for a texture format. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureFormatTexelBlockSize)

type GPUTextureLocation

type GPUTextureLocation struct {
	Texture  *GPUTexture // The texture used in the copy operation.
	MipLevel uint32      // The mip level index of the location.
	Layer    uint32      // The layer index of the location.
	X        uint32      // The left offset of the location.
	Y        uint32      // The top offset of the location.
	Z        uint32      // The front offset of the location.
}

SDL_GPUTextureLocation - A structure specifying a location in a texture. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureLocation)

type GPUTextureRegion

type GPUTextureRegion struct {
	Texture  *GPUTexture // The texture used in the copy operation.
	MipLevel uint32      // The mip level index to transfer.
	Layer    uint32      // The layer index to transfer.
	X        uint32      // The left offset of the region.
	Y        uint32      // The top offset of the region.
	Z        uint32      // The front offset of the region.
	W        uint32      // The width of the region.
	H        uint32      // The height of the region.
	D        uint32      // The depth of the region.
}

SDL_GPUTextureRegion - A structure specifying a region of a texture. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureRegion)

type GPUTextureSamplerBinding

type GPUTextureSamplerBinding struct {
	Texture *GPUTexture // The texture to bind. Must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
	Sampler *GPUSampler // The sampler to bind.
}

SDL_GPUTextureSamplerBinding - A structure specifying parameters in a sampler binding call. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureSamplerBinding)

type GPUTextureTransferInfo

type GPUTextureTransferInfo struct {
	TransferBuffer *GPUTransferBuffer // The transfer buffer used in the transfer operation.
	Offset         uint32             // The starting byte of the image data in the transfer buffer.
	PixelsPerRow   uint32             // The number of pixels from one row to the next.
	RowsPerLayer   uint32             // The number of rows from one layer/depth-slice to the next.
}

SDL_GPUTextureTransferInfo - A structure specifying parameters related to transferring data to or from a texture. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureTransferInfo)

type GPUTextureType

type GPUTextureType uint32

SDL_GPUTextureType - Specifies the type of a texture. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureType)

const (
	GPU_TEXTURETYPE_2D         GPUTextureType = 0 // The texture is a 2-dimensional image.
	GPU_TEXTURETYPE_2D_ARRAY   GPUTextureType = 1 // The texture is a 2-dimensional array image.
	GPU_TEXTURETYPE_3D         GPUTextureType = 2 // The texture is a 3-dimensional image.
	GPU_TEXTURETYPE_CUBE       GPUTextureType = 3 // The texture is a cube image.
	GPU_TEXTURETYPE_CUBE_ARRAY GPUTextureType = 4 // The texture is a cube array image.
)

type GPUTextureUsageFlags

type GPUTextureUsageFlags uint32

SDL_GPUTextureUsageFlags - Specifies how a texture is intended to be used by the client. (https://wiki.libsdl.org/SDL3/SDL_GPUTextureUsageFlags)

const (
	GPU_TEXTUREUSAGE_SAMPLER                                 GPUTextureUsageFlags = 1 << 0 /**< Texture supports sampling. */
	GPU_TEXTUREUSAGE_COLOR_TARGET                            GPUTextureUsageFlags = 1 << 1 /**< Texture is a color render target. */
	GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET                    GPUTextureUsageFlags = 1 << 2 /**< Texture is a depth stencil target. */
	GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ                   GPUTextureUsageFlags = 1 << 3 /**< Texture supports storage reads in graphics stages. */
	GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ                    GPUTextureUsageFlags = 1 << 4 /**< Texture supports storage reads in the compute stage. */
	GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE                   GPUTextureUsageFlags = 1 << 5 /**< Texture supports storage writes in the compute stage. */
	GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE GPUTextureUsageFlags = 1 << 6 /**< Texture supports reads and writes in the same compute shader. This is NOT equivalent to READ | WRITE. */
)

type GPUTransferBuffer

type GPUTransferBuffer struct{}

SDL_GPUTransferBuffer - An opaque handle representing a transfer buffer. (https://wiki.libsdl.org/SDL3/SDL_GPUTransferBuffer)

type GPUTransferBufferCreateInfo

type GPUTransferBufferCreateInfo struct {
	Usage GPUTransferBufferUsage // How the transfer buffer is intended to be used by the client.
	Size  uint32                 // The size in bytes of the transfer buffer.
	Props PropertiesID           // A properties ID for extensions. Should be 0 if no extensions are needed.
}

SDL_GPUTransferBufferCreateInfo - A structure specifying the parameters of a transfer buffer. (https://wiki.libsdl.org/SDL3/SDL_GPUTransferBufferCreateInfo)

type GPUTransferBufferLocation

type GPUTransferBufferLocation struct {
	TransferBuffer *GPUTransferBuffer // The transfer buffer used in the transfer operation.
	Offset         uint32             // The starting byte of the buffer data in the transfer buffer.
}

SDL_GPUTransferBufferLocation - A structure specifying a location in a transfer buffer. (https://wiki.libsdl.org/SDL3/SDL_GPUTransferBufferLocation)

type GPUTransferBufferUsage

type GPUTransferBufferUsage uint32

SDL_GPUTransferBufferUsage - Specifies how a transfer buffer is intended to be used by the client. (https://wiki.libsdl.org/SDL3/SDL_GPUTransferBufferUsage)

const (
	GPU_TRANSFERBUFFERUSAGE_UPLOAD   GPUTransferBufferUsage = 0
	GPU_TRANSFERBUFFERUSAGE_DOWNLOAD GPUTransferBufferUsage = 1
)

type GPUVertexAttribute

type GPUVertexAttribute struct {
	Location   uint32                 // The shader input location index.
	BufferSlot uint32                 // The binding slot of the associated vertex buffer.
	Format     GPUVertexElementFormat // The size and type of the attribute data.
	Offset     uint32                 // The byte offset of this attribute relative to the start of the vertex element.
}

SDL_GPUVertexAttribute - A structure specifying a vertex attribute. (https://wiki.libsdl.org/SDL3/SDL_GPUVertexAttribute)

type GPUVertexBufferDescription

type GPUVertexBufferDescription struct {
	Slot             uint32             // The binding slot of the vertex buffer.
	Pitch            uint32             // The size of a single element + the offset between elements.
	InputRate        GPUVertexInputRate // Whether attribute addressing is a function of the vertex index or instance index.
	InstanceStepRate uint32             // Reserved for future use. Must be set to 0.
}

SDL_GPUVertexBufferDescription - A structure specifying the parameters of vertex buffers used in a graphics pipeline. (https://wiki.libsdl.org/SDL3/SDL_GPUVertexBufferDescription)

type GPUVertexElementFormat

type GPUVertexElementFormat uint32

SDL_GPUVertexElementFormat - Specifies the format of a vertex attribute. (https://wiki.libsdl.org/SDL3/SDL_GPUVertexElementFormat)

const (
	GPU_VERTEXELEMENTFORMAT_INVALID      GPUVertexElementFormat = 0
	GPU_VERTEXELEMENTFORMAT_INT          GPUVertexElementFormat = 1
	GPU_VERTEXELEMENTFORMAT_INT2         GPUVertexElementFormat = 2
	GPU_VERTEXELEMENTFORMAT_INT3         GPUVertexElementFormat = 3
	GPU_VERTEXELEMENTFORMAT_INT4         GPUVertexElementFormat = 4
	GPU_VERTEXELEMENTFORMAT_UINT         GPUVertexElementFormat = 5
	GPU_VERTEXELEMENTFORMAT_UINT2        GPUVertexElementFormat = 6
	GPU_VERTEXELEMENTFORMAT_UINT3        GPUVertexElementFormat = 7
	GPU_VERTEXELEMENTFORMAT_UINT4        GPUVertexElementFormat = 8
	GPU_VERTEXELEMENTFORMAT_FLOAT        GPUVertexElementFormat = 9
	GPU_VERTEXELEMENTFORMAT_FLOAT2       GPUVertexElementFormat = 10
	GPU_VERTEXELEMENTFORMAT_FLOAT3       GPUVertexElementFormat = 11
	GPU_VERTEXELEMENTFORMAT_FLOAT4       GPUVertexElementFormat = 12
	GPU_VERTEXELEMENTFORMAT_BYTE2        GPUVertexElementFormat = 13
	GPU_VERTEXELEMENTFORMAT_BYTE4        GPUVertexElementFormat = 14
	GPU_VERTEXELEMENTFORMAT_UBYTE2       GPUVertexElementFormat = 15
	GPU_VERTEXELEMENTFORMAT_UBYTE4       GPUVertexElementFormat = 16
	GPU_VERTEXELEMENTFORMAT_BYTE2_NORM   GPUVertexElementFormat = 17
	GPU_VERTEXELEMENTFORMAT_BYTE4_NORM   GPUVertexElementFormat = 18
	GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM  GPUVertexElementFormat = 19
	GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM  GPUVertexElementFormat = 20
	GPU_VERTEXELEMENTFORMAT_SHORT2       GPUVertexElementFormat = 21
	GPU_VERTEXELEMENTFORMAT_SHORT4       GPUVertexElementFormat = 22
	GPU_VERTEXELEMENTFORMAT_USHORT2      GPUVertexElementFormat = 23
	GPU_VERTEXELEMENTFORMAT_USHORT4      GPUVertexElementFormat = 24
	GPU_VERTEXELEMENTFORMAT_SHORT2_NORM  GPUVertexElementFormat = 25
	GPU_VERTEXELEMENTFORMAT_SHORT4_NORM  GPUVertexElementFormat = 26
	GPU_VERTEXELEMENTFORMAT_USHORT2_NORM GPUVertexElementFormat = 27
	GPU_VERTEXELEMENTFORMAT_USHORT4_NORM GPUVertexElementFormat = 28
	GPU_VERTEXELEMENTFORMAT_HALF2        GPUVertexElementFormat = 29
	GPU_VERTEXELEMENTFORMAT_HALF4        GPUVertexElementFormat = 30
)

type GPUVertexInputRate

type GPUVertexInputRate uint32

SDL_GPUVertexInputRate - Specifies the rate at which vertex attributes are pulled from buffers. (https://wiki.libsdl.org/SDL3/SDL_GPUVertexInputRate)

const (
	GPU_VERTEXINPUTRATE_VERTEX   GPUVertexInputRate = 0 // Attribute addressing is a function of the vertex index.
	GPU_VERTEXINPUTRATE_INSTANCE GPUVertexInputRate = 1 // Attribute addressing is a function of the instance index.
)

type GPUVertexInputState

type GPUVertexInputState struct {
	VertexBufferDescriptions []GPUVertexBufferDescription
	VertexAttributes         []GPUVertexAttribute
}

SDL_GPUVertexInputState - A structure specifying the parameters of a graphics pipeline vertex input state. (https://wiki.libsdl.org/SDL3/SDL_GPUVertexInputState)

type GPUViewport

type GPUViewport struct {
	X        float32 // The left offset of the viewport.
	Y        float32 // The top offset of the viewport.
	W        float32 // The width of the viewport.
	H        float32 // The height of the viewport.
	MinDepth float32 // The minimum depth of the viewport.
	MaxDepth float32 // The maximum depth of the viewport.
}

SDL_GPUViewport - A structure specifying a viewport. (https://wiki.libsdl.org/SDL3/SDL_GPUViewport)

type Gamepad

type Gamepad struct{}

SDL_Gamepad - The structure used to identify an SDL gamepad (https://wiki.libsdl.org/SDL3/SDL_Gamepad)

func GetGamepadFromPlayerIndex

func GetGamepadFromPlayerIndex(playerIndex int) *Gamepad

SDL_GetGamepadFromPlayerIndex - Get the SDL_Gamepad associated with a player index. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadFromPlayerIndex)

func (*Gamepad) AppleSFSymbolsNameForAxis

func (gamepad *Gamepad) AppleSFSymbolsNameForAxis(axis GamepadAxis) string

SDL_GetGamepadAppleSFSymbolsNameForAxis - Return the sfSymbolsName for a given axis on a gamepad on Apple platforms. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadAppleSFSymbolsNameForAxis)

func (*Gamepad) AppleSFSymbolsNameForButton

func (gamepad *Gamepad) AppleSFSymbolsNameForButton(button GamepadButton) string

SDL_GetGamepadAppleSFSymbolsNameForButton - Return the sfSymbolsName for a given button on a gamepad on Apple platforms. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadAppleSFSymbolsNameForButton)

func (*Gamepad) Axis

func (gamepad *Gamepad) Axis(axis GamepadAxis) int16

SDL_GetGamepadAxis - Get the current state of an axis control on a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadAxis)

func (*Gamepad) Bindings

func (gamepad *Gamepad) Bindings() ([]*GamepadBinding, error)

SDL_GetGamepadBindings - Get the SDL joystick layer bindings for a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadBindings)

func (*Gamepad) Button

func (gamepad *Gamepad) Button(button GamepadButton) bool

SDL_GetGamepadButton - Get the current state of a button on a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadButton)

func (*Gamepad) ButtonLabel

func (gamepad *Gamepad) ButtonLabel(button GamepadButton) GamepadButtonLabel

SDL_GetGamepadButtonLabel - Get the label of a button on a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadButtonLabel)

func (*Gamepad) Close

func (gamepad *Gamepad) Close()

SDL_CloseGamepad - Close a gamepad previously opened with SDL_OpenGamepad(). (https://wiki.libsdl.org/SDL3/SDL_CloseGamepad)

func (*Gamepad) Connected

func (gamepad *Gamepad) Connected() bool

SDL_GamepadConnected - Check if a gamepad has been opened and is currently connected. (https://wiki.libsdl.org/SDL3/SDL_GamepadConnected)

func (*Gamepad) ConnectionState

func (gamepad *Gamepad) ConnectionState() (JoystickConnectionState, error)

SDL_GetGamepadConnectionState - Get the connection state of a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadConnectionState)

func (*Gamepad) FirmwareVersion

func (gamepad *Gamepad) FirmwareVersion() uint16

SDL_GetGamepadFirmwareVersion - Get the firmware version of an opened gamepad, if available. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadFirmwareVersion)

func (*Gamepad) HasAxis

func (gamepad *Gamepad) HasAxis(axis GamepadAxis) bool

SDL_GamepadHasAxis - Query whether a gamepad has a given axis. (https://wiki.libsdl.org/SDL3/SDL_GamepadHasAxis)

func (*Gamepad) HasButton

func (gamepad *Gamepad) HasButton(button GamepadButton) bool

SDL_GamepadHasButton - Query whether a gamepad has a given button. (https://wiki.libsdl.org/SDL3/SDL_GamepadHasButton)

func (*Gamepad) HasSensor

func (gamepad *Gamepad) HasSensor(typ SensorType) bool

SDL_GamepadHasSensor - Return whether a gamepad has a particular sensor. (https://wiki.libsdl.org/SDL3/SDL_GamepadHasSensor)

func (*Gamepad) ID

func (gamepad *Gamepad) ID() (JoystickID, error)

SDL_GetGamepadID - Get the instance ID of an opened gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadID)

func (*Gamepad) Joystick

func (gamepad *Gamepad) Joystick() (*Joystick, error)

SDL_GetGamepadJoystick - Get the underlying joystick from a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadJoystick)

func (*Gamepad) Mapping

func (gamepad *Gamepad) Mapping() (string, error)

SDL_GetGamepadMapping - Get the current mapping of a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadMapping)

func (*Gamepad) Name

func (gamepad *Gamepad) Name() string

SDL_GetGamepadName - Get the implementation-dependent name for an opened gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadName)

func (*Gamepad) NumTouchpadFingers

func (gamepad *Gamepad) NumTouchpadFingers(touchpad int32) int32

SDL_GetNumGamepadTouchpadFingers - Get the number of supported simultaneous fingers on a touchpad on a game gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetNumGamepadTouchpadFingers)

func (*Gamepad) NumTouchpads

func (gamepad *Gamepad) NumTouchpads() int32

SDL_GetNumGamepadTouchpads - Get the number of touchpads on a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetNumGamepadTouchpads)

func (*Gamepad) Path

func (gamepad *Gamepad) Path() string

SDL_GetGamepadPath - Get the implementation-dependent path for an opened gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadPath)

func (*Gamepad) PlayerIndex

func (gamepad *Gamepad) PlayerIndex() int32

SDL_GetGamepadPlayerIndex - Get the player index of an opened gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadPlayerIndex)

func (*Gamepad) PowerInfo

func (gamepad *Gamepad) PowerInfo() (PowerState, int32)

SDL_GetGamepadPowerInfo - Get the battery state of a gamepad. Returns power state, percent. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadPowerInfo)

func (*Gamepad) Product

func (gamepad *Gamepad) Product() uint16

SDL_GetGamepadProduct - Get the USB product ID of an opened gamepad, if available. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadProduct)

func (*Gamepad) ProductVersion

func (gamepad *Gamepad) ProductVersion() uint16

SDL_GetGamepadProductVersion - Get the product version of an opened gamepad, if available. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadProductVersion)

func (*Gamepad) Properties

func (gamepad *Gamepad) Properties() (PropertiesID, error)

SDL_GetGamepadProperties - Get the properties associated with an opened gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadProperties)

func (*Gamepad) RealType

func (gamepad *Gamepad) RealType() GamepadType

SDL_GetRealGamepadType - Get the type of an opened gamepad, ignoring any mapping override. (https://wiki.libsdl.org/SDL3/SDL_GetRealGamepadType)

func (*Gamepad) Rumble

func (gamepad *Gamepad) Rumble(lowFrequency, highFrequency uint16, durationMS uint32) error

SDL_RumbleGamepad - Start a rumble effect on a gamepad. (https://wiki.libsdl.org/SDL3/SDL_RumbleGamepad)

func (*Gamepad) RumbleTriggers

func (gamepad *Gamepad) RumbleTriggers(left, right uint16, durationMS uint32) error

SDL_RumbleGamepadTriggers - Start a rumble effect in the gamepad's triggers. (https://wiki.libsdl.org/SDL3/SDL_RumbleGamepadTriggers)

func (*Gamepad) SendEffect

func (gamepad *Gamepad) SendEffect(data []byte) error

SDL_SendGamepadEffect - Send a gamepad specific effect packet. (https://wiki.libsdl.org/SDL3/SDL_SendGamepadEffect)

func (*Gamepad) SensorData

func (gamepad *Gamepad) SensorData(typ SensorType, data *float32, num_values int32) bool

SDL_GetGamepadSensorData - Get the current state of a gamepad sensor. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadSensorData)

func (*Gamepad) SensorDataRate

func (gamepad *Gamepad) SensorDataRate(typ SensorType) float32

SDL_GetGamepadSensorDataRate - Get the data rate (number of events per second) of a gamepad sensor. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadSensorDataRate)

func (*Gamepad) SensorEnabled

func (gamepad *Gamepad) SensorEnabled(typ SensorType) bool

SDL_GamepadSensorEnabled - Query whether sensor data reporting is enabled for a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GamepadSensorEnabled)

func (*Gamepad) Serial

func (gamepad *Gamepad) Serial() string

SDL_GetGamepadSerial - Get the serial number of an opened gamepad, if available. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadSerial)

func (*Gamepad) SetLED

func (gamepad *Gamepad) SetLED(red, green, blue uint8) error

SDL_SetGamepadLED - Update a gamepad's LED color. (https://wiki.libsdl.org/SDL3/SDL_SetGamepadLED)

func (*Gamepad) SetPlayerIndex

func (gamepad *Gamepad) SetPlayerIndex(playerIndex int32) error

SDL_SetGamepadPlayerIndex - Set the player index of an opened gamepad. (https://wiki.libsdl.org/SDL3/SDL_SetGamepadPlayerIndex)

func (*Gamepad) SetSensorEnabled

func (gamepad *Gamepad) SetSensorEnabled(typ SensorType, enabled bool) error

SDL_SetGamepadSensorEnabled - Set whether data reporting for a gamepad sensor is enabled. (https://wiki.libsdl.org/SDL3/SDL_SetGamepadSensorEnabled)

func (*Gamepad) SteamHandle

func (gamepad *Gamepad) SteamHandle() uint64

SDL_GetGamepadSteamHandle - Get the Steam Input handle of an opened gamepad, if available. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadSteamHandle)

func (*Gamepad) TouchpadFinger

func (gamepad *Gamepad) TouchpadFinger(touchpad int32, finger int32, down *bool, x *float32, y *float32, pressure *float32) bool

SDL_GetGamepadTouchpadFinger - Get the current state of a finger on a touchpad on a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadTouchpadFinger)

func (*Gamepad) Type

func (gamepad *Gamepad) Type() GamepadType

SDL_GetGamepadType - Get the type of an opened gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadType)

func (*Gamepad) Vendor

func (gamepad *Gamepad) Vendor() uint16

SDL_GetGamepadVendor - Get the USB vendor ID of an opened gamepad, if available. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadVendor)

type GamepadAxis

type GamepadAxis uint32

SDL_GamepadAxis - The list of axes available on a gamepad (https://wiki.libsdl.org/SDL3/SDL_GamepadAxis)

const (
	GAMEPAD_AXIS_INVALID       GamepadAxis = 4294967295
	GAMEPAD_AXIS_LEFTX         GamepadAxis = 0
	GAMEPAD_AXIS_LEFTY         GamepadAxis = 1
	GAMEPAD_AXIS_RIGHTX        GamepadAxis = 2
	GAMEPAD_AXIS_RIGHTY        GamepadAxis = 3
	GAMEPAD_AXIS_LEFT_TRIGGER  GamepadAxis = 4
	GAMEPAD_AXIS_RIGHT_TRIGGER GamepadAxis = 5
	GAMEPAD_AXIS_COUNT         GamepadAxis = 6
)

func GetGamepadAxisFromString

func GetGamepadAxisFromString(str string) GamepadAxis

SDL_GetGamepadAxisFromString - Convert a string into SDL_GamepadAxis enum. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadAxisFromString)

func (GamepadAxis) GamepadStringForAxis

func (axis GamepadAxis) GamepadStringForAxis() string

SDL_GetGamepadStringForAxis - Convert from an SDL_GamepadAxis enum to a string. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadStringForAxis)

type GamepadAxisEvent

type GamepadAxisEvent struct {
	Type EventType // SDL_EVENT_GAMEPAD_AXIS_MOTION

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	Axis      uint8      // The gamepad axis (SDL_GamepadAxis)

	Value int16 // The axis value (range: -32768 to 32767)
	// contains filtered or unexported fields
}

SDL_GamepadAxisEvent - Gamepad axis motion event structure (event.gaxis.*) (https://wiki.libsdl.org/SDL3/SDL_GamepadAxisEvent)

type GamepadBinding

type GamepadBinding struct {
	InputType  int32
	InputData  [12]byte
	OutputType GamepadBindingType
	OutputData [12]byte
}

SDL_GamepadBinding - A mapping between one joystick input to a gamepad control. (https://wiki.libsdl.org/SDL3/SDL_GamepadBinding) Union type

type GamepadBindingType

type GamepadBindingType uint32

SDL_GamepadBindingType - Types of gamepad control bindings. (https://wiki.libsdl.org/SDL3/SDL_GamepadBindingType)

const (
	GAMEPAD_BINDTYPE_NONE   GamepadBindingType = 0
	GAMEPAD_BINDTYPE_BUTTON GamepadBindingType = 1
	GAMEPAD_BINDTYPE_AXIS   GamepadBindingType = 2
	GAMEPAD_BINDTYPE_HAT    GamepadBindingType = 3
)

type GamepadButton

type GamepadButton uint32

SDL_GamepadButton - The list of buttons available on a gamepad (https://wiki.libsdl.org/SDL3/SDL_GamepadButton)

const (
	GAMEPAD_BUTTON_INVALID        GamepadButton = 4294967295
	GAMEPAD_BUTTON_SOUTH          GamepadButton = 0 // Bottom face button (e.g. Xbox A button)
	GAMEPAD_BUTTON_EAST           GamepadButton = 1 // Right face button (e.g. Xbox B button)
	GAMEPAD_BUTTON_WEST           GamepadButton = 2 // Left face button (e.g. Xbox X button)
	GAMEPAD_BUTTON_NORTH          GamepadButton = 3 // Top face button (e.g. Xbox Y button)
	GAMEPAD_BUTTON_BACK           GamepadButton = 4
	GAMEPAD_BUTTON_GUIDE          GamepadButton = 5
	GAMEPAD_BUTTON_START          GamepadButton = 6
	GAMEPAD_BUTTON_LEFT_STICK     GamepadButton = 7
	GAMEPAD_BUTTON_RIGHT_STICK    GamepadButton = 8
	GAMEPAD_BUTTON_LEFT_SHOULDER  GamepadButton = 9
	GAMEPAD_BUTTON_RIGHT_SHOULDER GamepadButton = 10
	GAMEPAD_BUTTON_DPAD_UP        GamepadButton = 11
	GAMEPAD_BUTTON_DPAD_DOWN      GamepadButton = 12
	GAMEPAD_BUTTON_DPAD_LEFT      GamepadButton = 13
	GAMEPAD_BUTTON_DPAD_RIGHT     GamepadButton = 14
	GAMEPAD_BUTTON_MISC1          GamepadButton = 15 // Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button, Google Stadia capture button)
	GAMEPAD_BUTTON_RIGHT_PADDLE1  GamepadButton = 16 // Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1, DualSense Edge RB button, Right Joy-Con SR button)
	GAMEPAD_BUTTON_LEFT_PADDLE1   GamepadButton = 17 // Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3, DualSense Edge LB button, Left Joy-Con SL button)
	GAMEPAD_BUTTON_RIGHT_PADDLE2  GamepadButton = 18 // Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2, DualSense Edge right Fn button, Right Joy-Con SL button)
	GAMEPAD_BUTTON_LEFT_PADDLE2   GamepadButton = 19 // Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4, DualSense Edge left Fn button, Left Joy-Con SR button)
	GAMEPAD_BUTTON_TOUCHPAD       GamepadButton = 20 // PS4/PS5 touchpad button
	GAMEPAD_BUTTON_MISC2          GamepadButton = 21 // Additional button
	GAMEPAD_BUTTON_MISC3          GamepadButton = 22 // Additional button (e.g. Nintendo GameCube left trigger click)
	GAMEPAD_BUTTON_MISC4          GamepadButton = 23 // Additional button (e.g. Nintendo GameCube right trigger click)
	GAMEPAD_BUTTON_MISC5          GamepadButton = 24 // Additional button
	GAMEPAD_BUTTON_MISC6          GamepadButton = 25 // Additional button
	GAMEPAD_BUTTON_COUNT          GamepadButton = 26
)

func GetGamepadButtonFromString

func GetGamepadButtonFromString(str string) GamepadButton

SDL_GetGamepadButtonFromString - Convert a string into an SDL_GamepadButton enum. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadButtonFromString)

func (GamepadButton) GamepadStringForButton

func (button GamepadButton) GamepadStringForButton() string

SDL_GetGamepadStringForButton - Convert from an SDL_GamepadButton enum to a string. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadStringForButton)

type GamepadButtonEvent

type GamepadButtonEvent struct {
	Type EventType // SDL_EVENT_GAMEPAD_BUTTON_DOWN or SDL_EVENT_GAMEPAD_BUTTON_UP

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	Button    uint8      // The gamepad button (SDL_GamepadButton)
	Down      bool       // true if the button is pressed
	// contains filtered or unexported fields
}

SDL_GamepadButtonEvent - Gamepad button event structure (event.gbutton.*) (https://wiki.libsdl.org/SDL3/SDL_GamepadButtonEvent)

type GamepadButtonLabel

type GamepadButtonLabel uint32

SDL_GamepadButtonLabel - The set of gamepad button labels (https://wiki.libsdl.org/SDL3/SDL_GamepadButtonLabel)

const (
	GAMEPAD_BUTTON_LABEL_UNKNOWN  GamepadButtonLabel = 0
	GAMEPAD_BUTTON_LABEL_A        GamepadButtonLabel = 1
	GAMEPAD_BUTTON_LABEL_B        GamepadButtonLabel = 2
	GAMEPAD_BUTTON_LABEL_X        GamepadButtonLabel = 3
	GAMEPAD_BUTTON_LABEL_Y        GamepadButtonLabel = 4
	GAMEPAD_BUTTON_LABEL_CROSS    GamepadButtonLabel = 5
	GAMEPAD_BUTTON_LABEL_CIRCLE   GamepadButtonLabel = 6
	GAMEPAD_BUTTON_LABEL_SQUARE   GamepadButtonLabel = 7
	GAMEPAD_BUTTON_LABEL_TRIANGLE GamepadButtonLabel = 8
)

type GamepadDeviceEvent

type GamepadDeviceEvent struct {
	Type EventType // SDL_EVENT_GAMEPAD_ADDED, SDL_EVENT_GAMEPAD_REMOVED, or SDL_EVENT_GAMEPAD_REMAPPED, SDL_EVENT_GAMEPAD_UPDATE_COMPLETE or SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	// contains filtered or unexported fields
}

SDL_GamepadDeviceEvent - Gamepad device event structure (event.gdevice.*) (https://wiki.libsdl.org/SDL3/SDL_GamepadDeviceEvent)

type GamepadSensorEvent

type GamepadSensorEvent struct {
	Type EventType // SDL_EVENT_GAMEPAD_SENSOR_UPDATE

	Timestamp       uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which           JoystickID // The joystick instance id
	Sensor          int32      // The type of the sensor, one of the values of SDL_SensorType
	Data            [3]float32 // Up to 3 values from the sensor, as defined in SDL_sensor.h
	SensorTimestamp uint64     // The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock
	// contains filtered or unexported fields
}

SDL_GamepadSensorEvent - Gamepad sensor event structure (event.gsensor.*) (https://wiki.libsdl.org/SDL3/SDL_GamepadSensorEvent)

type GamepadTouchpadEvent

type GamepadTouchpadEvent struct {
	Type EventType // SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN or SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION or SDL_EVENT_GAMEPAD_TOUCHPAD_UP

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	Touchpad  int32      // The index of the touchpad
	Finger    int32      // The index of the finger on the touchpad
	X         float32    // Normalized in the range 0...1 with 0 being on the left
	Y         float32    // Normalized in the range 0...1 with 0 being at the top
	Pressure  float32    // Normalized in the range 0...1
	// contains filtered or unexported fields
}

SDL_GamepadTouchpadEvent - Gamepad touchpad event structure (event.gtouchpad.*) (https://wiki.libsdl.org/SDL3/SDL_GamepadTouchpadEvent)

type GamepadType

type GamepadType uint32

SDL_GamepadType - Standard gamepad types. (https://wiki.libsdl.org/SDL3/SDL_GamepadType)

const (
	GAMEPAD_TYPE_UNKNOWN                      GamepadType = 0
	GAMEPAD_TYPE_STANDARD                     GamepadType = 1
	GAMEPAD_TYPE_XBOX360                      GamepadType = 2
	GAMEPAD_TYPE_XBOXONE                      GamepadType = 3
	GAMEPAD_TYPE_PS3                          GamepadType = 4
	GAMEPAD_TYPE_PS4                          GamepadType = 5
	GAMEPAD_TYPE_PS5                          GamepadType = 6
	GAMEPAD_TYPE_NINTENDO_SWITCH_PRO          GamepadType = 7
	GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT  GamepadType = 8
	GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT GamepadType = 9
	GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR  GamepadType = 10
	GAMEPAD_TYPE_GAMECUBE                     GamepadType = 11
	GAMEPAD_TYPE_COUNT                        GamepadType = 12
)

func GetGamepadTypeFromString

func GetGamepadTypeFromString(str string) GamepadType

SDL_GetGamepadTypeFromString - Convert a string into [SDL_GamepadType](SDL_GamepadType) enum. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadTypeFromString)

func (GamepadType) GamepadButtonLabelForType

func (typ GamepadType) GamepadButtonLabelForType(button GamepadButton) GamepadButtonLabel

SDL_GetGamepadButtonLabelForType - Get the label of a button on a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadButtonLabelForType)

func (GamepadType) GamepadStringForType

func (typ GamepadType) GamepadStringForType() string

SDL_GetGamepadStringForType - Convert from an SDL_GamepadType enum to a string. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadStringForType)

type GlobFlags

type GlobFlags uint32

SDL_GlobFlags - Flags for path matching. (https://wiki.libsdl.org/SDL3/SDL_GlobFlags)

type Haptic

type Haptic struct{}

SDL_Haptic - The haptic structure used to identify an SDL haptic. (https://wiki.libsdl.org/SDL3/SDL_Haptic)

func OpenHapticFromMouse

func OpenHapticFromMouse() (*Haptic, error)

SDL_OpenHapticFromMouse - Try to open a haptic device from the current mouse. (https://wiki.libsdl.org/SDL3/SDL_OpenHapticFromMouse)

func (*Haptic) Close

func (haptic *Haptic) Close()

SDL_CloseHaptic - Close a haptic device previously opened with SDL_OpenHaptic(). (https://wiki.libsdl.org/SDL3/SDL_CloseHaptic)

func (*Haptic) CreateEffect

func (haptic *Haptic) CreateEffect(effect *HapticEffect) (HapticEffectID, error)

SDL_CreateHapticEffect - Create a new haptic effect on a specified device. (https://wiki.libsdl.org/SDL3/SDL_CreateHapticEffect)

func (*Haptic) DestroyEffect

func (haptic *Haptic) DestroyEffect(effect HapticEffectID)

SDL_DestroyHapticEffect - Destroy a haptic effect on the device. (https://wiki.libsdl.org/SDL3/SDL_DestroyHapticEffect)

func (*Haptic) EffectStatus

func (haptic *Haptic) EffectStatus(effect HapticEffectID) bool

SDL_GetHapticEffectStatus - Get the status of the current effect on the specified haptic device. (https://wiki.libsdl.org/SDL3/SDL_GetHapticEffectStatus)

func (*Haptic) EffectSupported

func (haptic *Haptic) EffectSupported(effect *HapticEffect) bool

SDL_HapticEffectSupported - Check to see if an effect is supported by a haptic device. (https://wiki.libsdl.org/SDL3/SDL_HapticEffectSupported)

func (*Haptic) Features

func (haptic *Haptic) Features() (uint32, error)

SDL_GetHapticFeatures - Get the haptic device's supported features in bitwise manner. (https://wiki.libsdl.org/SDL3/SDL_GetHapticFeatures)

func (*Haptic) ID

func (haptic *Haptic) ID() (HapticID, error)

SDL_GetHapticID - Get the instance ID of an opened haptic device. (https://wiki.libsdl.org/SDL3/SDL_GetHapticID)

func (*Haptic) InitRumble

func (haptic *Haptic) InitRumble() error

SDL_InitHapticRumble - Initialize a haptic device for simple rumble playback. (https://wiki.libsdl.org/SDL3/SDL_InitHapticRumble)

func (*Haptic) MaxEffects

func (haptic *Haptic) MaxEffects() (int32, error)

SDL_GetMaxHapticEffects - Get the number of effects a haptic device can store. (https://wiki.libsdl.org/SDL3/SDL_GetMaxHapticEffects)

func (*Haptic) MaxEffectsPlaying

func (haptic *Haptic) MaxEffectsPlaying() (int32, error)

SDL_GetMaxHapticEffectsPlaying - Get the number of effects a haptic device can play at the same time. (https://wiki.libsdl.org/SDL3/SDL_GetMaxHapticEffectsPlaying)

func (*Haptic) Name

func (haptic *Haptic) Name() (string, error)

SDL_GetHapticName - Get the implementation dependent name of a haptic device. (https://wiki.libsdl.org/SDL3/SDL_GetHapticName)

func (*Haptic) NumAxes

func (haptic *Haptic) NumAxes() (int32, error)

SDL_GetNumHapticAxes - Get the number of haptic axes the device has. (https://wiki.libsdl.org/SDL3/SDL_GetNumHapticAxes)

func (*Haptic) Pause

func (haptic *Haptic) Pause() error

SDL_PauseHaptic - Pause a haptic device. (https://wiki.libsdl.org/SDL3/SDL_PauseHaptic)

func (*Haptic) PlayRumble

func (haptic *Haptic) PlayRumble(strength float32, length uint32) error

SDL_PlayHapticRumble - Run a simple rumble effect on a haptic device. (https://wiki.libsdl.org/SDL3/SDL_PlayHapticRumble)

func (*Haptic) Resume

func (haptic *Haptic) Resume() error

SDL_ResumeHaptic - Resume a haptic device. (https://wiki.libsdl.org/SDL3/SDL_ResumeHaptic)

func (*Haptic) RumbleSupported

func (haptic *Haptic) RumbleSupported() bool

SDL_HapticRumbleSupported - Check whether rumble is supported on a haptic device. (https://wiki.libsdl.org/SDL3/SDL_HapticRumbleSupported)

func (*Haptic) RunEffect

func (haptic *Haptic) RunEffect(effect HapticEffectID, iterations uint32) error

SDL_RunHapticEffect - Run the haptic effect on its associated haptic device. (https://wiki.libsdl.org/SDL3/SDL_RunHapticEffect)

func (*Haptic) SetAutocenter

func (haptic *Haptic) SetAutocenter(autocenter int32) error

SDL_SetHapticAutocenter - Set the global autocenter of the device. (https://wiki.libsdl.org/SDL3/SDL_SetHapticAutocenter)

func (*Haptic) SetGain

func (haptic *Haptic) SetGain(gain int32) error

SDL_SetHapticGain - Set the global gain of the specified haptic device. (https://wiki.libsdl.org/SDL3/SDL_SetHapticGain)

func (*Haptic) StopEffect

func (haptic *Haptic) StopEffect(effect HapticEffectID) error

SDL_StopHapticEffect - Stop the haptic effect on its associated haptic device. (https://wiki.libsdl.org/SDL3/SDL_StopHapticEffect)

func (*Haptic) StopEffects

func (haptic *Haptic) StopEffects() error

SDL_StopHapticEffects - Stop all the currently playing effects on a haptic device. (https://wiki.libsdl.org/SDL3/SDL_StopHapticEffects)

func (*Haptic) StopRumble

func (haptic *Haptic) StopRumble() error

SDL_StopHapticRumble - Stop the simple rumble on a haptic device. (https://wiki.libsdl.org/SDL3/SDL_StopHapticRumble)

func (*Haptic) UpdateEffect

func (haptic *Haptic) UpdateEffect(effect HapticEffectID, data *HapticEffect) error

SDL_UpdateHapticEffect - Update the properties of an effect. (https://wiki.libsdl.org/SDL3/SDL_UpdateHapticEffect)

type HapticCondition

type HapticCondition struct {
	Type       HapticEffectType // SDL_HAPTIC_SPRING, SDL_HAPTIC_DAMPER, SDL_HAPTIC_INERTIA or SDL_HAPTIC_FRICTION
	Direction  HapticDirection  // Direction of the effect.
	Length     uint32           // Duration of the effect.
	Delay      uint16           // Delay before starting the effect.
	Button     uint16           // Button that triggers the effect.
	Interval   uint16           // How soon it can be triggered again after button.
	RightSat   [3]uint16        // Level when joystick is to the positive side; max 0xFFFF.
	LeftSat    [3]uint16        // Level when joystick is to the negative side; max 0xFFFF.
	RightCoeff [3]int16         // How fast to increase the force towards the positive side.
	LeftCoeff  [3]int16         // How fast to increase the force towards the negative side.
	Deadband   [3]uint16        // Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered.
	Center     [3]int16         // Position of the dead zone.
}

SDL_HapticCondition - A structure containing a template for a Condition effect. (https://wiki.libsdl.org/SDL3/SDL_HapticCondition)

type HapticConstant

type HapticConstant struct {
	Type         HapticEffectType // SDL_HAPTIC_CONSTANT
	Direction    HapticDirection  // Direction of the effect.
	Length       uint32           // Duration of the effect.
	Delay        uint16           // Delay before starting the effect.
	Button       uint16           // Button that triggers the effect.
	Interval     uint16           // How soon it can be triggered again after button.
	Level        int16            // Strength of the constant effect.
	AttackLength uint16           // Duration of the attack.
	AttackLevel  uint16           // Level at the start of the attack.
	FadeLength   uint16           // Duration of the fade.
	FadeLevel    uint16           // Level at the end of the fade.
}

SDL_HapticConstant - A structure containing a template for a Constant effect. (https://wiki.libsdl.org/SDL3/SDL_HapticConstant)

type HapticCustom

type HapticCustom struct {
	Type         HapticEffectType // SDL_HAPTIC_CUSTOM
	Direction    HapticDirection  // Direction of the effect.
	Length       uint32           // Duration of the effect.
	Delay        uint16           // Delay before starting the effect.
	Button       uint16           // Button that triggers the effect.
	Interval     uint16           // How soon it can be triggered again after button.
	Channels     uint8            // Axes to use, minimum of one.
	Period       uint16           // Sample periods.
	Samples      uint16           // Amount of samples.
	Data         *uint16          // Should contain channels*samples items.
	AttackLength uint16           // Duration of the attack.
	AttackLevel  uint16           // Level at the start of the attack.
	FadeLength   uint16           // Duration of the fade.
	FadeLevel    uint16           // Level at the end of the fade.
}

SDL_HapticCustom - A structure containing a template for the [SDL_HAPTIC_CUSTOM](SDL_HAPTIC_CUSTOM) effect. (https://wiki.libsdl.org/SDL3/SDL_HapticCustom)

type HapticDirection

type HapticDirection struct {
	Type HapticDirectionType // The type of encoding.
	Dir  [3]int32            // The encoded direction.
}

SDL_HapticDirection - Structure that represents a haptic direction. (https://wiki.libsdl.org/SDL3/SDL_HapticDirection)

type HapticDirectionType

type HapticDirectionType uint8

SDL_HapticDirectionType - Type of coordinates used for haptic direction. (https://wiki.libsdl.org/SDL3/SDL_HapticDirectionType)

type HapticEffect

type HapticEffect struct {
	Type       uint16
	HapticData [66]byte // 68 is full size of SDL_HapticCondition
}

SDL_HapticEffect - The generic template for any haptic effect. (https://wiki.libsdl.org/SDL3/SDL_HapticEffect) Union type

type HapticEffectID

type HapticEffectID int32

SDL_HapticEffectID - ID for haptic effects. (https://wiki.libsdl.org/SDL3/SDL_HapticEffectID)

type HapticEffectType

type HapticEffectType uint16

SDL_HapticEffectType - Type of haptic effect. (https://wiki.libsdl.org/SDL3/SDL_HapticEffectType)

type HapticID

type HapticID uint32

SDL_HapticID - This is a unique ID for a haptic device for the time it is connected to the system, and is never reused for the lifetime of the application. (https://wiki.libsdl.org/SDL3/SDL_HapticID)

func GetHaptics

func GetHaptics() []HapticID

SDL_GetHaptics - Get a list of currently connected haptic devices. (https://wiki.libsdl.org/SDL3/SDL_GetHaptics)

func (HapticID) Haptic

func (id HapticID) Haptic() (*Haptic, error)

SDL_GetHapticFromID - Get the SDL_Haptic associated with an instance ID, if it has been opened. (https://wiki.libsdl.org/SDL3/SDL_GetHapticFromID)

func (HapticID) HapticName

func (id HapticID) HapticName() (string, error)

SDL_GetHapticNameForID - Get the implementation dependent name of a haptic device. (https://wiki.libsdl.org/SDL3/SDL_GetHapticNameForID)

func (HapticID) OpenHaptic

func (id HapticID) OpenHaptic() (*Haptic, error)

SDL_OpenHaptic - Open a haptic device for use. (https://wiki.libsdl.org/SDL3/SDL_OpenHaptic)

type HapticLeftRight

type HapticLeftRight struct {
	Type           HapticEffectType // SDL_HAPTIC_LEFTRIGHT
	Length         uint32           // Duration of the effect in milliseconds.
	LargeMagnitude uint16           // Control of the large controller motor.
	SmallMagnitude uint16           // Control of the small controller motor.
}

SDL_HapticLeftRight - A structure containing a template for a Left/Right effect. (https://wiki.libsdl.org/SDL3/SDL_HapticLeftRight)

type HapticPeriodic

type HapticPeriodic struct {
	Type         HapticEffectType // SDL_HAPTIC_SINE, SDL_HAPTIC_SQUARE SDL_HAPTIC_TRIANGLE, SDL_HAPTIC_SAWTOOTHUP or SDL_HAPTIC_SAWTOOTHDOWN
	Direction    HapticDirection  // Direction of the effect.
	Length       uint32           // Duration of the effect.
	Delay        uint16           // Delay before starting the effect.
	Button       uint16           // Button that triggers the effect.
	Interval     uint16           // How soon it can be triggered again after button.
	Period       uint16           // Period of the wave.
	Magnitude    int16            // Peak value; if negative, equivalent to 180 degrees extra phase shift.
	Offset       int16            // Mean value of the wave.
	Phase        uint16           // Positive phase shift given by hundredth of a degree.
	AttackLength uint16           // Duration of the attack.
	AttackLevel  uint16           // Level at the start of the attack.
	FadeLength   uint16           // Duration of the fade.
	FadeLevel    uint16           // Level at the end of the fade.
}

SDL_HapticPeriodic - A structure containing a template for a Periodic effect. (https://wiki.libsdl.org/SDL3/SDL_HapticPeriodic)

type HapticRamp

type HapticRamp struct {
	Type         HapticEffectType // SDL_HAPTIC_RAMP
	Direction    HapticDirection  // Direction of the effect.
	Length       uint32           // Duration of the effect.
	Delay        uint16           // Delay before starting the effect.
	Button       uint16           // Button that triggers the effect.
	Interval     uint16           // How soon it can be triggered again after button.
	Start        int16            // Beginning strength level.
	End          int16            // Ending strength level.
	AttackLength uint16           // Duration of the attack.
	AttackLevel  uint16           // Level at the start of the attack.
	FadeLength   uint16           // Duration of the fade.
	FadeLevel    uint16           // Level at the end of the fade.
}

SDL_HapticRamp - A structure containing a template for a Ramp effect. (https://wiki.libsdl.org/SDL3/SDL_HapticRamp)

type HintCallback

type HintCallback uintptr

SDL_HintCallback - A callback used to send notifications of hint value changes. (https://wiki.libsdl.org/SDL3/SDL_HintCallback)

type HintPriority

type HintPriority uint32

SDL_HintPriority - An enumeration of hint priorities. (https://wiki.libsdl.org/SDL3/SDL_HintPriority)

const (
	HINT_DEFAULT  HintPriority = 0
	HINT_NORMAL   HintPriority = 1
	HINT_OVERRIDE HintPriority = 2
)

type HitTest

type HitTest uintptr // TODO: supposed to be a callback but can't find the signature

SDL_HitTest - Callback used for hit-testing. (https://wiki.libsdl.org/SDL3/SDL_HitTest)

type IOStatus

type IOStatus uint32

SDL_IOStatus - [SDL_IOStream](SDL_IOStream) status, set by a read or write operation. (https://wiki.libsdl.org/SDL3/SDL_IOStatus)

const (
	IO_STATUS_READY     IOStatus = 0 // Everything is ready (no errors and not EOF).
	IO_STATUS_ERROR     IOStatus = 1 // Read or write I/O error
	IO_STATUS_EOF       IOStatus = 2 // End of file
	IO_STATUS_NOT_READY IOStatus = 3 // Non blocking I/O, not ready
	IO_STATUS_READONLY  IOStatus = 4 // Tried to write a read-only buffer
	IO_STATUS_WRITEONLY IOStatus = 5 // Tried to read a write-only buffer
)

type IOStream

type IOStream struct{}

SDL_IOStream - The read/write operation structure. (https://wiki.libsdl.org/SDL3/SDL_IOStream)

func IOFromBytes

func IOFromBytes(b []byte) (*IOStream, error)

IOFromBytes creates a stream from a byte slice.

func IOFromConstMem

func IOFromConstMem(mem []byte) (*IOStream, error)

SDL_IOFromConstMem - Use this function to prepare a read-only memory buffer for use with SDL_IOStream. (https://wiki.libsdl.org/SDL3/SDL_IOFromConstMem) Note: This function is unsafe as it is required for `mem` not to be garbage collected while the IOStream is in use. Please use IOFromBytes or IOFromDynamicMem, unless you can guarantee that `mem` will be kept alive.

func IOFromDynamicMem

func IOFromDynamicMem() *IOStream

SDL_IOFromDynamicMem - Use this function to create an SDL_IOStream that is backed by dynamically allocated memory. (https://wiki.libsdl.org/SDL3/SDL_IOFromDynamicMem)

func IOFromFile

func IOFromFile(file, mode string) (*IOStream, error)

SDL_IOFromFile - Use this function to create a new [SDL_IOStream](SDL_IOStream) structure for reading from and/or writing to a named file. (https://wiki.libsdl.org/SDL3/SDL_IOFromFile)

func (*IOStream) Close

func (context *IOStream) Close() error

SDL_CloseIO - Close and free an allocated SDL_IOStream structure. (https://wiki.libsdl.org/SDL3/SDL_CloseIO)

func (*IOStream) Flush

func (context *IOStream) Flush() error

SDL_FlushIO - Flush any buffered data in the stream. (https://wiki.libsdl.org/SDL3/SDL_FlushIO)

func (*IOStream) LoadFile

func (src *IOStream) LoadFile(closeio bool) ([]byte, error)

SDL_LoadFile_IO - Load all the data from an SDL data stream. (https://wiki.libsdl.org/SDL3/SDL_LoadFile_IO)

func (*IOStream) Printf

func (context *IOStream) Printf(format string, values ...any) (uint64, error)

SDL_IOprintf - Print to an SDL_IOStream data stream. (https://wiki.libsdl.org/SDL3/SDL_IOprintf)

func (*IOStream) Properties

func (context *IOStream) Properties() (PropertiesID, error)

SDL_GetIOProperties - Get the properties associated with an SDL_IOStream. (https://wiki.libsdl.org/SDL3/SDL_GetIOProperties)

func (*IOStream) Read

func (context *IOStream) Read(available []byte) (uint64, error)

SDL_ReadIO - Read from a data source. (https://wiki.libsdl.org/SDL3/SDL_ReadIO)

func (*IOStream) ReadS8

func (src *IOStream) ReadS8() (int8, error)

SDL_ReadS8 - Use this function to read a signed byte from an SDL_IOStream. (https://wiki.libsdl.org/SDL3/SDL_ReadS8)

func (*IOStream) ReadS16BE

func (src *IOStream) ReadS16BE() (int16, error)

SDL_ReadS16BE - Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadS16BE)

func (*IOStream) ReadS16LE

func (src *IOStream) ReadS16LE() (int16, error)

SDL_ReadS16LE - Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadS16LE)

func (*IOStream) ReadS32BE

func (src *IOStream) ReadS32BE() (int32, error)

SDL_ReadS32BE - Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadS32BE)

func (*IOStream) ReadS32LE

func (src *IOStream) ReadS32LE() (int32, error)

SDL_ReadS32LE - Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadS32LE)

func (*IOStream) ReadS64BE

func (src *IOStream) ReadS64BE() (int64, error)

SDL_ReadS64BE - Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadS64BE)

func (*IOStream) ReadS64LE

func (src *IOStream) ReadS64LE() (int64, error)

SDL_ReadS64LE - Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadS64LE)

func (*IOStream) ReadU8

func (src *IOStream) ReadU8() (uint8, error)

SDL_ReadU8 - Use this function to read a byte from an SDL_IOStream. (https://wiki.libsdl.org/SDL3/SDL_ReadU8)

func (*IOStream) ReadU16BE

func (src *IOStream) ReadU16BE() (uint16, error)

SDL_ReadU16BE - Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadU16BE)

func (*IOStream) ReadU16LE

func (src *IOStream) ReadU16LE() (uint16, error)

SDL_ReadU16LE - Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadU16LE)

func (*IOStream) ReadU32BE

func (src *IOStream) ReadU32BE() (uint32, error)

SDL_ReadU32BE - Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadU32BE)

func (*IOStream) ReadU32LE

func (src *IOStream) ReadU32LE() (uint32, error)

SDL_ReadU32LE - Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadU32LE)

func (*IOStream) ReadU64BE

func (src *IOStream) ReadU64BE() (uint64, error)

SDL_ReadU64BE - Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadU64BE)

func (*IOStream) ReadU64LE

func (src *IOStream) ReadU64LE() (uint64, error)

SDL_ReadU64LE - Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format. (https://wiki.libsdl.org/SDL3/SDL_ReadU64LE)

func (*IOStream) SaveFile

func (src *IOStream) SaveFile(data []byte, closeio bool) error

SDL_SaveFile_IO - Save all the data into an SDL data stream. (https://wiki.libsdl.org/SDL3/SDL_SaveFile_IO)

func (*IOStream) Seek

func (context *IOStream) Seek(offset int64, whence IOWhence) (int64, error)

SDL_SeekIO - Seek within an SDL_IOStream data stream. (https://wiki.libsdl.org/SDL3/SDL_SeekIO)

func (*IOStream) Size

func (context *IOStream) Size() (int64, error)

SDL_GetIOSize - Use this function to get the size of the data stream in an SDL_IOStream. (https://wiki.libsdl.org/SDL3/SDL_GetIOSize)

func (*IOStream) Status

func (context *IOStream) Status() IOStatus

SDL_GetIOStatus - Query the stream status of an SDL_IOStream. (https://wiki.libsdl.org/SDL3/SDL_GetIOStatus)

func (*IOStream) Tell

func (context *IOStream) Tell() int64

SDL_TellIO - Determine the current read/write offset in an SDL_IOStream data stream. (https://wiki.libsdl.org/SDL3/SDL_TellIO)

func (*IOStream) Write

func (context *IOStream) Write(data []byte) (uint64, error)

SDL_WriteIO - Write to an SDL_IOStream data stream. (https://wiki.libsdl.org/SDL3/SDL_WriteIO)

func (*IOStream) WriteS8

func (dst *IOStream) WriteS8(value int8) error

SDL_WriteS8 - Use this function to write a signed byte to an SDL_IOStream. (https://wiki.libsdl.org/SDL3/SDL_WriteS8)

func (*IOStream) WriteS16BE

func (dst *IOStream) WriteS16BE(value int16) error

SDL_WriteS16BE - Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteS16BE)

func (*IOStream) WriteS16LE

func (dst *IOStream) WriteS16LE(value int16) error

SDL_WriteS16LE - Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteS16LE)

func (*IOStream) WriteS32BE

func (dst *IOStream) WriteS32BE(value int32) error

SDL_WriteS32BE - Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteS32BE)

func (*IOStream) WriteS32LE

func (dst *IOStream) WriteS32LE(value int32) error

SDL_WriteS32LE - Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteS32LE)

func (*IOStream) WriteS64BE

func (dst *IOStream) WriteS64BE(value int64) error

SDL_WriteS64BE - Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteS64BE)

func (*IOStream) WriteS64LE

func (dst *IOStream) WriteS64LE(value int64) error

SDL_WriteS64LE - Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteS64LE)

func (*IOStream) WriteU8

func (dst *IOStream) WriteU8(value uint8) error

SDL_WriteU8 - Use this function to write a byte to an SDL_IOStream. (https://wiki.libsdl.org/SDL3/SDL_WriteU8)

func (*IOStream) WriteU16BE

func (dst *IOStream) WriteU16BE(value uint16) error

SDL_WriteU16BE - Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteU16BE)

func (*IOStream) WriteU16LE

func (dst *IOStream) WriteU16LE(value uint16) error

SDL_WriteU16LE - Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteU16LE)

func (*IOStream) WriteU32BE

func (dst *IOStream) WriteU32BE(value uint32) error

SDL_WriteU32BE - Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteU32BE)

func (*IOStream) WriteU32LE

func (dst *IOStream) WriteU32LE(value uint32) error

SDL_WriteU32LE - Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteU32LE)

func (*IOStream) WriteU64BE

func (dst *IOStream) WriteU64BE(value uint64) error

SDL_WriteU64BE - Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteU64BE)

func (*IOStream) WriteU64LE

func (dst *IOStream) WriteU64LE(value uint64) error

SDL_WriteU64LE - Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data. (https://wiki.libsdl.org/SDL3/SDL_WriteU64LE)

type IOStreamInterface

type IOStreamInterface struct {
	Version uint32
	Size    Pointer
	Seek    Pointer
	Read    Pointer
	Write   Pointer
	Flush   Pointer
	Close   Pointer
}

SDL_IOStreamInterface - The function pointers that drive an [SDL_IOStream](SDL_IOStream). (https://wiki.libsdl.org/SDL3/SDL_IOStreamInterface)

func (*IOStreamInterface) OpenIO

func (iface *IOStreamInterface) OpenIO(userdata *byte) *IOStream

SDL_OpenIO - Create a custom SDL_IOStream. (https://wiki.libsdl.org/SDL3/SDL_OpenIO)

type IOWhence

type IOWhence uint32

SDL_IOWhence - Possible `whence` values for [SDL_IOStream](SDL_IOStream) seeking. (https://wiki.libsdl.org/SDL3/SDL_IOWhence)

const (
	IO_SEEK_SET IOWhence = 0 // Seek from the beginning of data
	IO_SEEK_CUR IOWhence = 1 // Seek relative to current read point
	IO_SEEK_END IOWhence = 2 // Seek relative to the end of data
)

type InitFlags

type InitFlags uint32

SDL_InitFlags - Initialization flags for [SDL_Init](SDL_Init) and/or [SDL_InitSubSystem](SDL_InitSubSystem) (https://wiki.libsdl.org/SDL3/SDL_InitFlags)

const (
	INIT_AUDIO    InitFlags = 0x00000010 /**< `SDL_INIT_AUDIO` implies `SDL_INIT_EVENTS` */
	INIT_VIDEO    InitFlags = 0x00000020 /**< `SDL_INIT_VIDEO` implies `SDL_INIT_EVENTS`, should be initialized on the main thread */
	INIT_JOYSTICK InitFlags = 0x00000200 /**< `SDL_INIT_JOYSTICK` implies `SDL_INIT_EVENTS` */
	INIT_HAPTIC   InitFlags = 0x00001000
	INIT_GAMEPAD  InitFlags = 0x00002000 /**< `SDL_INIT_GAMEPAD` implies `SDL_INIT_JOYSTICK` */
	INIT_EVENTS   InitFlags = 0x00004000
	INIT_SENSOR   InitFlags = 0x00008000 /**< `SDL_INIT_SENSOR` implies `SDL_INIT_EVENTS` */
	INIT_CAMERA   InitFlags = 0x00010000 /**< `SDL_INIT_CAMERA` implies `SDL_INIT_EVENTS` */
)

func WasInit

func WasInit(flags InitFlags) InitFlags

SDL_WasInit - Get a mask of the specified subsystems which are currently initialized. (https://wiki.libsdl.org/SDL3/SDL_WasInit)

type InitState

type InitState struct {
	Status AtomicInt
	Thread ThreadID
	// contains filtered or unexported fields
}

SDL_InitState - A structure used for thread-safe initialization and shutdown. (https://wiki.libsdl.org/SDL3/SDL_InitState)

func (*InitState) SetInitialized

func (state *InitState) SetInitialized(initialized bool)

SDL_SetInitialized - Finish an initialization state transition. (https://wiki.libsdl.org/SDL3/SDL_SetInitialized)

func (*InitState) ShouldInit

func (state *InitState) ShouldInit() bool

SDL_ShouldInit - Return whether initialization should be done. (https://wiki.libsdl.org/SDL3/SDL_ShouldInit)

func (*InitState) ShouldQuit

func (state *InitState) ShouldQuit() bool

SDL_ShouldQuit - Return whether cleanup should be done. (https://wiki.libsdl.org/SDL3/SDL_ShouldQuit)

type JoyAxisEvent

type JoyAxisEvent struct {
	Type EventType // SDL_EVENT_JOYSTICK_AXIS_MOTION

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	Axis      uint8      // The joystick axis index

	Value int16 // The axis value (range: -32768 to 32767)
	// contains filtered or unexported fields
}

SDL_JoyAxisEvent - Joystick axis motion event structure (event.jaxis.*) (https://wiki.libsdl.org/SDL3/SDL_JoyAxisEvent)

type JoyBallEvent

type JoyBallEvent struct {
	Type EventType // SDL_EVENT_JOYSTICK_BALL_MOTION

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	Ball      uint8      // The joystick trackball index

	Xrel int16 // The relative motion in the X direction
	Yrel int16 // The relative motion in the Y direction
	// contains filtered or unexported fields
}

SDL_JoyBallEvent - Joystick trackball motion event structure (event.jball.*) (https://wiki.libsdl.org/SDL3/SDL_JoyBallEvent)

type JoyBatteryEvent

type JoyBatteryEvent struct {
	Type EventType // SDL_EVENT_JOYSTICK_BATTERY_UPDATED

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	State     PowerState // The joystick battery state
	Percent   int32      // The joystick battery percent charge remaining
	// contains filtered or unexported fields
}

SDL_JoyBatteryEvent - Joystick battery level change event structure (event.jbattery.*) (https://wiki.libsdl.org/SDL3/SDL_JoyBatteryEvent)

type JoyButtonEvent

type JoyButtonEvent struct {
	Type EventType // SDL_EVENT_JOYSTICK_BUTTON_DOWN or SDL_EVENT_JOYSTICK_BUTTON_UP

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	Button    uint8      // The joystick button index
	Down      bool       // true if the button is pressed
	// contains filtered or unexported fields
}

SDL_JoyButtonEvent - Joystick button event structure (event.jbutton.*) (https://wiki.libsdl.org/SDL3/SDL_JoyButtonEvent)

type JoyDeviceEvent

type JoyDeviceEvent struct {
	Type EventType // SDL_EVENT_JOYSTICK_ADDED or SDL_EVENT_JOYSTICK_REMOVED or SDL_EVENT_JOYSTICK_UPDATE_COMPLETE

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	// contains filtered or unexported fields
}

SDL_JoyDeviceEvent - Joystick device event structure (event.jdevice.*) (https://wiki.libsdl.org/SDL3/SDL_JoyDeviceEvent)

type JoyHatEvent

type JoyHatEvent struct {
	Type EventType // SDL_EVENT_JOYSTICK_HAT_MOTION

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     JoystickID // The joystick instance id
	Hat       uint8      // The joystick hat index
	Value     uint8      // The hat position value. *   \sa SDL_HAT_LEFTUP SDL_HAT_UP SDL_HAT_RIGHTUP *   \sa SDL_HAT_LEFT SDL_HAT_CENTERED SDL_HAT_RIGHT *   \sa SDL_HAT_LEFTDOWN SDL_HAT_DOWN SDL_HAT_RIGHTDOWN * *   Note that zero means the POV is centered.
	// contains filtered or unexported fields
}

SDL_JoyHatEvent - Joystick hat position change event structure (event.jhat.*) (https://wiki.libsdl.org/SDL3/SDL_JoyHatEvent)

type Joystick

type Joystick struct{}

SDL_Joystick - The joystick structure used to identify an SDL joystick. (https://wiki.libsdl.org/SDL3/SDL_Joystick)

func GetJoystickFromPlayerIndex

func GetJoystickFromPlayerIndex(playerIndex int) *Joystick

SDL_GetJoystickFromPlayerIndex - Get the SDL_Joystick associated with a player index. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickFromPlayerIndex)

func (*Joystick) Axis

func (joystick *Joystick) Axis(axis int32) (int16, error)

SDL_GetJoystickAxis - Get the current state of an axis control on a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickAxis)

func (*Joystick) AxisInitialState

func (joystick *Joystick) AxisInitialState(axis int32) (int16, bool)

SDL_GetJoystickAxisInitialState - Get the initial state of an axis control on a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickAxisInitialState)

func (*Joystick) Ball

func (joystick *Joystick) Ball(ball int32) (int32, int32, error)

SDL_GetJoystickBall - Get the ball axis change since the last poll. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickBall)

func (*Joystick) Button

func (joystick *Joystick) Button(button int32) bool

SDL_GetJoystickButton - Get the current state of a button on a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickButton)

func (*Joystick) Close

func (joystick *Joystick) Close()

SDL_CloseJoystick - Close a joystick previously opened with SDL_OpenJoystick(). (https://wiki.libsdl.org/SDL3/SDL_CloseJoystick)

func (*Joystick) Connected

func (joystick *Joystick) Connected() bool

SDL_JoystickConnected - Get the status of a specified joystick. (https://wiki.libsdl.org/SDL3/SDL_JoystickConnected)

func (*Joystick) ConnectionState

func (joystick *Joystick) ConnectionState() (JoystickConnectionState, error)

SDL_GetJoystickConnectionState - Get the connection state of a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickConnectionState)

func (*Joystick) FirmwareVersion

func (joystick *Joystick) FirmwareVersion() uint16

SDL_GetJoystickFirmwareVersion - Get the firmware version of an opened joystick, if available. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickFirmwareVersion)

func (*Joystick) GUID

func (joystick *Joystick) GUID() GUID

SDL_GetJoystickGUID - Get the implementation-dependent GUID for the joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickGUID)

func (*Joystick) Hat

func (joystick *Joystick) Hat(hat int32) uint8

SDL_GetJoystickHat - Get the current state of a POV hat on a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickHat)

func (*Joystick) ID

func (joystick *Joystick) ID() (JoystickID, error)

SDL_GetJoystickID - Get the instance ID of an opened joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickID)

func (*Joystick) IsHaptic

func (joystick *Joystick) IsHaptic() bool

SDL_IsJoystickHaptic - Query if a joystick has haptic features. (https://wiki.libsdl.org/SDL3/SDL_IsJoystickHaptic)

func (*Joystick) Name

func (joystick *Joystick) Name() (string, error)

SDL_GetJoystickName - Get the implementation dependent name of a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickName)

func (*Joystick) NumAxes

func (joystick *Joystick) NumAxes() (int32, error)

SDL_GetNumJoystickAxes - Get the number of general axis controls on a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetNumJoystickAxes)

func (*Joystick) NumBalls

func (joystick *Joystick) NumBalls() (int32, error)

SDL_GetNumJoystickBalls - Get the number of trackballs on a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetNumJoystickBalls)

func (*Joystick) NumButtons

func (joystick *Joystick) NumButtons() (int32, error)

SDL_GetNumJoystickButtons - Get the number of buttons on a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetNumJoystickButtons)

func (*Joystick) NumHats

func (joystick *Joystick) NumHats() (int32, error)

SDL_GetNumJoystickHats - Get the number of POV hats on a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetNumJoystickHats)

func (*Joystick) OpenHapticFrom

func (joystick *Joystick) OpenHapticFrom() (*Haptic, error)

SDL_OpenHapticFromJoystick - Open a haptic device for use from a joystick device. (https://wiki.libsdl.org/SDL3/SDL_OpenHapticFromJoystick)

func (*Joystick) Path

func (joystick *Joystick) Path() (string, error)

SDL_GetJoystickPath - Get the implementation dependent path of a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickPath)

func (*Joystick) PlayerIndex

func (joystick *Joystick) PlayerIndex() int32

SDL_GetJoystickPlayerIndex - Get the player index of an opened joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickPlayerIndex)

func (*Joystick) PowerInfo

func (joystick *Joystick) PowerInfo(percent *int32) (*PowerInfo, error)

SDL_GetJoystickPowerInfo - Get the battery state of a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickPowerInfo)

func (*Joystick) Product

func (joystick *Joystick) Product() uint16

SDL_GetJoystickProduct - Get the USB product ID of an opened joystick, if available. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickProduct)

func (*Joystick) ProductVersion

func (joystick *Joystick) ProductVersion() uint16

SDL_GetJoystickProductVersion - Get the product version of an opened joystick, if available. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickProductVersion)

func (*Joystick) Properties

func (joystick *Joystick) Properties() (PropertiesID, error)

SDL_GetJoystickProperties - Get the properties associated with a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickProperties)

func (*Joystick) Rumble

func (joystick *Joystick) Rumble(lowFreqencyRumble, highFrequencyRumble uint16, durationMS uint32) bool

SDL_RumbleJoystick - Start a rumble effect. (https://wiki.libsdl.org/SDL3/SDL_RumbleJoystick)

func (*Joystick) RumbleTriggers

func (joystick *Joystick) RumbleTriggers(leftRumble, rightRumble uint16, durationMS uint32) error

SDL_RumbleJoystickTriggers - Start a rumble effect in the joystick's triggers. (https://wiki.libsdl.org/SDL3/SDL_RumbleJoystickTriggers)

func (*Joystick) SendEffect

func (joystick *Joystick) SendEffect(data []byte) error

SDL_SendJoystickEffect - Send a joystick specific effect packet. (https://wiki.libsdl.org/SDL3/SDL_SendJoystickEffect)

func (*Joystick) SendVirtualSensorData

func (joystick *Joystick) SendVirtualSensorData(typ SensorType, sensorTimestamp uint64, data []float32) error

SDL_SendJoystickVirtualSensorData - Send a sensor update for an opened virtual joystick. (https://wiki.libsdl.org/SDL3/SDL_SendJoystickVirtualSensorData)

func (*Joystick) Serial

func (joystick *Joystick) Serial() string

SDL_GetJoystickSerial - Get the serial number of an opened joystick, if available. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickSerial)

func (*Joystick) SetLED

func (joystick *Joystick) SetLED(red, green, blue uint8) error

SDL_SetJoystickLED - Update a joystick's LED color. (https://wiki.libsdl.org/SDL3/SDL_SetJoystickLED)

func (*Joystick) SetPlayerIndex

func (joystick *Joystick) SetPlayerIndex(playerIndex int32) error

SDL_SetJoystickPlayerIndex - Set the player index of an opened joystick. (https://wiki.libsdl.org/SDL3/SDL_SetJoystickPlayerIndex)

func (*Joystick) SetVirtualAxis

func (joystick *Joystick) SetVirtualAxis(axis int32, value int16) error

SDL_SetJoystickVirtualAxis - Set the state of an axis on an opened virtual joystick. (https://wiki.libsdl.org/SDL3/SDL_SetJoystickVirtualAxis)

func (*Joystick) SetVirtualBall

func (joystick *Joystick) SetVirtualBall(ball int32, xrel, yrel int16) error

SDL_SetJoystickVirtualBall - Generate ball motion on an opened virtual joystick. (https://wiki.libsdl.org/SDL3/SDL_SetJoystickVirtualBall)

func (*Joystick) SetVirtualButton

func (joystick *Joystick) SetVirtualButton(button int32, down bool) error

SDL_SetJoystickVirtualButton - Set the state of a button on an opened virtual joystick. (https://wiki.libsdl.org/SDL3/SDL_SetJoystickVirtualButton)

func (*Joystick) SetVirtualHat

func (joystick *Joystick) SetVirtualHat(hat int32, value uint8) error

SDL_SetJoystickVirtualHat - Set the state of a hat on an opened virtual joystick. (https://wiki.libsdl.org/SDL3/SDL_SetJoystickVirtualHat)

func (*Joystick) SetVirtualTouchpad

func (joystick *Joystick) SetVirtualTouchpad(touchpad int32, finger int32, down bool, x, y, pressure float32) error

SDL_SetJoystickVirtualTouchpad - Set touchpad finger state on an opened virtual joystick. (https://wiki.libsdl.org/SDL3/SDL_SetJoystickVirtualTouchpad)

func (*Joystick) Type

func (joystick *Joystick) Type() JoystickType

SDL_GetJoystickType - Get the type of an opened joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickType)

func (*Joystick) Vendor

func (joystick *Joystick) Vendor() uint16

SDL_GetJoystickVendor - Get the USB vendor ID of an opened joystick, if available. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickVendor)

type JoystickConnectionState

type JoystickConnectionState uint32

SDL_JoystickConnectionState - Possible connection states for a joystick device. (https://wiki.libsdl.org/SDL3/SDL_JoystickConnectionState)

const (
	JOYSTICK_CONNECTION_INVALID  JoystickConnectionState = 4294967295
	JOYSTICK_CONNECTION_UNKNOWN  JoystickConnectionState = 0
	JOYSTICK_CONNECTION_WIRED    JoystickConnectionState = 1
	JOYSTICK_CONNECTION_WIRELESS JoystickConnectionState = 2
)

type JoystickID

type JoystickID uint32

SDL_JoystickID - This is a unique ID for a joystick for the time it is connected to the system, and is never reused for the lifetime of the application. (https://wiki.libsdl.org/SDL3/SDL_JoystickID)

func AttachVirtualJoystick

func AttachVirtualJoystick(desc *VirtualJoystickDesc) (JoystickID, error)

SDL_AttachVirtualJoystick - Attach a new virtual joystick. (https://wiki.libsdl.org/SDL3/SDL_AttachVirtualJoystick)

func GetGamepads

func GetGamepads() ([]JoystickID, error)

SDL_GetGamepads - Get a list of currently connected gamepads. (https://wiki.libsdl.org/SDL3/SDL_GetGamepads)

func GetJoysticks

func GetJoysticks() ([]JoystickID, error)

SDL_GetJoysticks - Get a list of currently connected joysticks. (https://wiki.libsdl.org/SDL3/SDL_GetJoysticks)

func (JoystickID) DetachVirtualJoystick

func (id JoystickID) DetachVirtualJoystick() error

SDL_DetachVirtualJoystick - Detach a virtual joystick. (https://wiki.libsdl.org/SDL3/SDL_DetachVirtualJoystick)

func (JoystickID) Gamepad

func (id JoystickID) Gamepad() (*Gamepad, error)

SDL_GetGamepadFromID - Get the SDL_Gamepad associated with a joystick instance ID, if it has been opened. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadFromID)

func (JoystickID) GamepadGUIDForID

func (instance_id JoystickID) GamepadGUIDForID() GUID

SDL_GetGamepadGUIDForID - Get the implementation-dependent GUID of a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadGUIDForID)

func (JoystickID) GamepadMapping

func (id JoystickID) GamepadMapping() string

SDL_GetGamepadMappingForID - Get the mapping of a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadMappingForID)

func (JoystickID) GamepadName

func (id JoystickID) GamepadName() (string, error)

SDL_GetGamepadNameForID - Get the implementation dependent name of a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadNameForID)

func (JoystickID) GamepadPath

func (id JoystickID) GamepadPath() (string, error)

SDL_GetGamepadPathForID - Get the implementation dependent path of a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadPathForID)

func (JoystickID) GamepadPlayerIndex

func (id JoystickID) GamepadPlayerIndex() int32

SDL_GetGamepadPlayerIndexForID - Get the player index of a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadPlayerIndexForID)

func (JoystickID) GamepadProduct

func (id JoystickID) GamepadProduct() uint16

SDL_GetGamepadProductForID - Get the USB product ID of a gamepad, if available. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadProductForID)

func (JoystickID) GamepadProductVersion

func (id JoystickID) GamepadProductVersion() uint16

SDL_GetGamepadProductVersionForID - Get the product version of a gamepad, if available. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadProductVersionForID)

func (JoystickID) GamepadType

func (id JoystickID) GamepadType() GamepadType

SDL_GetGamepadTypeForID - Get the type of a gamepad. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadTypeForID)

func (JoystickID) GamepadVendor

func (id JoystickID) GamepadVendor() uint16

SDL_GetGamepadVendorForID - Get the USB vendor ID of a gamepad, if available. (https://wiki.libsdl.org/SDL3/SDL_GetGamepadVendorForID)

func (JoystickID) IsGamepad

func (id JoystickID) IsGamepad() bool

SDL_IsGamepad - Check if the given joystick is supported by the gamepad interface. (https://wiki.libsdl.org/SDL3/SDL_IsGamepad)

func (JoystickID) IsJoystickVirtual

func (id JoystickID) IsJoystickVirtual() bool

SDL_IsJoystickVirtual - Query whether or not a joystick is virtual. (https://wiki.libsdl.org/SDL3/SDL_IsJoystickVirtual)

func (JoystickID) Joystick

func (id JoystickID) Joystick() (*Joystick, error)

SDL_GetJoystickFromID - Get the SDL_Joystick associated with an instance ID, if it has been opened. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickFromID)

func (JoystickID) JoystickGUIDForID

func (id JoystickID) JoystickGUIDForID() GUID

SDL_GetJoystickGUIDForID - Get the implementation-dependent GUID of a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickGUIDForID)

func (JoystickID) JoystickNameForID

func (id JoystickID) JoystickNameForID() (string, error)

SDL_GetJoystickNameForID - Get the implementation dependent name of a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickNameForID)

func (JoystickID) JoystickPathForID

func (id JoystickID) JoystickPathForID() (string, error)

SDL_GetJoystickPathForID - Get the implementation dependent path of a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickPathForID)

func (JoystickID) JoystickPlayerIndexForID

func (id JoystickID) JoystickPlayerIndexForID() int32

SDL_GetJoystickPlayerIndexForID - Get the player index of a joystick. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickPlayerIndexForID)

func (JoystickID) JoystickProductForID

func (id JoystickID) JoystickProductForID() uint16

SDL_GetJoystickProductForID - Get the USB product ID of a joystick, if available. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickProductForID)

func (JoystickID) JoystickProductVersionForID

func (id JoystickID) JoystickProductVersionForID() uint16

SDL_GetJoystickProductVersionForID - Get the product version of a joystick, if available. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickProductVersionForID)

func (JoystickID) JoystickTypeForID

func (id JoystickID) JoystickTypeForID() JoystickType

SDL_GetJoystickTypeForID - Get the type of a joystick, if available. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickTypeForID)

func (JoystickID) JoystickVendorForID

func (id JoystickID) JoystickVendorForID() uint16

SDL_GetJoystickVendorForID - Get the USB vendor ID of a joystick, if available. (https://wiki.libsdl.org/SDL3/SDL_GetJoystickVendorForID)

func (JoystickID) OpenGamepad

func (id JoystickID) OpenGamepad() (*Gamepad, error)

SDL_OpenGamepad - Open a gamepad for use. (https://wiki.libsdl.org/SDL3/SDL_OpenGamepad)

func (JoystickID) OpenJoystick

func (id JoystickID) OpenJoystick() (*Joystick, error)

SDL_OpenJoystick - Open a joystick for use. (https://wiki.libsdl.org/SDL3/SDL_OpenJoystick)

func (JoystickID) RealGamepadType

func (id JoystickID) RealGamepadType() GamepadType

SDL_GetRealGamepadTypeForID - Get the type of a gamepad, ignoring any mapping override. (https://wiki.libsdl.org/SDL3/SDL_GetRealGamepadTypeForID)

func (JoystickID) SetGamepadMapping

func (instance_id JoystickID) SetGamepadMapping(mapping string) error

SDL_SetGamepadMapping - Set the current mapping of a joystick or gamepad. (https://wiki.libsdl.org/SDL3/SDL_SetGamepadMapping)

type JoystickType

type JoystickType uint32

SDL_JoystickType - An enum of some common joystick types. (https://wiki.libsdl.org/SDL3/SDL_JoystickType)

const (
	JOYSTICK_TYPE_UNKNOWN      JoystickType = 0
	JOYSTICK_TYPE_GAMEPAD      JoystickType = 1
	JOYSTICK_TYPE_WHEEL        JoystickType = 2
	JOYSTICK_TYPE_ARCADE_STICK JoystickType = 3
	JOYSTICK_TYPE_FLIGHT_STICK JoystickType = 4
	JOYSTICK_TYPE_DANCE_PAD    JoystickType = 5
	JOYSTICK_TYPE_GUITAR       JoystickType = 6
	JOYSTICK_TYPE_DRUM_KIT     JoystickType = 7
	JOYSTICK_TYPE_ARCADE_PAD   JoystickType = 8
	JOYSTICK_TYPE_THROTTLE     JoystickType = 9
	JOYSTICK_TYPE_COUNT        JoystickType = 10
)

type KeyboardDeviceEvent

type KeyboardDeviceEvent struct {
	Type EventType // SDL_EVENT_KEYBOARD_ADDED or SDL_EVENT_KEYBOARD_REMOVED

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which     KeyboardID // The keyboard instance id
	// contains filtered or unexported fields
}

SDL_KeyboardDeviceEvent - Keyboard device event structure (event.kdevice.*) (https://wiki.libsdl.org/SDL3/SDL_KeyboardDeviceEvent)

type KeyboardEvent

type KeyboardEvent struct {
	Type EventType // SDL_EVENT_KEY_DOWN or SDL_EVENT_KEY_UP

	Timestamp uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID   // The window with keyboard focus, if any
	Which     KeyboardID // The keyboard instance id, or 0 if unknown or virtual
	Scancode  Scancode   // SDL physical key code
	Key       Keycode    // SDL virtual key code
	Mod       Keymod     // current key modifiers
	Raw       uint16     // The platform dependent scancode for this event
	Down      bool       // true if the key is pressed
	Repeat    bool       // true if this is a key repeat
	// contains filtered or unexported fields
}

SDL_KeyboardEvent - Keyboard button event structure (event.key.*) (https://wiki.libsdl.org/SDL3/SDL_KeyboardEvent)

type KeyboardID

type KeyboardID uint32

SDL_KeyboardID - This is a unique ID for a keyboard for the time it is connected to the system, and is never reused for the lifetime of the application. (https://wiki.libsdl.org/SDL3/SDL_KeyboardID)

func GetKeyboards

func GetKeyboards() ([]KeyboardID, error)

SDL_GetKeyboards - Get a list of currently connected keyboards. (https://wiki.libsdl.org/SDL3/SDL_GetKeyboards)

func (KeyboardID) Name

func (id KeyboardID) Name() (string, error)

SDL_GetKeyboardNameForID - Get the name of a keyboard. (https://wiki.libsdl.org/SDL3/SDL_GetKeyboardNameForID)

type Keycode

type Keycode uint32

SDL_Keycode - The SDL virtual key representation. (https://wiki.libsdl.org/SDL3/SDL_Keycode)

const (
	K_EXTENDED_MASK = (1 << 29)
	K_SCANCODE_MASK = (1 << 30)

	K_UNKNOWN              Keycode = 0x00000000 /**< 0 */
	K_RETURN               Keycode = 0x0000000d /**< '\r' */
	K_ESCAPE               Keycode = 0x0000001b /**< '\x1B' */
	K_BACKSPACE            Keycode = 0x00000008 /**< '\b' */
	K_TAB                  Keycode = 0x00000009 /**< '\t' */
	K_SPACE                Keycode = 0x00000020 /**< ' ' */
	K_EXCLAIM              Keycode = 0x00000021 /**< '!' */
	K_DBLAPOSTROPHE        Keycode = 0x00000022 /**< '"' */
	K_HASH                 Keycode = 0x00000023 /**< '#' */
	K_DOLLAR               Keycode = 0x00000024 /**< '$' */
	K_PERCENT              Keycode = 0x00000025 /**< '%' */
	K_AMPERSAND            Keycode = 0x00000026 /**< '&' */
	K_APOSTROPHE           Keycode = 0x00000027 /**< '\” */
	K_LEFTPAREN            Keycode = 0x00000028 /**< '(' */
	K_RIGHTPAREN           Keycode = 0x00000029 /**< ')' */
	K_ASTERISK             Keycode = 0x0000002a /**< '*' */
	K_PLUS                 Keycode = 0x0000002b /**< '+' */
	K_COMMA                Keycode = 0x0000002c /**< ',' */
	K_MINUS                Keycode = 0x0000002d /**< '-' */
	K_PERIOD               Keycode = 0x0000002e /**< '.' */
	K_SLASH                Keycode = 0x0000002f /**< '/' */
	K_0                    Keycode = 0x00000030 /**< '0' */
	K_1                    Keycode = 0x00000031 /**< '1' */
	K_2                    Keycode = 0x00000032 /**< '2' */
	K_3                    Keycode = 0x00000033 /**< '3' */
	K_4                    Keycode = 0x00000034 /**< '4' */
	K_5                    Keycode = 0x00000035 /**< '5' */
	K_6                    Keycode = 0x00000036 /**< '6' */
	K_7                    Keycode = 0x00000037 /**< '7' */
	K_8                    Keycode = 0x00000038 /**< '8' */
	K_9                    Keycode = 0x00000039 /**< '9' */
	K_COLON                Keycode = 0x0000003a /**< ':' */
	K_SEMICOLON            Keycode = 0x0000003b /**< ';' */
	K_LESS                 Keycode = 0x0000003c /**< '<' */
	K_EQUALS               Keycode = 0x0000003d /**< '=' */
	K_GREATER              Keycode = 0x0000003e /**< '>' */
	K_QUESTION             Keycode = 0x0000003f /**< '?' */
	K_AT                   Keycode = 0x00000040 /**< '@' */
	K_LEFTBRACKET          Keycode = 0x0000005b /**< '[' */
	K_BACKSLASH            Keycode = 0x0000005c /**< '\\' */
	K_RIGHTBRACKET         Keycode = 0x0000005d /**< ']' */
	K_CARET                Keycode = 0x0000005e /**< '^' */
	K_UNDERSCORE           Keycode = 0x0000005f /**< '_' */
	K_GRAVE                Keycode = 0x00000060 /**< '`' */
	K_A                    Keycode = 0x00000061 /**< 'a' */
	K_B                    Keycode = 0x00000062 /**< 'b' */
	K_C                    Keycode = 0x00000063 /**< 'c' */
	K_D                    Keycode = 0x00000064 /**< 'd' */
	K_E                    Keycode = 0x00000065 /**< 'e' */
	K_F                    Keycode = 0x00000066 /**< 'f' */
	K_G                    Keycode = 0x00000067 /**< 'g' */
	K_H                    Keycode = 0x00000068 /**< 'h' */
	K_I                    Keycode = 0x00000069 /**< 'i' */
	K_J                    Keycode = 0x0000006a /**< 'j' */
	K_K                    Keycode = 0x0000006b /**< 'k' */
	K_L                    Keycode = 0x0000006c /**< 'l' */
	K_M                    Keycode = 0x0000006d /**< 'm' */
	K_N                    Keycode = 0x0000006e /**< 'n' */
	K_O                    Keycode = 0x0000006f /**< 'o' */
	K_P                    Keycode = 0x00000070 /**< 'p' */
	K_Q                    Keycode = 0x00000071 /**< 'q' */
	K_R                    Keycode = 0x00000072 /**< 'r' */
	K_S                    Keycode = 0x00000073 /**< 's' */
	K_T                    Keycode = 0x00000074 /**< 't' */
	K_U                    Keycode = 0x00000075 /**< 'u' */
	K_V                    Keycode = 0x00000076 /**< 'v' */
	K_W                    Keycode = 0x00000077 /**< 'w' */
	K_X                    Keycode = 0x00000078 /**< 'x' */
	K_Y                    Keycode = 0x00000079 /**< 'y' */
	K_Z                    Keycode = 0x0000007a /**< 'z' */
	K_LEFTBRACE            Keycode = 0x0000007b /**< '{' */
	K_PIPE                 Keycode = 0x0000007c /**< '|' */
	K_RIGHTBRACE           Keycode = 0x0000007d /**< '}' */
	K_TILDE                Keycode = 0x0000007e /**< '~' */
	K_DELETE               Keycode = 0x0000007f /**< '\x7F' */
	K_PLUSMINUS            Keycode = 0x000000b1 /**< '\xB1' */
	K_CAPSLOCK             Keycode = 0x40000039 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK) */
	K_F1                   Keycode = 0x4000003a /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1) */
	K_F2                   Keycode = 0x4000003b /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2) */
	K_F3                   Keycode = 0x4000003c /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3) */
	K_F4                   Keycode = 0x4000003d /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4) */
	K_F5                   Keycode = 0x4000003e /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5) */
	K_F6                   Keycode = 0x4000003f /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6) */
	K_F7                   Keycode = 0x40000040 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7) */
	K_F8                   Keycode = 0x40000041 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8) */
	K_F9                   Keycode = 0x40000042 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9) */
	K_F10                  Keycode = 0x40000043 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10) */
	K_F11                  Keycode = 0x40000044 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11) */
	K_F12                  Keycode = 0x40000045 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12) */
	K_PRINTSCREEN          Keycode = 0x40000046 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN) */
	K_SCROLLLOCK           Keycode = 0x40000047 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK) */
	K_PAUSE                Keycode = 0x40000048 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE) */
	K_INSERT               Keycode = 0x40000049 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT) */
	K_HOME                 Keycode = 0x4000004a /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME) */
	K_PAGEUP               Keycode = 0x4000004b /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP) */
	K_END                  Keycode = 0x4000004d /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END) */
	K_PAGEDOWN             Keycode = 0x4000004e /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN) */
	K_RIGHT                Keycode = 0x4000004f /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT) */
	K_LEFT                 Keycode = 0x40000050 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT) */
	K_DOWN                 Keycode = 0x40000051 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN) */
	K_UP                   Keycode = 0x40000052 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP) */
	K_NUMLOCKCLEAR         Keycode = 0x40000053 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR) */
	K_KP_DIVIDE            Keycode = 0x40000054 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE) */
	K_KP_MULTIPLY          Keycode = 0x40000055 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY) */
	K_KP_MINUS             Keycode = 0x40000056 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS) */
	K_KP_PLUS              Keycode = 0x40000057 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS) */
	K_KP_ENTER             Keycode = 0x40000058 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER) */
	K_KP_1                 Keycode = 0x40000059 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1) */
	K_KP_2                 Keycode = 0x4000005a /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2) */
	K_KP_3                 Keycode = 0x4000005b /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3) */
	K_KP_4                 Keycode = 0x4000005c /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4) */
	K_KP_5                 Keycode = 0x4000005d /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5) */
	K_KP_6                 Keycode = 0x4000005e /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6) */
	K_KP_7                 Keycode = 0x4000005f /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7) */
	K_KP_8                 Keycode = 0x40000060 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8) */
	K_KP_9                 Keycode = 0x40000061 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9) */
	K_KP_0                 Keycode = 0x40000062 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0) */
	K_KP_PERIOD            Keycode = 0x40000063 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD) */
	K_APPLICATION          Keycode = 0x40000065 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION) */
	K_POWER                Keycode = 0x40000066 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER) */
	K_KP_EQUALS            Keycode = 0x40000067 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS) */
	K_F13                  Keycode = 0x40000068 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13) */
	K_F14                  Keycode = 0x40000069 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14) */
	K_F15                  Keycode = 0x4000006a /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15) */
	K_F16                  Keycode = 0x4000006b /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16) */
	K_F17                  Keycode = 0x4000006c /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17) */
	K_F18                  Keycode = 0x4000006d /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18) */
	K_F19                  Keycode = 0x4000006e /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19) */
	K_F20                  Keycode = 0x4000006f /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20) */
	K_F21                  Keycode = 0x40000070 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21) */
	K_F22                  Keycode = 0x40000071 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22) */
	K_F23                  Keycode = 0x40000072 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23) */
	K_F24                  Keycode = 0x40000073 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24) */
	K_EXECUTE              Keycode = 0x40000074 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE) */
	K_HELP                 Keycode = 0x40000075 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP) */
	K_MENU                 Keycode = 0x40000076 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU) */
	K_SELECT               Keycode = 0x40000077 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT) */
	K_STOP                 Keycode = 0x40000078 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP) */
	K_AGAIN                Keycode = 0x40000079 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN) */
	K_UNDO                 Keycode = 0x4000007a /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO) */
	K_CUT                  Keycode = 0x4000007b /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT) */
	K_COPY                 Keycode = 0x4000007c /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY) */
	K_PASTE                Keycode = 0x4000007d /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE) */
	K_FIND                 Keycode = 0x4000007e /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND) */
	K_MUTE                 Keycode = 0x4000007f /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE) */
	K_VOLUMEUP             Keycode = 0x40000080 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP) */
	K_VOLUMEDOWN           Keycode = 0x40000081 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN) */
	K_KP_COMMA             Keycode = 0x40000085 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA) */
	K_KP_EQUALSAS400       Keycode = 0x40000086 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400) */
	K_ALTERASE             Keycode = 0x40000099 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE) */
	K_SYSREQ               Keycode = 0x4000009a /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ) */
	K_CANCEL               Keycode = 0x4000009b /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL) */
	K_CLEAR                Keycode = 0x4000009c /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR) */
	K_PRIOR                Keycode = 0x4000009d /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR) */
	K_RETURN2              Keycode = 0x4000009e /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2) */
	K_SEPARATOR            Keycode = 0x4000009f /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR) */
	K_OUT                  Keycode = 0x400000a0 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT) */
	K_OPER                 Keycode = 0x400000a1 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER) */
	K_CLEARAGAIN           Keycode = 0x400000a2 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN) */
	K_CRSEL                Keycode = 0x400000a3 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL) */
	K_EXSEL                Keycode = 0x400000a4 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL) */
	K_KP_00                Keycode = 0x400000b0 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00) */
	K_KP_000               Keycode = 0x400000b1 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000) */
	K_THOUSANDSSEPARATOR   Keycode = 0x400000b2 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR) */
	K_DECIMALSEPARATOR     Keycode = 0x400000b3 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR) */
	K_CURRENCYUNIT         Keycode = 0x400000b4 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT) */
	K_CURRENCYSUBUNIT      Keycode = 0x400000b5 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT) */
	K_KP_LEFTPAREN         Keycode = 0x400000b6 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN) */
	K_KP_RIGHTPAREN        Keycode = 0x400000b7 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN) */
	K_KP_LEFTBRACE         Keycode = 0x400000b8 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE) */
	K_KP_RIGHTBRACE        Keycode = 0x400000b9 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE) */
	K_KP_TAB               Keycode = 0x400000ba /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB) */
	K_KP_BACKSPACE         Keycode = 0x400000bb /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE) */
	K_KP_A                 Keycode = 0x400000bc /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A) */
	K_KP_B                 Keycode = 0x400000bd /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B) */
	K_KP_C                 Keycode = 0x400000be /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C) */
	K_KP_D                 Keycode = 0x400000bf /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D) */
	K_KP_E                 Keycode = 0x400000c0 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E) */
	K_KP_F                 Keycode = 0x400000c1 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F) */
	K_KP_XOR               Keycode = 0x400000c2 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR) */
	K_KP_POWER             Keycode = 0x400000c3 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER) */
	K_KP_PERCENT           Keycode = 0x400000c4 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT) */
	K_KP_LESS              Keycode = 0x400000c5 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS) */
	K_KP_GREATER           Keycode = 0x400000c6 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER) */
	K_KP_AMPERSAND         Keycode = 0x400000c7 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND) */
	K_KP_DBLAMPERSAND      Keycode = 0x400000c8 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND) */
	K_KP_VERTICALBAR       Keycode = 0x400000c9 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR) */
	K_KP_DBLVERTICALBAR    Keycode = 0x400000ca /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR) */
	K_KP_COLON             Keycode = 0x400000cb /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON) */
	K_KP_HASH              Keycode = 0x400000cc /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH) */
	K_KP_SPACE             Keycode = 0x400000cd /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE) */
	K_KP_AT                Keycode = 0x400000ce /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT) */
	K_KP_EXCLAM            Keycode = 0x400000cf /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM) */
	K_KP_MEMSTORE          Keycode = 0x400000d0 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE) */
	K_KP_MEMRECALL         Keycode = 0x400000d1 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL) */
	K_KP_MEMCLEAR          Keycode = 0x400000d2 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR) */
	K_KP_MEMADD            Keycode = 0x400000d3 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD) */
	K_KP_MEMSUBTRACT       Keycode = 0x400000d4 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT) */
	K_KP_MEMMULTIPLY       Keycode = 0x400000d5 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY) */
	K_KP_MEMDIVIDE         Keycode = 0x400000d6 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE) */
	K_KP_PLUSMINUS         Keycode = 0x400000d7 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS) */
	K_KP_CLEAR             Keycode = 0x400000d8 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR) */
	K_KP_CLEARENTRY        Keycode = 0x400000d9 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY) */
	K_KP_BINARY            Keycode = 0x400000da /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY) */
	K_KP_OCTAL             Keycode = 0x400000db /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL) */
	K_KP_DECIMAL           Keycode = 0x400000dc /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL) */
	K_KP_HEXADECIMAL       Keycode = 0x400000dd /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL) */
	K_LCTRL                Keycode = 0x400000e0 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL) */
	K_LSHIFT               Keycode = 0x400000e1 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT) */
	K_LALT                 Keycode = 0x400000e2 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT) */
	K_LGUI                 Keycode = 0x400000e3 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI) */
	K_RCTRL                Keycode = 0x400000e4 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL) */
	K_RSHIFT               Keycode = 0x400000e5 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT) */
	K_RALT                 Keycode = 0x400000e6 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT) */
	K_RGUI                 Keycode = 0x400000e7 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI) */
	K_MODE                 Keycode = 0x40000101 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE) */
	K_SLEEP                Keycode = 0x40000102 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP) */
	K_WAKE                 Keycode = 0x40000103 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WAKE) */
	K_CHANNEL_INCREMENT    Keycode = 0x40000104 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_INCREMENT) */
	K_CHANNEL_DECREMENT    Keycode = 0x40000105 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_DECREMENT) */
	K_MEDIA_PLAY           Keycode = 0x40000106 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY) */
	K_MEDIA_PAUSE          Keycode = 0x40000107 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PAUSE) */
	K_MEDIA_RECORD         Keycode = 0x40000108 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_RECORD) */
	K_MEDIA_FAST_FORWARD   Keycode = 0x40000109 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_FAST_FORWARD) */
	K_MEDIA_REWIND         Keycode = 0x4000010a /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_REWIND) */
	K_MEDIA_NEXT_TRACK     Keycode = 0x4000010b /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_NEXT_TRACK) */
	K_MEDIA_PREVIOUS_TRACK Keycode = 0x4000010c /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PREVIOUS_TRACK) */
	K_MEDIA_STOP           Keycode = 0x4000010d /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_STOP) */
	K_MEDIA_EJECT          Keycode = 0x4000010e /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_EJECT) */
	K_MEDIA_PLAY_PAUSE     Keycode = 0x4000010f /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY_PAUSE) */
	K_MEDIA_SELECT         Keycode = 0x40000110 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_SELECT) */
	K_AC_NEW               Keycode = 0x40000111 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_NEW) */
	K_AC_OPEN              Keycode = 0x40000112 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_OPEN) */
	K_AC_CLOSE             Keycode = 0x40000113 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_CLOSE) */
	K_AC_EXIT              Keycode = 0x40000114 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_EXIT) */
	K_AC_SAVE              Keycode = 0x40000115 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SAVE) */
	K_AC_PRINT             Keycode = 0x40000116 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PRINT) */
	K_AC_PROPERTIES        Keycode = 0x40000117 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PROPERTIES) */
	K_AC_SEARCH            Keycode = 0x40000118 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH) */
	K_AC_HOME              Keycode = 0x40000119 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME) */
	K_AC_BACK              Keycode = 0x4000011a /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK) */
	K_AC_FORWARD           Keycode = 0x4000011b /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD) */
	K_AC_STOP              Keycode = 0x4000011c /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP) */
	K_AC_REFRESH           Keycode = 0x4000011d /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH) */
	K_AC_BOOKMARKS         Keycode = 0x4000011e /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS) */
	K_SOFTLEFT             Keycode = 0x4000011f /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT) */
	K_SOFTRIGHT            Keycode = 0x40000120 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT) */
	K_CALL                 Keycode = 0x40000121 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL) */
	K_ENDCALL              Keycode = 0x40000122 /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL) */
	K_LEFT_TAB             Keycode = 0x20000001 /**< Extended key Left Tab */
	K_LEVEL5_SHIFT         Keycode = 0x20000002 /**< Extended key Level 5 Shift */
	K_MULTI_KEY_COMPOSE    Keycode = 0x20000003 /**< Extended key Multi-key Compose */
	K_LMETA                Keycode = 0x20000004 /**< Extended key Left Meta */
	K_RMETA                Keycode = 0x20000005 /**< Extended key Right Meta */
	K_LHYPER               Keycode = 0x20000006 /**< Extended key Left Hyper */
	K_RHYPER               Keycode = 0x20000007 /**< Extended key Right Hyper */
)

func GetKeyFromName

func GetKeyFromName(name string) Keycode

SDL_GetKeyFromName - Get a key code from a human-readable name. (https://wiki.libsdl.org/SDL3/SDL_GetKeyFromName)

func (Keycode) KeyName

func (key Keycode) KeyName() string

SDL_GetKeyName - Get a human-readable name for a key. (https://wiki.libsdl.org/SDL3/SDL_GetKeyName)

func (Keycode) ScancodeFromKey

func (key Keycode) ScancodeFromKey(modstate *Keymod) Scancode

SDL_GetScancodeFromKey - Get the scancode corresponding to the given key code according to the current keyboard layout. (https://wiki.libsdl.org/SDL3/SDL_GetScancodeFromKey)

type Keymod

type Keymod uint16

SDL_Keymod - Valid key modifiers (possibly OR'd together). (https://wiki.libsdl.org/SDL3/SDL_Keymod)

const (
	KMOD_NONE   Keymod = 0x0000                      /**< no modifier is applicable. */
	KMOD_LSHIFT Keymod = 0x0001                      /**< the left Shift key is down. */
	KMOD_RSHIFT Keymod = 0x0002                      /**< the right Shift key is down. */
	KMOD_LEVEL5 Keymod = 0x0004                      /**< the Level 5 Shift key is down. */
	KMOD_LCTRL  Keymod = 0x0040                      /**< the left Ctrl (Control) key is down. */
	KMOD_RCTRL  Keymod = 0x0080                      /**< the right Ctrl (Control) key is down. */
	KMOD_LALT   Keymod = 0x0100                      /**< the left Alt key is down. */
	KMOD_RALT   Keymod = 0x0200                      /**< the right Alt key is down. */
	KMOD_LGUI   Keymod = 0x0400                      /**< the left GUI key (often the Windows key) is down. */
	KMOD_RGUI   Keymod = 0x0800                      /**< the right GUI key (often the Windows key) is down. */
	KMOD_NUM    Keymod = 0x1000                      /**< the Num Lock key (may be located on an extended keypad) is down. */
	KMOD_CAPS   Keymod = 0x2000                      /**< the Caps Lock key is down. */
	KMOD_MODE   Keymod = 0x4000                      /**< the !AltGr key is down. */
	KMOD_SCROLL Keymod = 0x8000                      /**< the Scroll Lock key is down. */
	KMOD_CTRL   Keymod = (KMOD_LCTRL | KMOD_RCTRL)   /**< Any Ctrl key is down. */
	KMOD_SHIFT  Keymod = (KMOD_LSHIFT | KMOD_RSHIFT) /**< Any Shift key is down. */
	KMOD_ALT    Keymod = (KMOD_LALT | KMOD_RALT)     /**< Any Alt key is down. */
	KMOD_GUI    Keymod = (KMOD_LGUI | KMOD_RGUI)     /**< Any GUI key is down. */
)

func GetModState

func GetModState() Keymod

SDL_GetModState - Get the current key modifier state for the keyboard. (https://wiki.libsdl.org/SDL3/SDL_GetModState)

type Locale

type Locale struct {
	Language string // A language name, like "en" for English.
	Country  string // A country, like "US" for America. Can be NULL.
}

SDL_Locale - A struct to provide locale data. (https://wiki.libsdl.org/SDL3/SDL_Locale)

func GetPreferredLocales

func GetPreferredLocales() ([]*Locale, error)

SDL_GetPreferredLocales - Report the user's preferred locale. (https://wiki.libsdl.org/SDL3/SDL_GetPreferredLocales)

type LogOutputFunction

type LogOutputFunction uintptr

SDL_LogOutputFunction - The prototype for the log output callback function. (https://wiki.libsdl.org/SDL3/SDL_LogOutputFunction)

type LogPriority

type LogPriority uint32

SDL_LogPriority - The predefined log priorities (https://wiki.libsdl.org/SDL3/SDL_LogPriority)

const (
	LOG_PRIORITY_INVALID  LogPriority = 0
	LOG_PRIORITY_TRACE    LogPriority = 1
	LOG_PRIORITY_VERBOSE  LogPriority = 2
	LOG_PRIORITY_DEBUG    LogPriority = 3
	LOG_PRIORITY_INFO     LogPriority = 4
	LOG_PRIORITY_WARN     LogPriority = 5
	LOG_PRIORITY_ERROR    LogPriority = 6
	LOG_PRIORITY_CRITICAL LogPriority = 7
	LOG_PRIORITY_COUNT    LogPriority = 8
)

type MainThreadCallback

type MainThreadCallback uintptr

SDL_MainThreadCallback - Callback run on the main thread. (https://wiki.libsdl.org/SDL3/SDL_MainThreadCallback)

type MessageBoxButtonData

type MessageBoxButtonData struct {
	Flags    MessageBoxButtonFlags
	ButtonID int32  // User defined button id (value returned via SDL_ShowMessageBox)
	Text     string // The UTF-8 button text
}

SDL_MessageBoxButtonData - Individual button data. (https://wiki.libsdl.org/SDL3/SDL_MessageBoxButtonData)

type MessageBoxButtonFlags

type MessageBoxButtonFlags uint32

SDL_MessageBoxButtonFlags - [SDL_MessageBoxButtonData](SDL_MessageBoxButtonData) flags. (https://wiki.libsdl.org/SDL3/SDL_MessageBoxButtonFlags)

const (
	MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT MessageBoxButtonFlags = 0x00000001 /**< Marks the default button when return is hit */
	MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT MessageBoxButtonFlags = 0x00000002 /**< Marks the default button when escape is hit */
)

type MessageBoxColor

type MessageBoxColor struct {
	R uint8
	G uint8
	B uint8
}

SDL_MessageBoxColor - RGB value used in a message box color scheme (https://wiki.libsdl.org/SDL3/SDL_MessageBoxColor)

type MessageBoxColorScheme

type MessageBoxColorScheme struct {
	Colors [5]MessageBoxColor
}

SDL_MessageBoxColorScheme - A set of colors to use for message box dialogs (https://wiki.libsdl.org/SDL3/SDL_MessageBoxColorScheme)

type MessageBoxData

type MessageBoxData struct {
	Flags       MessageBoxFlags
	Window      *Window // Parent window, can be NULL
	Title       string  // UTF-8 title
	Message     string  // UTF-8 message text
	Buttons     []MessageBoxButtonData
	ColorScheme *MessageBoxColorScheme // SDL_MessageBoxColorScheme, can be NULL to use system settings
}

SDL_MessageBoxData - MessageBox structure containing title, text, window, etc. (https://wiki.libsdl.org/SDL3/SDL_MessageBoxData)

type MessageBoxFlags

type MessageBoxFlags uint32

SDL_MessageBoxFlags - Message box flags. (https://wiki.libsdl.org/SDL3/SDL_MessageBoxFlags)

const (
	MESSAGEBOX_ERROR                 MessageBoxFlags = 0x00000010 /**< error dialog */
	MESSAGEBOX_WARNING               MessageBoxFlags = 0x00000020 /**< warning dialog */
	MESSAGEBOX_INFORMATION           MessageBoxFlags = 0x00000040 /**< informational dialog */
	MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT MessageBoxFlags = 0x00000080 /**< buttons placed left to right */
	MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT MessageBoxFlags = 0x00000100 /**< buttons placed right to left */
)

type MetalView

type MetalView uintptr

SDL_MetalView - A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS). (https://wiki.libsdl.org/SDL3/SDL_MetalView)

type MouseButtonEvent

type MouseButtonEvent struct {
	Type EventType // SDL_EVENT_MOUSE_BUTTON_DOWN or SDL_EVENT_MOUSE_BUTTON_UP

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID // The window with mouse focus, if any
	Which     MouseID  // The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0
	Button    uint8    // The mouse button index
	Down      bool     // true if the button is pressed
	Clicks    uint8    // 1 for single-click, 2 for double-click, etc.

	X float32 // X coordinate, relative to window
	Y float32 // Y coordinate, relative to window
	// contains filtered or unexported fields
}

SDL_MouseButtonEvent - Mouse button event structure (event.button.*) (https://wiki.libsdl.org/SDL3/SDL_MouseButtonEvent)

type MouseButtonFlags

type MouseButtonFlags uint32

SDL_MouseButtonFlags - A bitmask of pressed mouse buttons, as reported by [SDL_GetMouseState](SDL_GetMouseState), etc. (https://wiki.libsdl.org/SDL3/SDL_MouseButtonFlags)

const (
	BUTTON_LEFT   MouseButtonFlags = 1
	BUTTON_MIDDLE MouseButtonFlags = 2
	BUTTON_RIGHT  MouseButtonFlags = 3
	BUTTON_X1     MouseButtonFlags = 4
	BUTTON_X2     MouseButtonFlags = 5
)

func GetGlobalMouseState

func GetGlobalMouseState() (MouseButtonFlags, float32, float32)

SDL_GetGlobalMouseState - Query the platform for the asynchronous mouse button state and the desktop-relative platform-cursor position. (https://wiki.libsdl.org/SDL3/SDL_GetGlobalMouseState)

func GetMouseState

func GetMouseState() (MouseButtonFlags, float32, float32)

SDL_GetMouseState - Query SDL's cache for the synchronous mouse button state and the window-relative SDL-cursor position. (https://wiki.libsdl.org/SDL3/SDL_GetMouseState)

func GetRelativeMouseState

func GetRelativeMouseState() (MouseButtonFlags, float32, float32)

SDL_GetRelativeMouseState - Query SDL's cache for the synchronous mouse button state and accumulated mouse delta since last call. (https://wiki.libsdl.org/SDL3/SDL_GetRelativeMouseState)

type MouseDeviceEvent

type MouseDeviceEvent struct {
	Type EventType // SDL_EVENT_MOUSE_ADDED or SDL_EVENT_MOUSE_REMOVED

	Timestamp uint64  // In nanoseconds, populated using SDL_GetTicksNS()
	Which     MouseID // The mouse instance id
	// contains filtered or unexported fields
}

SDL_MouseDeviceEvent - Mouse device event structure (event.mdevice.*) (https://wiki.libsdl.org/SDL3/SDL_MouseDeviceEvent)

type MouseID

type MouseID uint32

SDL_MouseID - This is a unique ID for a mouse for the time it is connected to the system, and is never reused for the lifetime of the application. (https://wiki.libsdl.org/SDL3/SDL_MouseID)

func GetMice

func GetMice() ([]MouseID, error)

SDL_GetMice - Get a list of currently connected mice. (https://wiki.libsdl.org/SDL3/SDL_GetMice)

func (MouseID) Name

func (id MouseID) Name() (string, error)

SDL_GetMouseNameForID - Get the name of a mouse. (https://wiki.libsdl.org/SDL3/SDL_GetMouseNameForID)

type MouseMotionEvent

type MouseMotionEvent struct {
	Type EventType // SDL_EVENT_MOUSE_MOTION

	Timestamp uint64           // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID         // The window with mouse focus, if any
	Which     MouseID          // The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0
	State     MouseButtonFlags // The current button state
	X         float32          // X coordinate, relative to window
	Y         float32          // Y coordinate, relative to window
	Xrel      float32          // The relative motion in the X direction
	Yrel      float32          // The relative motion in the Y direction
	// contains filtered or unexported fields
}

SDL_MouseMotionEvent - Mouse motion event structure (event.motion.*) (https://wiki.libsdl.org/SDL3/SDL_MouseMotionEvent)

type MouseMotionTransformCallback

type MouseMotionTransformCallback uintptr

SDL_MouseMotionTransformCallback - A callback used to transform mouse motion delta from raw values. (https://wiki.libsdl.org/SDL3/SDL_MouseMotionTransformCallback)

type MouseWheelDirection

type MouseWheelDirection uint32

SDL_MouseWheelDirection - Scroll direction types for the Scroll event (https://wiki.libsdl.org/SDL3/SDL_MouseWheelDirection)

const (
	MOUSEWHEEL_NORMAL  MouseWheelDirection = 0 // The scroll direction is normal
	MOUSEWHEEL_FLIPPED MouseWheelDirection = 1 // The scroll direction is flipped / natural
)

type MouseWheelEvent

type MouseWheelEvent struct {
	Type EventType // SDL_EVENT_MOUSE_WHEEL

	Timestamp uint64              // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID            // The window with mouse focus, if any
	Which     MouseID             // The mouse instance id in relative mode or 0
	X         float32             // The amount scrolled horizontally, positive to the right and negative to the left
	Y         float32             // The amount scrolled vertically, positive away from the user and negative toward the user
	Direction MouseWheelDirection // Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back
	MouseX    float32             // X coordinate, relative to window
	MouseY    float32             // Y coordinate, relative to window
	IntegerX  int32               // The amount scrolled horizontally, accumulated to whole scroll "ticks" (added in 3.2.12)
	IntegerY  int32               // The amount scrolled vertically, accumulated to whole scroll "ticks" (added in 3.2.12)
	// contains filtered or unexported fields
}

SDL_MouseWheelEvent - Mouse wheel event structure (event.wheel.*) (https://wiki.libsdl.org/SDL3/SDL_MouseWheelEvent)

type Mutex

type Mutex struct{}

SDL_Mutex - A means to serialize access to a resource between threads. (https://wiki.libsdl.org/SDL3/SDL_Mutex)

func (*Mutex) Destroy

func (mutex *Mutex) Destroy()

SDL_DestroyMutex - Destroy a mutex created with SDL_CreateMutex(). (https://wiki.libsdl.org/SDL3/SDL_DestroyMutex)

func (*Mutex) Lock

func (mutex *Mutex) Lock()

SDL_LockMutex - Lock the mutex. (https://wiki.libsdl.org/SDL3/SDL_LockMutex)

func (*Mutex) TryLock

func (mutex *Mutex) TryLock() bool

SDL_TryLockMutex - Try to lock a mutex without blocking. (https://wiki.libsdl.org/SDL3/SDL_TryLockMutex)

func (*Mutex) Unlock

func (mutex *Mutex) Unlock()

SDL_UnlockMutex - Unlock the mutex. (https://wiki.libsdl.org/SDL3/SDL_UnlockMutex)

type NSTimerCallback

type NSTimerCallback uintptr

SDL_NSTimerCallback - Function prototype for the nanosecond timer callback function. (https://wiki.libsdl.org/SDL3/SDL_NSTimerCallback)

type Palette

type Palette struct {
	// contains filtered or unexported fields
}

SDL_Palette - A set of indexed colors representing a palette. (https://wiki.libsdl.org/SDL3/SDL_Palette)

func CreatePalette

func CreatePalette(numColors int) (*Palette, error)

SDL_CreatePalette - Create a palette structure with the specified number of color entries. (https://wiki.libsdl.org/SDL3/SDL_CreatePalette)

func (*Palette) Destroy

func (palette *Palette) Destroy()

SDL_DestroyPalette - Free a palette created with SDL_CreatePalette(). (https://wiki.libsdl.org/SDL3/SDL_DestroyPalette)

func (*Palette) SetColors

func (palette *Palette) SetColors(colors []Color, firstcolor int32) error

SDL_SetPaletteColors - Set a range of colors in a palette. (https://wiki.libsdl.org/SDL3/SDL_SetPaletteColors)

type PathInfo

type PathInfo struct {
	Type       PathType // the path type
	Size       uint64   // the file size in bytes
	CreateTime Time     // the time when the path was created
	ModifyTime Time     // the last time the path was modified
	AccessTime Time     // the last time the path was read
}

SDL_PathInfo - Information about a path on the filesystem. (https://wiki.libsdl.org/SDL3/SDL_PathInfo)

type PathType

type PathType uint32

SDL_PathType - Types of filesystem entries. (https://wiki.libsdl.org/SDL3/SDL_PathType)

const (
	PATHTYPE_NONE      PathType = 0 // path does not exist
	PATHTYPE_FILE      PathType = 1 // a normal file
	PATHTYPE_DIRECTORY PathType = 2 // a directory
	PATHTYPE_OTHER     PathType = 3 // something completely different like a device node (not a symlink, those are always followed)
)

type PenAxis

type PenAxis uint32

SDL_PenAxis - Pen axis indices. (https://wiki.libsdl.org/SDL3/SDL_PenAxis)

const (
	PEN_AXIS_PRESSURE            PenAxis = 0 // Pen pressure.  Unidirectional: 0 to 1.0
	PEN_AXIS_XTILT               PenAxis = 1 // Pen horizontal tilt angle.  Bidirectional: -90.0 to 90.0 (left-to-right).
	PEN_AXIS_YTILT               PenAxis = 2 // Pen vertical tilt angle.  Bidirectional: -90.0 to 90.0 (top-to-down).
	PEN_AXIS_DISTANCE            PenAxis = 3 // Pen distance to drawing surface.  Unidirectional: 0.0 to 1.0
	PEN_AXIS_ROTATION            PenAxis = 4 // Pen barrel rotation.  Bidirectional: -180 to 179.9 (clockwise, 0 is facing up, -180.0 is facing down).
	PEN_AXIS_SLIDER              PenAxis = 5 // Pen finger wheel or slider (e.g., Airbrush Pen).  Unidirectional: 0 to 1.0
	PEN_AXIS_TANGENTIAL_PRESSURE PenAxis = 6 // Pressure from squeezing the pen ("barrel pressure").
	PEN_AXIS_COUNT               PenAxis = 7 // Total known pen axis types in this version of SDL. This number may grow in future releases!
)

type PenAxisEvent

type PenAxisEvent struct {
	Type EventType // SDL_EVENT_PEN_AXIS

	Timestamp uint64        // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID      // The window with pen focus, if any
	Which     PenID         // The pen instance id
	PenState  PenInputFlags // Complete pen input state at time of event
	X         float32       // X coordinate, relative to window
	Y         float32       // Y coordinate, relative to window
	Axis      PenAxis       // Axis that has changed
	Value     float32       // New value of axis
	// contains filtered or unexported fields
}

SDL_PenAxisEvent - Pressure-sensitive pen pressure / angle event structure (event.paxis.*) (https://wiki.libsdl.org/SDL3/SDL_PenAxisEvent)

type PenButtonEvent

type PenButtonEvent struct {
	Type EventType // SDL_EVENT_PEN_BUTTON_DOWN or SDL_EVENT_PEN_BUTTON_UP

	Timestamp uint64        // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID      // The window with mouse focus, if any
	Which     PenID         // The pen instance id
	PenState  PenInputFlags // Complete pen input state at time of event
	X         float32       // X coordinate, relative to window
	Y         float32       // Y coordinate, relative to window
	Button    uint8         // The pen button index (first button is 1).
	Down      bool          // true if the button is pressed
	// contains filtered or unexported fields
}

SDL_PenButtonEvent - Pressure-sensitive pen button event structure (event.pbutton.*) (https://wiki.libsdl.org/SDL3/SDL_PenButtonEvent)

type PenID

type PenID uint32

SDL_PenID - SDL pen instance IDs. (https://wiki.libsdl.org/SDL3/SDL_PenID)

type PenInputFlags

type PenInputFlags uint32

SDL_PenInputFlags - Pen input flags, as reported by various pen events' `pen_state` field. (https://wiki.libsdl.org/SDL3/SDL_PenInputFlags)

type PenMotionEvent

type PenMotionEvent struct {
	Type EventType // SDL_EVENT_PEN_MOTION

	Timestamp uint64        // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID      // The window with pen focus, if any
	Which     PenID         // The pen instance id
	PenState  PenInputFlags // Complete pen input state at time of event
	X         float32       // X coordinate, relative to window
	Y         float32       // Y coordinate, relative to window
	// contains filtered or unexported fields
}

SDL_PenMotionEvent - Pressure-sensitive pen motion event structure (event.pmotion.*) (https://wiki.libsdl.org/SDL3/SDL_PenMotionEvent)

type PenProximityEvent

type PenProximityEvent struct {
	Type EventType // SDL_EVENT_PEN_PROXIMITY_IN or SDL_EVENT_PEN_PROXIMITY_OUT

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID // The window with pen focus, if any
	Which     PenID    // The pen instance id
	// contains filtered or unexported fields
}

SDL_PenProximityEvent - Pressure-sensitive pen proximity event structure (event.pproximity.*) (https://wiki.libsdl.org/SDL3/SDL_PenProximityEvent)

type PenTouchEvent

type PenTouchEvent struct {
	Type EventType // SDL_EVENT_PEN_DOWN or SDL_EVENT_PEN_UP

	Timestamp uint64        // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID      // The window with pen focus, if any
	Which     PenID         // The pen instance id
	PenState  PenInputFlags // Complete pen input state at time of event
	X         float32       // X coordinate, relative to window
	Y         float32       // Y coordinate, relative to window
	Eraser    bool          // true if eraser end is used (not all pens support this).
	Down      bool          // true if the pen is touching or false if the pen is lifted off
	// contains filtered or unexported fields
}

SDL_PenTouchEvent - Pressure-sensitive pen touched event structure (event.ptouch.*) (https://wiki.libsdl.org/SDL3/SDL_PenTouchEvent)

type PinchFingerEvent

type PinchFingerEvent struct {
	Type EventType // ::SDL_EVENT_PINCH_BEGIN or ::SDL_EVENT_PINCH_UPDATE or ::SDL_EVENT_PINCH_END

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	Scale     float32  // The scale change since the last SDL_EVENT_PINCH_UPDATE. Scale < 1 is "zoom out". Scale > 1 is "zoom in".
	WindowID  WindowID // The window underneath the finger, if any
	// contains filtered or unexported fields
}

SDL_PinchFingerEvent - Pinch event structure (event.pinch.*) (https://wiki.libsdl.org/SDL3/SDL_PinchFingerEvent)

type PixelFormat

type PixelFormat uint32

SDL_PixelFormat - Pixel format. (https://wiki.libsdl.org/SDL3/SDL_PixelFormat)

const (
	PIXELFORMAT_UNKNOWN       PixelFormat = 0
	PIXELFORMAT_INDEX1LSB     PixelFormat = 286261504
	PIXELFORMAT_INDEX1MSB     PixelFormat = 287310080
	PIXELFORMAT_INDEX2LSB     PixelFormat = 470811136
	PIXELFORMAT_INDEX2MSB     PixelFormat = 471859712
	PIXELFORMAT_INDEX4LSB     PixelFormat = 303039488
	PIXELFORMAT_INDEX4MSB     PixelFormat = 304088064
	PIXELFORMAT_INDEX8        PixelFormat = 318769153
	PIXELFORMAT_RGB332        PixelFormat = 336660481
	PIXELFORMAT_XRGB4444      PixelFormat = 353504258
	PIXELFORMAT_XBGR4444      PixelFormat = 357698562
	PIXELFORMAT_XRGB1555      PixelFormat = 353570562
	PIXELFORMAT_XBGR1555      PixelFormat = 357764866
	PIXELFORMAT_ARGB4444      PixelFormat = 355602434
	PIXELFORMAT_RGBA4444      PixelFormat = 356651010
	PIXELFORMAT_ABGR4444      PixelFormat = 359796738
	PIXELFORMAT_BGRA4444      PixelFormat = 360845314
	PIXELFORMAT_ARGB1555      PixelFormat = 355667970
	PIXELFORMAT_RGBA5551      PixelFormat = 356782082
	PIXELFORMAT_ABGR1555      PixelFormat = 359862274
	PIXELFORMAT_BGRA5551      PixelFormat = 360976386
	PIXELFORMAT_RGB565        PixelFormat = 353701890
	PIXELFORMAT_BGR565        PixelFormat = 357896194
	PIXELFORMAT_RGB24         PixelFormat = 386930691
	PIXELFORMAT_BGR24         PixelFormat = 390076419
	PIXELFORMAT_XRGB8888      PixelFormat = 370546692
	PIXELFORMAT_RGBX8888      PixelFormat = 371595268
	PIXELFORMAT_XBGR8888      PixelFormat = 374740996
	PIXELFORMAT_BGRX8888      PixelFormat = 375789572
	PIXELFORMAT_ARGB8888      PixelFormat = 372645892
	PIXELFORMAT_RGBA8888      PixelFormat = 373694468
	PIXELFORMAT_ABGR8888      PixelFormat = 376840196
	PIXELFORMAT_BGRA8888      PixelFormat = 377888772
	PIXELFORMAT_XRGB2101010   PixelFormat = 370614276
	PIXELFORMAT_XBGR2101010   PixelFormat = 374808580
	PIXELFORMAT_ARGB2101010   PixelFormat = 372711428
	PIXELFORMAT_ABGR2101010   PixelFormat = 376905732
	PIXELFORMAT_RGB48         PixelFormat = 403714054
	PIXELFORMAT_BGR48         PixelFormat = 406859782
	PIXELFORMAT_RGBA64        PixelFormat = 404766728
	PIXELFORMAT_ARGB64        PixelFormat = 405815304
	PIXELFORMAT_BGRA64        PixelFormat = 407912456
	PIXELFORMAT_ABGR64        PixelFormat = 408961032
	PIXELFORMAT_RGB48_FLOAT   PixelFormat = 437268486
	PIXELFORMAT_BGR48_FLOAT   PixelFormat = 440414214
	PIXELFORMAT_RGBA64_FLOAT  PixelFormat = 438321160
	PIXELFORMAT_ARGB64_FLOAT  PixelFormat = 439369736
	PIXELFORMAT_BGRA64_FLOAT  PixelFormat = 441466888
	PIXELFORMAT_ABGR64_FLOAT  PixelFormat = 442515464
	PIXELFORMAT_RGB96_FLOAT   PixelFormat = 454057996
	PIXELFORMAT_BGR96_FLOAT   PixelFormat = 457203724
	PIXELFORMAT_RGBA128_FLOAT PixelFormat = 455114768
	PIXELFORMAT_ARGB128_FLOAT PixelFormat = 456163344
	PIXELFORMAT_BGRA128_FLOAT PixelFormat = 458260496
	PIXELFORMAT_ABGR128_FLOAT PixelFormat = 459309072
	PIXELFORMAT_YV12          PixelFormat = 842094169  // Planar mode: Y + V + U  (3 planes)
	PIXELFORMAT_IYUV          PixelFormat = 1448433993 // Planar mode: Y + U + V  (3 planes)
	PIXELFORMAT_YUY2          PixelFormat = 844715353  // Packed mode: Y0+U0+Y1+V0 (1 plane)
	PIXELFORMAT_UYVY          PixelFormat = 1498831189 // Packed mode: U0+Y0+V0+Y1 (1 plane)
	PIXELFORMAT_YVYU          PixelFormat = 1431918169 // Packed mode: Y0+V0+Y1+U0 (1 plane)
	PIXELFORMAT_NV12          PixelFormat = 842094158  // Planar mode: Y + U/V interleaved  (2 planes)
	PIXELFORMAT_NV21          PixelFormat = 825382478  // Planar mode: Y + V/U interleaved  (2 planes)
	PIXELFORMAT_P010          PixelFormat = 808530000  // Planar mode: Y + U/V interleaved  (2 planes)
	PIXELFORMAT_EXTERNAL_OES  PixelFormat = 542328143  // Android video texture format
	PIXELFORMAT_MJPG          PixelFormat = 1196444237 // Motion JPEG
	PIXELFORMAT_RGBA32        PixelFormat = 376840196
	PIXELFORMAT_ARGB32        PixelFormat = 377888772
	PIXELFORMAT_BGRA32        PixelFormat = 372645892
	PIXELFORMAT_ABGR32        PixelFormat = 373694468
	PIXELFORMAT_RGBX32        PixelFormat = 374740996
	PIXELFORMAT_XRGB32        PixelFormat = 375789572
	PIXELFORMAT_BGRX32        PixelFormat = 370546692
	PIXELFORMAT_XBGR32        PixelFormat = 371595268
)

func GetPixelFormatForMasks

func GetPixelFormatForMasks(bpp int, rmask, gmask, bmask, amask uint32) PixelFormat

SDL_GetPixelFormatForMasks - Convert a bpp value and RGBA masks to an enumerated pixel format. (https://wiki.libsdl.org/SDL3/SDL_GetPixelFormatForMasks)

func (PixelFormat) Details

func (format PixelFormat) Details() (*PixelFormatDetails, error)

SDL_GetPixelFormatDetails - Create an SDL_PixelFormatDetails structure corresponding to a pixel format. (https://wiki.libsdl.org/SDL3/SDL_GetPixelFormatDetails)

func (PixelFormat) Masks

func (format PixelFormat) Masks(bpp *int32, Rmask *uint32, Gmask *uint32, Bmask *uint32, Amask *uint32) bool

SDL_GetMasksForPixelFormat - Convert one of the enumerated pixel formats to a bpp value and RGBA masks. (https://wiki.libsdl.org/SDL3/SDL_GetMasksForPixelFormat)

func (PixelFormat) Name

func (format PixelFormat) Name() string

SDL_GetPixelFormatName - Get the human readable name of a pixel format. (https://wiki.libsdl.org/SDL3/SDL_GetPixelFormatName)

type PixelFormatDetails

type PixelFormatDetails struct {
	Format        PixelFormat
	BitsPerPixel  uint8
	BytesPerPixel uint8

	Rmask  uint32
	Gmask  uint32
	Bmask  uint32
	Amask  uint32
	Rbits  uint8
	Gbits  uint8
	Bbits  uint8
	Abits  uint8
	Rshift uint8
	Gshift uint8
	Bshift uint8
	Ashift uint8
	// contains filtered or unexported fields
}

SDL_PixelFormatDetails - Details about the format of a pixel. (https://wiki.libsdl.org/SDL3/SDL_PixelFormatDetails)

func (*PixelFormatDetails) MapRGB

func (format *PixelFormatDetails) MapRGB(palette *Palette, r, g, b uint8) uint32

SDL_MapRGB - Map an RGB triple to an opaque pixel value for a given pixel format. (https://wiki.libsdl.org/SDL3/SDL_MapRGB)

func (*PixelFormatDetails) MapRGBA

func (format *PixelFormatDetails) MapRGBA(palette *Palette, r, g, b, a uint8) uint32

SDL_MapRGBA - Map an RGBA quadruple to a pixel value for a given pixel format. (https://wiki.libsdl.org/SDL3/SDL_MapRGBA)

type Point

type Point struct {
	X int32
	Y int32
}

SDL_Point - The structure that defines a point (using integers). (https://wiki.libsdl.org/SDL3/SDL_Point)

type Pointer

type Pointer = internal.Pointer

type PowerInfo

type PowerInfo struct {
	Seconds int32
	Percent int32
	State   PowerState
}

func GetPowerInfo

func GetPowerInfo() (PowerInfo, error)

SDL_GetPowerInfo - Get the current power supply details. (https://wiki.libsdl.org/SDL3/SDL_GetPowerInfo)

type PowerState

type PowerState uint32

SDL_PowerState - The basic state for the system's power supply. (https://wiki.libsdl.org/SDL3/SDL_PowerState)

const (
	POWERSTATE_ERROR      PowerState = 4294967295 // error determining power status
	POWERSTATE_UNKNOWN    PowerState = 0          // cannot determine power status
	POWERSTATE_ON_BATTERY PowerState = 1          // Not plugged in, running on the battery
	POWERSTATE_NO_BATTERY PowerState = 2          // Plugged in, no battery available
	POWERSTATE_CHARGING   PowerState = 3          // Plugged in, charging battery
	POWERSTATE_CHARGED    PowerState = 4          // Plugged in, battery charged
)

type Process

type Process struct{}

SDL_Process - An opaque handle representing a system process. (https://wiki.libsdl.org/SDL3/SDL_Process)

func CreateProcessWithProperties

func CreateProcessWithProperties(props PropertiesID) *Process

SDL_CreateProcessWithProperties - Create a new process with the specified properties. (https://wiki.libsdl.org/SDL3/SDL_CreateProcessWithProperties)

func (*Process) Destroy

func (process *Process) Destroy()

SDL_DestroyProcess - Destroy a previously created process object. (https://wiki.libsdl.org/SDL3/SDL_DestroyProcess)

func (*Process) Input

func (process *Process) Input() (*IOStream, error)

SDL_GetProcessInput - Get the SDL_IOStream associated with process standard input. (https://wiki.libsdl.org/SDL3/SDL_GetProcessInput)

func (*Process) Kill

func (process *Process) Kill(force bool) error

SDL_KillProcess - Stop a process. (https://wiki.libsdl.org/SDL3/SDL_KillProcess)

func (*Process) Output

func (process *Process) Output() (*IOStream, error)

SDL_GetProcessOutput - Get the SDL_IOStream associated with process standard output. (https://wiki.libsdl.org/SDL3/SDL_GetProcessOutput)

func (*Process) Properties

func (process *Process) Properties() (PropertiesID, error)

SDL_GetProcessProperties - Get the properties associated with a process. (https://wiki.libsdl.org/SDL3/SDL_GetProcessProperties)

func (*Process) Read

func (process *Process) Read() (*ProcessData, error)

SDL_ReadProcess - Read all the output from a process. (https://wiki.libsdl.org/SDL3/SDL_ReadProcess)

func (*Process) Wait

func (process *Process) Wait(block bool) (int32, bool)

SDL_WaitProcess - Wait for a process to finish. (https://wiki.libsdl.org/SDL3/SDL_WaitProcess)

type ProcessData

type ProcessData struct {
	ExitCode int32
	Data     []byte
}

type ProgressState

type ProgressState uint32

SDL_ProgressState - Window progress state (https://wiki.libsdl.org/SDL3/SDL_ProgressState)

const (
	PROGRESS_STATE_INVALID       ProgressState = 4294967295 // An invalid progress state indicating an error; check SDL_GetError()
	PROGRESS_STATE_NONE          ProgressState = 0          // No progress bar is shown
	PROGRESS_STATE_INDETERMINATE ProgressState = 1          // The progress bar is shown in a indeterminate state
	PROGRESS_STATE_NORMAL        ProgressState = 2          // The progress bar is shown in a normal state
	PROGRESS_STATE_PAUSED        ProgressState = 3          // The progress bar is shown in a paused state
	PROGRESS_STATE_ERROR         ProgressState = 4          // The progress bar is shown in a state indicating the application had an error
)

type PropertiesID

type PropertiesID uint32

SDL_PropertiesID - An ID that represents a properties set. (https://wiki.libsdl.org/SDL3/SDL_PropertiesID)

func CreateProperties

func CreateProperties() (PropertiesID, error)

SDL_CreateProperties - Create a group of properties. (https://wiki.libsdl.org/SDL3/SDL_CreateProperties)

func GetGlobalProperties

func GetGlobalProperties() (PropertiesID, error)

SDL_GetGlobalProperties - Get the global SDL properties. (https://wiki.libsdl.org/SDL3/SDL_GetGlobalProperties)

func NewProperties

func NewProperties(properties map[string]any) (PropertiesID, error)

NewProperties is a convenience function to create a new PropertiesID from the given map.

func (PropertiesID) BooleanProperty

func (props PropertiesID) BooleanProperty(name string, defaultValue bool) bool

SDL_GetBooleanProperty - Get a boolean property from a group of properties. (https://wiki.libsdl.org/SDL3/SDL_GetBooleanProperty)

func (PropertiesID) ClearProperty

func (props PropertiesID) ClearProperty(name string) error

SDL_ClearProperty - Clear a property from a group of properties. (https://wiki.libsdl.org/SDL3/SDL_ClearProperty)

func (PropertiesID) Destroy

func (props PropertiesID) Destroy()

SDL_DestroyProperties - Destroy a group of properties. (https://wiki.libsdl.org/SDL3/SDL_DestroyProperties)

func (PropertiesID) EnumerateProperties

func (props PropertiesID) EnumerateProperties(callback EnumeratePropertiesCallback) bool

SDL_EnumerateProperties - Enumerate the properties contained in a group of properties. (https://wiki.libsdl.org/SDL3/SDL_EnumerateProperties)

func (PropertiesID) FloatProperty

func (props PropertiesID) FloatProperty(name string, defaultValue float32) float32

SDL_GetFloatProperty - Get a floating point property from a group of properties. (https://wiki.libsdl.org/SDL3/SDL_GetFloatProperty)

func (PropertiesID) GPUSupport

func (props PropertiesID) GPUSupport() bool

SDL_GPUSupportsProperties - Checks for GPU runtime support. (https://wiki.libsdl.org/SDL3/SDL_GPUSupportsProperties)

func (PropertiesID) HasProperty

func (props PropertiesID) HasProperty(name string) bool

SDL_HasProperty - Return whether a property exists in a group of properties. (https://wiki.libsdl.org/SDL3/SDL_HasProperty)

func (PropertiesID) Lock

func (props PropertiesID) Lock() error

SDL_LockProperties - Lock a group of properties. (https://wiki.libsdl.org/SDL3/SDL_LockProperties)

func (PropertiesID) NumberProperty

func (props PropertiesID) NumberProperty(name string, defaultValue int64) int64

SDL_GetNumberProperty - Get a number property from a group of properties. (https://wiki.libsdl.org/SDL3/SDL_GetNumberProperty)

func (PropertiesID) PointerProperty

func (props PropertiesID) PointerProperty(name string, default_value *byte) *byte

SDL_GetPointerProperty - Get a pointer property from a group of properties. (https://wiki.libsdl.org/SDL3/SDL_GetPointerProperty)

func (PropertiesID) PropertyType

func (props PropertiesID) PropertyType(name string) PropertyType

SDL_GetPropertyType - Get the type of a property in a group of properties. (https://wiki.libsdl.org/SDL3/SDL_GetPropertyType)

func (PropertiesID) SetBooleanProperty

func (props PropertiesID) SetBooleanProperty(name string, value bool) error

SDL_SetBooleanProperty - Set a boolean property in a group of properties. (https://wiki.libsdl.org/SDL3/SDL_SetBooleanProperty)

func (PropertiesID) SetFloatProperty

func (props PropertiesID) SetFloatProperty(name string, value float32) error

SDL_SetFloatProperty - Set a floating point property in a group of properties. (https://wiki.libsdl.org/SDL3/SDL_SetFloatProperty)

func (PropertiesID) SetNumberProperty

func (props PropertiesID) SetNumberProperty(name string, value int64) error

SDL_SetNumberProperty - Set an integer property in a group of properties. (https://wiki.libsdl.org/SDL3/SDL_SetNumberProperty)

func (PropertiesID) SetPointerProperty

func (props PropertiesID) SetPointerProperty(name string, value *byte) bool

SDL_SetPointerProperty - Set a pointer property in a group of properties. (https://wiki.libsdl.org/SDL3/SDL_SetPointerProperty)

func (PropertiesID) SetPointerPropertyWithCleanup

func (props PropertiesID) SetPointerPropertyWithCleanup(name string, value *byte, cleanup CleanupPropertyCallback, userdata *byte) bool

SDL_SetPointerPropertyWithCleanup - Set a pointer property in a group of properties with a cleanup function that is called when the property is deleted. (https://wiki.libsdl.org/SDL3/SDL_SetPointerPropertyWithCleanup)

func (PropertiesID) SetStringProperty

func (props PropertiesID) SetStringProperty(name, value string) error

SDL_SetStringProperty - Set a string property in a group of properties. (https://wiki.libsdl.org/SDL3/SDL_SetStringProperty)

func (PropertiesID) StringProperty

func (props PropertiesID) StringProperty(name, defaultValue string) string

SDL_GetStringProperty - Get a string property from a group of properties. (https://wiki.libsdl.org/SDL3/SDL_GetStringProperty)

func (PropertiesID) Unlock

func (props PropertiesID) Unlock()

SDL_UnlockProperties - Unlock a group of properties. (https://wiki.libsdl.org/SDL3/SDL_UnlockProperties)

type PropertyType

type PropertyType uint32

SDL_PropertyType - SDL property type (https://wiki.libsdl.org/SDL3/SDL_PropertyType)

const (
	PROPERTY_TYPE_INVALID PropertyType = 0
	PROPERTY_TYPE_POINTER PropertyType = 1
	PROPERTY_TYPE_STRING  PropertyType = 2
	PROPERTY_TYPE_NUMBER  PropertyType = 3
	PROPERTY_TYPE_FLOAT   PropertyType = 4
	PROPERTY_TYPE_BOOLEAN PropertyType = 5
)

type QuitEvent

type QuitEvent struct {
	Type EventType // SDL_EVENT_QUIT

	Timestamp uint64 // In nanoseconds, populated using SDL_GetTicksNS()
	// contains filtered or unexported fields
}

SDL_QuitEvent - The "quit requested" event (https://wiki.libsdl.org/SDL3/SDL_QuitEvent)

type RWLock

type RWLock struct{}

SDL_RWLock - A mutex that allows read-only threads to run in parallel. (https://wiki.libsdl.org/SDL3/SDL_RWLock)

func (*RWLock) Destroy

func (rwlock *RWLock) Destroy()

SDL_DestroyRWLock - Destroy a read/write lock created with SDL_CreateRWLock(). (https://wiki.libsdl.org/SDL3/SDL_DestroyRWLock)

func (*RWLock) LockForReading

func (rwlock *RWLock) LockForReading()

SDL_LockRWLockForReading - Lock the read/write lock for _read only_ operations. (https://wiki.libsdl.org/SDL3/SDL_LockRWLockForReading)

func (*RWLock) LockForWriting

func (rwlock *RWLock) LockForWriting()

SDL_LockRWLockForWriting - Lock the read/write lock for _write_ operations. (https://wiki.libsdl.org/SDL3/SDL_LockRWLockForWriting)

func (*RWLock) TryLockForReading

func (rwlock *RWLock) TryLockForReading() bool

SDL_TryLockRWLockForReading - Try to lock a read/write lock _for reading_ without blocking. (https://wiki.libsdl.org/SDL3/SDL_TryLockRWLockForReading)

func (*RWLock) TryLockForWriting

func (rwlock *RWLock) TryLockForWriting() bool

SDL_TryLockRWLockForWriting - Try to lock a read/write lock _for writing_ without blocking. (https://wiki.libsdl.org/SDL3/SDL_TryLockRWLockForWriting)

func (*RWLock) Unlock

func (rwlock *RWLock) Unlock()

SDL_UnlockRWLock - Unlock the read/write lock. (https://wiki.libsdl.org/SDL3/SDL_UnlockRWLock)

type Rect

type Rect struct {
	X int32
	Y int32
	W int32
	H int32
}

SDL_Rect - A rectangle, with the origin at the upper left (using integers). (https://wiki.libsdl.org/SDL3/SDL_Rect)

func GetRectEnclosingPoints

func GetRectEnclosingPoints(points []Point, clip *Rect) (*Rect, bool)

SDL_GetRectEnclosingPoints - Calculate a minimal rectangle enclosing a set of points. (https://wiki.libsdl.org/SDL3/SDL_GetRectEnclosingPoints)

func (*Rect) HasIntersection

func (a *Rect) HasIntersection(b *Rect) bool

SDL_HasRectIntersection - Determine whether two rectangles intersect. (https://wiki.libsdl.org/SDL3/SDL_HasRectIntersection)

func (*Rect) Intersection

func (a *Rect) Intersection(b *Rect) *Rect

SDL_GetRectIntersection - Calculate the intersection of two rectangles. (https://wiki.libsdl.org/SDL3/SDL_GetRectIntersection)

func (*Rect) Union

func (a *Rect) Union(b *Rect) (*Rect, error)

SDL_GetRectUnion - Calculate the union of two rectangles. (https://wiki.libsdl.org/SDL3/SDL_GetRectUnion)

type RenderEvent

type RenderEvent struct {
	Type EventType // SDL_EVENT_RENDER_TARGETS_RESET, SDL_EVENT_RENDER_DEVICE_RESET, SDL_EVENT_RENDER_DEVICE_LOST

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID // The window containing the renderer in question.
	// contains filtered or unexported fields
}

SDL_RenderEvent - Renderer event structure (event.render.*) (https://wiki.libsdl.org/SDL3/SDL_RenderEvent)

type Renderer

type Renderer struct{}

SDL_Renderer - A structure representing rendering state (https://wiki.libsdl.org/SDL3/SDL_Renderer)

func CreateRendererWithProperties

func CreateRendererWithProperties(props PropertiesID) (*Renderer, error)

SDL_CreateRendererWithProperties - Create a 2D rendering context for a window, with the specified properties. (https://wiki.libsdl.org/SDL3/SDL_CreateRendererWithProperties)

func (*Renderer) AddVulkanRenderSemaphores

func (renderer *Renderer) AddVulkanRenderSemaphores(waitStageMask uint32, waitSemaphore, signalSemaphore int64) error

SDL_AddVulkanRenderSemaphores - Add a set of synchronization semaphores for the current frame. (https://wiki.libsdl.org/SDL3/SDL_AddVulkanRenderSemaphores)

func (*Renderer) Clear

func (renderer *Renderer) Clear() error

SDL_RenderClear - Clear the current rendering target with the drawing color. (https://wiki.libsdl.org/SDL3/SDL_RenderClear)

func (*Renderer) ClipEnabled

func (renderer *Renderer) ClipEnabled() error

SDL_RenderClipEnabled - Get whether clipping is enabled on the given renderer. (https://wiki.libsdl.org/SDL3/SDL_RenderClipEnabled)

func (*Renderer) ClipRect

func (renderer *Renderer) ClipRect() (Rect, error)

SDL_GetRenderClipRect - Get the clip rectangle for the current target. (https://wiki.libsdl.org/SDL3/SDL_GetRenderClipRect)

func (*Renderer) ColorScale

func (renderer *Renderer) ColorScale() (float32, error)

SDL_GetRenderColorScale - Get the color scale used for render operations. (https://wiki.libsdl.org/SDL3/SDL_GetRenderColorScale)

func (*Renderer) ConvertEventToRenderCoordinates

func (renderer *Renderer) ConvertEventToRenderCoordinates(event *Event) error

SDL_ConvertEventToRenderCoordinates - Convert the coordinates in an event to render coordinates. (https://wiki.libsdl.org/SDL3/SDL_ConvertEventToRenderCoordinates)

func (*Renderer) CreateGPURenderState

func (renderer *Renderer) CreateGPURenderState(info *GPURenderStateCreateInfo) (*GPURenderState, error)

SDL_CreateGPURenderState - Create custom GPU render state. (https://wiki.libsdl.org/SDL3/SDL_CreateGPURenderState)

func (*Renderer) CreateTexture

func (renderer *Renderer) CreateTexture(format PixelFormat, access TextureAccess, w, h int) (*Texture, error)

SDL_CreateTexture - Create a texture for a rendering context. (https://wiki.libsdl.org/SDL3/SDL_CreateTexture)

func (*Renderer) CreateTextureFromSurface

func (renderer *Renderer) CreateTextureFromSurface(surface *Surface) (*Texture, error)

SDL_CreateTextureFromSurface - Create a texture from an existing surface. (https://wiki.libsdl.org/SDL3/SDL_CreateTextureFromSurface)

func (*Renderer) CreateTextureWithProperties

func (renderer *Renderer) CreateTextureWithProperties(props PropertiesID) (*Texture, error)

SDL_CreateTextureWithProperties - Create a texture for a rendering context with the specified properties. (https://wiki.libsdl.org/SDL3/SDL_CreateTextureWithProperties)

func (*Renderer) CurrentOutputSize

func (renderer *Renderer) CurrentOutputSize() (int32, int32, error)

SDL_GetCurrentRenderOutputSize - Get the current output size in pixels of a rendering context. (https://wiki.libsdl.org/SDL3/SDL_GetCurrentRenderOutputSize)

func (*Renderer) DebugText

func (renderer *Renderer) DebugText(x float32, y float32, str string) error

SDL_RenderDebugText - Draw debug text to an SDL_Renderer. (https://wiki.libsdl.org/SDL3/SDL_RenderDebugText)

func (*Renderer) DebugTextFormat

func (renderer *Renderer) DebugTextFormat(x float32, y float32, format string, values ...any) bool

SDL_RenderDebugTextFormat - Draw debug text to an SDL_Renderer. (https://wiki.libsdl.org/SDL3/SDL_RenderDebugTextFormat)

func (*Renderer) DefaultTextureScaleMode

func (renderer *Renderer) DefaultTextureScaleMode() (ScaleMode, error)

SDL_GetDefaultTextureScaleMode - Get default texture scale mode of the given renderer. (https://wiki.libsdl.org/SDL3/SDL_GetDefaultTextureScaleMode)

func (*Renderer) Destroy

func (renderer *Renderer) Destroy()

SDL_DestroyRenderer - Destroy the rendering context for a window and free all associated textures. (https://wiki.libsdl.org/SDL3/SDL_DestroyRenderer)

func (*Renderer) DrawBlendMode

func (renderer *Renderer) DrawBlendMode() (BlendMode, error)

SDL_GetRenderDrawBlendMode - Get the blend mode used for drawing operations. (https://wiki.libsdl.org/SDL3/SDL_GetRenderDrawBlendMode)

func (*Renderer) DrawColor

func (renderer *Renderer) DrawColor() (Color, error)

SDL_GetRenderDrawColor - Get the color used for drawing operations (Rect, Line and Clear). (https://wiki.libsdl.org/SDL3/SDL_GetRenderDrawColor)

func (*Renderer) DrawColorFloat

func (renderer *Renderer) DrawColorFloat() (FColor, error)

SDL_GetRenderDrawColorFloat - Get the color used for drawing operations (Rect, Line and Clear). (https://wiki.libsdl.org/SDL3/SDL_GetRenderDrawColorFloat)

func (*Renderer) Flush

func (renderer *Renderer) Flush() error

SDL_FlushRenderer - Force the rendering context to flush any pending commands and state. (https://wiki.libsdl.org/SDL3/SDL_FlushRenderer)

func (*Renderer) GPUDevice

func (renderer *Renderer) GPUDevice() (*GPUDevice, error)

SDL_GetGPURendererDevice - Return the GPU device used by a renderer. (https://wiki.libsdl.org/SDL3/SDL_GetGPURendererDevice)

func (*Renderer) LogicalPresentation

func (renderer *Renderer) LogicalPresentation() (int32, int32, RendererLogicalPresentation, error)

SDL_GetRenderLogicalPresentation - Get device independent resolution and presentation mode for rendering. (https://wiki.libsdl.org/SDL3/SDL_GetRenderLogicalPresentation)

func (*Renderer) LogicalPresentationRect

func (renderer *Renderer) LogicalPresentationRect() (*FRect, error)

SDL_GetRenderLogicalPresentationRect - Get the final presentation rectangle for rendering. (https://wiki.libsdl.org/SDL3/SDL_GetRenderLogicalPresentationRect)

func (*Renderer) Name

func (renderer *Renderer) Name() (string, error)

SDL_GetRendererName - Get the name of a renderer. (https://wiki.libsdl.org/SDL3/SDL_GetRendererName)

func (*Renderer) Present

func (renderer *Renderer) Present() error

SDL_RenderPresent - Update the screen with any rendering performed since the previous call. (https://wiki.libsdl.org/SDL3/SDL_RenderPresent)

func (*Renderer) Properties

func (renderer *Renderer) Properties() PropertiesID

SDL_GetRendererProperties - Get the properties associated with a renderer. (https://wiki.libsdl.org/SDL3/SDL_GetRendererProperties)

func (*Renderer) ReadPixels

func (renderer *Renderer) ReadPixels(rect *Rect) (*Surface, error)

SDL_RenderReadPixels - Read pixels from the current rendering target. (https://wiki.libsdl.org/SDL3/SDL_RenderReadPixels)

func (*Renderer) RenderCoordinatesFromWindow

func (renderer *Renderer) RenderCoordinatesFromWindow(windowX, windowY float32) (float32, float32, error)

SDL_RenderCoordinatesFromWindow - Get a point in render coordinates when given a point in window coordinates. (https://wiki.libsdl.org/SDL3/SDL_RenderCoordinatesFromWindow)

func (*Renderer) RenderCoordinatesToWindow

func (renderer *Renderer) RenderCoordinatesToWindow(x, y float32) (float32, float32, error)

SDL_RenderCoordinatesToWindow - Get a point in window coordinates when given a point in render coordinates. (https://wiki.libsdl.org/SDL3/SDL_RenderCoordinatesToWindow)

func (*Renderer) RenderFillRect

func (renderer *Renderer) RenderFillRect(rect *FRect) error

SDL_RenderFillRect - Fill a rectangle on the current rendering target with the drawing color at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderFillRect)

func (*Renderer) RenderFillRects

func (renderer *Renderer) RenderFillRects(rects []FRect) error

SDL_RenderFillRects - Fill some number of rectangles on the current rendering target with the drawing color at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderFillRects)

func (*Renderer) RenderGeometry

func (renderer *Renderer) RenderGeometry(texture *Texture, vertices []Vertex, indices []int32) error

SDL_RenderGeometry - 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). (https://wiki.libsdl.org/SDL3/SDL_RenderGeometry)

func (*Renderer) RenderGeometryRaw

func (renderer *Renderer) RenderGeometryRaw(texture *Texture, xy []float32, xyStride int32, color []FColor, colorStride int32, uv []float32, uvStride int32, indices []uint16) error

SDL_RenderGeometryRaw - 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). (https://wiki.libsdl.org/SDL3/SDL_RenderGeometryRaw)

func (*Renderer) RenderLine

func (renderer *Renderer) RenderLine(x1 float32, y1 float32, x2 float32, y2 float32) error

SDL_RenderLine - Draw a line on the current rendering target at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderLine)

func (*Renderer) RenderLines

func (renderer *Renderer) RenderLines(points []FPoint) error

SDL_RenderLines - Draw a series of connected lines on the current rendering target at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderLines)

func (*Renderer) RenderMetalCommandEncoder

func (renderer *Renderer) RenderMetalCommandEncoder() *byte

SDL_GetRenderMetalCommandEncoder - Get the Metal command encoder for the current frame. (https://wiki.libsdl.org/SDL3/SDL_GetRenderMetalCommandEncoder)

func (*Renderer) RenderMetalLayer

func (renderer *Renderer) RenderMetalLayer() *byte

SDL_GetRenderMetalLayer - Get the CAMetalLayer associated with the given Metal renderer. (https://wiki.libsdl.org/SDL3/SDL_GetRenderMetalLayer)

func (*Renderer) RenderOutputSize

func (renderer *Renderer) RenderOutputSize() (int32, int32, error)

SDL_GetRenderOutputSize - Get the output size in pixels of a rendering context. (https://wiki.libsdl.org/SDL3/SDL_GetRenderOutputSize)

func (*Renderer) RenderPoint

func (renderer *Renderer) RenderPoint(x, y float32) error

SDL_RenderPoint - Draw a point on the current rendering target at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderPoint)

func (*Renderer) RenderPoints

func (renderer *Renderer) RenderPoints(points []FPoint) error

SDL_RenderPoints - Draw multiple points on the current rendering target at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderPoints)

func (*Renderer) RenderRect

func (renderer *Renderer) RenderRect(rect *FRect) error

SDL_RenderRect - Draw a rectangle on the current rendering target at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderRect)

func (*Renderer) RenderRects

func (renderer *Renderer) RenderRects(rects []FRect) error

SDL_RenderRects - Draw some number of rectangles on the current rendering target at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderRects)

func (*Renderer) RenderTarget

func (renderer *Renderer) RenderTarget() *Texture

SDL_GetRenderTarget - Get the current render target. (https://wiki.libsdl.org/SDL3/SDL_GetRenderTarget)

func (*Renderer) RenderTexture

func (renderer *Renderer) RenderTexture(texture *Texture, srcrect *FRect, dstrect *FRect) error

SDL_RenderTexture - Copy a portion of the texture to the current rendering target at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderTexture)

func (*Renderer) RenderTexture9Grid

func (renderer *Renderer) RenderTexture9Grid(texture *Texture, srcrect *FRect, leftWidth, rightWidth, topHeight, bottomHeight, scale float32, dstrect *FRect) error

SDL_RenderTexture9Grid - Perform a scaled copy using the 9-grid algorithm to the current rendering target at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderTexture9Grid)

func (*Renderer) RenderTextureAffine

func (renderer *Renderer) RenderTextureAffine(texture *Texture, srcrect *FRect, origin, right, down *FPoint) error

SDL_RenderTextureAffine - Copy a portion of the source texture to the current rendering target, with affine transform, at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderTextureAffine)

func (*Renderer) RenderTextureRotated

func (renderer *Renderer) RenderTextureRotated(texture *Texture, srcrect *FRect, dstrect *FRect, angle float64, center *FPoint, flip FlipMode) error

SDL_RenderTextureRotated - Copy a portion of the source texture to the current rendering target, with rotation and flipping, at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderTextureRotated)

func (*Renderer) RenderTextureTiled

func (renderer *Renderer) RenderTextureTiled(texture *Texture, srcrect *FRect, scale float32, dstrect *FRect) error

SDL_RenderTextureTiled - Tile a portion of the texture to the current rendering target at subpixel precision. (https://wiki.libsdl.org/SDL3/SDL_RenderTextureTiled)

func (*Renderer) SafeArea

func (renderer *Renderer) SafeArea() (Rect, error)

SDL_GetRenderSafeArea - Get the safe area for rendering within the current viewport. (https://wiki.libsdl.org/SDL3/SDL_GetRenderSafeArea)

func (*Renderer) Scale

func (renderer *Renderer) Scale() (float32, float32, error)

SDL_GetRenderScale - Get the drawing scale for the current target. (https://wiki.libsdl.org/SDL3/SDL_GetRenderScale)

func (*Renderer) SetClipRect

func (renderer *Renderer) SetClipRect(rect *Rect) error

SDL_SetRenderClipRect - Set the clip rectangle for rendering on the specified target. (https://wiki.libsdl.org/SDL3/SDL_SetRenderClipRect)

func (*Renderer) SetColorScale

func (renderer *Renderer) SetColorScale(scale float32) error

SDL_SetRenderColorScale - Set the color scale used for render operations. (https://wiki.libsdl.org/SDL3/SDL_SetRenderColorScale)

func (*Renderer) SetDefaultTextureScaleMode

func (renderer *Renderer) SetDefaultTextureScaleMode(mode ScaleMode) error

SDL_SetDefaultTextureScaleMode - Set default scale mode for new textures for given renderer. (https://wiki.libsdl.org/SDL3/SDL_SetDefaultTextureScaleMode)

func (*Renderer) SetDrawBlendMode

func (renderer *Renderer) SetDrawBlendMode(blendMode BlendMode) error

SDL_SetRenderDrawBlendMode - Set the blend mode used for drawing operations (Fill and Line). (https://wiki.libsdl.org/SDL3/SDL_SetRenderDrawBlendMode)

func (*Renderer) SetDrawColor

func (renderer *Renderer) SetDrawColor(r, g, b, a uint8) error

SDL_SetRenderDrawColor - Set the color used for drawing operations. (https://wiki.libsdl.org/SDL3/SDL_SetRenderDrawColor)

func (*Renderer) SetDrawColorFloat

func (renderer *Renderer) SetDrawColorFloat(r, g, b, a float32) error

SDL_SetRenderDrawColorFloat - Set the color used for drawing operations (Rect, Line and Clear). (https://wiki.libsdl.org/SDL3/SDL_SetRenderDrawColorFloat)

func (*Renderer) SetGPURenderState

func (renderer *Renderer) SetGPURenderState(state *GPURenderState) error

SDL_SetGPURenderState - Set custom GPU render state. (https://wiki.libsdl.org/SDL3/SDL_SetGPURenderState)

func (*Renderer) SetLogicalPresentation

func (renderer *Renderer) SetLogicalPresentation(w int32, h int32, mode RendererLogicalPresentation) error

SDL_SetRenderLogicalPresentation - Set a device independent resolution and presentation mode for rendering. (https://wiki.libsdl.org/SDL3/SDL_SetRenderLogicalPresentation)

func (*Renderer) SetRenderTarget

func (renderer *Renderer) SetRenderTarget(texture *Texture) error

SDL_SetRenderTarget - Set a texture as the current rendering target. (https://wiki.libsdl.org/SDL3/SDL_SetRenderTarget)

func (*Renderer) SetScale

func (renderer *Renderer) SetScale(scaleX, scaleY float32) error

SDL_SetRenderScale - Set the drawing scale for rendering on the current target. (https://wiki.libsdl.org/SDL3/SDL_SetRenderScale)

func (*Renderer) SetTextureAddressMode

func (renderer *Renderer) SetTextureAddressMode(uMode, vMode TextureAddressMode) error

SDL_SetRenderTextureAddressMode - Set the texture addressing mode used in [SDL_RenderGeometry](SDL_RenderGeometry)(). (https://wiki.libsdl.org/SDL3/SDL_SetRenderTextureAddressMode)

func (*Renderer) SetVSync

func (renderer *Renderer) SetVSync(vsync int32) error

SDL_SetRenderVSync - Toggle VSync of the given renderer. (https://wiki.libsdl.org/SDL3/SDL_SetRenderVSync)

func (*Renderer) SetViewport

func (renderer *Renderer) SetViewport(rect *Rect) error

SDL_SetRenderViewport - Set the drawing area for rendering on the current target. (https://wiki.libsdl.org/SDL3/SDL_SetRenderViewport)

func (*Renderer) TextureAddressMode

func (renderer *Renderer) TextureAddressMode() (TextureAddressMode, TextureAddressMode, error)

SDL_GetRenderTextureAddressMode - Get the texture addressing mode used in [SDL_RenderGeometry](SDL_RenderGeometry)(). (https://wiki.libsdl.org/SDL3/SDL_GetRenderTextureAddressMode)

func (*Renderer) VSync

func (renderer *Renderer) VSync() (int32, error)

SDL_GetRenderVSync - Get VSync of the given renderer. (https://wiki.libsdl.org/SDL3/SDL_GetRenderVSync)

func (*Renderer) Viewport

func (renderer *Renderer) Viewport() (Rect, error)

SDL_GetRenderViewport - Get the drawing area for the current target. (https://wiki.libsdl.org/SDL3/SDL_GetRenderViewport)

func (*Renderer) ViewportSet

func (renderer *Renderer) ViewportSet() bool

SDL_RenderViewportSet - Return whether an explicit rectangle was set as the viewport. (https://wiki.libsdl.org/SDL3/SDL_RenderViewportSet)

func (*Renderer) Window

func (renderer *Renderer) Window() (*Window, error)

SDL_GetRenderWindow - Get the window associated with a renderer. (https://wiki.libsdl.org/SDL3/SDL_GetRenderWindow)

type RendererLogicalPresentation

type RendererLogicalPresentation uint32

SDL_RendererLogicalPresentation - How the logical size is mapped to the output. (https://wiki.libsdl.org/SDL3/SDL_RendererLogicalPresentation)

const (
	LOGICAL_PRESENTATION_DISABLED      RendererLogicalPresentation = 0 // There is no logical size in effect
	LOGICAL_PRESENTATION_STRETCH       RendererLogicalPresentation = 1 // The rendered content is stretched to the output resolution
	LOGICAL_PRESENTATION_LETTERBOX     RendererLogicalPresentation = 2 // The rendered content is fit to the largest dimension and the other dimension is letterboxed with the clear color
	LOGICAL_PRESENTATION_OVERSCAN      RendererLogicalPresentation = 3 // The rendered content is fit to the smallest dimension and the other dimension extends beyond the output bounds
	LOGICAL_PRESENTATION_INTEGER_SCALE RendererLogicalPresentation = 4 // The rendered content is scaled up by integer multiples to fit the output resolution
)

type Sandbox

type Sandbox uint32

SDL_Sandbox - Application sandbox environment. (https://wiki.libsdl.org/SDL3/SDL_Sandbox)

const (
	SANDBOX_NONE              Sandbox = 0
	SANDBOX_UNKNOWN_CONTAINER Sandbox = 1
	SANDBOX_FLATPAK           Sandbox = 2
	SANDBOX_SNAP              Sandbox = 3
	SANDBOX_MACOS             Sandbox = 4
)

type ScaleMode

type ScaleMode uint32

SDL_ScaleMode - The scaling mode. (https://wiki.libsdl.org/SDL3/SDL_ScaleMode)

const (
	SCALEMODE_INVALID  ScaleMode = 4294967295
	SCALEMODE_NEAREST  ScaleMode = 0 // nearest pixel sampling
	SCALEMODE_LINEAR   ScaleMode = 1 // linear filtering
	SCALEMODE_PIXELART ScaleMode = 2 // nearest pixel sampling with improved scaling for pixel art, available since SDL 3.4.0
)

type Scancode

type Scancode uint32

SDL_Scancode - The SDL keyboard scancode representation. (https://wiki.libsdl.org/SDL3/SDL_Scancode)

const (
	SCANCODE_UNKNOWN              Scancode = 0
	SCANCODE_A                    Scancode = 4
	SCANCODE_B                    Scancode = 5
	SCANCODE_C                    Scancode = 6
	SCANCODE_D                    Scancode = 7
	SCANCODE_E                    Scancode = 8
	SCANCODE_F                    Scancode = 9
	SCANCODE_G                    Scancode = 10
	SCANCODE_H                    Scancode = 11
	SCANCODE_I                    Scancode = 12
	SCANCODE_J                    Scancode = 13
	SCANCODE_K                    Scancode = 14
	SCANCODE_L                    Scancode = 15
	SCANCODE_M                    Scancode = 16
	SCANCODE_N                    Scancode = 17
	SCANCODE_O                    Scancode = 18
	SCANCODE_P                    Scancode = 19
	SCANCODE_Q                    Scancode = 20
	SCANCODE_R                    Scancode = 21
	SCANCODE_S                    Scancode = 22
	SCANCODE_T                    Scancode = 23
	SCANCODE_U                    Scancode = 24
	SCANCODE_V                    Scancode = 25
	SCANCODE_W                    Scancode = 26
	SCANCODE_X                    Scancode = 27
	SCANCODE_Y                    Scancode = 28
	SCANCODE_Z                    Scancode = 29
	SCANCODE_1                    Scancode = 30
	SCANCODE_2                    Scancode = 31
	SCANCODE_3                    Scancode = 32
	SCANCODE_4                    Scancode = 33
	SCANCODE_5                    Scancode = 34
	SCANCODE_6                    Scancode = 35
	SCANCODE_7                    Scancode = 36
	SCANCODE_8                    Scancode = 37
	SCANCODE_9                    Scancode = 38
	SCANCODE_0                    Scancode = 39
	SCANCODE_RETURN               Scancode = 40
	SCANCODE_ESCAPE               Scancode = 41
	SCANCODE_BACKSPACE            Scancode = 42
	SCANCODE_TAB                  Scancode = 43
	SCANCODE_SPACE                Scancode = 44
	SCANCODE_MINUS                Scancode = 45
	SCANCODE_EQUALS               Scancode = 46
	SCANCODE_LEFTBRACKET          Scancode = 47
	SCANCODE_RIGHTBRACKET         Scancode = 48
	SCANCODE_BACKSLASH            Scancode = 49 // Located at the lower left of the return *   key on ISO keyboards and at the right end *   of the QWERTY row on ANSI keyboards. *   Produces REVERSE SOLIDUS (backslash) and *   VERTICAL LINE in a US layout, REVERSE *   SOLIDUS and VERTICAL LINE in a UK Mac *   layout, NUMBER SIGN and TILDE in a UK *   Windows layout, DOLLAR SIGN and POUND SIGN *   in a Swiss German layout, NUMBER SIGN and *   APOSTROPHE in a German layout, GRAVE *   ACCENT and POUND SIGN in a French Mac *   layout, and ASTERISK and MICRO SIGN in a *   French Windows layout.
	SCANCODE_NONUSHASH            Scancode = 50 // ISO USB keyboards actually use this code *   instead of 49 for the same key, but all *   OSes I've seen treat the two codes *   identically. So, as an implementer, unless *   your keyboard generates both of those *   codes and your OS treats them differently, *   you should generate SDL_SCANCODE_BACKSLASH *   instead of this code. As a user, you *   should not rely on this code because SDL *   will never generate it with most (all?) *   keyboards.
	SCANCODE_SEMICOLON            Scancode = 51
	SCANCODE_APOSTROPHE           Scancode = 52
	SCANCODE_GRAVE                Scancode = 53 // Located in the top left corner (on both ANSI *   and ISO keyboards). Produces GRAVE ACCENT and *   TILDE in a US Windows layout and in US and UK *   Mac layouts on ANSI keyboards, GRAVE ACCENT *   and NOT SIGN in a UK Windows layout, SECTION *   SIGN and PLUS-MINUS SIGN in US and UK Mac *   layouts on ISO keyboards, SECTION SIGN and *   DEGREE SIGN in a Swiss German layout (Mac: *   only on ISO keyboards), CIRCUMFLEX ACCENT and *   DEGREE SIGN in a German layout (Mac: only on *   ISO keyboards), SUPERSCRIPT TWO and TILDE in a *   French Windows layout, COMMERCIAL AT and *   NUMBER SIGN in a French Mac layout on ISO *   keyboards, and LESS-THAN SIGN and GREATER-THAN *   SIGN in a Swiss German, German, or French Mac *   layout on ANSI keyboards.
	SCANCODE_COMMA                Scancode = 54
	SCANCODE_PERIOD               Scancode = 55
	SCANCODE_SLASH                Scancode = 56
	SCANCODE_CAPSLOCK             Scancode = 57
	SCANCODE_F1                   Scancode = 58
	SCANCODE_F2                   Scancode = 59
	SCANCODE_F3                   Scancode = 60
	SCANCODE_F4                   Scancode = 61
	SCANCODE_F5                   Scancode = 62
	SCANCODE_F6                   Scancode = 63
	SCANCODE_F7                   Scancode = 64
	SCANCODE_F8                   Scancode = 65
	SCANCODE_F9                   Scancode = 66
	SCANCODE_F10                  Scancode = 67
	SCANCODE_F11                  Scancode = 68
	SCANCODE_F12                  Scancode = 69
	SCANCODE_PRINTSCREEN          Scancode = 70
	SCANCODE_SCROLLLOCK           Scancode = 71
	SCANCODE_PAUSE                Scancode = 72
	SCANCODE_INSERT               Scancode = 73 // insert on PC, help on some Mac keyboards (but does send code 73, not 117)
	SCANCODE_HOME                 Scancode = 74
	SCANCODE_PAGEUP               Scancode = 75
	SCANCODE_DELETE               Scancode = 76
	SCANCODE_END                  Scancode = 77
	SCANCODE_PAGEDOWN             Scancode = 78
	SCANCODE_RIGHT                Scancode = 79
	SCANCODE_LEFT                 Scancode = 80
	SCANCODE_DOWN                 Scancode = 81
	SCANCODE_UP                   Scancode = 82
	SCANCODE_NUMLOCKCLEAR         Scancode = 83 // num lock on PC, clear on Mac keyboards
	SCANCODE_KP_DIVIDE            Scancode = 84
	SCANCODE_KP_MULTIPLY          Scancode = 85
	SCANCODE_KP_MINUS             Scancode = 86
	SCANCODE_KP_PLUS              Scancode = 87
	SCANCODE_KP_ENTER             Scancode = 88
	SCANCODE_KP_1                 Scancode = 89
	SCANCODE_KP_2                 Scancode = 90
	SCANCODE_KP_3                 Scancode = 91
	SCANCODE_KP_4                 Scancode = 92
	SCANCODE_KP_5                 Scancode = 93
	SCANCODE_KP_6                 Scancode = 94
	SCANCODE_KP_7                 Scancode = 95
	SCANCODE_KP_8                 Scancode = 96
	SCANCODE_KP_9                 Scancode = 97
	SCANCODE_KP_0                 Scancode = 98
	SCANCODE_KP_PERIOD            Scancode = 99
	SCANCODE_NONUSBACKSLASH       Scancode = 100 // This is the additional key that ISO *   keyboards have over ANSI ones, *   located between left shift and Z. *   Produces GRAVE ACCENT and TILDE in a *   US or UK Mac layout, REVERSE SOLIDUS *   (backslash) and VERTICAL LINE in a *   US or UK Windows layout, and *   LESS-THAN SIGN and GREATER-THAN SIGN *   in a Swiss German, German, or French *   layout.
	SCANCODE_APPLICATION          Scancode = 101 // windows contextual menu, compose
	SCANCODE_POWER                Scancode = 102 // The USB document says this is a status flag, *   not a physical key - but some Mac keyboards *   do have a power key.
	SCANCODE_KP_EQUALS            Scancode = 103
	SCANCODE_F13                  Scancode = 104
	SCANCODE_F14                  Scancode = 105
	SCANCODE_F15                  Scancode = 106
	SCANCODE_F16                  Scancode = 107
	SCANCODE_F17                  Scancode = 108
	SCANCODE_F18                  Scancode = 109
	SCANCODE_F19                  Scancode = 110
	SCANCODE_F20                  Scancode = 111
	SCANCODE_F21                  Scancode = 112
	SCANCODE_F22                  Scancode = 113
	SCANCODE_F23                  Scancode = 114
	SCANCODE_F24                  Scancode = 115
	SCANCODE_EXECUTE              Scancode = 116
	SCANCODE_HELP                 Scancode = 117 // AL Integrated Help Center
	SCANCODE_MENU                 Scancode = 118 // Menu (show menu)
	SCANCODE_SELECT               Scancode = 119
	SCANCODE_STOP                 Scancode = 120 // AC Stop
	SCANCODE_AGAIN                Scancode = 121 // AC Redo/Repeat
	SCANCODE_UNDO                 Scancode = 122 // AC Undo
	SCANCODE_CUT                  Scancode = 123 // AC Cut
	SCANCODE_COPY                 Scancode = 124 // AC Copy
	SCANCODE_PASTE                Scancode = 125 // AC Paste
	SCANCODE_FIND                 Scancode = 126 // AC Find
	SCANCODE_MUTE                 Scancode = 127
	SCANCODE_VOLUMEUP             Scancode = 128
	SCANCODE_VOLUMEDOWN           Scancode = 129
	SCANCODE_KP_COMMA             Scancode = 133
	SCANCODE_KP_EQUALSAS400       Scancode = 134
	SCANCODE_INTERNATIONAL1       Scancode = 135 // used on Asian keyboards, see footnotes in USB doc
	SCANCODE_INTERNATIONAL2       Scancode = 136
	SCANCODE_INTERNATIONAL3       Scancode = 137 // Yen
	SCANCODE_INTERNATIONAL4       Scancode = 138
	SCANCODE_INTERNATIONAL5       Scancode = 139
	SCANCODE_INTERNATIONAL6       Scancode = 140
	SCANCODE_INTERNATIONAL7       Scancode = 141
	SCANCODE_INTERNATIONAL8       Scancode = 142
	SCANCODE_INTERNATIONAL9       Scancode = 143
	SCANCODE_LANG1                Scancode = 144 // Hangul/English toggle
	SCANCODE_LANG2                Scancode = 145 // Hanja conversion
	SCANCODE_LANG3                Scancode = 146 // Katakana
	SCANCODE_LANG4                Scancode = 147 // Hiragana
	SCANCODE_LANG5                Scancode = 148 // Zenkaku/Hankaku
	SCANCODE_LANG6                Scancode = 149 // reserved
	SCANCODE_LANG7                Scancode = 150 // reserved
	SCANCODE_LANG8                Scancode = 151 // reserved
	SCANCODE_LANG9                Scancode = 152 // reserved
	SCANCODE_ALTERASE             Scancode = 153 // Erase-Eaze
	SCANCODE_SYSREQ               Scancode = 154
	SCANCODE_CANCEL               Scancode = 155 // AC Cancel
	SCANCODE_CLEAR                Scancode = 156
	SCANCODE_PRIOR                Scancode = 157
	SCANCODE_RETURN2              Scancode = 158
	SCANCODE_SEPARATOR            Scancode = 159
	SCANCODE_OUT                  Scancode = 160
	SCANCODE_OPER                 Scancode = 161
	SCANCODE_CLEARAGAIN           Scancode = 162
	SCANCODE_CRSEL                Scancode = 163
	SCANCODE_EXSEL                Scancode = 164
	SCANCODE_KP_00                Scancode = 176
	SCANCODE_KP_000               Scancode = 177
	SCANCODE_THOUSANDSSEPARATOR   Scancode = 178
	SCANCODE_DECIMALSEPARATOR     Scancode = 179
	SCANCODE_CURRENCYUNIT         Scancode = 180
	SCANCODE_CURRENCYSUBUNIT      Scancode = 181
	SCANCODE_KP_LEFTPAREN         Scancode = 182
	SCANCODE_KP_RIGHTPAREN        Scancode = 183
	SCANCODE_KP_LEFTBRACE         Scancode = 184
	SCANCODE_KP_RIGHTBRACE        Scancode = 185
	SCANCODE_KP_TAB               Scancode = 186
	SCANCODE_KP_BACKSPACE         Scancode = 187
	SCANCODE_KP_A                 Scancode = 188
	SCANCODE_KP_B                 Scancode = 189
	SCANCODE_KP_C                 Scancode = 190
	SCANCODE_KP_D                 Scancode = 191
	SCANCODE_KP_E                 Scancode = 192
	SCANCODE_KP_F                 Scancode = 193
	SCANCODE_KP_XOR               Scancode = 194
	SCANCODE_KP_POWER             Scancode = 195
	SCANCODE_KP_PERCENT           Scancode = 196
	SCANCODE_KP_LESS              Scancode = 197
	SCANCODE_KP_GREATER           Scancode = 198
	SCANCODE_KP_AMPERSAND         Scancode = 199
	SCANCODE_KP_DBLAMPERSAND      Scancode = 200
	SCANCODE_KP_VERTICALBAR       Scancode = 201
	SCANCODE_KP_DBLVERTICALBAR    Scancode = 202
	SCANCODE_KP_COLON             Scancode = 203
	SCANCODE_KP_HASH              Scancode = 204
	SCANCODE_KP_SPACE             Scancode = 205
	SCANCODE_KP_AT                Scancode = 206
	SCANCODE_KP_EXCLAM            Scancode = 207
	SCANCODE_KP_MEMSTORE          Scancode = 208
	SCANCODE_KP_MEMRECALL         Scancode = 209
	SCANCODE_KP_MEMCLEAR          Scancode = 210
	SCANCODE_KP_MEMADD            Scancode = 211
	SCANCODE_KP_MEMSUBTRACT       Scancode = 212
	SCANCODE_KP_MEMMULTIPLY       Scancode = 213
	SCANCODE_KP_MEMDIVIDE         Scancode = 214
	SCANCODE_KP_PLUSMINUS         Scancode = 215
	SCANCODE_KP_CLEAR             Scancode = 216
	SCANCODE_KP_CLEARENTRY        Scancode = 217
	SCANCODE_KP_BINARY            Scancode = 218
	SCANCODE_KP_OCTAL             Scancode = 219
	SCANCODE_KP_DECIMAL           Scancode = 220
	SCANCODE_KP_HEXADECIMAL       Scancode = 221
	SCANCODE_LCTRL                Scancode = 224
	SCANCODE_LSHIFT               Scancode = 225
	SCANCODE_LALT                 Scancode = 226 // alt, option
	SCANCODE_LGUI                 Scancode = 227 // windows, command (apple), meta
	SCANCODE_RCTRL                Scancode = 228
	SCANCODE_RSHIFT               Scancode = 229
	SCANCODE_RALT                 Scancode = 230 // alt gr, option
	SCANCODE_RGUI                 Scancode = 231 // windows, command (apple), meta
	SCANCODE_MODE                 Scancode = 257 // I'm not sure if this is really not covered *   by any of the above, but since there's a *   special SDL_KMOD_MODE for it I'm adding it here
	SCANCODE_SLEEP                Scancode = 258 // Sleep
	SCANCODE_WAKE                 Scancode = 259 // Wake
	SCANCODE_CHANNEL_INCREMENT    Scancode = 260 // Channel Increment
	SCANCODE_CHANNEL_DECREMENT    Scancode = 261 // Channel Decrement
	SCANCODE_MEDIA_PLAY           Scancode = 262 // Play
	SCANCODE_MEDIA_PAUSE          Scancode = 263 // Pause
	SCANCODE_MEDIA_RECORD         Scancode = 264 // Record
	SCANCODE_MEDIA_FAST_FORWARD   Scancode = 265 // Fast Forward
	SCANCODE_MEDIA_REWIND         Scancode = 266 // Rewind
	SCANCODE_MEDIA_NEXT_TRACK     Scancode = 267 // Next Track
	SCANCODE_MEDIA_PREVIOUS_TRACK Scancode = 268 // Previous Track
	SCANCODE_MEDIA_STOP           Scancode = 269 // Stop
	SCANCODE_MEDIA_EJECT          Scancode = 270 // Eject
	SCANCODE_MEDIA_PLAY_PAUSE     Scancode = 271 // Play / Pause
	SCANCODE_MEDIA_SELECT         Scancode = 272
	SCANCODE_AC_NEW               Scancode = 273 // AC New
	SCANCODE_AC_OPEN              Scancode = 274 // AC Open
	SCANCODE_AC_CLOSE             Scancode = 275 // AC Close
	SCANCODE_AC_EXIT              Scancode = 276 // AC Exit
	SCANCODE_AC_SAVE              Scancode = 277 // AC Save
	SCANCODE_AC_PRINT             Scancode = 278 // AC Print
	SCANCODE_AC_PROPERTIES        Scancode = 279 // AC Properties
	SCANCODE_AC_SEARCH            Scancode = 280 // AC Search
	SCANCODE_AC_HOME              Scancode = 281 // AC Home
	SCANCODE_AC_BACK              Scancode = 282 // AC Back
	SCANCODE_AC_FORWARD           Scancode = 283 // AC Forward
	SCANCODE_AC_STOP              Scancode = 284 // AC Stop
	SCANCODE_AC_REFRESH           Scancode = 285 // AC Refresh
	SCANCODE_AC_BOOKMARKS         Scancode = 286 // AC Bookmarks
	SCANCODE_SOFTLEFT             Scancode = 287 // Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom left of the display.
	SCANCODE_SOFTRIGHT            Scancode = 288 // Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom right of the display.
	SCANCODE_CALL                 Scancode = 289 // Used for accepting phone calls.
	SCANCODE_ENDCALL              Scancode = 290 // Used for rejecting phone calls.
	SCANCODE_RESERVED             Scancode = 400 // 400-500 reserved for dynamic keycodes
	SCANCODE_COUNT                Scancode = 512 // not a key, just marks the number of scancodes for array bounds
)

func GetScancodeFromName

func GetScancodeFromName(name string) Scancode

SDL_GetScancodeFromName - Get a scancode from a human-readable name. (https://wiki.libsdl.org/SDL3/SDL_GetScancodeFromName)

func (Scancode) KeyFrom

func (scancode Scancode) KeyFrom(modstate Keymod, keyEvent bool) Keycode

SDL_GetKeyFromScancode - Get the key code corresponding to the given scancode according to the current keyboard layout. (https://wiki.libsdl.org/SDL3/SDL_GetKeyFromScancode)

func (Scancode) Name

func (scancode Scancode) Name() string

SDL_GetScancodeName - Get a human-readable name for a scancode. (https://wiki.libsdl.org/SDL3/SDL_GetScancodeName)

func (Scancode) SetName

func (scancode Scancode) SetName(name string) error

SDL_SetScancodeName - Set a human-readable name for a scancode. (https://wiki.libsdl.org/SDL3/SDL_SetScancodeName)

func (Scancode) ToKeycode

func (scancode Scancode) ToKeycode() Keycode

type Semaphore

type Semaphore struct{}

SDL_Semaphore - A means to manage access to a resource, by count, between threads. (https://wiki.libsdl.org/SDL3/SDL_Semaphore)

func (*Semaphore) Destroy

func (sem *Semaphore) Destroy()

SDL_DestroySemaphore - Destroy a semaphore. (https://wiki.libsdl.org/SDL3/SDL_DestroySemaphore)

func (*Semaphore) Signal

func (sem *Semaphore) Signal()

SDL_SignalSemaphore - Atomically increment a semaphore's value and wake waiting threads. (https://wiki.libsdl.org/SDL3/SDL_SignalSemaphore)

func (*Semaphore) TryWait

func (sem *Semaphore) TryWait() bool

SDL_TryWaitSemaphore - See if a semaphore has a positive value and decrement it if it does. (https://wiki.libsdl.org/SDL3/SDL_TryWaitSemaphore)

func (*Semaphore) Value

func (sem *Semaphore) Value() uint32

SDL_GetSemaphoreValue - Get the current value of a semaphore. (https://wiki.libsdl.org/SDL3/SDL_GetSemaphoreValue)

func (*Semaphore) Wait

func (sem *Semaphore) Wait()

SDL_WaitSemaphore - Wait until a semaphore has a positive value and then decrements it. (https://wiki.libsdl.org/SDL3/SDL_WaitSemaphore)

func (*Semaphore) WaitTimeout

func (sem *Semaphore) WaitTimeout(timeoutMS int32) bool

SDL_WaitSemaphoreTimeout - Wait until a semaphore has a positive value and then decrements it. (https://wiki.libsdl.org/SDL3/SDL_WaitSemaphoreTimeout)

type Sensor

type Sensor struct{}

SDL_Sensor - The opaque structure used to identify an opened SDL sensor. (https://wiki.libsdl.org/SDL3/SDL_Sensor)

func (*Sensor) Close

func (sensor *Sensor) Close()

SDL_CloseSensor - Close a sensor previously opened with SDL_OpenSensor(). (https://wiki.libsdl.org/SDL3/SDL_CloseSensor)

func (*Sensor) Data

func (sensor *Sensor) Data(data []float32, numValues int32) error

SDL_GetSensorData - Get the current state of an opened sensor. (https://wiki.libsdl.org/SDL3/SDL_GetSensorData)

func (*Sensor) ID

func (sensor *Sensor) ID() (SensorID, error)

SDL_GetSensorID - Get the instance ID of a sensor. (https://wiki.libsdl.org/SDL3/SDL_GetSensorID)

func (*Sensor) Name

func (sensor *Sensor) Name() (string, error)

SDL_GetSensorName - Get the implementation dependent name of a sensor. (https://wiki.libsdl.org/SDL3/SDL_GetSensorName)

func (*Sensor) NonPortableType

func (sensor *Sensor) NonPortableType() int32

SDL_GetSensorNonPortableType - Get the platform dependent type of a sensor. (https://wiki.libsdl.org/SDL3/SDL_GetSensorNonPortableType)

func (*Sensor) Properties

func (sensor *Sensor) Properties() (PropertiesID, error)

SDL_GetSensorProperties - Get the properties associated with a sensor. (https://wiki.libsdl.org/SDL3/SDL_GetSensorProperties)

func (*Sensor) Type

func (sensor *Sensor) Type() SensorType

SDL_GetSensorType - Get the type of a sensor. (https://wiki.libsdl.org/SDL3/SDL_GetSensorType)

type SensorEvent

type SensorEvent struct {
	Type EventType // SDL_EVENT_SENSOR_UPDATE

	Timestamp       uint64     // In nanoseconds, populated using SDL_GetTicksNS()
	Which           SensorID   // The instance ID of the sensor
	Data            [6]float32 // Up to 6 values from the sensor - additional values can be queried using SDL_GetSensorData()
	SensorTimestamp uint64     // The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock
	// contains filtered or unexported fields
}

SDL_SensorEvent - Sensor event structure (event.sensor.*) (https://wiki.libsdl.org/SDL3/SDL_SensorEvent)

type SensorID

type SensorID uint32

SDL_SensorID - This is a unique ID for a sensor for the time it is connected to the system, and is never reused for the lifetime of the application. (https://wiki.libsdl.org/SDL3/SDL_SensorID)

func GetSensors

func GetSensors() ([]SensorID, error)

SDL_GetSensors - Get a list of currently connected sensors. (https://wiki.libsdl.org/SDL3/SDL_GetSensors)

func (SensorID) OpenSensor

func (id SensorID) OpenSensor() (*Sensor, error)

SDL_OpenSensor - Open a sensor for use. (https://wiki.libsdl.org/SDL3/SDL_OpenSensor)

func (SensorID) Sensor

func (id SensorID) Sensor() (*Sensor, error)

SDL_GetSensorFromID - Return the SDL_Sensor associated with an instance ID. (https://wiki.libsdl.org/SDL3/SDL_GetSensorFromID)

func (SensorID) SensorName

func (id SensorID) SensorName() string

SDL_GetSensorNameForID - Get the implementation dependent name of a sensor. (https://wiki.libsdl.org/SDL3/SDL_GetSensorNameForID)

func (SensorID) SensorNonPortableType

func (id SensorID) SensorNonPortableType() int32

SDL_GetSensorNonPortableTypeForID - Get the platform dependent type of a sensor. (https://wiki.libsdl.org/SDL3/SDL_GetSensorNonPortableTypeForID)

func (SensorID) SensorType

func (id SensorID) SensorType() SensorType

SDL_GetSensorTypeForID - Get the type of a sensor. (https://wiki.libsdl.org/SDL3/SDL_GetSensorTypeForID)

type SensorType

type SensorType uint32

SDL_SensorType - The different sensors defined by SDL. (https://wiki.libsdl.org/SDL3/SDL_SensorType)

const (
	SENSOR_INVALID SensorType = 4294967295 // Returned for an invalid sensor
	SENSOR_UNKNOWN SensorType = 0          // Unknown sensor type
	SENSOR_ACCEL   SensorType = 1          // Accelerometer
	SENSOR_GYRO    SensorType = 2          // Gyroscope
	SENSOR_ACCEL_L SensorType = 3          // Accelerometer for left Joy-Con controller and Wii nunchuk
	SENSOR_GYRO_L  SensorType = 4          // Gyroscope for left Joy-Con controller
	SENSOR_ACCEL_R SensorType = 5          // Accelerometer for right Joy-Con controller
	SENSOR_GYRO_R  SensorType = 6          // Gyroscope for right Joy-Con controller
	SENSOR_COUNT   SensorType = 7
)

type SharedObject

type SharedObject struct{}

SDL_SharedObject - An opaque datatype that represents a loaded shared object. (https://wiki.libsdl.org/SDL3/SDL_SharedObject)

type SpinLock

type SpinLock int32

SDL_SpinLock - An atomic spinlock. (https://wiki.libsdl.org/SDL3/SDL_SpinLock)

func (*SpinLock) Lock

func (lock *SpinLock) Lock()

SDL_LockSpinlock - Lock a spin lock by setting it to a non-zero value. (https://wiki.libsdl.org/SDL3/SDL_LockSpinlock)

func (*SpinLock) TryLock

func (lock *SpinLock) TryLock() bool

SDL_TryLockSpinlock - Try to lock a spin lock by setting it to a non-zero value. (https://wiki.libsdl.org/SDL3/SDL_TryLockSpinlock)

func (*SpinLock) Unlock

func (lock *SpinLock) Unlock()

SDL_UnlockSpinlock - Unlock a spin lock by setting it to 0. (https://wiki.libsdl.org/SDL3/SDL_UnlockSpinlock)

type Storage

type Storage struct{}

SDL_Storage - An abstract interface for filesystem access. (https://wiki.libsdl.org/SDL3/SDL_Storage)

func (*Storage) Close

func (storage *Storage) Close() error

SDL_CloseStorage - Closes and frees a storage container. (https://wiki.libsdl.org/SDL3/SDL_CloseStorage)

func (*Storage) CopyFile

func (storage *Storage) CopyFile(oldpath, newpath string) error

SDL_CopyStorageFile - Copy a file in a writable storage container. (https://wiki.libsdl.org/SDL3/SDL_CopyStorageFile)

func (*Storage) CreateDirectory

func (storage *Storage) CreateDirectory(path string) error

SDL_CreateStorageDirectory - Create a directory in a writable storage container. (https://wiki.libsdl.org/SDL3/SDL_CreateStorageDirectory)

func (*Storage) EnumerateDirectory

func (storage *Storage) EnumerateDirectory(path string, callback EnumerateDirectoryCallback) error

SDL_EnumerateStorageDirectory - Enumerate a directory in a storage container through a callback function. (https://wiki.libsdl.org/SDL3/SDL_EnumerateStorageDirectory)

func (*Storage) FileSize

func (storage *Storage) FileSize(path string) (uint64, error)

SDL_GetStorageFileSize - Query the size of a file within a storage container. (https://wiki.libsdl.org/SDL3/SDL_GetStorageFileSize)

func (*Storage) GlobDirectory

func (storage *Storage) GlobDirectory(path string, pattern string, flags GlobFlags) ([]string, error)

SDL_GlobStorageDirectory - Enumerate a directory tree, filtered by pattern, and return a list. (https://wiki.libsdl.org/SDL3/SDL_GlobStorageDirectory)

func (*Storage) PathInfo

func (storage *Storage) PathInfo(path string) (*PathInfo, error)

SDL_GetStoragePathInfo - Get information about a filesystem path in a storage container. (https://wiki.libsdl.org/SDL3/SDL_GetStoragePathInfo)

func (*Storage) ReadFile

func (storage *Storage) ReadFile(path string, length uint64) ([]byte, error)

SDL_ReadStorageFile - Synchronously read a file from a storage container into a client-provided buffer. (https://wiki.libsdl.org/SDL3/SDL_ReadStorageFile)

func (*Storage) Ready

func (storage *Storage) Ready() bool

SDL_StorageReady - Checks if the storage container is ready to use. (https://wiki.libsdl.org/SDL3/SDL_StorageReady)

func (*Storage) RemovePath

func (storage *Storage) RemovePath(path string) error

SDL_RemoveStoragePath - Remove a file or an empty directory in a writable storage container. (https://wiki.libsdl.org/SDL3/SDL_RemoveStoragePath)

func (*Storage) RenamePath

func (storage *Storage) RenamePath(oldpath, newpath string) error

SDL_RenameStoragePath - Rename a file or directory in a writable storage container. (https://wiki.libsdl.org/SDL3/SDL_RenameStoragePath)

func (*Storage) SpaceRemaining

func (storage *Storage) SpaceRemaining() uint64

SDL_GetStorageSpaceRemaining - Queries the remaining space in a storage container. (https://wiki.libsdl.org/SDL3/SDL_GetStorageSpaceRemaining)

func (*Storage) WriteFile

func (storage *Storage) WriteFile(path string, source []byte) error

SDL_WriteStorageFile - Synchronously write a file from client memory into a storage container. (https://wiki.libsdl.org/SDL3/SDL_WriteStorageFile)

type StorageInterface

type StorageInterface struct {
	Version        uint32
	Close          Pointer
	Ready          Pointer
	Enumerate      Pointer
	Info           Pointer
	ReadFile       Pointer
	WriteFile      Pointer
	Mkdir          Pointer
	Remove         Pointer
	Rename         Pointer
	Copy           Pointer
	SpaceRemaining Pointer
}

SDL_StorageInterface - Function interface for [SDL_Storage](SDL_Storage). (https://wiki.libsdl.org/SDL3/SDL_StorageInterface)

func (*StorageInterface) OpenStorage

func (iface *StorageInterface) OpenStorage(userdata *byte) *Storage

SDL_OpenStorage - Opens up a container using a client-provided storage interface. (https://wiki.libsdl.org/SDL3/SDL_OpenStorage)

type Surface

type Surface struct {
	Flags  SurfaceFlags // The flags of the surface, read-only
	Format PixelFormat  // The format of the surface, read-only
	W      int32        // The width of the surface, read-only.
	H      int32        // The height of the surface, read-only.
	Pitch  int32        // The distance in bytes between rows of pixels, read-only

	Refcount int32 // Application reference count, used when freeing surface
	// contains filtered or unexported fields
}

SDL_Surface - A collection of pixels used in software blitting. (https://wiki.libsdl.org/SDL3/SDL_Surface)

func CreateSurface

func CreateSurface(width, height int, format PixelFormat) (*Surface, error)

SDL_CreateSurface - Allocate a new surface with a specific pixel format. (https://wiki.libsdl.org/SDL3/SDL_CreateSurface)

func CreateSurfaceFrom

func CreateSurfaceFrom(width, height int, format PixelFormat, pixels []byte, pitch int) (*Surface, error)

SDL_CreateSurfaceFrom - Allocate a new surface with a specific pixel format and existing pixel data. (https://wiki.libsdl.org/SDL3/SDL_CreateSurfaceFrom)

func LoadBMP

func LoadBMP(file string) (*Surface, error)

SDL_LoadBMP - Load a BMP image from a file. (https://wiki.libsdl.org/SDL3/SDL_LoadBMP)

func LoadBMP_IO

func LoadBMP_IO(src *IOStream, closeIO bool) (*Surface, error)

SDL_LoadBMP_IO - Load a BMP image from a seekable SDL data stream. (https://wiki.libsdl.org/SDL3/SDL_LoadBMP_IO)

func (*Surface) AddAlternateImage

func (surface *Surface) AddAlternateImage(image *Surface) error

SDL_AddSurfaceAlternateImage - Add an alternate version of a surface. (https://wiki.libsdl.org/SDL3/SDL_AddSurfaceAlternateImage)

func (*Surface) AlphaMod

func (surface *Surface) AlphaMod() (uint8, error)

SDL_GetSurfaceAlphaMod - Get the additional alpha value used in blit operations. (https://wiki.libsdl.org/SDL3/SDL_GetSurfaceAlphaMod)

func (*Surface) BlendMode

func (surface *Surface) BlendMode() (BlendMode, error)

SDL_GetSurfaceBlendMode - Get the blend mode used for blit operations. (https://wiki.libsdl.org/SDL3/SDL_GetSurfaceBlendMode)

func (*Surface) Blit

func (src *Surface) Blit(srcrect *Rect, dst *Surface, dstrect *Rect) error

SDL_BlitSurface - Performs a fast blit from the source surface to the destination surface with clipping. (https://wiki.libsdl.org/SDL3/SDL_BlitSurface)

func (*Surface) Blit9Grid

func (src *Surface) Blit9Grid(srcrect *Rect, leftWidth, rightWidth, topHeight, bottomHeight int32, scale float32, scaleMode ScaleMode, dst *Surface, dstrect *Rect) error

SDL_BlitSurface9Grid - Perform a scaled blit using the 9-grid algorithm to a destination surface, which may be of a different format. (https://wiki.libsdl.org/SDL3/SDL_BlitSurface9Grid)

func (*Surface) BlitScaled

func (src *Surface) BlitScaled(srcrect *Rect, dst *Surface, dstrect *Rect, scaleMode ScaleMode) error

SDL_BlitSurfaceScaled - Perform a scaled blit to a destination surface, which may be of a different format. (https://wiki.libsdl.org/SDL3/SDL_BlitSurfaceScaled)

func (*Surface) BlitTiled

func (src *Surface) BlitTiled(srcrect *Rect, dst *Surface, dstrect *Rect) error

SDL_BlitSurfaceTiled - Perform a tiled blit to a destination surface, which may be of a different format. (https://wiki.libsdl.org/SDL3/SDL_BlitSurfaceTiled)

func (*Surface) BlitTiledWithScale

func (src *Surface) BlitTiledWithScale(srcrect *Rect, scale float32, scaleMode ScaleMode, dst *Surface, dstrect *Rect) error

SDL_BlitSurfaceTiledWithScale - Perform a scaled and tiled blit to a destination surface, which may be of a different format. (https://wiki.libsdl.org/SDL3/SDL_BlitSurfaceTiledWithScale)

func (*Surface) BlitUnchecked

func (src *Surface) BlitUnchecked(srcrect *Rect, dst *Surface, dstrect *Rect) error

SDL_BlitSurfaceUnchecked - Perform low-level surface blitting only. (https://wiki.libsdl.org/SDL3/SDL_BlitSurfaceUnchecked)

func (*Surface) BlitUncheckedScaled

func (src *Surface) BlitUncheckedScaled(srcrect *Rect, dst *Surface, dstrect *Rect, scaleMode ScaleMode) error

SDL_BlitSurfaceUncheckedScaled - Perform low-level surface scaled blitting only. (https://wiki.libsdl.org/SDL3/SDL_BlitSurfaceUncheckedScaled)

func (*Surface) Clear

func (surface *Surface) Clear(r, g, b, a float32) error

SDL_ClearSurface - Clear a surface with a specific color, with floating point precision. (https://wiki.libsdl.org/SDL3/SDL_ClearSurface)

func (*Surface) ClipRect

func (surface *Surface) ClipRect() (*Rect, error)

SDL_GetSurfaceClipRect - Get the clipping rectangle for a surface. (https://wiki.libsdl.org/SDL3/SDL_GetSurfaceClipRect)

func (*Surface) ColorKey

func (surface *Surface) ColorKey() (uint32, error)

SDL_GetSurfaceColorKey - Get the color key (transparent pixel) for a surface. (https://wiki.libsdl.org/SDL3/SDL_GetSurfaceColorKey)

func (*Surface) ColorMod

func (surface *Surface) ColorMod() (uint8, uint8, uint8, error)

SDL_GetSurfaceColorMod - Get the additional color value multiplied into blit operations. (https://wiki.libsdl.org/SDL3/SDL_GetSurfaceColorMod)

func (*Surface) Colorspace

func (surface *Surface) Colorspace() Colorspace

SDL_GetSurfaceColorspace - Get the colorspace used by a surface. (https://wiki.libsdl.org/SDL3/SDL_GetSurfaceColorspace)

func (*Surface) Convert

func (surface *Surface) Convert(format PixelFormat) (*Surface, error)

SDL_ConvertSurface - Copy an existing surface to a new surface of the specified format. (https://wiki.libsdl.org/SDL3/SDL_ConvertSurface)

func (*Surface) ConvertWithColorspace

func (surface *Surface) ConvertWithColorspace(format PixelFormat, palette *Palette, colorspace Colorspace, props PropertiesID) (*Surface, error)

SDL_ConvertSurfaceAndColorspace - Copy an existing surface to a new surface of the specified format and colorspace. (https://wiki.libsdl.org/SDL3/SDL_ConvertSurfaceAndColorspace)

func (*Surface) CreateColorCursor

func (surface *Surface) CreateColorCursor(hotX, hotY int32) (*Cursor, error)

SDL_CreateColorCursor - Create a color cursor. (https://wiki.libsdl.org/SDL3/SDL_CreateColorCursor)

func (*Surface) CreatePalette

func (surface *Surface) CreatePalette() (*Palette, error)

SDL_CreateSurfacePalette - Create a palette and associate it with a surface. (https://wiki.libsdl.org/SDL3/SDL_CreateSurfacePalette)

func (*Surface) CreateSoftwareRenderer

func (surface *Surface) CreateSoftwareRenderer() (*Renderer, error)

SDL_CreateSoftwareRenderer - Create a 2D software rendering context for a surface. (https://wiki.libsdl.org/SDL3/SDL_CreateSoftwareRenderer)

func (*Surface) Destroy

func (surface *Surface) Destroy()

SDL_DestroySurface - Free a surface. (https://wiki.libsdl.org/SDL3/SDL_DestroySurface)

func (*Surface) Duplicate

func (surface *Surface) Duplicate() (*Surface, error)

SDL_DuplicateSurface - Creates a new surface identical to the existing surface. (https://wiki.libsdl.org/SDL3/SDL_DuplicateSurface)

func (*Surface) FillRect

func (dst *Surface) FillRect(rect *Rect, color uint32) error

SDL_FillSurfaceRect - Perform a fast fill of a rectangle with a specific color. (https://wiki.libsdl.org/SDL3/SDL_FillSurfaceRect)

func (*Surface) FillRects

func (dst *Surface) FillRects(rects []Rect, color uint32) error

SDL_FillSurfaceRects - Perform a fast fill of a set of rectangles with a specific color. (https://wiki.libsdl.org/SDL3/SDL_FillSurfaceRects)

func (*Surface) Flip

func (surface *Surface) Flip(flip FlipMode) error

SDL_FlipSurface - Flip a surface vertically or horizontally. (https://wiki.libsdl.org/SDL3/SDL_FlipSurface)

func (*Surface) HasAlternateImages

func (surface *Surface) HasAlternateImages() bool

SDL_SurfaceHasAlternateImages - Return whether a surface has alternate versions available. (https://wiki.libsdl.org/SDL3/SDL_SurfaceHasAlternateImages)

func (*Surface) HasColorKey

func (surface *Surface) HasColorKey() bool

SDL_SurfaceHasColorKey - Returns whether the surface has a color key. (https://wiki.libsdl.org/SDL3/SDL_SurfaceHasColorKey)

func (*Surface) HasRLE

func (surface *Surface) HasRLE() bool

SDL_SurfaceHasRLE - Returns whether the surface is RLE enabled. (https://wiki.libsdl.org/SDL3/SDL_SurfaceHasRLE)

func (*Surface) Images

func (surface *Surface) Images() ([]*Surface, error)

SDL_GetSurfaceImages - Get an array including all versions of a surface. (https://wiki.libsdl.org/SDL3/SDL_GetSurfaceImages)

func (*Surface) Lock

func (surface *Surface) Lock() error

SDL_LockSurface - Set up a surface for directly accessing the pixels. (https://wiki.libsdl.org/SDL3/SDL_LockSurface)

func (*Surface) MapRGB

func (surface *Surface) MapRGB(r, g, b uint8) uint32

SDL_MapSurfaceRGB - Map an RGB triple to an opaque pixel value for a surface. (https://wiki.libsdl.org/SDL3/SDL_MapSurfaceRGB)

func (*Surface) MapRGBA

func (surface *Surface) MapRGBA(r, g, b, a uint8) uint32

SDL_MapSurfaceRGBA - Map an RGBA quadruple to a pixel value for a surface. (https://wiki.libsdl.org/SDL3/SDL_MapSurfaceRGBA)

func (*Surface) Palette

func (surface *Surface) Palette() *Palette

SDL_GetSurfacePalette - Get the palette used by a surface. (https://wiki.libsdl.org/SDL3/SDL_GetSurfacePalette)

func (*Surface) Pixels

func (s *Surface) Pixels() []byte

func (*Surface) PremultiplyAlpha

func (surface *Surface) PremultiplyAlpha(linear bool) error

SDL_PremultiplySurfaceAlpha - Premultiply the alpha in a surface. (https://wiki.libsdl.org/SDL3/SDL_PremultiplySurfaceAlpha)

func (*Surface) Properties

func (surface *Surface) Properties() (PropertiesID, error)

SDL_GetSurfaceProperties - Get the properties associated with a surface. (https://wiki.libsdl.org/SDL3/SDL_GetSurfaceProperties)

func (*Surface) ReadPixel

func (surface *Surface) ReadPixel(x, y int32) (uint8, uint8, uint8, uint8, error)

SDL_ReadSurfacePixel - Retrieves a single pixel from a surface. (https://wiki.libsdl.org/SDL3/SDL_ReadSurfacePixel)

func (*Surface) ReadPixelFloat

func (surface *Surface) ReadPixelFloat(x, y int32) (float32, float32, float32, float32, error)

SDL_ReadSurfacePixelFloat - Retrieves a single pixel from a surface. (https://wiki.libsdl.org/SDL3/SDL_ReadSurfacePixelFloat)

func (*Surface) RemoveAlternateImages

func (surface *Surface) RemoveAlternateImages()

SDL_RemoveSurfaceAlternateImages - Remove all alternate versions of a surface. (https://wiki.libsdl.org/SDL3/SDL_RemoveSurfaceAlternateImages)

func (*Surface) SaveBMP

func (surface *Surface) SaveBMP(file string) error

SDL_SaveBMP - Save a surface to a file. (https://wiki.libsdl.org/SDL3/SDL_SaveBMP)

func (*Surface) SaveBMP_IO

func (surface *Surface) SaveBMP_IO(dst *IOStream, closeio bool) error

SDL_SaveBMP_IO - Save a surface to a seekable SDL data stream in BMP format. (https://wiki.libsdl.org/SDL3/SDL_SaveBMP_IO)

func (*Surface) Scale

func (surface *Surface) Scale(width, height int32, scaleMode ScaleMode) (*Surface, error)

SDL_ScaleSurface - Creates a new surface identical to the existing surface, scaled to the desired size. (https://wiki.libsdl.org/SDL3/SDL_ScaleSurface)

func (*Surface) SetAlphaMod

func (surface *Surface) SetAlphaMod(alpha uint8) error

SDL_SetSurfaceAlphaMod - Set an additional alpha value used in blit operations. (https://wiki.libsdl.org/SDL3/SDL_SetSurfaceAlphaMod)

func (*Surface) SetBlendMode

func (surface *Surface) SetBlendMode(blendMode BlendMode) error

SDL_SetSurfaceBlendMode - Set the blend mode used for blit operations. (https://wiki.libsdl.org/SDL3/SDL_SetSurfaceBlendMode)

func (*Surface) SetClipRect

func (surface *Surface) SetClipRect(rect *Rect) bool

SDL_SetSurfaceClipRect - Set the clipping rectangle for a surface. (https://wiki.libsdl.org/SDL3/SDL_SetSurfaceClipRect)

func (*Surface) SetColorKey

func (surface *Surface) SetColorKey(enabled bool, key uint32) error

SDL_SetSurfaceColorKey - Set the color key (transparent pixel) in a surface. (https://wiki.libsdl.org/SDL3/SDL_SetSurfaceColorKey)

func (*Surface) SetColorMod

func (surface *Surface) SetColorMod(r, g, b uint8) error

SDL_SetSurfaceColorMod - Set an additional color value multiplied into blit operations. (https://wiki.libsdl.org/SDL3/SDL_SetSurfaceColorMod)

func (*Surface) SetColorspace

func (surface *Surface) SetColorspace(colorspace Colorspace) error

SDL_SetSurfaceColorspace - Set the colorspace used by a surface. (https://wiki.libsdl.org/SDL3/SDL_SetSurfaceColorspace)

func (*Surface) SetPalette

func (surface *Surface) SetPalette(palette *Palette) error

SDL_SetSurfacePalette - Set the palette used by a surface. (https://wiki.libsdl.org/SDL3/SDL_SetSurfacePalette)

func (*Surface) SetRLE

func (surface *Surface) SetRLE(enabled bool) error

SDL_SetSurfaceRLE - Set the RLE acceleration hint for a surface. (https://wiki.libsdl.org/SDL3/SDL_SetSurfaceRLE)

func (*Surface) Unlock

func (surface *Surface) Unlock()

SDL_UnlockSurface - Release a surface after directly accessing the pixels. (https://wiki.libsdl.org/SDL3/SDL_UnlockSurface)

func (*Surface) WritePixel

func (surface *Surface) WritePixel(x, y int32, r, g, b, a uint8) error

SDL_WriteSurfacePixel - Writes a single pixel to a surface. (https://wiki.libsdl.org/SDL3/SDL_WriteSurfacePixel)

func (*Surface) WritePixelFloat

func (surface *Surface) WritePixelFloat(x, y int32, r, g, b, a float32) error

SDL_WriteSurfacePixelFloat - Writes a single pixel to a surface. (https://wiki.libsdl.org/SDL3/SDL_WriteSurfacePixelFloat)

type SurfaceFlags

type SurfaceFlags uint32

SDL_SurfaceFlags - The flags on an [SDL_Surface](SDL_Surface). (https://wiki.libsdl.org/SDL3/SDL_SurfaceFlags)

type SwapchainTexture

type SwapchainTexture struct {
	Texture *GPUTexture
	Width   uint32
	Height  uint32
}

type SystemCursor

type SystemCursor uint32

SDL_SystemCursor - Cursor types for [SDL_CreateSystemCursor](SDL_CreateSystemCursor)(). (https://wiki.libsdl.org/SDL3/SDL_SystemCursor)

const (
	SYSTEM_CURSOR_DEFAULT     SystemCursor = 0  // Default cursor. Usually an arrow.
	SYSTEM_CURSOR_TEXT        SystemCursor = 1  // Text selection. Usually an I-beam.
	SYSTEM_CURSOR_WAIT        SystemCursor = 2  // Wait. Usually an hourglass or watch or spinning ball.
	SYSTEM_CURSOR_CROSSHAIR   SystemCursor = 3  // Crosshair.
	SYSTEM_CURSOR_PROGRESS    SystemCursor = 4  // Program is busy but still interactive. Usually it's WAIT with an arrow.
	SYSTEM_CURSOR_NWSE_RESIZE SystemCursor = 5  // Double arrow pointing northwest and southeast.
	SYSTEM_CURSOR_NESW_RESIZE SystemCursor = 6  // Double arrow pointing northeast and southwest.
	SYSTEM_CURSOR_EW_RESIZE   SystemCursor = 7  // Double arrow pointing west and east.
	SYSTEM_CURSOR_NS_RESIZE   SystemCursor = 8  // Double arrow pointing north and south.
	SYSTEM_CURSOR_MOVE        SystemCursor = 9  // Four pointed arrow pointing north, south, east, and west.
	SYSTEM_CURSOR_NOT_ALLOWED SystemCursor = 10 // Not permitted. Usually a slashed circle or crossbones.
	SYSTEM_CURSOR_POINTER     SystemCursor = 11 // Pointer that indicates a link. Usually a pointing hand.
	SYSTEM_CURSOR_NW_RESIZE   SystemCursor = 12 // Window resize top-left. This may be a single arrow or a double arrow like NWSE_RESIZE.
	SYSTEM_CURSOR_N_RESIZE    SystemCursor = 13 // Window resize top. May be NS_RESIZE.
	SYSTEM_CURSOR_NE_RESIZE   SystemCursor = 14 // Window resize top-right. May be NESW_RESIZE.
	SYSTEM_CURSOR_E_RESIZE    SystemCursor = 15 // Window resize right. May be EW_RESIZE.
	SYSTEM_CURSOR_SE_RESIZE   SystemCursor = 16 // Window resize bottom-right. May be NWSE_RESIZE.
	SYSTEM_CURSOR_S_RESIZE    SystemCursor = 17 // Window resize bottom. May be NS_RESIZE.
	SYSTEM_CURSOR_SW_RESIZE   SystemCursor = 18 // Window resize bottom-left. May be NESW_RESIZE.
	SYSTEM_CURSOR_W_RESIZE    SystemCursor = 19 // Window resize left. May be EW_RESIZE.
	SYSTEM_CURSOR_COUNT       SystemCursor = 20
)

type SystemTheme

type SystemTheme uint32

SDL_SystemTheme - System theme. (https://wiki.libsdl.org/SDL3/SDL_SystemTheme)

const (
	SYSTEM_THEME_UNKNOWN SystemTheme = 0 // Unknown system theme
	SYSTEM_THEME_LIGHT   SystemTheme = 1 // Light colored system theme
	SYSTEM_THEME_DARK    SystemTheme = 2 // Dark colored system theme
)

func GetSystemTheme

func GetSystemTheme() SystemTheme

SDL_GetSystemTheme - Get the current system theme. (https://wiki.libsdl.org/SDL3/SDL_GetSystemTheme)

type TLSDestructorCallback

type TLSDestructorCallback uintptr

SDL_TLSDestructorCallback - The callback used to cleanup data passed to [SDL_SetTLS](SDL_SetTLS). (https://wiki.libsdl.org/SDL3/SDL_TLSDestructorCallback)

func NewTLSDestructorCallback

func NewTLSDestructorCallback(fn func(value uintptr)) TLSDestructorCallback

type TLSID

type TLSID AtomicInt

SDL_TLSID - Thread local storage ID. (https://wiki.libsdl.org/SDL3/SDL_TLSID)

type TextEditingCandidatesEvent

type TextEditingCandidatesEvent struct {
	Type              EventType // SDL_EVENT_TEXT_EDITING_CANDIDATES
	Reserved          uint32
	Timestamp         uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID          WindowID // The window with keyboard focus, if any
	Candidates        []string // The list of candidates, or NULL if there are no candidates available
	NumCandidates     int32    // The number of strings in `candidates`
	SelectedCandidate int32    // The index of the selected candidate, or -1 if no candidate is selected
	Horizontal        bool     // true if the list is horizontal, false if it's vertical
}

SDL_TextEditingCandidatesEvent - Keyboard IME candidates event structure (event.edit_candidates.*) (https://wiki.libsdl.org/SDL3/SDL_TextEditingCandidatesEvent)

type TextEditingEvent

type TextEditingEvent struct {
	Type EventType // SDL_EVENT_TEXT_EDITING

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID // The window with keyboard focus, if any
	Text      string   // The editing text
	Start     int32    // The start cursor of selected editing text, or -1 if not set
	Length    int32    // The length of selected editing text, or -1 if not set
	// contains filtered or unexported fields
}

SDL_TextEditingEvent - Keyboard text editing event structure (event.edit.*) (https://wiki.libsdl.org/SDL3/SDL_TextEditingEvent)

type TextInputEvent

type TextInputEvent struct {
	Type EventType // SDL_EVENT_TEXT_INPUT

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID // The window with keyboard focus, if any
	Text      string   // The input text, UTF-8 encoded
	// contains filtered or unexported fields
}

SDL_TextInputEvent - Keyboard text input event structure (event.text.*) (https://wiki.libsdl.org/SDL3/SDL_TextInputEvent)

type Texture

type Texture struct {
	Format   PixelFormat
	W        int32
	H        int32
	Refcount int32
}

SDL_Texture - An efficient driver-specific representation of pixel data (https://wiki.libsdl.org/SDL3/SDL_Texture)

func (*Texture) AlphaMod

func (texture *Texture) AlphaMod() (uint8, error)

SDL_GetTextureAlphaMod - Get the additional alpha value multiplied into render copy operations. (https://wiki.libsdl.org/SDL3/SDL_GetTextureAlphaMod)

func (*Texture) AlphaModFloat

func (texture *Texture) AlphaModFloat() (float32, error)

SDL_GetTextureAlphaModFloat - Get the additional alpha value multiplied into render copy operations. (https://wiki.libsdl.org/SDL3/SDL_GetTextureAlphaModFloat)

func (*Texture) BlendMode

func (texture *Texture) BlendMode() (BlendMode, error)

SDL_GetTextureBlendMode - Get the blend mode used for texture copy operations. (https://wiki.libsdl.org/SDL3/SDL_GetTextureBlendMode)

func (*Texture) ColorMod

func (texture *Texture) ColorMod() (uint8, uint8, uint8, error)

SDL_GetTextureColorMod - Get the additional color value multiplied into render copy operations. (https://wiki.libsdl.org/SDL3/SDL_GetTextureColorMod)

func (*Texture) ColorModFloat

func (texture *Texture) ColorModFloat() (float32, float32, float32, error)

SDL_GetTextureColorModFloat - Get the additional color value multiplied into render copy operations. (https://wiki.libsdl.org/SDL3/SDL_GetTextureColorModFloat)

func (*Texture) Destroy

func (texture *Texture) Destroy()

SDL_DestroyTexture - Destroy the specified texture. (https://wiki.libsdl.org/SDL3/SDL_DestroyTexture)

func (*Texture) Lock

func (texture *Texture) Lock(rect *Rect) ([]byte, int32, error)

SDL_LockTexture - Lock a portion of the texture for **write-only** pixel access. Returns pixels data, pitch, error. (https://wiki.libsdl.org/SDL3/SDL_LockTexture)

func (*Texture) LockToSurface

func (texture *Texture) LockToSurface(rect *Rect, surface **Surface) error

SDL_LockTextureToSurface - Lock a portion of the texture for **write-only** pixel access, and expose it as a SDL surface. (https://wiki.libsdl.org/SDL3/SDL_LockTextureToSurface)

func (*Texture) Palette

func (texture *Texture) Palette() *Palette

SDL_GetTexturePalette - Get the palette used by a texture. (https://wiki.libsdl.org/SDL3/SDL_GetTexturePalette)

func (*Texture) Properties

func (texture *Texture) Properties() (PropertiesID, error)

SDL_GetTextureProperties - Get the properties associated with a texture. (https://wiki.libsdl.org/SDL3/SDL_GetTextureProperties)

func (*Texture) Renderer

func (texture *Texture) Renderer() (*Renderer, error)

SDL_GetRendererFromTexture - Get the renderer that created an SDL_Texture. (https://wiki.libsdl.org/SDL3/SDL_GetRendererFromTexture)

func (*Texture) ScaleMode

func (texture *Texture) ScaleMode() (ScaleMode, error)

SDL_GetTextureScaleMode - Get the scale mode used for texture scale operations. (https://wiki.libsdl.org/SDL3/SDL_GetTextureScaleMode)

func (*Texture) SetAlphaMod

func (texture *Texture) SetAlphaMod(alpha uint8) error

SDL_SetTextureAlphaMod - Set an additional alpha value multiplied into render copy operations. (https://wiki.libsdl.org/SDL3/SDL_SetTextureAlphaMod)

func (*Texture) SetAlphaModFloat

func (texture *Texture) SetAlphaModFloat(alpha float32) error

SDL_SetTextureAlphaModFloat - Set an additional alpha value multiplied into render copy operations. (https://wiki.libsdl.org/SDL3/SDL_SetTextureAlphaModFloat)

func (*Texture) SetBlendMode

func (texture *Texture) SetBlendMode(blendMode BlendMode) error

SDL_SetTextureBlendMode - Set the blend mode for a texture, used by SDL_RenderTexture(). (https://wiki.libsdl.org/SDL3/SDL_SetTextureBlendMode)

func (*Texture) SetColorMod

func (texture *Texture) SetColorMod(r, g, b uint8) error

SDL_SetTextureColorMod - Set an additional color value multiplied into render copy operations. (https://wiki.libsdl.org/SDL3/SDL_SetTextureColorMod)

func (*Texture) SetColorModFloat

func (texture *Texture) SetColorModFloat(r float32, g float32, b float32) error

SDL_SetTextureColorModFloat - Set an additional color value multiplied into render copy operations. (https://wiki.libsdl.org/SDL3/SDL_SetTextureColorModFloat)

func (*Texture) SetPalette

func (texture *Texture) SetPalette(palette *Palette) error

SDL_SetTexturePalette - Set the palette used by a texture. (https://wiki.libsdl.org/SDL3/SDL_SetTexturePalette)

func (*Texture) SetScaleMode

func (texture *Texture) SetScaleMode(scaleMode ScaleMode) error

SDL_SetTextureScaleMode - Set the scale mode used for texture scale operations. (https://wiki.libsdl.org/SDL3/SDL_SetTextureScaleMode)

func (*Texture) Size

func (texture *Texture) Size() (float32, float32, error)

SDL_GetTextureSize - Get the size of a texture, as floating point values. (https://wiki.libsdl.org/SDL3/SDL_GetTextureSize)

func (*Texture) Unlock

func (texture *Texture) Unlock()

SDL_UnlockTexture - Unlock a texture, uploading the changes to video memory, if needed. (https://wiki.libsdl.org/SDL3/SDL_UnlockTexture)

func (*Texture) Update

func (texture *Texture) Update(rect *Rect, pixels []byte, pitch int32) error

SDL_UpdateTexture - Update the given texture rectangle with new pixel data. (https://wiki.libsdl.org/SDL3/SDL_UpdateTexture)

func (*Texture) UpdateNV

func (texture *Texture) UpdateNV(rect *Rect, Yplane []byte, Ypitch int32, UVplane []byte, UVpitch int32) error

SDL_UpdateNVTexture - Update a rectangle within a planar NV12 or NV21 texture with new pixels. (https://wiki.libsdl.org/SDL3/SDL_UpdateNVTexture)

func (*Texture) UpdateYUV

func (texture *Texture) UpdateYUV(rect *Rect, Yplane []byte, Ypitch int32, Uplane []byte, Upitch int32, Vplane []byte, Vpitch int32) error

SDL_UpdateYUVTexture - Update a rectangle within a planar YV12 or IYUV texture with new pixel data. (https://wiki.libsdl.org/SDL3/SDL_UpdateYUVTexture)

type TextureAccess

type TextureAccess uint32

SDL_TextureAccess - The access pattern allowed for a texture. (https://wiki.libsdl.org/SDL3/SDL_TextureAccess)

const (
	TEXTUREACCESS_STATIC    TextureAccess = 0 // Changes rarely, not lockable
	TEXTUREACCESS_STREAMING TextureAccess = 1 // Changes frequently, lockable
	TEXTUREACCESS_TARGET    TextureAccess = 2 // Texture can be used as a render target
)

type TextureAddressMode

type TextureAddressMode uint32

SDL_TextureAddressMode - The addressing mode for a texture when used in [SDL_RenderGeometry](SDL_RenderGeometry)(). (https://wiki.libsdl.org/SDL3/SDL_TextureAddressMode)

const (
	TEXTURE_ADDRESS_INVALID TextureAddressMode = 4294967295
	TEXTURE_ADDRESS_AUTO    TextureAddressMode = 0 // Wrapping is enabled if texture coordinates are outside [0, 1], this is the default
	TEXTURE_ADDRESS_CLAMP   TextureAddressMode = 1 // Texture coordinates are clamped to the [0, 1] range
	TEXTURE_ADDRESS_WRAP    TextureAddressMode = 2 // The texture is repeated (tiled)
)

type Thread

type Thread struct{}

SDL_Thread - The SDL thread object. (https://wiki.libsdl.org/SDL3/SDL_Thread)

type ThreadID

type ThreadID uint64

SDL_ThreadID - A unique numeric ID that identifies a thread. (https://wiki.libsdl.org/SDL3/SDL_ThreadID)

type ThreadPriority

type ThreadPriority uint32

SDL_ThreadPriority - The SDL thread priority. (https://wiki.libsdl.org/SDL3/SDL_ThreadPriority)

const (
	THREAD_PRIORITY_LOW           ThreadPriority = 0
	THREAD_PRIORITY_NORMAL        ThreadPriority = 1
	THREAD_PRIORITY_HIGH          ThreadPriority = 2
	THREAD_PRIORITY_TIME_CRITICAL ThreadPriority = 3
)

type ThreadState

type ThreadState uint32

SDL_ThreadState - The SDL thread state. (https://wiki.libsdl.org/SDL3/SDL_ThreadState)

const (
	THREAD_UNKNOWN  ThreadState = 0 // The thread is not valid
	THREAD_ALIVE    ThreadState = 1 // The thread is currently running
	THREAD_DETACHED ThreadState = 2 // The thread is detached and can't be waited on
	THREAD_COMPLETE ThreadState = 3 // The thread has finished and should be cleaned up with SDL_WaitThread()
)

type Time

type Time int64

SDL_Time - SDL times are signed, 64-bit integers representing nanoseconds since the Unix epoch (Jan 1, 1970). (https://wiki.libsdl.org/SDL3/SDL_Time)

type TimeFormat

type TimeFormat uint32

SDL_TimeFormat - The preferred time format of the current system locale. (https://wiki.libsdl.org/SDL3/SDL_TimeFormat)

const (
	TIME_FORMAT_24HR TimeFormat = 0 // 24 hour time
	TIME_FORMAT_12HR TimeFormat = 1 // 12 hour time
)

type TimerCallback

type TimerCallback uintptr

SDL_TimerCallback - Function prototype for the millisecond timer callback function. (https://wiki.libsdl.org/SDL3/SDL_TimerCallback)

type TimerID

type TimerID uint32

SDL_TimerID - Definition of the timer ID type. (https://wiki.libsdl.org/SDL3/SDL_TimerID)

type TouchDeviceType

type TouchDeviceType uint32

SDL_TouchDeviceType - An enum that describes the type of a touch device. (https://wiki.libsdl.org/SDL3/SDL_TouchDeviceType)

const (
	TOUCH_DEVICE_INVALID           TouchDeviceType = 4294967295
	TOUCH_DEVICE_DIRECT            TouchDeviceType = 0 // touch screen with window-relative coordinates
	TOUCH_DEVICE_INDIRECT_ABSOLUTE TouchDeviceType = 1 // trackpad with absolute device coordinates
	TOUCH_DEVICE_INDIRECT_RELATIVE TouchDeviceType = 2 // trackpad with screen cursor-relative coordinates
)

type TouchFingerEvent

type TouchFingerEvent struct {
	Type EventType // SDL_EVENT_FINGER_DOWN, SDL_EVENT_FINGER_UP, SDL_EVENT_FINGER_MOTION, or SDL_EVENT_FINGER_CANCELED

	Timestamp uint64  // In nanoseconds, populated using SDL_GetTicksNS()
	TouchID   TouchID // The touch device id
	FingerID  FingerID
	X         float32  // Normalized in the range 0...1
	Y         float32  // Normalized in the range 0...1
	Dx        float32  // Normalized in the range -1...1
	Dy        float32  // Normalized in the range -1...1
	Pressure  float32  // Normalized in the range 0...1
	WindowID  WindowID // The window underneath the finger, if any
	// contains filtered or unexported fields
}

SDL_TouchFingerEvent - Touch finger event structure (event.tfinger.*) (https://wiki.libsdl.org/SDL3/SDL_TouchFingerEvent)

type TouchID

type TouchID uint64

SDL_TouchID - A unique ID for a touch device. (https://wiki.libsdl.org/SDL3/SDL_TouchID)

func GetTouchDevices

func GetTouchDevices() ([]TouchID, error)

SDL_GetTouchDevices - Get a list of registered touch devices. (https://wiki.libsdl.org/SDL3/SDL_GetTouchDevices)

func (TouchID) DeviceName

func (touchID TouchID) DeviceName() (string, error)

SDL_GetTouchDeviceName - Get the touch device name as reported from the driver. (https://wiki.libsdl.org/SDL3/SDL_GetTouchDeviceName)

func (TouchID) DeviceType

func (touchID TouchID) DeviceType() TouchDeviceType

SDL_GetTouchDeviceType - Get the type of the given touch device. (https://wiki.libsdl.org/SDL3/SDL_GetTouchDeviceType)

func (TouchID) Fingers

func (touchID TouchID) Fingers() ([]*Finger, error)

SDL_GetTouchFingers - Get a list of active fingers for a given touch device. (https://wiki.libsdl.org/SDL3/SDL_GetTouchFingers)

type Tray

type Tray struct{}

SDL_Tray - An opaque handle representing a toplevel system tray object. (https://wiki.libsdl.org/SDL3/SDL_Tray)

func CreateTray

func CreateTray(icon *Surface, tooltip string) *Tray

SDL_CreateTray - Create an icon to be placed in the operating system's tray, or equivalent. (https://wiki.libsdl.org/SDL3/SDL_CreateTray)

func (*Tray) CreateMenu

func (tray *Tray) CreateMenu() *TrayMenu

SDL_CreateTrayMenu - Create a menu for a system tray. (https://wiki.libsdl.org/SDL3/SDL_CreateTrayMenu)

func (*Tray) Destroy

func (tray *Tray) Destroy()

SDL_DestroyTray - Destroys a tray object. (https://wiki.libsdl.org/SDL3/SDL_DestroyTray)

func (*Tray) Menu

func (tray *Tray) Menu() *TrayMenu

SDL_GetTrayMenu - Gets a previously created tray menu. (https://wiki.libsdl.org/SDL3/SDL_GetTrayMenu)

func (*Tray) SetIcon

func (tray *Tray) SetIcon(icon *Surface)

SDL_SetTrayIcon - Updates the system tray icon's icon. (https://wiki.libsdl.org/SDL3/SDL_SetTrayIcon)

func (*Tray) SetToolTip

func (tray *Tray) SetToolTip(tooltip string)

SDL_SetTrayTooltip - Updates the system tray icon's tooltip. (https://wiki.libsdl.org/SDL3/SDL_SetTrayTooltip)

type TrayCallback

type TrayCallback uintptr

SDL_TrayCallback - A callback that is invoked when a tray entry is selected. (https://wiki.libsdl.org/SDL3/SDL_TrayCallback)

type TrayEntry

type TrayEntry struct{}

SDL_TrayEntry - An opaque handle representing an entry on a system tray object. (https://wiki.libsdl.org/SDL3/SDL_TrayEntry)

func (*TrayEntry) Checked

func (entry *TrayEntry) Checked() bool

SDL_GetTrayEntryChecked - Gets whether or not an entry is checked. (https://wiki.libsdl.org/SDL3/SDL_GetTrayEntryChecked)

func (*TrayEntry) Click

func (entry *TrayEntry) Click()

SDL_ClickTrayEntry - Simulate a click on a tray entry. (https://wiki.libsdl.org/SDL3/SDL_ClickTrayEntry)

func (*TrayEntry) Enabled

func (entry *TrayEntry) Enabled() bool

SDL_GetTrayEntryEnabled - Gets whether or not an entry is enabled. (https://wiki.libsdl.org/SDL3/SDL_GetTrayEntryEnabled)

func (*TrayEntry) Label

func (entry *TrayEntry) Label() string

SDL_GetTrayEntryLabel - Gets the label of an entry. (https://wiki.libsdl.org/SDL3/SDL_GetTrayEntryLabel)

func (*TrayEntry) Menu

func (entry *TrayEntry) Menu() *TrayMenu

SDL_GetTraySubmenu - Gets a previously created tray entry submenu. (https://wiki.libsdl.org/SDL3/SDL_GetTraySubmenu)

func (*TrayEntry) Parent

func (entry *TrayEntry) Parent() *TrayMenu

SDL_GetTrayEntryParent - Gets the menu containing a certain tray entry. (https://wiki.libsdl.org/SDL3/SDL_GetTrayEntryParent)

func (*TrayEntry) SetCallback

func (entry *TrayEntry) SetCallback(callback TrayCallback)

SDL_SetTrayEntryCallback - Sets a callback to be invoked when the entry is selected. (https://wiki.libsdl.org/SDL3/SDL_SetTrayEntryCallback)

func (*TrayEntry) SetChecked

func (entry *TrayEntry) SetChecked(checked bool)

SDL_SetTrayEntryChecked - Sets whether or not an entry is checked. (https://wiki.libsdl.org/SDL3/SDL_SetTrayEntryChecked)

func (*TrayEntry) SetEnabled

func (entry *TrayEntry) SetEnabled(enabled bool)

SDL_SetTrayEntryEnabled - Sets whether or not an entry is enabled. (https://wiki.libsdl.org/SDL3/SDL_SetTrayEntryEnabled)

func (*TrayEntry) SetLabel

func (entry *TrayEntry) SetLabel(label string)

SDL_SetTrayEntryLabel - Sets the label of an entry. (https://wiki.libsdl.org/SDL3/SDL_SetTrayEntryLabel)

type TrayEntryFlags

type TrayEntryFlags uint32

SDL_TrayEntryFlags - Flags that control the creation of system tray entries. (https://wiki.libsdl.org/SDL3/SDL_TrayEntryFlags)

type TrayMenu

type TrayMenu struct{}

SDL_TrayMenu - An opaque handle representing a menu/submenu on a system tray object. (https://wiki.libsdl.org/SDL3/SDL_TrayMenu)

func CreateTraySubmenu

func CreateTraySubmenu(entry *TrayEntry) *TrayMenu

SDL_CreateTraySubmenu - Create a submenu for a system tray entry. (https://wiki.libsdl.org/SDL3/SDL_CreateTraySubmenu)

func (*TrayMenu) Entries

func (menu *TrayMenu) Entries() []*TrayEntry

SDL_GetTrayEntries - Returns a list of entries in the menu, in order. (https://wiki.libsdl.org/SDL3/SDL_GetTrayEntries)

func (*TrayMenu) InsertEntryAt

func (menu *TrayMenu) InsertEntryAt(index int32, label string, flags TrayEntryFlags) *TrayEntry

SDL_InsertTrayEntryAt - Insert a tray entry at a given position. (https://wiki.libsdl.org/SDL3/SDL_InsertTrayEntryAt)

func (*TrayMenu) ParentEntry

func (menu *TrayMenu) ParentEntry() *TrayEntry

SDL_GetTrayMenuParentEntry - Gets the entry for which the menu is a submenu, if the current menu is a submenu. (https://wiki.libsdl.org/SDL3/SDL_GetTrayMenuParentEntry)

func (*TrayMenu) ParentTray

func (menu *TrayMenu) ParentTray() *Tray

SDL_GetTrayMenuParentTray - Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu. (https://wiki.libsdl.org/SDL3/SDL_GetTrayMenuParentTray)

type UserEvent

type UserEvent struct {
	Type uint32 // SDL_EVENT_USER through SDL_EVENT_LAST, Uint32 because these are not in the SDL_EventType enumeration

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID // The associated window if any
	Code      int32    // User defined event code
	Data1     Pointer  // User defined data pointer
	Data2     Pointer  // User defined data pointer
	// contains filtered or unexported fields
}

SDL_UserEvent - A user-defined event type (event.user.*) (https://wiki.libsdl.org/SDL3/SDL_UserEvent)

type Version

type Version int32

https://github.com/libsdl-org/SDL/blob/release-3.2.2/include/SDL3/SDL_version.h

func GetVersion

func GetVersion() Version

SDL_GetVersion - Get the version of SDL that is linked against your program. (https://wiki.libsdl.org/SDL3/SDL_GetVersion)

func (Version) Major

func (v Version) Major() int

func (Version) Minor

func (v Version) Minor() int

func (Version) Patch

func (v Version) Patch() int

func (Version) String

func (v Version) String() string

type Vertex

type Vertex struct {
	Position FPoint // Vertex position, in SDL_Renderer coordinates
	Color    FColor // Vertex color
	TexCoord FPoint // Normalized texture coordinates, if needed
}

SDL_Vertex - Vertex structure. (https://wiki.libsdl.org/SDL3/SDL_Vertex)

type VirtualJoystickDesc

type VirtualJoystickDesc struct {
	Version           uint32                        // the version of this interface
	Type              JoystickType                  // `SDL_JoystickType`
	VendorId          uint16                        // the USB vendor ID of this joystick
	ProductId         uint16                        // the USB product ID of this joystick
	Naxes             uint16                        // the number of axes on this joystick
	Nbuttons          uint16                        // the number of buttons on this joystick
	Nballs            uint16                        // the number of balls on this joystick
	Nhats             uint16                        // the number of hats on this joystick
	ButtonMask        uint32                        // A mask of which buttons are valid for this controller e.g. (1 << SDL_GAMEPAD_BUTTON_SOUTH)
	AxisMask          uint32                        // A mask of which axes are valid for this controller e.g. (1 << SDL_GAMEPAD_AXIS_LEFTX)
	Name              string                        // the name of the joystick
	Touchpads         []VirtualJoystickTouchpadDesc // A pointer to an array of touchpad descriptions, required if `ntouchpads` is > 0
	Sensors           []VirtualJoystickSensorDesc   // A pointer to an array of sensor descriptions, required if `nsensors` is > 0
	Update            Pointer                       // Called when the joystick state should be updated
	SetPlayerIndex    Pointer                       // Called when the player index is set
	Rumble            Pointer                       // Implements SDL_RumbleJoystick()
	RumbleTriggers    Pointer                       // Implements SDL_RumbleJoystickTriggers()
	SetLED            Pointer                       // Implements SDL_SetJoystickLED()
	SendEffect        Pointer                       // Implements SDL_SendJoystickEffect()
	SetSensorsEnabled Pointer                       // Implements SDL_SetGamepadSensorEnabled()
}

SDL_VirtualJoystickDesc - The structure that describes a virtual joystick. (https://wiki.libsdl.org/SDL3/SDL_VirtualJoystickDesc)

type VirtualJoystickSensorDesc

type VirtualJoystickSensorDesc struct {
	Type SensorType // the type of this sensor
	Rate float32    // the update frequency of this sensor, may be 0.0f
}

SDL_VirtualJoystickSensorDesc - The structure that describes a virtual joystick sensor. (https://wiki.libsdl.org/SDL3/SDL_VirtualJoystickSensorDesc)

type VirtualJoystickTouchpadDesc

type VirtualJoystickTouchpadDesc struct {
	Nfingers uint16 // the number of simultaneous fingers on this touchpad
	// contains filtered or unexported fields
}

SDL_VirtualJoystickTouchpadDesc - The structure that describes a virtual joystick touchpad. (https://wiki.libsdl.org/SDL3/SDL_VirtualJoystickTouchpadDesc)

type VkAllocationCallbacks

type VkAllocationCallbacks struct{}

VkAllocationCallbacks is a placeholder type for Vulkan_AllocationCallbacks

type VkAllocationCallbacksPtr

type VkAllocationCallbacksPtr uintptr

VkAllocationCallbacksPtr is a pointer to for VkAllocationCallbacks

type VkInstance

type VkInstance uintptr

VkInstance is a pointer to a Vulkan_Instance

type VkPhysicalDevice

type VkPhysicalDevice uintptr

VkPhysicalDevice is a pointer to a Vulkan_PhysicalDevice

type VkSurfaceKHR

type VkSurfaceKHR uintptr

VkSurfaceKHR is a pointer to a Vulkan_SurfaceKHR

func Vulkan_CreateSurface

func Vulkan_CreateSurface(window *Window, instance VkInstance, allocator VkAllocationCallbacksPtr) (VkSurfaceKHR, error)

SDL_Vulkan_CreateSurface - Create a Vulkan rendering surface for a window. (https://wiki.libsdl.org/SDL3/SDL_Vulkan_CreateSurface)

type Window

type Window struct{}

SDL_Window - The struct used as an opaque handle to a window. (https://wiki.libsdl.org/SDL3/SDL_Window)

func CreateWindow

func CreateWindow(title string, width, height int, flags WindowFlags) (*Window, error)

SDL_CreateWindow - Create a window with the specified dimensions and flags. (https://wiki.libsdl.org/SDL3/SDL_CreateWindow)

func CreateWindowWithProperties

func CreateWindowWithProperties(props PropertiesID) (*Window, error)

SDL_CreateWindowWithProperties - Create a window with the specified properties. (https://wiki.libsdl.org/SDL3/SDL_CreateWindowWithProperties)

func GL_GetCurrentWindow

func GL_GetCurrentWindow() (*Window, error)

SDL_GL_GetCurrentWindow - Get the currently active OpenGL window. (https://wiki.libsdl.org/SDL3/SDL_GL_GetCurrentWindow)

func GetGrabbedWindow

func GetGrabbedWindow() *Window

SDL_GetGrabbedWindow - Get the window that currently has an input grab enabled. (https://wiki.libsdl.org/SDL3/SDL_GetGrabbedWindow)

func GetKeyboardFocus

func GetKeyboardFocus() *Window

SDL_GetKeyboardFocus - Query the window which currently has keyboard focus. (https://wiki.libsdl.org/SDL3/SDL_GetKeyboardFocus)

func GetMouseFocus

func GetMouseFocus() *Window

SDL_GetMouseFocus - Get the window which currently has mouse focus. (https://wiki.libsdl.org/SDL3/SDL_GetMouseFocus)

func GetWindows

func GetWindows() ([]*Window, error)

SDL_GetWindows - Get a list of valid windows. (https://wiki.libsdl.org/SDL3/SDL_GetWindows)

func (*Window) AspectRatio

func (window *Window) AspectRatio() (float32, float32, error)

SDL_GetWindowAspectRatio - Get the size of a window's client area. (https://wiki.libsdl.org/SDL3/SDL_GetWindowAspectRatio)

func (*Window) BordersSize

func (window *Window) BordersSize() (BorderSize, error)

SDL_GetWindowBordersSize - Get the size of a window's borders (decorations) around the client area. (https://wiki.libsdl.org/SDL3/SDL_GetWindowBordersSize)

func (*Window) ClearComposition

func (window *Window) ClearComposition() error

SDL_ClearComposition - Dismiss the composition window/IME without disabling the subsystem. (https://wiki.libsdl.org/SDL3/SDL_ClearComposition)

func (*Window) CreatePopup

func (parent *Window) CreatePopup(offsetX, offsetY, w, h int32, flags WindowFlags) (*Window, error)

SDL_CreatePopupWindow - Create a child popup window of the specified parent window. (https://wiki.libsdl.org/SDL3/SDL_CreatePopupWindow)

func (*Window) CreateRenderer

func (window *Window) CreateRenderer(name string) (*Renderer, error)

SDL_CreateRenderer - Create a 2D rendering context for a window. (https://wiki.libsdl.org/SDL3/SDL_CreateRenderer)

func (*Window) Destroy

func (window *Window) Destroy()

SDL_DestroyWindow - Destroy a window. (https://wiki.libsdl.org/SDL3/SDL_DestroyWindow)

func (*Window) DestroySurface

func (window *Window) DestroySurface() error

SDL_DestroyWindowSurface - Destroy the surface associated with the window. (https://wiki.libsdl.org/SDL3/SDL_DestroyWindowSurface)

func (*Window) DisplayScale

func (window *Window) DisplayScale() (float32, error)

SDL_GetWindowDisplayScale - Get the content display scale relative to a window's pixel size. (https://wiki.libsdl.org/SDL3/SDL_GetWindowDisplayScale)

func (*Window) Flags

func (window *Window) Flags() WindowFlags

SDL_GetWindowFlags - Get the window flags. (https://wiki.libsdl.org/SDL3/SDL_GetWindowFlags)

func (*Window) Flash

func (window *Window) Flash(operation FlashOperation) error

SDL_FlashWindow - Request a window to demand attention from the user. (https://wiki.libsdl.org/SDL3/SDL_FlashWindow)

func (*Window) FullscreenMode

func (window *Window) FullscreenMode() *DisplayMode

SDL_GetWindowFullscreenMode - Query the display mode to use when a window is visible at fullscreen. (https://wiki.libsdl.org/SDL3/SDL_GetWindowFullscreenMode)

func (*Window) GetProgressState

func (window *Window) GetProgressState() (ProgressState, error)

SDL_GetWindowProgressState - Get the state of the progress bar for the given window’s taskbar icon. (https://wiki.libsdl.org/SDL3/SDL_GetWindowProgressState)

func (*Window) GetProgressValue

func (window *Window) GetProgressValue() (float32, error)

SDL_GetWindowProgressValue - Get the value of the progress bar for the given window’s taskbar icon. (https://wiki.libsdl.org/SDL3/SDL_GetWindowProgressValue)

func (*Window) HasSurface

func (window *Window) HasSurface() bool

SDL_WindowHasSurface - Return whether the window has a surface associated with it. (https://wiki.libsdl.org/SDL3/SDL_WindowHasSurface)

func (*Window) Hide

func (window *Window) Hide() error

SDL_HideWindow - Hide a window. (https://wiki.libsdl.org/SDL3/SDL_HideWindow)

func (*Window) ICCProfile

func (window *Window) ICCProfile() ([]byte, error)

SDL_GetWindowICCProfile - Get the raw ICC profile data for the screen the window is currently on. (https://wiki.libsdl.org/SDL3/SDL_GetWindowICCProfile)

func (*Window) ID

func (window *Window) ID() (WindowID, error)

SDL_GetWindowID - Get the numeric ID of a window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowID)

func (*Window) KeyboardGrab

func (window *Window) KeyboardGrab() bool

SDL_GetWindowKeyboardGrab - Get a window's keyboard grab mode. (https://wiki.libsdl.org/SDL3/SDL_GetWindowKeyboardGrab)

func (*Window) Maximize

func (window *Window) Maximize() error

SDL_MaximizeWindow - Request that the window be made as large as possible. (https://wiki.libsdl.org/SDL3/SDL_MaximizeWindow)

func (*Window) MaximumSize

func (window *Window) MaximumSize() (int32, int32, error)

SDL_GetWindowMaximumSize - Get the maximum size of a window's client area. (https://wiki.libsdl.org/SDL3/SDL_GetWindowMaximumSize)

func (*Window) Metal_CreateView

func (window *Window) Metal_CreateView() MetalView

SDL_Metal_CreateView - Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window. (https://wiki.libsdl.org/SDL3/SDL_Metal_CreateView)

func (*Window) Minimize

func (window *Window) Minimize() error

SDL_MinimizeWindow - Request that the window be minimized to an iconic representation. (https://wiki.libsdl.org/SDL3/SDL_MinimizeWindow)

func (*Window) MinimumSize

func (window *Window) MinimumSize() (int32, int32, error)

SDL_GetWindowMinimumSize - Get the minimum size of a window's client area. (https://wiki.libsdl.org/SDL3/SDL_GetWindowMinimumSize)

func (*Window) MouseGrab

func (window *Window) MouseGrab() bool

SDL_GetWindowMouseGrab - Get a window's mouse grab mode. (https://wiki.libsdl.org/SDL3/SDL_GetWindowMouseGrab)

func (*Window) MouseRect

func (window *Window) MouseRect() *Rect

SDL_GetWindowMouseRect - Get the mouse confinement rectangle of a window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowMouseRect)

func (*Window) Opacity

func (window *Window) Opacity() float32

SDL_GetWindowOpacity - Get the opacity of a window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowOpacity)

func (*Window) Parent

func (window *Window) Parent() *Window

SDL_GetWindowParent - Get parent of a window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowParent)

func (*Window) PixelDensity

func (window *Window) PixelDensity() (float32, error)

SDL_GetWindowPixelDensity - Get the pixel density of a window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowPixelDensity)

func (*Window) PixelFormat

func (window *Window) PixelFormat() (PixelFormat, error)

SDL_GetWindowPixelFormat - Get the pixel format associated with the window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowPixelFormat)

func (*Window) Position

func (window *Window) Position() (int32, int32, error)

SDL_GetWindowPosition - Get the position of a window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowPosition)

func (*Window) Properties

func (window *Window) Properties() (PropertiesID, error)

SDL_GetWindowProperties - Get the properties associated with a window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowProperties)

func (*Window) Raise

func (window *Window) Raise() error

SDL_RaiseWindow - Request that a window be raised above other windows and gain the input focus. (https://wiki.libsdl.org/SDL3/SDL_RaiseWindow)

func (*Window) RelativeMouseMode

func (window *Window) RelativeMouseMode() bool

SDL_GetWindowRelativeMouseMode - Query whether relative mouse mode is enabled for a window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowRelativeMouseMode)

func (*Window) Renderer

func (window *Window) Renderer() *Renderer

SDL_GetRenderer - Get the renderer associated with a window. (https://wiki.libsdl.org/SDL3/SDL_GetRenderer)

func (*Window) Restore

func (window *Window) Restore() error

SDL_RestoreWindow - Request that the size and position of a minimized or maximized window be restored. (https://wiki.libsdl.org/SDL3/SDL_RestoreWindow)

func (*Window) SafeArea

func (window *Window) SafeArea() (Rect, error)

SDL_GetWindowSafeArea - Get the safe area for this window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowSafeArea)

func (*Window) ScreenKeyboardShown

func (window *Window) ScreenKeyboardShown() bool

SDL_ScreenKeyboardShown - Check whether the screen keyboard is shown for given window. (https://wiki.libsdl.org/SDL3/SDL_ScreenKeyboardShown)

func (*Window) SetAlwaysOnTop

func (window *Window) SetAlwaysOnTop(onTop bool) error

SDL_SetWindowAlwaysOnTop - Set the window to always be above the others. (https://wiki.libsdl.org/SDL3/SDL_SetWindowAlwaysOnTop)

func (*Window) SetAspectRatio

func (window *Window) SetAspectRatio(minAspect, maxAspect float32) error

SDL_SetWindowAspectRatio - Request that the aspect ratio of a window's client area be set. (https://wiki.libsdl.org/SDL3/SDL_SetWindowAspectRatio)

func (*Window) SetBordered

func (window *Window) SetBordered(bordered bool) error

SDL_SetWindowBordered - Set the border state of a window. (https://wiki.libsdl.org/SDL3/SDL_SetWindowBordered)

func (*Window) SetFillDocument

func (w *Window) SetFillDocument(fill bool) error

SDL_SetWindowFillDocument - Set the window to fill the current document space (Emscripten only). (https://wiki.libsdl.org/SDL3/SDL_SetWindowFillDocument)

func (*Window) SetFocusable

func (window *Window) SetFocusable(focusable bool) error

SDL_SetWindowFocusable - Set whether the window may have input focus. (https://wiki.libsdl.org/SDL3/SDL_SetWindowFocusable)

func (*Window) SetFullscreen

func (window *Window) SetFullscreen(fullscreen bool) error

SDL_SetWindowFullscreen - Request that the window's fullscreen state be changed. (https://wiki.libsdl.org/SDL3/SDL_SetWindowFullscreen)

func (*Window) SetFullscreenMode

func (window *Window) SetFullscreenMode(mode *DisplayMode) error

SDL_SetWindowFullscreenMode - Set the display mode to use when a window is visible and fullscreen. (https://wiki.libsdl.org/SDL3/SDL_SetWindowFullscreenMode)

func (*Window) SetHitTest

func (window *Window) SetHitTest(callback HitTest) error

SDL_SetWindowHitTest - Provide a callback that decides if a window region has special properties. (https://wiki.libsdl.org/SDL3/SDL_SetWindowHitTest)

func (*Window) SetIcon

func (window *Window) SetIcon(icon *Surface) error

SDL_SetWindowIcon - Set the icon for a window. (https://wiki.libsdl.org/SDL3/SDL_SetWindowIcon)

func (*Window) SetKeyboardGrab

func (window *Window) SetKeyboardGrab(grabbed bool) error

SDL_SetWindowKeyboardGrab - Set a window's keyboard grab mode. (https://wiki.libsdl.org/SDL3/SDL_SetWindowKeyboardGrab)

func (*Window) SetMaximumSize

func (window *Window) SetMaximumSize(maxW, maxH int32) error

SDL_SetWindowMaximumSize - Set the maximum size of a window's client area. (https://wiki.libsdl.org/SDL3/SDL_SetWindowMaximumSize)

func (*Window) SetMinimumSize

func (window *Window) SetMinimumSize(minW, minH int32) error

SDL_SetWindowMinimumSize - Set the minimum size of a window's client area. (https://wiki.libsdl.org/SDL3/SDL_SetWindowMinimumSize)

func (*Window) SetModal

func (window *Window) SetModal(modal bool) error

SDL_SetWindowModal - Toggle the state of the window as modal. (https://wiki.libsdl.org/SDL3/SDL_SetWindowModal)

func (*Window) SetMouseGrab

func (window *Window) SetMouseGrab(grabbed bool) error

SDL_SetWindowMouseGrab - Set a window's mouse grab mode. (https://wiki.libsdl.org/SDL3/SDL_SetWindowMouseGrab)

func (*Window) SetMouseRect

func (window *Window) SetMouseRect(rect *Rect) error

SDL_SetWindowMouseRect - Confines the cursor to the specified area of a window. (https://wiki.libsdl.org/SDL3/SDL_SetWindowMouseRect)

func (*Window) SetOpacity

func (window *Window) SetOpacity(opacity float32) error

SDL_SetWindowOpacity - Set the opacity for a window. (https://wiki.libsdl.org/SDL3/SDL_SetWindowOpacity)

func (*Window) SetParent

func (window *Window) SetParent(parent *Window) error

SDL_SetWindowParent - Set the window as a child of a parent window. (https://wiki.libsdl.org/SDL3/SDL_SetWindowParent)

func (*Window) SetPosition

func (window *Window) SetPosition(x, y int32) error

SDL_SetWindowPosition - Request that the window's position be set. (https://wiki.libsdl.org/SDL3/SDL_SetWindowPosition)

func (*Window) SetProgressState

func (window *Window) SetProgressState(state ProgressState) error

SDL_SetWindowProgressState - Sets the state of the progress bar for the given window’s taskbar icon. (https://wiki.libsdl.org/SDL3/SDL_SetWindowProgressState)

func (*Window) SetProgressValue

func (window *Window) SetProgressValue(value float32) error

SDL_SetWindowProgressValue - Sets the value of the progress bar for the given window’s taskbar icon. (https://wiki.libsdl.org/SDL3/SDL_SetWindowProgressValue)

func (*Window) SetRelativeMouseMode

func (window *Window) SetRelativeMouseMode(enabled bool) error

SDL_SetWindowRelativeMouseMode - Set relative mouse mode for a window. (https://wiki.libsdl.org/SDL3/SDL_SetWindowRelativeMouseMode)

func (*Window) SetResizable

func (window *Window) SetResizable(resizable bool) error

SDL_SetWindowResizable - Set the user-resizable state of a window. (https://wiki.libsdl.org/SDL3/SDL_SetWindowResizable)

func (*Window) SetShape

func (window *Window) SetShape(shape *Surface) error

SDL_SetWindowShape - Set the shape of a transparent window. (https://wiki.libsdl.org/SDL3/SDL_SetWindowShape)

func (*Window) SetSize

func (window *Window) SetSize(w, h int32) error

SDL_SetWindowSize - Request that the size of a window's client area be set. (https://wiki.libsdl.org/SDL3/SDL_SetWindowSize)

func (*Window) SetSurfaceVSync

func (window *Window) SetSurfaceVSync(vsync int32) error

SDL_SetWindowSurfaceVSync - Toggle VSync for the window surface. (https://wiki.libsdl.org/SDL3/SDL_SetWindowSurfaceVSync)

func (*Window) SetTextInputArea

func (window *Window) SetTextInputArea(rect *Rect, cursor int32) error

SDL_SetTextInputArea - Set the area used to type Unicode text input. (https://wiki.libsdl.org/SDL3/SDL_SetTextInputArea)

func (*Window) SetTitle

func (window *Window) SetTitle(title string) error

SDL_SetWindowTitle - Set the title of a window. (https://wiki.libsdl.org/SDL3/SDL_SetWindowTitle)

func (*Window) Show

func (window *Window) Show() error

SDL_ShowWindow - Show a window. (https://wiki.libsdl.org/SDL3/SDL_ShowWindow)

func (*Window) ShowSystemMenu

func (window *Window) ShowSystemMenu(x, y int32) error

SDL_ShowWindowSystemMenu - Display the system-level window menu. (https://wiki.libsdl.org/SDL3/SDL_ShowWindowSystemMenu)

func (*Window) Size

func (window *Window) Size() (int32, int32, error)

SDL_GetWindowSize - Get the size of a window's client area. (https://wiki.libsdl.org/SDL3/SDL_GetWindowSize)

func (*Window) SizeInPixels

func (window *Window) SizeInPixels() (int32, int32, error)

SDL_GetWindowSizeInPixels - Get the size of a window's client area, in pixels. (https://wiki.libsdl.org/SDL3/SDL_GetWindowSizeInPixels)

func (*Window) StartTextInput

func (window *Window) StartTextInput() error

SDL_StartTextInput - Start accepting Unicode text input events in a window. (https://wiki.libsdl.org/SDL3/SDL_StartTextInput)

func (*Window) StartTextInputWithProperties

func (window *Window) StartTextInputWithProperties(props PropertiesID) error

SDL_StartTextInputWithProperties - Start accepting Unicode text input events in a window, with properties describing the input. (https://wiki.libsdl.org/SDL3/SDL_StartTextInputWithProperties)

func (*Window) StopTextInput

func (window *Window) StopTextInput() error

SDL_StopTextInput - Stop receiving any text input events in a window. (https://wiki.libsdl.org/SDL3/SDL_StopTextInput)

func (*Window) Surface

func (window *Window) Surface() (*Surface, error)

SDL_GetWindowSurface - Get the SDL surface associated with the window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowSurface)

func (*Window) SurfaceVSync

func (window *Window) SurfaceVSync() (int32, error)

SDL_GetWindowSurfaceVSync - Get VSync for the window surface. (https://wiki.libsdl.org/SDL3/SDL_GetWindowSurfaceVSync)

func (*Window) Sync

func (window *Window) Sync() error

SDL_SyncWindow - Block until any pending window state is finalized. (https://wiki.libsdl.org/SDL3/SDL_SyncWindow)

func (*Window) TextInputActive

func (window *Window) TextInputActive() bool

SDL_TextInputActive - Check whether or not Unicode text input events are enabled for a window. (https://wiki.libsdl.org/SDL3/SDL_TextInputActive)

func (*Window) TextInputArea

func (window *Window) TextInputArea() (Rect, int32, error)

SDL_GetTextInputArea - Get the area used to type Unicode text input. (https://wiki.libsdl.org/SDL3/SDL_GetTextInputArea)

func (*Window) Title

func (window *Window) Title() string

SDL_GetWindowTitle - Get the title of a window. (https://wiki.libsdl.org/SDL3/SDL_GetWindowTitle)

func (*Window) UpdateSurface

func (window *Window) UpdateSurface() error

SDL_UpdateWindowSurface - Copy the window surface to the screen. (https://wiki.libsdl.org/SDL3/SDL_UpdateWindowSurface)

func (*Window) UpdateSurfaceRects

func (window *Window) UpdateSurfaceRects(rects []Rect) error

SDL_UpdateWindowSurfaceRects - Copy areas of the window surface to the screen. (https://wiki.libsdl.org/SDL3/SDL_UpdateWindowSurfaceRects)

func (*Window) WarpMouseIn

func (window *Window) WarpMouseIn(x float32, y float32)

SDL_WarpMouseInWindow - Move the mouse cursor to the given position within the window. (https://wiki.libsdl.org/SDL3/SDL_WarpMouseInWindow)

type WindowEvent

type WindowEvent struct {
	Type EventType // SDL_EVENT_WINDOW_*

	Timestamp uint64   // In nanoseconds, populated using SDL_GetTicksNS()
	WindowID  WindowID // The associated window
	Data1     int32    // event dependent data
	Data2     int32    // event dependent data
	// contains filtered or unexported fields
}

SDL_WindowEvent - Window state change event data (event.window.*) (https://wiki.libsdl.org/SDL3/SDL_WindowEvent)

type WindowFlags

type WindowFlags uint64

SDL_WindowFlags - The flags on a window. (https://wiki.libsdl.org/SDL3/SDL_WindowFlags)

const (
	WINDOW_FULLSCREEN          WindowFlags = 0x0000000000000001 /**< window is in fullscreen mode */
	WINDOW_OPENGL              WindowFlags = 0x0000000000000002 /**< window usable with OpenGL context */
	WINDOW_OCCLUDED            WindowFlags = 0x0000000000000004 /**< window is occluded */
	WINDOW_HIDDEN              WindowFlags = 0x0000000000000008 /**< window is neither mapped onto the desktop nor shown in the taskbar/dock/window list; SDL_ShowWindow() is required for it to become visible */
	WINDOW_BORDERLESS          WindowFlags = 0x0000000000000010 /**< no window decoration */
	WINDOW_RESIZABLE           WindowFlags = 0x0000000000000020 /**< window can be resized */
	WINDOW_MINIMIZED           WindowFlags = 0x0000000000000040 /**< window is minimized */
	WINDOW_MAXIMIZED           WindowFlags = 0x0000000000000080 /**< window is maximized */
	WINDOW_MOUSE_GRABBED       WindowFlags = 0x0000000000000100 /**< window has grabbed mouse input */
	WINDOW_INPUT_FOCUS         WindowFlags = 0x0000000000000200 /**< window has input focus */
	WINDOW_MOUSE_FOCUS         WindowFlags = 0x0000000000000400 /**< window has mouse focus */
	WINDOW_EXTERNAL            WindowFlags = 0x0000000000000800 /**< window not created by SDL */
	WINDOW_MODAL               WindowFlags = 0x0000000000001000 /**< window is modal */
	WINDOW_HIGH_PIXEL_DENSITY  WindowFlags = 0x0000000000002000 /**< window uses high pixel density back buffer if possible */
	WINDOW_MOUSE_CAPTURE       WindowFlags = 0x0000000000004000 /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
	WINDOW_MOUSE_RELATIVE_MODE WindowFlags = 0x0000000000008000 /**< window has relative mode enabled */
	WINDOW_ALWAYS_ON_TOP       WindowFlags = 0x0000000000010000 /**< window should always be above others */
	WINDOW_UTILITY             WindowFlags = 0x0000000000020000 /**< window should be treated as a utility window, not showing in the task bar and window list */
	WINDOW_TOOLTIP             WindowFlags = 0x0000000000040000 /**< window should be treated as a tooltip and does not get mouse or keyboard focus, requires a parent window */
	WINDOW_POPUP_MENU          WindowFlags = 0x0000000000080000 /**< window should be treated as a popup menu, requires a parent window */
	WINDOW_KEYBOARD_GRABBED    WindowFlags = 0x0000000000100000 /**< window has grabbed keyboard input */
	WINDOW_FILL_DOCUMENT       WindowFlags = 0x0000000000200000 /**< window is in fill-document mode (Emscripten only), since SDL 3.4.0 */
	WINDOW_VULKAN              WindowFlags = 0x0000000010000000 /**< window usable for Vulkan surface */
	WINDOW_METAL               WindowFlags = 0x0000000020000000 /**< window usable for Metal view */
	WINDOW_TRANSPARENT         WindowFlags = 0x0000000040000000 /**< window with transparent buffer */
	WINDOW_NOT_FOCUSABLE       WindowFlags = 0x0000000080000000 /**< window should not be focusable */
)

type WindowID

type WindowID uint32

SDL_WindowID - This is a unique ID for a window. (https://wiki.libsdl.org/SDL3/SDL_WindowID)

func (WindowID) Window

func (id WindowID) Window() (*Window, error)

SDL_GetWindowFromID - Get a window from a stored ID. (https://wiki.libsdl.org/SDL3/SDL_GetWindowFromID)

type X11EventHook

type X11EventHook uintptr

SDL_X11EventHook - A callback to be used with [SDL_SetX11EventHook](SDL_SetX11EventHook). (https://wiki.libsdl.org/SDL3/SDL_X11EventHook)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL