Documentation
¶
Index ¶
- Constants
- func AddGamepadMapping(mapping string) (int, error)
- func AddGamepadMappingsFromFile(file string) (int, error)
- func AddGamepadMappingsFromIO(src unsafe.Pointer, closeIO bool) (int, error)
- func CreateWindowAndRenderer(title string, width, height int, windowFlags WindowFlags) (*Window, Renderer, error)
- func DetachVirtualJoystick(instanceID JoystickID) bool
- func GamepadEventsEnabled() bool
- func GetBooleanProperty(props uintptr, name string, defaultValue bool) bool
- func GetGamepadMappingForGUID(guid GUID) string
- func GetGamepadMappingForID(id GamepadID) string
- func GetGamepadMappings() ([]string, error)
- func GetGamepadNameForID(id GamepadID) string
- func GetGamepadPathForID(id GamepadID) string
- func GetGamepadPlayerIndexForID(id GamepadID) int
- func GetGamepadProductForID(id GamepadID) uint16
- func GetGamepadProductVersionForID(id GamepadID) uint16
- func GetGamepadStringForAxis(axis GamepadAxis) string
- func GetGamepadStringForButton(button GamepadButton) string
- func GetGamepadStringForType(t GamepadType) string
- func GetGamepadVendorForID(id GamepadID) uint16
- func GetHint(name Hint) string
- func GetHintBoolean(name Hint, defaultValue bool) bool
- func GetJoystickGUIDInfo(guid GUID) (vendor, product, version, crc16 uint16)
- func GetJoystickNameForID(instanceID JoystickID) string
- func GetJoystickPathForID(instanceID JoystickID) string
- func GetJoystickPlayerIndexForID(instanceID JoystickID) int
- func GetJoystickProductForID(instanceID JoystickID) uint16
- func GetJoystickProductVersionForID(instanceID JoystickID) uint16
- func GetJoystickVendorForID(instanceID JoystickID) uint16
- func HasGamepad() bool
- func HasJoystick() bool
- func Init(flags InitFlags) error
- func InitGamepadSubSystem() error
- func InitJoystickSubSystem() error
- func InitSubSystem(flags InitFlags) error
- func IsGamepad(id GamepadID) bool
- func IsJoystickVirtual(instanceID JoystickID) bool
- func JoystickEventsEnabled() bool
- func LockJoysticks()
- func PropGamepadCapMonoLEDBoolean() string
- func PropGamepadCapPlayerLEDBoolean() string
- func PropGamepadCapRGBLEDBoolean() string
- func Quit()
- func QuitGamepadSubSystem()
- func QuitJoystickSubSystem()
- func QuitSubSystem(flags InitFlags)
- func ReloadGamepadMappings() error
- func ResetHint(name Hint)
- func ResetHints()
- func SetGamepadEventsEnabled(enabled bool)
- func SetGamepadMapping(id GamepadID, mapping string) error
- func SetHint(name Hint, value string) error
- func SetHintWithPriority(name Hint, value string, priority HintPriority) error
- func SetJoystickEventsEnabled(enabled bool)
- func TryLockJoysticks() bool
- func UnlockJoysticks()
- func UpdateGamepads()
- func UpdateJoysticks()
- type AudioDeviceEvent
- type BaseEvent
- type BasicEvent
- type CameraDeviceEvent
- type ClipboardEvent
- type DisplayEvent
- type DisplayMode
- type DropEvent
- type Event
- type EventType
- type GUID
- type Gamepad
- func (g *Gamepad) AppleSFSymbolsNameForAxis(axis GamepadAxis) string
- func (g *Gamepad) AppleSFSymbolsNameForButton(button GamepadButton) string
- func (g *Gamepad) Close()
- func (g *Gamepad) Connected() bool
- func (g *Gamepad) ConnectionState() JoystickConnectionState
- func (g *Gamepad) FirmwareVersion() uint16
- func (g *Gamepad) GetAxis(axis GamepadAxis) int16
- func (g *Gamepad) GetBindings() ([]GamepadBinding, error)
- func (g *Gamepad) GetButton(button GamepadButton) bool
- func (g *Gamepad) GetButtonLabel(button GamepadButton) GamepadButtonLabel
- func (g *Gamepad) GetPlayerIndex() int
- func (g *Gamepad) GetProperties() uintptr
- func (g *Gamepad) GetSensorData(sensorType SensorType, values []float32) bool
- func (g *Gamepad) GetSteamHandle() uint64
- func (g *Gamepad) GetTouchpadFinger(touchpad, finger int) (bool, bool, float32, float32, float32)
- func (g *Gamepad) HasAxis(axis GamepadAxis) bool
- func (g *Gamepad) HasButton(button GamepadButton) bool
- func (g *Gamepad) HasSensor(sensorType SensorType) bool
- func (g *Gamepad) ID() GamepadID
- func (g *Gamepad) Joystick() *Joystick
- func (g *Gamepad) Mapping() string
- func (g *Gamepad) Name() string
- func (g *Gamepad) NumTouchpadFingers(touchpad int) int
- func (g *Gamepad) NumTouchpads() int
- func (g *Gamepad) Path() string
- func (g *Gamepad) PowerInfo() (int, int)
- func (g *Gamepad) Product() uint16
- func (g *Gamepad) ProductVersion() uint16
- func (g *Gamepad) RealType() GamepadType
- func (g *Gamepad) Rumble(lowFrequencyRumble, highFrequencyRumble uint16, durationMs uint32) bool
- func (g *Gamepad) RumbleTriggers(leftRumble, rightRumble uint16, durationMs uint32) bool
- func (g *Gamepad) SendEffect(data unsafe.Pointer, size int) bool
- func (g *Gamepad) SensorDataRate(sensorType SensorType) float32
- func (g *Gamepad) SensorEnabled(sensorType SensorType) bool
- func (g *Gamepad) Serial() string
- func (g *Gamepad) SetLED(red, green, blue uint8) bool
- func (g *Gamepad) SetPlayerIndex(index int) error
- func (g *Gamepad) SetSensorEnabled(sensorType SensorType, enabled bool) bool
- func (g *Gamepad) Type() GamepadType
- func (g *Gamepad) Vendor() uint16
- type GamepadAxis
- type GamepadAxisEvent
- type GamepadBinding
- type GamepadBindingType
- type GamepadButton
- type GamepadButtonEvent
- type GamepadButtonLabel
- type GamepadDeviceEvent
- type GamepadID
- type GamepadSensorEvent
- type GamepadTouchpadEvent
- type GamepadType
- type Hint
- type HintPriority
- type HitTestResult
- type InitFlags
- type JoyAxisEvent
- type JoyBallEvent
- type JoyBatteryEvent
- type JoyButtonEvent
- type JoyDeviceEvent
- type JoyHatEvent
- type Joystick
- func (j *Joystick) Close()
- func (j *Joystick) Connected() bool
- func (j *Joystick) ConnectionState() JoystickConnectionState
- func (j *Joystick) FirmwareVersion() uint16
- func (j *Joystick) GUID() GUID
- func (j *Joystick) GetAxis(axis int) int16
- func (j *Joystick) GetAxisInitialState(axis int) (bool, int16)
- func (j *Joystick) GetBall(ball int) (bool, int, int)
- func (j *Joystick) GetButton(button int) bool
- func (j *Joystick) GetHat(hat int) uint8
- func (j *Joystick) GetProperties() uintptr
- func (j *Joystick) ID() JoystickID
- func (j *Joystick) Name() string
- func (j *Joystick) NumAxes() int
- func (j *Joystick) NumBalls() int
- func (j *Joystick) NumButtons() int
- func (j *Joystick) NumHats() int
- func (j *Joystick) Path() string
- func (j *Joystick) PlayerIndex() int
- func (j *Joystick) PowerInfo() (int, int)
- func (j *Joystick) Product() uint16
- func (j *Joystick) ProductVersion() uint16
- func (j *Joystick) Rumble(lowFrequencyRumble, highFrequencyRumble uint16, durationMs uint32) bool
- func (j *Joystick) RumbleTriggers(leftRumble, rightRumble uint16, durationMs uint32) bool
- func (j *Joystick) SendEffect(data unsafe.Pointer, size int) bool
- func (j *Joystick) SendVirtualSensorData(sensorType int32, sensorTimestamp uint64, values []float32) bool
- func (j *Joystick) Serial() string
- func (j *Joystick) SetLED(red, green, blue uint8) bool
- func (j *Joystick) SetPlayerIndex(playerIndex int) error
- func (j *Joystick) SetVirtualAxis(axis int, value int16) bool
- func (j *Joystick) SetVirtualBall(ball int, xRel, yRel int16) bool
- func (j *Joystick) SetVirtualButton(button int, down bool) bool
- func (j *Joystick) SetVirtualHat(hat int, value uint8) bool
- func (j *Joystick) SetVirtualTouchpad(touchpad, finger int, down bool, x, y, pressure float32) bool
- func (j *Joystick) Type() JoystickType
- func (j *Joystick) Vendor() uint16
- type JoystickConnectionState
- type JoystickID
- type JoystickType
- type KeyCode
- type KeyboardDeviceEvent
- type KeyboardEvent
- type MouseButtonEvent
- type MouseDeviceEvent
- type MouseMotionEvent
- type MouseWheelEvent
- type PenAxisEvent
- type PenButtonEvent
- type PenMotionEvent
- type PenProximityEvent
- type PenTouchEvent
- type PinchFingerEvent
- type QuitEvent
- type Rect
- type RenderEvent
- type Renderer
- type SDLError
- type SensorEvent
- type SensorType
- type TextEditingCandidatesEvent
- type TextEditingEvent
- type TextInputEvent
- type TouchFingerEvent
- type UnknownEvent
- type UserEvent
- type Window
- func (w *Window) Destroy()
- func (w *Window) GetNativeHandle() (unsafe.Pointer, error)
- func (w *Window) GetPointerProperty(property WindowPointerProperty) uintptr
- func (w *Window) GetWindowFlags() WindowFlags
- func (w *Window) GetWindowKeyboardGrab() bool
- func (w *Window) GetWindowMouseGrab() bool
- func (w *Window) GetWindowPosition() (x, y int)
- func (w *Window) GetWindowRelativeMouseMode() bool
- func (w *Window) GetWindowSafeArea() (Rect, error)
- func (w *Window) GetWindowSize() (width, height int)
- func (w *Window) GetWindowTitle() string
- func (w *Window) GetX11WindowNumber() uintptr
- func (w *Window) HideWindow()
- func (w *Window) MaximizeWindow()
- func (w *Window) MinimizeWindow()
- func (w *Window) RaiseWindow()
- func (w *Window) RestoreWindow()
- func (w *Window) SetWindowAlwaysOnTop(alwaysOnTop bool) error
- func (w *Window) SetWindowBordered(bordered bool) error
- func (w *Window) SetWindowFillDocument(fillDocument bool) error
- func (w *Window) SetWindowFocusable(focusable bool) error
- func (w *Window) SetWindowFullscreen(fullscreen bool) error
- func (w *Window) SetWindowFullscreenMode(mode *DisplayMode) error
- func (w *Window) SetWindowHitTest(callback WindowHitTestFunc) error
- func (w *Window) SetWindowIcon(surface unsafe.Pointer)
- func (w *Window) SetWindowKeyboardGrab(grabbed bool) error
- func (w *Window) SetWindowMouseGrab(grabbed bool) error
- func (w *Window) SetWindowPosition(x, y int)
- func (w *Window) SetWindowRelativeMouseMode(enabled bool) error
- func (w *Window) SetWindowResizable(resizable bool) error
- func (w *Window) SetWindowSize(width, height int) error
- func (w *Window) SetWindowTitle(title string) error
- func (w *Window) ShowWindow()
- type WindowEvent
- type WindowFlags
- type WindowHitTestFunc
- type WindowPointerProperty
Constants ¶
const ( JoystickAxisMax = C.SDL_JOYSTICK_AXIS_MAX JoystickAxisMin = C.SDL_JOYSTICK_AXIS_MIN )
JoystickAxisMax and JoystickAxisMin are the largest and smallest values a joystick axis can report.
Variables ¶
This section is empty.
Functions ¶
func AddGamepadMapping ¶
AddGamepadMapping adds or updates a gamepad mapping string.
func AddGamepadMappingsFromFile ¶
AddGamepadMappingsFromFile loads gamepad mappings from a file.
func AddGamepadMappingsFromIO ¶
AddGamepadMappingsFromIO loads gamepad mappings from an SDL_IOStream.
func CreateWindowAndRenderer ¶
func CreateWindowAndRenderer(title string, width, height int, windowFlags WindowFlags) (*Window, Renderer, error)
CreateWindowAndRenderer creates a window and default renderer.
func DetachVirtualJoystick ¶
func DetachVirtualJoystick(instanceID JoystickID) bool
DetachVirtualJoystick detaches a virtual joystick.
func GamepadEventsEnabled ¶
func GamepadEventsEnabled() bool
GamepadEventsEnabled queries the state of gamepad event processing.
func GetBooleanProperty ¶
GetBooleanProperty gets a boolean property from an SDL properties group.
func GetGamepadMappingForGUID ¶
GetGamepadMappingForGUID gets the mapping string for a gamepad GUID.
func GetGamepadMappingForID ¶
GetGamepadMappingForID gets the mapping string for a gamepad ID.
func GetGamepadMappings ¶
GetGamepadMappings returns all current gamepad mapping strings.
func GetGamepadNameForID ¶
GetGamepadNameForID gets the implementation dependent name of a gamepad.
This can be called before any gamepads are opened.
func GetGamepadPathForID ¶
GetGamepadPathForID gets the implementation dependent path of a gamepad.
func GetGamepadPlayerIndexForID ¶
GetGamepadPlayerIndexForID gets the player index of a gamepad.
func GetGamepadProductForID ¶
GetGamepadProductForID gets the USB product ID of a gamepad, if available.
func GetGamepadProductVersionForID ¶
GetGamepadProductVersionForID gets the product version of a gamepad, if available.
func GetGamepadStringForAxis ¶
func GetGamepadStringForAxis(axis GamepadAxis) string
GetGamepadStringForAxis converts a GamepadAxis to a string.
func GetGamepadStringForButton ¶
func GetGamepadStringForButton(button GamepadButton) string
GetGamepadStringForButton converts a GamepadButton to a string.
func GetGamepadStringForType ¶
func GetGamepadStringForType(t GamepadType) string
GetGamepadStringForType converts a GamepadType to a string.
func GetGamepadVendorForID ¶
GetGamepadVendorForID gets the USB vendor ID of a gamepad, if available.
func GetHint ¶
GetHint gets the value of a hint.
\param name the hint to query. \returns the string value of a hint or NULL if the hint isn't set.
hreadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_SetHint \sa SDL_SetHintWithPriority
func GetHintBoolean ¶
GetHintBoolean gets the boolean value of a hint variable.
\param name the name of the hint to get the boolean value from. \param default_value the value to return if the hint does not exist. \returns the boolean value of a hint or the provided default value if the
hint does not exist. hreadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_GetHint \sa SDL_SetHint
func GetJoystickGUIDInfo ¶
GetJoystickGUIDInfo gets the device information encoded in a GUID structure.
func GetJoystickNameForID ¶
func GetJoystickNameForID(instanceID JoystickID) string
GetJoystickNameForID gets the implementation dependent name of a joystick.
This can be called before any joysticks are opened.
func GetJoystickPathForID ¶
func GetJoystickPathForID(instanceID JoystickID) string
GetJoystickPathForID gets the implementation dependent path of a joystick.
This can be called before any joysticks are opened.
func GetJoystickPlayerIndexForID ¶
func GetJoystickPlayerIndexForID(instanceID JoystickID) int
GetJoystickPlayerIndexForID gets the player index of a joystick.
This can be called before any joysticks are opened.
func GetJoystickProductForID ¶
func GetJoystickProductForID(instanceID JoystickID) uint16
GetJoystickProductForID gets the USB product ID of a joystick, if available.
This can be called before any joysticks are opened.
func GetJoystickProductVersionForID ¶
func GetJoystickProductVersionForID(instanceID JoystickID) uint16
GetJoystickProductVersionForID gets the product version of a joystick, if available.
This can be called before any joysticks are opened.
func GetJoystickVendorForID ¶
func GetJoystickVendorForID(instanceID JoystickID) uint16
GetJoystickVendorForID gets the USB vendor ID of a joystick, if available.
This can be called before any joysticks are opened.
func HasGamepad ¶
func HasGamepad() bool
HasGamepad returns whether a gamepad is currently connected.
func HasJoystick ¶
func HasJoystick() bool
HasJoystick returns whether a joystick is currently connected.
func Init ¶
Init initializes the SDL library.
Init simply forwards to calling SDL_InitSubSystem(). Therefore, the two may be used interchangeably.
Subsystem initialization is ref-counted; call QuitSubSystem() for each InitSubSystem(), or call Quit() to force shutdown.
This function should only be called on the main thread.
func InitGamepadSubSystem ¶
func InitGamepadSubSystem() error
func InitJoystickSubSystem ¶
func InitJoystickSubSystem() error
InitJoystickSubSystem initializes the joystick subsystem.
The joystick subsystem must be initialized before a joystick can be opened for use.
func InitSubSystem ¶
InitSubSystem compatibility function to initialize the SDL library.
This function and SDL_Init() are interchangeable.
This function should only be called on the main thread.
func IsJoystickVirtual ¶
func IsJoystickVirtual(instanceID JoystickID) bool
IsJoystickVirtual queries whether or not a joystick is virtual.
func JoystickEventsEnabled ¶
func JoystickEventsEnabled() bool
JoystickEventsEnabled queries the state of joystick event processing.
func PropGamepadCapMonoLEDBoolean ¶
func PropGamepadCapMonoLEDBoolean() string
PropGamepadCapMonoLEDBoolean returns the gamepad mono LED capability property key.
func PropGamepadCapPlayerLEDBoolean ¶
func PropGamepadCapPlayerLEDBoolean() string
PropGamepadCapPlayerLEDBoolean returns the gamepad player LED capability property key.
func PropGamepadCapRGBLEDBoolean ¶
func PropGamepadCapRGBLEDBoolean() string
PropGamepadCapRGBLEDBoolean returns the gamepad RGB LED capability property key.
func Quit ¶
func Quit()
Quit cleans up all initialized subsystems.
This function should only be called on the main thread.
func QuitGamepadSubSystem ¶
func QuitGamepadSubSystem()
func QuitJoystickSubSystem ¶
func QuitJoystickSubSystem()
QuitJoystickSubSystem shuts down the joystick subsystem.
func QuitSubSystem ¶
func QuitSubSystem(flags InitFlags)
QuitSubSystem shuts down specific SDL subsystems.
You still need to call SDL_Quit() even if you close all open subsystems with SDL_QuitSubSystem().
func ReloadGamepadMappings ¶
func ReloadGamepadMappings() error
ReloadGamepadMappings reinitializes the gamepad mapping database.
func ResetHint ¶
func ResetHint(name Hint)
ResetHint resets a hint to the default value.
This will reset a hint to the value of the environment variable, or NULL if the environment isn't set. Callbacks will be called normally with this change.
\param name the hint to set. \returns true on success or false on failure; call SDL_GetError() for more
information. hreadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_SetHint \sa SDL_ResetHints
func ResetHints ¶
func ResetHints()
ResetHints resets all hints to the default values.
This will reset all hints to the value of the associated environment variable, or NULL if the environment isn't set. Callbacks will be called normally with this change.
hreadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_ResetHint
func SetGamepadEventsEnabled ¶
func SetGamepadEventsEnabled(enabled bool)
SetGamepadEventsEnabled sets the state of gamepad event processing.
func SetGamepadMapping ¶
SetGamepadMapping sets the current mapping of a joystick or gamepad.
Pass an empty mapping string to clear the mapping.
func SetHint ¶
SetHint sets a hint with normal priority.
Hints will not be set if there is an existing override hint or environment variable that takes precedence. You can use SDL_SetHintWithPriority() to set the hint with override priority instead.
\param name the hint to set. \param value the value of the hint variable. \returns true on success or false on failure; call SDL_GetError() for more
information. hreadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_GetHint \sa SDL_ResetHint \sa SDL_SetHintWithPriority
func SetHintWithPriority ¶
func SetHintWithPriority(name Hint, value string, priority HintPriority) error
SetHintWithPriority sets a hint with a specific priority.
The priority controls the behavior when setting a hint that already has a value. Hints will replace existing hints of their priority and lower. Environment variables are considered to have override priority.
\param name the hint to set. \param value the value of the hint variable. \param priority the SDL_HintPriority level for the hint. \returns true on success or false on failure; call SDL_GetError() for more
information. hreadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_GetHint \sa SDL_ResetHint \sa SDL_SetHint
func SetJoystickEventsEnabled ¶
func SetJoystickEventsEnabled(enabled bool)
SetJoystickEventsEnabled sets the state of joystick event processing.
func TryLockJoysticks ¶
func TryLockJoysticks() bool
TryLockJoysticks attempts to lock the joysticks while processing.
func UpdateGamepads ¶
func UpdateGamepads()
UpdateGamepads manually pumps gamepad updates if not using the loop.
func UpdateJoysticks ¶
func UpdateJoysticks()
UpdateJoysticks updates the current state of the open joysticks.
Types ¶
type AudioDeviceEvent ¶
AudioDeviceEvent is audio device event structure.
func (*AudioDeviceEvent) Base ¶
func (e *AudioDeviceEvent) Base() BaseEvent
type BasicEvent ¶
type BasicEvent struct {
BaseEvent
}
BasicEvent wraps events that only provide common fields.
func (*BasicEvent) Base ¶
func (e *BasicEvent) Base() BaseEvent
type CameraDeviceEvent ¶
CameraDeviceEvent is camera device event structure.
func (*CameraDeviceEvent) Base ¶
func (e *CameraDeviceEvent) Base() BaseEvent
type ClipboardEvent ¶
ClipboardEvent is triggered when the clipboard contents have changed.
func (*ClipboardEvent) Base ¶
func (e *ClipboardEvent) Base() BaseEvent
type DisplayEvent ¶
DisplayEvent is display state change event data.
func (*DisplayEvent) Base ¶
func (e *DisplayEvent) Base() BaseEvent
type DisplayMode ¶
type DisplayMode struct {
DisplayID uint32
Format uint32
W int
H int
PixelDensity float32
RefreshRate float32
RefreshRateNumerator int
RefreshRateDenominator int
}
DisplayMode defines a display mode.
type DropEvent ¶
type DropEvent struct {
BaseEvent
WindowID uint32
X float32
Y float32
Source unsafe.Pointer
Data unsafe.Pointer
}
DropEvent is an event used to drop text or request a file open by the system.
type Event ¶
type Event interface {
Base() BaseEvent
}
Event is the common interface for all wrapped SDL events.
func PollEvent ¶
PollEvent polls for currently pending events.
It returns false if there are no events available.
type EventType ¶
type EventType uint32
EventType specifies the types of events that can be delivered.
const ( EventTypeFirst EventType = C.SDL_EVENT_FIRST EventTypeQuit EventType = C.SDL_EVENT_QUIT EventTypeTerminating EventType = C.SDL_EVENT_TERMINATING EventTypeLowMemory EventType = C.SDL_EVENT_LOW_MEMORY EventTypeWillEnterBackground EventType = C.SDL_EVENT_WILL_ENTER_BACKGROUND EventTypeDidEnterBackground EventType = C.SDL_EVENT_DID_ENTER_BACKGROUND EventTypeWillEnterForeground EventType = C.SDL_EVENT_WILL_ENTER_FOREGROUND EventTypeDidEnterForeground EventType = C.SDL_EVENT_DID_ENTER_FOREGROUND EventTypeLocaleChanged EventType = C.SDL_EVENT_LOCALE_CHANGED EventTypeSystemThemeChanged EventType = C.SDL_EVENT_SYSTEM_THEME_CHANGED EventTypeDisplayOrientation EventType = C.SDL_EVENT_DISPLAY_ORIENTATION EventTypeDisplayAdded EventType = C.SDL_EVENT_DISPLAY_ADDED EventTypeDisplayRemoved EventType = C.SDL_EVENT_DISPLAY_REMOVED EventTypeDisplayMoved EventType = C.SDL_EVENT_DISPLAY_MOVED EventTypeDisplayDesktopModeChanged EventType = C.SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED EventTypeDisplayCurrentModeChanged EventType = C.SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED EventTypeDisplayContentScaleChanged EventType = C.SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED EventTypeDisplayUsableBoundsChanged EventType = C.SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED EventTypeWindowShown EventType = C.SDL_EVENT_WINDOW_SHOWN EventTypeWindowHidden EventType = C.SDL_EVENT_WINDOW_HIDDEN EventTypeWindowExposed EventType = C.SDL_EVENT_WINDOW_EXPOSED EventTypeWindowMoved EventType = C.SDL_EVENT_WINDOW_MOVED EventTypeWindowResized EventType = C.SDL_EVENT_WINDOW_RESIZED EventTypeWindowPixelSizeChanged EventType = C.SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED EventTypeWindowMetalViewResized EventType = C.SDL_EVENT_WINDOW_METAL_VIEW_RESIZED EventTypeWindowMinimized EventType = C.SDL_EVENT_WINDOW_MINIMIZED EventTypeWindowMaximized EventType = C.SDL_EVENT_WINDOW_MAXIMIZED EventTypeWindowRestored EventType = C.SDL_EVENT_WINDOW_RESTORED EventTypeWindowMouseEnter EventType = C.SDL_EVENT_WINDOW_MOUSE_ENTER EventTypeWindowMouseLeave EventType = C.SDL_EVENT_WINDOW_MOUSE_LEAVE EventTypeWindowFocusGained EventType = C.SDL_EVENT_WINDOW_FOCUS_GAINED EventTypeWindowFocusLost EventType = C.SDL_EVENT_WINDOW_FOCUS_LOST EventTypeWindowCloseRequested EventType = C.SDL_EVENT_WINDOW_CLOSE_REQUESTED EventTypeWindowHitTest EventType = C.SDL_EVENT_WINDOW_HIT_TEST EventTypeWindowICCProfChanged EventType = C.SDL_EVENT_WINDOW_ICCPROF_CHANGED EventTypeWindowDisplayChanged EventType = C.SDL_EVENT_WINDOW_DISPLAY_CHANGED EventTypeWindowDisplayScaleChanged EventType = C.SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED EventTypeWindowSafeAreaChanged EventType = C.SDL_EVENT_WINDOW_SAFE_AREA_CHANGED EventTypeWindowOccluded EventType = C.SDL_EVENT_WINDOW_OCCLUDED EventTypeWindowEnterFullscreen EventType = C.SDL_EVENT_WINDOW_ENTER_FULLSCREEN EventTypeWindowLeaveFullscreen EventType = C.SDL_EVENT_WINDOW_LEAVE_FULLSCREEN EventTypeWindowDestroyed EventType = C.SDL_EVENT_WINDOW_DESTROYED EventTypeWindowHDRStateChanged EventType = C.SDL_EVENT_WINDOW_HDR_STATE_CHANGED EventTypeKeyDown EventType = C.SDL_EVENT_KEY_DOWN EventTypeKeyUp EventType = C.SDL_EVENT_KEY_UP EventTypeTextEditing EventType = C.SDL_EVENT_TEXT_EDITING EventTypeTextInput EventType = C.SDL_EVENT_TEXT_INPUT EventTypeKeymapChanged EventType = C.SDL_EVENT_KEYMAP_CHANGED EventTypeKeyboardAdded EventType = C.SDL_EVENT_KEYBOARD_ADDED EventTypeKeyboardRemoved EventType = C.SDL_EVENT_KEYBOARD_REMOVED EventTypeTextEditingCandidates EventType = C.SDL_EVENT_TEXT_EDITING_CANDIDATES EventTypeScreenKeyboardShown EventType = C.SDL_EVENT_SCREEN_KEYBOARD_SHOWN EventTypeScreenKeyboardHidden EventType = C.SDL_EVENT_SCREEN_KEYBOARD_HIDDEN EventTypeMouseMotion EventType = C.SDL_EVENT_MOUSE_MOTION EventTypeMouseButtonDown EventType = C.SDL_EVENT_MOUSE_BUTTON_DOWN EventTypeMouseButtonUp EventType = C.SDL_EVENT_MOUSE_BUTTON_UP EventTypeMouseWheel EventType = C.SDL_EVENT_MOUSE_WHEEL EventTypeMouseAdded EventType = C.SDL_EVENT_MOUSE_ADDED EventTypeMouseRemoved EventType = C.SDL_EVENT_MOUSE_REMOVED EventTypeJoystickAxisMotion EventType = C.SDL_EVENT_JOYSTICK_AXIS_MOTION EventTypeJoystickBallMotion EventType = C.SDL_EVENT_JOYSTICK_BALL_MOTION EventTypeJoystickHatMotion EventType = C.SDL_EVENT_JOYSTICK_HAT_MOTION EventTypeJoystickButtonDown EventType = C.SDL_EVENT_JOYSTICK_BUTTON_DOWN EventTypeJoystickButtonUp EventType = C.SDL_EVENT_JOYSTICK_BUTTON_UP EventTypeJoystickAdded EventType = C.SDL_EVENT_JOYSTICK_ADDED EventTypeJoystickRemoved EventType = C.SDL_EVENT_JOYSTICK_REMOVED EventTypeJoystickBatteryUpdated EventType = C.SDL_EVENT_JOYSTICK_BATTERY_UPDATED EventTypeJoystickUpdateComplete EventType = C.SDL_EVENT_JOYSTICK_UPDATE_COMPLETE EventTypeGamepadAxisMotion EventType = C.SDL_EVENT_GAMEPAD_AXIS_MOTION EventTypeGamepadButtonDown EventType = C.SDL_EVENT_GAMEPAD_BUTTON_DOWN EventTypeGamepadButtonUp EventType = C.SDL_EVENT_GAMEPAD_BUTTON_UP EventTypeGamepadAdded EventType = C.SDL_EVENT_GAMEPAD_ADDED EventTypeGamepadRemoved EventType = C.SDL_EVENT_GAMEPAD_REMOVED EventTypeGamepadRemapped EventType = C.SDL_EVENT_GAMEPAD_REMAPPED EventTypeGamepadTouchpadDown EventType = C.SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN EventTypeGamepadTouchpadMotion EventType = C.SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION EventTypeGamepadTouchpadUp EventType = C.SDL_EVENT_GAMEPAD_TOUCHPAD_UP EventTypeGamepadSensorUpdate EventType = C.SDL_EVENT_GAMEPAD_SENSOR_UPDATE EventTypeGamepadUpdateComplete EventType = C.SDL_EVENT_GAMEPAD_UPDATE_COMPLETE EventTypeGamepadSteamHandleUpdated EventType = C.SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED EventTypeFingerDown EventType = C.SDL_EVENT_FINGER_DOWN EventTypeFingerUp EventType = C.SDL_EVENT_FINGER_UP EventTypeFingerMotion EventType = C.SDL_EVENT_FINGER_MOTION EventTypeFingerCanceled EventType = C.SDL_EVENT_FINGER_CANCELED EventTypePinchBegin EventType = C.SDL_EVENT_PINCH_BEGIN EventTypePinchUpdate EventType = C.SDL_EVENT_PINCH_UPDATE EventTypePinchEnd EventType = C.SDL_EVENT_PINCH_END EventTypeClipboardUpdate EventType = C.SDL_EVENT_CLIPBOARD_UPDATE EventTypeDropFile EventType = C.SDL_EVENT_DROP_FILE EventTypeDropText EventType = C.SDL_EVENT_DROP_TEXT EventTypeDropBegin EventType = C.SDL_EVENT_DROP_BEGIN EventTypeDropComplete EventType = C.SDL_EVENT_DROP_COMPLETE EventTypeDropPosition EventType = C.SDL_EVENT_DROP_POSITION EventTypeAudioDeviceAdded EventType = C.SDL_EVENT_AUDIO_DEVICE_ADDED EventTypeAudioDeviceRemoved EventType = C.SDL_EVENT_AUDIO_DEVICE_REMOVED EventTypeAudioDeviceFormatChanged EventType = C.SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED EventTypeSensorUpdate EventType = C.SDL_EVENT_SENSOR_UPDATE EventTypePenProximityIn EventType = C.SDL_EVENT_PEN_PROXIMITY_IN EventTypePenProximityOut EventType = C.SDL_EVENT_PEN_PROXIMITY_OUT EventTypePenDown EventType = C.SDL_EVENT_PEN_DOWN EventTypePenUp EventType = C.SDL_EVENT_PEN_UP EventTypePenButtonDown EventType = C.SDL_EVENT_PEN_BUTTON_DOWN EventTypePenButtonUp EventType = C.SDL_EVENT_PEN_BUTTON_UP EventTypePenMotion EventType = C.SDL_EVENT_PEN_MOTION EventTypePenAxis EventType = C.SDL_EVENT_PEN_AXIS EventTypeCameraDeviceAdded EventType = C.SDL_EVENT_CAMERA_DEVICE_ADDED EventTypeCameraDeviceRemoved EventType = C.SDL_EVENT_CAMERA_DEVICE_REMOVED EventTypeCameraDeviceApproved EventType = C.SDL_EVENT_CAMERA_DEVICE_APPROVED EventTypeCameraDeviceDenied EventType = C.SDL_EVENT_CAMERA_DEVICE_DENIED EventTypeRenderTargetsReset EventType = C.SDL_EVENT_RENDER_TARGETS_RESET EventTypeRenderDeviceReset EventType = C.SDL_EVENT_RENDER_DEVICE_RESET EventTypeRenderDeviceLost EventType = C.SDL_EVENT_RENDER_DEVICE_LOST EventTypePrivate0 EventType = C.SDL_EVENT_PRIVATE0 EventTypePrivate1 EventType = C.SDL_EVENT_PRIVATE1 EventTypePrivate2 EventType = C.SDL_EVENT_PRIVATE2 EventTypePrivate3 EventType = C.SDL_EVENT_PRIVATE3 EventTypePollSentinel EventType = C.SDL_EVENT_POLL_SENTINEL EventTypeUser EventType = C.SDL_EVENT_USER EventTypeLast EventType = C.SDL_EVENT_LAST EventTypeEnumPadding EventType = C.SDL_EVENT_ENUM_PADDING )
Event type constants.
type GUID ¶
type GUID [16]byte
GUID is a 128-bit identifier for an input device that identifies that device across runs of SDL programs on the same platform.
func GetGamepadGUIDForID ¶
GetGamepadGUIDForID gets the implementation-dependent GUID of a gamepad.
func GetJoystickGUIDForID ¶
func GetJoystickGUIDForID(instanceID JoystickID) GUID
GetJoystickGUIDForID gets the implementation-dependent GUID of a joystick.
This can be called before any joysticks are opened.
func StringToGUID ¶
StringToGUID converts a GUID string into a GUID structure.
type Gamepad ¶
type Gamepad struct {
// contains filtered or unexported fields
}
Gamepad the structure used to identify an SDL gamepad.
func GetGamepadFromID ¶
GetGamepadFromID gets the SDL_Gamepad associated with a joystick instance ID, if it has been opened.
func GetGamepadFromPlayerIndex ¶
GetGamepadFromPlayerIndex gets the SDL_Gamepad associated with a player index.
func OpenGamepad ¶
OpenGamepad opens a gamepad for use.
func (*Gamepad) AppleSFSymbolsNameForAxis ¶
func (g *Gamepad) AppleSFSymbolsNameForAxis(axis GamepadAxis) string
AppleSFSymbolsNameForAxis gets the Apple sfSymbolsName for a gamepad axis.
func (*Gamepad) AppleSFSymbolsNameForButton ¶
func (g *Gamepad) AppleSFSymbolsNameForButton(button GamepadButton) string
AppleSFSymbolsNameForButton gets the Apple sfSymbolsName for a gamepad button.
func (*Gamepad) Close ¶
func (g *Gamepad) Close()
Close closes a gamepad previously opened with SDL_OpenGamepad().
func (*Gamepad) Connected ¶
Connected checks if a gamepad has been opened and is currently connected.
func (*Gamepad) ConnectionState ¶
func (g *Gamepad) ConnectionState() JoystickConnectionState
ConnectionState gets the connection state of an opened gamepad.
func (*Gamepad) FirmwareVersion ¶
FirmwareVersion gets the firmware version of an opened gamepad, if available.
func (*Gamepad) GetAxis ¶
func (g *Gamepad) GetAxis(axis GamepadAxis) int16
GetAxis gets the current state of an axis control on a gamepad.
func (*Gamepad) GetBindings ¶
func (g *Gamepad) GetBindings() ([]GamepadBinding, error)
GetBindings gets joystick-layer bindings for an opened gamepad.
func (*Gamepad) GetButton ¶
func (g *Gamepad) GetButton(button GamepadButton) bool
GetButton gets the current state of a button on a gamepad.
func (*Gamepad) GetButtonLabel ¶
func (g *Gamepad) GetButtonLabel(button GamepadButton) GamepadButtonLabel
GetButtonLabel gets the label of a button on a gamepad.
func (*Gamepad) GetPlayerIndex ¶
GetPlayerIndex gets the player index of an opened gamepad.
func (*Gamepad) GetProperties ¶
GetProperties gets the properties associated with an opened gamepad.
func (*Gamepad) GetSensorData ¶
func (g *Gamepad) GetSensorData(sensorType SensorType, values []float32) bool
GetSensorData gets the current state of a gamepad sensor.
func (*Gamepad) GetSteamHandle ¶
GetSteamHandle gets the Steam Input handle for an opened gamepad, if available.
Returns 0 when unavailable.
func (*Gamepad) GetTouchpadFinger ¶
GetTouchpadFinger gets the current state of a finger on a gamepad touchpad.
func (*Gamepad) HasAxis ¶
func (g *Gamepad) HasAxis(axis GamepadAxis) bool
HasAxis queries whether a gamepad has a given axis.
func (*Gamepad) HasButton ¶
func (g *Gamepad) HasButton(button GamepadButton) bool
HasButton queries whether a gamepad has a given button.
func (*Gamepad) HasSensor ¶
func (g *Gamepad) HasSensor(sensorType SensorType) bool
HasSensor queries whether a gamepad has a given sensor type.
func (*Gamepad) NumTouchpadFingers ¶
NumTouchpadFingers gets the number of simultaneous fingers supported on a gamepad touchpad.
func (*Gamepad) NumTouchpads ¶
NumTouchpads gets the number of touchpads on a gamepad.
func (*Gamepad) ProductVersion ¶
ProductVersion gets the product version of an opened gamepad, if available.
func (*Gamepad) RealType ¶
func (g *Gamepad) RealType() GamepadType
RealType gets the type of an opened gamepad, ignoring mapping override.
func (*Gamepad) RumbleTriggers ¶
RumbleTriggers starts a rumble effect in a gamepad's triggers.
func (*Gamepad) SendEffect ¶
SendEffect sends a gamepad-specific effect packet.
func (*Gamepad) SensorDataRate ¶
func (g *Gamepad) SensorDataRate(sensorType SensorType) float32
SensorDataRate gets the data rate of a gamepad sensor.
func (*Gamepad) SensorEnabled ¶
func (g *Gamepad) SensorEnabled(sensorType SensorType) bool
SensorEnabled queries whether sensor data reporting is enabled for a gamepad sensor.
func (*Gamepad) SetPlayerIndex ¶
SetPlayerIndex sets the player index of an opened gamepad.
func (*Gamepad) SetSensorEnabled ¶
func (g *Gamepad) SetSensorEnabled(sensorType SensorType, enabled bool) bool
SetSensorEnabled sets whether sensor data reporting is enabled for a gamepad sensor.
func (*Gamepad) Type ¶
func (g *Gamepad) Type() GamepadType
Type gets the type of an opened gamepad.
type GamepadAxis ¶
type GamepadAxis int32
GamepadAxis the list of axes available on a gamepad.
const ( GamepadAxisInvalid GamepadAxis = C.SDL_GAMEPAD_AXIS_INVALID GamepadAxisLeftX GamepadAxis = C.SDL_GAMEPAD_AXIS_LEFTX GamepadAxisLeftY GamepadAxis = C.SDL_GAMEPAD_AXIS_LEFTY GamepadAxisRightX GamepadAxis = C.SDL_GAMEPAD_AXIS_RIGHTX GamepadAxisRightY GamepadAxis = C.SDL_GAMEPAD_AXIS_RIGHTY GamepadAxisLeftTrigger GamepadAxis = C.SDL_GAMEPAD_AXIS_LEFT_TRIGGER GamepadAxisRightTrigger GamepadAxis = C.SDL_GAMEPAD_AXIS_RIGHT_TRIGGER )
func GetGamepadAxisFromString ¶
func GetGamepadAxisFromString(s string) GamepadAxis
GetGamepadAxisFromString converts a string to a GamepadAxis.
type GamepadAxisEvent ¶
GamepadAxisEvent is gamepad axis motion event structure.
func (*GamepadAxisEvent) Base ¶
func (e *GamepadAxisEvent) Base() BaseEvent
type GamepadBinding ¶
type GamepadBinding struct {
InputType GamepadBindingType
InputButton int
InputAxis int
InputAxisMin int
InputAxisMax int
InputHat int
InputHatMask int
OutputType GamepadBindingType
OutputButton GamepadButton
OutputAxis GamepadAxis
OutputAxisMin int
OutputAxisMax int
}
GamepadBinding describes one joystick-layer binding for a gamepad.
type GamepadBindingType ¶
type GamepadBindingType int32
GamepadBindingType describes the type of a gamepad control binding.
const ( GamepadBindingTypeNone GamepadBindingType = C.SDL_GAMEPAD_BINDTYPE_NONE GamepadBindingTypeButton GamepadBindingType = C.SDL_GAMEPAD_BINDTYPE_BUTTON GamepadBindingTypeAxis GamepadBindingType = C.SDL_GAMEPAD_BINDTYPE_AXIS GamepadBindingTypeHat GamepadBindingType = C.SDL_GAMEPAD_BINDTYPE_HAT )
type GamepadButton ¶
type GamepadButton int32
GamepadButton the list of buttons available on a gamepad.
const ( GamepadButtonInvalid GamepadButton = C.SDL_GAMEPAD_BUTTON_INVALID GamepadButtonSouth GamepadButton = C.SDL_GAMEPAD_BUTTON_SOUTH GamepadButtonEast GamepadButton = C.SDL_GAMEPAD_BUTTON_EAST GamepadButtonWest GamepadButton = C.SDL_GAMEPAD_BUTTON_WEST GamepadButtonNorth GamepadButton = C.SDL_GAMEPAD_BUTTON_NORTH GamepadButtonBack GamepadButton = C.SDL_GAMEPAD_BUTTON_BACK GamepadButtonGuide GamepadButton = C.SDL_GAMEPAD_BUTTON_GUIDE GamepadButtonStart GamepadButton = C.SDL_GAMEPAD_BUTTON_START GamepadButtonLeftStick GamepadButton = C.SDL_GAMEPAD_BUTTON_LEFT_STICK GamepadButtonRightStick GamepadButton = C.SDL_GAMEPAD_BUTTON_RIGHT_STICK GamepadButtonLeftShoulder GamepadButton = C.SDL_GAMEPAD_BUTTON_LEFT_SHOULDER GamepadButtonRightShoulder GamepadButton = C.SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER GamepadButtonDpadUp GamepadButton = C.SDL_GAMEPAD_BUTTON_DPAD_UP GamepadButtonDpadDown GamepadButton = C.SDL_GAMEPAD_BUTTON_DPAD_DOWN GamepadButtonDpadLeft GamepadButton = C.SDL_GAMEPAD_BUTTON_DPAD_LEFT GamepadButtonDpadRight GamepadButton = C.SDL_GAMEPAD_BUTTON_DPAD_RIGHT GamepadButtonMisc1 GamepadButton = C.SDL_GAMEPAD_BUTTON_MISC1 GamepadButtonRightPaddle1 GamepadButton = C.SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1 GamepadButtonLeftPaddle1 GamepadButton = C.SDL_GAMEPAD_BUTTON_LEFT_PADDLE1 GamepadButtonRightPaddle2 GamepadButton = C.SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2 GamepadButtonLeftPaddle2 GamepadButton = C.SDL_GAMEPAD_BUTTON_LEFT_PADDLE2 GamepadButtonTouchpad GamepadButton = C.SDL_GAMEPAD_BUTTON_TOUCHPAD GamepadButtonMisc2 GamepadButton = C.SDL_GAMEPAD_BUTTON_MISC2 GamepadButtonMisc3 GamepadButton = C.SDL_GAMEPAD_BUTTON_MISC3 GamepadButtonMisc4 GamepadButton = C.SDL_GAMEPAD_BUTTON_MISC4 GamepadButtonMisc5 GamepadButton = C.SDL_GAMEPAD_BUTTON_MISC5 GamepadButtonMisc6 GamepadButton = C.SDL_GAMEPAD_BUTTON_MISC6 )
func GetGamepadButtonFromString ¶
func GetGamepadButtonFromString(s string) GamepadButton
GetGamepadButtonFromString converts a string to a GamepadButton.
type GamepadButtonEvent ¶
GamepadButtonEvent is gamepad button event structure.
func (*GamepadButtonEvent) Base ¶
func (e *GamepadButtonEvent) Base() BaseEvent
type GamepadButtonLabel ¶
type GamepadButtonLabel int32
GamepadButtonLabel the set of gamepad button labels.
const ( GamepadButtonLabelUnknown GamepadButtonLabel = C.SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN GamepadButtonLabelA GamepadButtonLabel = C.SDL_GAMEPAD_BUTTON_LABEL_A GamepadButtonLabelB GamepadButtonLabel = C.SDL_GAMEPAD_BUTTON_LABEL_B GamepadButtonLabelX GamepadButtonLabel = C.SDL_GAMEPAD_BUTTON_LABEL_X GamepadButtonLabelY GamepadButtonLabel = C.SDL_GAMEPAD_BUTTON_LABEL_Y GamepadButtonLabelCross GamepadButtonLabel = C.SDL_GAMEPAD_BUTTON_LABEL_CROSS GamepadButtonLabelCircle GamepadButtonLabel = C.SDL_GAMEPAD_BUTTON_LABEL_CIRCLE GamepadButtonLabelSquare GamepadButtonLabel = C.SDL_GAMEPAD_BUTTON_LABEL_SQUARE GamepadButtonLabelTriangle GamepadButtonLabel = C.SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE )
func GetGamepadButtonLabelForType ¶
func GetGamepadButtonLabelForType(t GamepadType, button GamepadButton) GamepadButtonLabel
GetGamepadButtonLabelForType gets the button label for a button on a gamepad type.
type GamepadDeviceEvent ¶
GamepadDeviceEvent is gamepad device event data.
func (*GamepadDeviceEvent) Base ¶
func (e *GamepadDeviceEvent) Base() BaseEvent
type GamepadID ¶
type GamepadID int32
func GetGamepads ¶
GetGamepads returns a list of currently connected gamepads.
type GamepadSensorEvent ¶
type GamepadSensorEvent struct {
BaseEvent
Which uint32
Sensor int32
Data0 float32
Data1 float32
Data2 float32
SensorTimestamp uint64
}
GamepadSensorEvent is gamepad sensor event structure.
func (*GamepadSensorEvent) Base ¶
func (e *GamepadSensorEvent) Base() BaseEvent
type GamepadTouchpadEvent ¶
type GamepadTouchpadEvent struct {
BaseEvent
Which int32
Touchpad int32
Finger int32
X float32
Y float32
Pressure float32
}
GamepadTouchpadEvent is gamepad touchpad event data.
func (*GamepadTouchpadEvent) Base ¶
func (e *GamepadTouchpadEvent) Base() BaseEvent
type GamepadType ¶
type GamepadType int32
GamepadType standard gamepad types.
const ( GamepadTypeUnknown GamepadType = C.SDL_GAMEPAD_TYPE_UNKNOWN GamepadTypeStandard GamepadType = C.SDL_GAMEPAD_TYPE_STANDARD GamepadTypeXbox360 GamepadType = C.SDL_GAMEPAD_TYPE_XBOX360 GamepadTypeXboxOne GamepadType = C.SDL_GAMEPAD_TYPE_XBOXONE GamepadTypePS3 GamepadType = C.SDL_GAMEPAD_TYPE_PS3 GamepadTypePS4 GamepadType = C.SDL_GAMEPAD_TYPE_PS4 GamepadTypePS5 GamepadType = C.SDL_GAMEPAD_TYPE_PS5 GamepadTypeNintendoSwitchPro GamepadType = C.SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO GamepadTypeNintendoSwitchJoyconLeft GamepadType = C.SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT GamepadTypeNintendoSwitchJoyconRight GamepadType = C.SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT GamepadTypeNintendoSwitchJoyconPair GamepadType = C.SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR GamepadTypeGameCube GamepadType = C.SDL_GAMEPAD_TYPE_GAMECUBE )
func GetGamepadTypeForID ¶
func GetGamepadTypeForID(id GamepadID) GamepadType
GetGamepadTypeForID gets the type of a gamepad.
func GetGamepadTypeFromString ¶
func GetGamepadTypeFromString(s string) GamepadType
GetGamepadTypeFromString converts a string to a GamepadType.
func GetRealGamepadTypeForID ¶
func GetRealGamepadTypeForID(id GamepadID) GamepadType
GetRealGamepadTypeForID gets the type of a gamepad, ignoring mapping overrides.
func (GamepadType) Name ¶
func (t GamepadType) Name() string
Name gets the string name of a gamepad type.
type Hint ¶
type Hint string
Hint is the name of an SDL configuration hint.
The convention for naming hints is SDL_HINT_X, where "SDL_X" is the environment variable that can be used to override the default.
In general these hints are just that - they may or may not be supported or applicable on any given platform, but they provide a way for an application or user to give the library a hint as to how they would like the library to work.
var ( HintAllowAltTabWhileGrabbed Hint = Hint(C.SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED) HintAndroidAllowRecreateActivity Hint = Hint(C.SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY) HintAndroidBlockOnPause Hint = Hint(C.SDL_HINT_ANDROID_BLOCK_ON_PAUSE) HintAndroidLowLatencyAudio Hint = Hint(C.SDL_HINT_ANDROID_LOW_LATENCY_AUDIO) HintAndroidTrapBackButton Hint = Hint(C.SDL_HINT_ANDROID_TRAP_BACK_BUTTON) HintAndroidAllowPersistentFolderAccess Hint = Hint(C.SDL_HINT_ANDROID_ALLOW_PERSISTENT_FOLDER_ACCESS) HintAppID Hint = Hint(C.SDL_HINT_APP_ID) HintAppName Hint = Hint(C.SDL_HINT_APP_NAME) HintAppleTvControllerUIEvents Hint = Hint(C.SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS) HintAppleTvRemoteAllowRotation Hint = Hint(C.SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION) HintAudioAlsaDefaultDevice Hint = Hint(C.SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE) HintAudioAlsaDefaultPlaybackDevice Hint = Hint(C.SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE) HintAudioAlsaDefaultRecordingDevice Hint = Hint(C.SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE) HintAudioCategory Hint = Hint(C.SDL_HINT_AUDIO_CATEGORY) HintAudioChannels Hint = Hint(C.SDL_HINT_AUDIO_CHANNELS) HintAudioDeviceAppIconName Hint = Hint(C.SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME) HintAudioDeviceSampleFrames Hint = Hint(C.SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES) HintAudioDeviceStreamName Hint = Hint(C.SDL_HINT_AUDIO_DEVICE_STREAM_NAME) HintAudioDeviceStreamRole Hint = Hint(C.SDL_HINT_AUDIO_DEVICE_STREAM_ROLE) HintAudioDeviceRawStream Hint = Hint(C.SDL_HINT_AUDIO_DEVICE_RAW_STREAM) HintAudioDiskInputFile Hint = Hint(C.SDL_HINT_AUDIO_DISK_INPUT_FILE) HintAudioDiskOutputFile Hint = Hint(C.SDL_HINT_AUDIO_DISK_OUTPUT_FILE) HintAudioDiskTimescale Hint = Hint(C.SDL_HINT_AUDIO_DISK_TIMESCALE) HintAudioDriver Hint = Hint(C.SDL_HINT_AUDIO_DRIVER) HintAudioDummyTimescale Hint = Hint(C.SDL_HINT_AUDIO_DUMMY_TIMESCALE) HintAudioFormat Hint = Hint(C.SDL_HINT_AUDIO_FORMAT) HintAudioFrequency Hint = Hint(C.SDL_HINT_AUDIO_FREQUENCY) HintAudioIncludeMonitors Hint = Hint(C.SDL_HINT_AUDIO_INCLUDE_MONITORS) HintAutoUpdateJoysticks Hint = Hint(C.SDL_HINT_AUTO_UPDATE_JOYSTICKS) HintAutoUpdateSensors Hint = Hint(C.SDL_HINT_AUTO_UPDATE_SENSORS) HintBmPSaveLegacyFormat Hint = Hint(C.SDL_HINT_BMP_SAVE_LEGACY_FORMAT) HintCameraDriver Hint = Hint(C.SDL_HINT_CAMERA_DRIVER) HintCPUFeatureMask Hint = Hint(C.SDL_HINT_CPU_FEATURE_MASK) HintJoystickDirectinput Hint = Hint(C.SDL_HINT_JOYSTICK_DIRECTINPUT) HintFileDialogDriver Hint = Hint(C.SDL_HINT_FILE_DIALOG_DRIVER) HintDisplayUsableBounds Hint = Hint(C.SDL_HINT_DISPLAY_USABLE_BOUNDS) HintDosAllowDirectFramebuffer Hint = Hint(C.SDL_HINT_DOS_ALLOW_DIRECT_FRAMEBUFFER) HintInvalidParamChecks Hint = Hint(C.SDL_HINT_INVALID_PARAM_CHECKS) HintEmscriptenAsyncify Hint = Hint(C.SDL_HINT_EMSCRIPTEN_ASYNCIFY) HintEmscriptenCanvasSelector Hint = Hint(C.SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR) HintEmscriptenKeyboardElement Hint = Hint(C.SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT) HintEnableScreenKeyboard Hint = Hint(C.SDL_HINT_ENABLE_SCREEN_KEYBOARD) HintEvdevDevices Hint = Hint(C.SDL_HINT_EVDEV_DEVICES) HintEventLogging Hint = Hint(C.SDL_HINT_EVENT_LOGGING) HintForceRaisewindow Hint = Hint(C.SDL_HINT_FORCE_RAISEWINDOW) HintFramebufferAcceleration Hint = Hint(C.SDL_HINT_FRAMEBUFFER_ACCELERATION) HintGamecontrollerconfig Hint = Hint(C.SDL_HINT_GAMECONTROLLERCONFIG) HintGamecontrollerconfigFile Hint = Hint(C.SDL_HINT_GAMECONTROLLERCONFIG_FILE) HintGamecontrollertype Hint = Hint(C.SDL_HINT_GAMECONTROLLERTYPE) HintGamecontrollerIgnoreDevices Hint = Hint(C.SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES) HintGamecontrollerIgnoreDevicesExcept Hint = Hint(C.SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT) HintGamecontrollerSensorFusion Hint = Hint(C.SDL_HINT_GAMECONTROLLER_SENSOR_FUSION) HintGdkTextinputDefaultText Hint = Hint(C.SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT) HintGdkTextinputDescription Hint = Hint(C.SDL_HINT_GDK_TEXTINPUT_DESCRIPTION) HintGdkTextinputMaxLength Hint = Hint(C.SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH) HintGdkTextinputScope Hint = Hint(C.SDL_HINT_GDK_TEXTINPUT_SCOPE) HintGdkTextinputTitle Hint = Hint(C.SDL_HINT_GDK_TEXTINPUT_TITLE) HintHIDAPILibusb Hint = Hint(C.SDL_HINT_HIDAPI_LIBUSB) HintHIDAPILibusbGamecube Hint = Hint(C.SDL_HINT_HIDAPI_LIBUSB_GAMECUBE) HintHIDAPILibusbWhitelist Hint = Hint(C.SDL_HINT_HIDAPI_LIBUSB_WHITELIST) HintHIDAPIUdev Hint = Hint(C.SDL_HINT_HIDAPI_UDEV) HintGpuDriver Hint = Hint(C.SDL_HINT_GPU_DRIVER) HintOpenxrLibrary Hint = Hint(C.SDL_HINT_OPENXR_LIBRARY) HintHIDAPIEnumerateOnlyControllers Hint = Hint(C.SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS) HintHIDAPIIgnoreDevices Hint = Hint(C.SDL_HINT_HIDAPI_IGNORE_DEVICES) HintImeImplementedUI Hint = Hint(C.SDL_HINT_IME_IMPLEMENTED_UI) HintIosHideHomeIndicator Hint = Hint(C.SDL_HINT_IOS_HIDE_HOME_INDICATOR) HintJoystickAllowBackgroundEvents Hint = Hint(C.SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS) HintJoystickArcadestickDevices Hint = Hint(C.SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES) HintJoystickArcadestickDevicesExcluded Hint = Hint(C.SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED) HintJoystickBlacklistDevices Hint = Hint(C.SDL_HINT_JOYSTICK_BLACKLIST_DEVICES) HintJoystickBlacklistDevicesExcluded Hint = Hint(C.SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED) HintJoystickDevice Hint = Hint(C.SDL_HINT_JOYSTICK_DEVICE) HintJoystickDrumDevices Hint = Hint(C.SDL_HINT_JOYSTICK_DRUM_DEVICES) HintJoystickEnhancedReports Hint = Hint(C.SDL_HINT_JOYSTICK_ENHANCED_REPORTS) HintJoystickFlightstickDevices Hint = Hint(C.SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES) HintJoystickFlightstickDevicesExcluded Hint = Hint(C.SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED) HintJoystickGameinput Hint = Hint(C.SDL_HINT_JOYSTICK_GAMEINPUT) HintJoystickGameinputRaw Hint = Hint(C.SDL_HINT_JOYSTICK_GAMEINPUT_RAW) HintJoystickGamecubeDevices Hint = Hint(C.SDL_HINT_JOYSTICK_GAMECUBE_DEVICES) HintJoystickGamecubeDevicesExcluded Hint = Hint(C.SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED) HintJoystickGuitarDevices Hint = Hint(C.SDL_HINT_JOYSTICK_GUITAR_DEVICES) HintJoystickHIDAPI Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI) HintJoystickHIDAPICombineJoyCons Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS) HintJoystickHIDAPIGamecube Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE) HintJoystickHIDAPIGamecubeRumbleBrake Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE) HintJoystickHIDAPIJoyCons Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS) HintJoystickHIDAPIJoyconHomeLed Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED) HintJoystickHIDAPILuna Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_LUNA) HintJoystickHIDAPINintendoClassic Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC) HintJoystickHIDAPIPS3 Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_PS3) HintJoystickHIDAPIPS3SixaxisDriver Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER) HintJoystickHIDAPIPS4 Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_PS4) HintJoystickHIDAPIPS4ReportInterval Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL) HintJoystickHIDAPIPS5 Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_PS5) HintJoystickHIDAPIPS5PlayerLed Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED) HintJoystickHIDAPIShield Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_SHIELD) HintJoystickHIDAPIStadia Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_STADIA) HintJoystickHIDAPISteam Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_STEAM) HintJoystickHIDAPISteamHomeLed Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED) HintJoystickHIDAPISteamdeck Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK) HintJoystickHIDAPISteamHori Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI) HintJoystickHIDAPILg4ff Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_LG4FF) HintJoystickHIDAPI8bitdo Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_8BITDO) HintJoystickHIDAPISinput Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_SINPUT) HintJoystickHIDAPIZuiki Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_ZUIKI) HintJoystickHIDAPIFlydigi Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI) HintJoystickHIDAPIGamesir Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_GAMESIR) HintJoystickHIDAPISwitch Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_SWITCH) HintJoystickHIDAPISwitchHomeLed Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED) HintJoystickHIDAPISwitchPlayerLed Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED) HintJoystickHIDAPISwitch2 Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_SWITCH2) HintJoystickHIDAPIVerticalJoyCons Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS) HintJoystickHIDAPIWii Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_WII) HintJoystickHIDAPIWiiPlayerLed Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED) HintJoystickHIDAPIXbox Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_XBOX) HintJoystickHIDAPIXbox360 Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_XBOX_360) HintJoystickHIDAPIXbox360PlayerLed Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED) HintJoystickHIDAPIXbox360Wireless Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS) HintJoystickHIDAPIXboxOne Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE) HintJoystickHIDAPIXboxOneHomeLed Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED) HintJoystickHIDAPIGIP Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_GIP) HintJoystickHIDAPIGIPResetForMetadata Hint = Hint(C.SDL_HINT_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA) HintJoystickIokit Hint = Hint(C.SDL_HINT_JOYSTICK_IOKIT) HintJoystickLinuxClassic Hint = Hint(C.SDL_HINT_JOYSTICK_LINUX_CLASSIC) HintJoystickLinuxDeadzones Hint = Hint(C.SDL_HINT_JOYSTICK_LINUX_DEADZONES) HintJoystickLinuxDigitalHats Hint = Hint(C.SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS) HintJoystickLinuxHatDeadzones Hint = Hint(C.SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES) HintJoystickMFI Hint = Hint(C.SDL_HINT_JOYSTICK_MFI) HintJoystickRawinput Hint = Hint(C.SDL_HINT_JOYSTICK_RAWINPUT) HintJoystickRawinputCorrelateXInput Hint = Hint(C.SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT) HintJoystickRogChakram Hint = Hint(C.SDL_HINT_JOYSTICK_ROG_CHAKRAM) HintJoystickThread Hint = Hint(C.SDL_HINT_JOYSTICK_THREAD) HintJoystickThrottleDevices Hint = Hint(C.SDL_HINT_JOYSTICK_THROTTLE_DEVICES) HintJoystickThrottleDevicesExcluded Hint = Hint(C.SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED) HintJoystickWGI Hint = Hint(C.SDL_HINT_JOYSTICK_WGI) HintJoystickWheelDevices Hint = Hint(C.SDL_HINT_JOYSTICK_WHEEL_DEVICES) HintJoystickWheelDevicesExcluded Hint = Hint(C.SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED) HintJoystickZeroCenteredDevices Hint = Hint(C.SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES) HintJoystickHapticAxes Hint = Hint(C.SDL_HINT_JOYSTICK_HAPTIC_AXES) HintKeycodeOptions Hint = Hint(C.SDL_HINT_KEYCODE_OPTIONS) HintKMSDRMDeviceIndex Hint = Hint(C.SDL_HINT_KMSDRM_DEVICE_INDEX) HintKMSDRMRequireDrmMaster Hint = Hint(C.SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER) HintKMSDRMAtomic Hint = Hint(C.SDL_HINT_KMSDRM_ATOMIC) HintLogging Hint = Hint(C.SDL_HINT_LOGGING) HintMacBackgroundApp Hint = Hint(C.SDL_HINT_MAC_BACKGROUND_APP) HintMacCtrlClickEmulateRightClick Hint = Hint(C.SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK) HintMacOpenGLAsyncDispatch Hint = Hint(C.SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH) HintMacOptionAsAlt Hint = Hint(C.SDL_HINT_MAC_OPTION_AS_ALT) HintMacScrollMomentum Hint = Hint(C.SDL_HINT_MAC_SCROLL_MOMENTUM) HintMacPressAndHold Hint = Hint(C.SDL_HINT_MAC_PRESS_AND_HOLD) HintMainCallbackRate Hint = Hint(C.SDL_HINT_MAIN_CALLBACK_RATE) HintMouseAutoCapture Hint = Hint(C.SDL_HINT_MOUSE_AUTO_CAPTURE) HintMouseDoubleClickRadius Hint = Hint(C.SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS) HintMouseDoubleClickTIME Hint = Hint(C.SDL_HINT_MOUSE_DOUBLE_CLICK_TIME) HintMouseDefaultSystemCursor Hint = Hint(C.SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR) HintMouseDpiScaleCursors Hint = Hint(C.SDL_HINT_MOUSE_DPI_SCALE_CURSORS) HintMouseEmulateWarpWithRelative Hint = Hint(C.SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE) HintMouseFocusClickThrough Hint = Hint(C.SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH) HintMouseNormalSpeedScale Hint = Hint(C.SDL_HINT_MOUSE_NORMAL_SPEED_SCALE) HintMouseRelativeModeCenter Hint = Hint(C.SDL_HINT_MOUSE_RELATIVE_MODE_CENTER) HintMouseRelativeSpeedScale Hint = Hint(C.SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE) HintMouseRelativeSystemScale Hint = Hint(C.SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE) HintMouseRelativeWarpMotion Hint = Hint(C.SDL_HINT_MOUSE_RELATIVE_WARP_MOTION) HintMouseRelativeCursorVisible Hint = Hint(C.SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE) HintMouseTouchEvents Hint = Hint(C.SDL_HINT_MOUSE_TOUCH_EVENTS) HintMuteConsoleKeyboard Hint = Hint(C.SDL_HINT_MUTE_CONSOLE_KEYBOARD) HintNoSignalHandlers Hint = Hint(C.SDL_HINT_NO_SIGNAL_HANDLERS) HintOpenGLLibrary Hint = Hint(C.SDL_HINT_OPENGL_LIBRARY) HintEglLibrary Hint = Hint(C.SDL_HINT_EGL_LIBRARY) HintOpenGLEsDriver Hint = Hint(C.SDL_HINT_OPENGL_ES_DRIVER) HintOpenGLForceSRGBFramebuffer Hint = Hint(C.SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER) HintOpenvrLibrary Hint = Hint(C.SDL_HINT_OPENVR_LIBRARY) HintOrientations Hint = Hint(C.SDL_HINT_ORIENTATIONS) HintPollSentinel Hint = Hint(C.SDL_HINT_POLL_SENTINEL) HintPreferredLocales Hint = Hint(C.SDL_HINT_PREFERRED_LOCALES) HintQuitOnLastWindowClose Hint = Hint(C.SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE) HintRenderDirect3dThreadsafe Hint = Hint(C.SDL_HINT_RENDER_DIRECT3D_THREADSAFE) HintRenderDirect3d11Debug Hint = Hint(C.SDL_HINT_RENDER_DIRECT3D11_DEBUG) HintRenderDirect3d11Warp Hint = Hint(C.SDL_HINT_RENDER_DIRECT3D11_WARP) HintRenderVulkanDebug Hint = Hint(C.SDL_HINT_RENDER_VULKAN_DEBUG) HintRenderGpuDebug Hint = Hint(C.SDL_HINT_RENDER_GPU_DEBUG) HintRenderGpuLowPower Hint = Hint(C.SDL_HINT_RENDER_GPU_LOW_POWER) HintRenderDriver Hint = Hint(C.SDL_HINT_RENDER_DRIVER) HintRenderLineMethod Hint = Hint(C.SDL_HINT_RENDER_LINE_METHOD) HintRenderMetalPreferLowPowerDevice Hint = Hint(C.SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE) HintRenderVsync Hint = Hint(C.SDL_HINT_RENDER_VSYNC) HintReturnKeyHidesIME Hint = Hint(C.SDL_HINT_RETURN_KEY_HIDES_IME) HintRogGamepadMice Hint = Hint(C.SDL_HINT_ROG_GAMEPAD_MICE) HintRogGamepadMiceExcluded Hint = Hint(C.SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED) HintPS2GSWidth Hint = Hint(C.SDL_HINT_PS2_GS_WIDTH) HintPS2GSHeight Hint = Hint(C.SDL_HINT_PS2_GS_HEIGHT) HintPS2GSProgressive Hint = Hint(C.SDL_HINT_PS2_GS_PROGRESSIVE) HintPS2GSMode Hint = Hint(C.SDL_HINT_PS2_GS_MODE) HintRpiVideoLayer Hint = Hint(C.SDL_HINT_RPI_VIDEO_LAYER) HintScreensaverInhibitActivityName Hint = Hint(C.SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME) HintShutdownDBusOnQuit Hint = Hint(C.SDL_HINT_SHUTDOWN_DBUS_ON_QUIT) HintStorageTitleDriver Hint = Hint(C.SDL_HINT_STORAGE_TITLE_DRIVER) HintStorageUserDriver Hint = Hint(C.SDL_HINT_STORAGE_USER_DRIVER) HintThreadForceRealtimeTimeCritical Hint = Hint(C.SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL) HintThreadPriorityPolicy Hint = Hint(C.SDL_HINT_THREAD_PRIORITY_POLICY) HintTimerResolution Hint = Hint(C.SDL_HINT_TIMER_RESOLUTION) HintTouchMouseEvents Hint = Hint(C.SDL_HINT_TOUCH_MOUSE_EVENTS) HintTrackpadIsTouchOnly Hint = Hint(C.SDL_HINT_TRACKPAD_IS_TOUCH_ONLY) HintTvRemoteAsJoystick Hint = Hint(C.SDL_HINT_TV_REMOTE_AS_JOYSTICK) HintVideoAllowScreensaver Hint = Hint(C.SDL_HINT_VIDEO_ALLOW_SCREENSAVER) HintVideoDisplayPriority Hint = Hint(C.SDL_HINT_VIDEO_DISPLAY_PRIORITY) HintVideoDoubleBuffer Hint = Hint(C.SDL_HINT_VIDEO_DOUBLE_BUFFER) HintVideoDriver Hint = Hint(C.SDL_HINT_VIDEO_DRIVER) HintVideoDummySaveFrames Hint = Hint(C.SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES) HintVideoEglAllowGetdisplayFallback Hint = Hint(C.SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK) HintVideoForceEGL Hint = Hint(C.SDL_HINT_VIDEO_FORCE_EGL) HintVideoMacFullscreenSpaces Hint = Hint(C.SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES) HintVideoMacFullscreenMenuVisibility Hint = Hint(C.SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY) HintVideoMetalAutoResizeDrawable Hint = Hint(C.SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE) HintVideoMatchExclusiveModeOnMove Hint = Hint(C.SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE) HintVideoMinimizeOnFocusLoss Hint = Hint(C.SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS) HintVideoOffscreenSaveFrames Hint = Hint(C.SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES) HintVideoSyncWindowOperations Hint = Hint(C.SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS) HintVideoWaylandAllowLibdecor Hint = Hint(C.SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR) HintVideoWaylandModeEmulation Hint = Hint(C.SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION) HintVideoWaylandModeScaling Hint = Hint(C.SDL_HINT_VIDEO_WAYLAND_MODE_SCALING) HintVideoWaylandPreferLibdecor Hint = Hint(C.SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR) HintVideoWaylandScaleToDisplay Hint = Hint(C.SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY) HintVideoWinD3dcompiler Hint = Hint(C.SDL_HINT_VIDEO_WIN_D3DCOMPILER) HintVideoX11EnableXSyncExt Hint = Hint(C.SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT) HintVideoX11ExternalWindowInput Hint = Hint(C.SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT) HintVideoX11NetWmBypassCompositor Hint = Hint(C.SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR) HintVideoX11NetWmPing Hint = Hint(C.SDL_HINT_VIDEO_X11_NET_WM_PING) HintVideoX11Nodirectcolor Hint = Hint(C.SDL_HINT_VIDEO_X11_NODIRECTCOLOR) HintVideoX11ScalingFactor Hint = Hint(C.SDL_HINT_VIDEO_X11_SCALING_FACTOR) HintVideoX11VisualID Hint = Hint(C.SDL_HINT_VIDEO_X11_VISUALID) HintVideoX11WindowVisualID Hint = Hint(C.SDL_HINT_VIDEO_X11_WINDOW_VISUALID) HintVideoX11XRandR Hint = Hint(C.SDL_HINT_VIDEO_X11_XRANDR) HintVitaEnableBackTouch Hint = Hint(C.SDL_HINT_VITA_ENABLE_BACK_TOUCH) HintVitaEnableFrontTouch Hint = Hint(C.SDL_HINT_VITA_ENABLE_FRONT_TOUCH) HintVitaModulePath Hint = Hint(C.SDL_HINT_VITA_MODULE_PATH) HintVitaPVRInit Hint = Hint(C.SDL_HINT_VITA_PVR_INIT) HintVitaResolution Hint = Hint(C.SDL_HINT_VITA_RESOLUTION) HintVitaPVROpenGL Hint = Hint(C.SDL_HINT_VITA_PVR_OPENGL) HintVitaTouchMouseDevice Hint = Hint(C.SDL_HINT_VITA_TOUCH_MOUSE_DEVICE) HintVulkanDisplay Hint = Hint(C.SDL_HINT_VULKAN_DISPLAY) HintVulkanLibrary Hint = Hint(C.SDL_HINT_VULKAN_LIBRARY) HintWaveFactChunk Hint = Hint(C.SDL_HINT_WAVE_FACT_CHUNK) HintWaveChunkLimit Hint = Hint(C.SDL_HINT_WAVE_CHUNK_LIMIT) HintWaveRIFFChunkSize Hint = Hint(C.SDL_HINT_WAVE_RIFF_CHUNK_SIZE) HintWaveTruncation Hint = Hint(C.SDL_HINT_WAVE_TRUNCATION) HintWindowActivateWhenRaised Hint = Hint(C.SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED) HintWindowActivateWhenShown Hint = Hint(C.SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN) HintWindowAllowTopmost Hint = Hint(C.SDL_HINT_WINDOW_ALLOW_TOPMOST) HintWindowFrameUsableWhileCursorHidden Hint = Hint(C.SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN) HintWindowsCloseOnAltF4 Hint = Hint(C.SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4) HintWindowsEnableMenuMnemonics Hint = Hint(C.SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS) HintWindowsEnableMessageloop Hint = Hint(C.SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP) HintWindowsGameinput Hint = Hint(C.SDL_HINT_WINDOWS_GAMEINPUT) HintWindowsRawKeyboard Hint = Hint(C.SDL_HINT_WINDOWS_RAW_KEYBOARD) HintWindowsRawKeyboardExcludeHotkeys Hint = Hint(C.SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS) HintWindowsRawKeyboardInputsink Hint = Hint(C.SDL_HINT_WINDOWS_RAW_KEYBOARD_INPUTSINK) HintWindowsForceSemaphoreKernel Hint = Hint(C.SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL) HintWindowsIntResourceIcon Hint = Hint(C.SDL_HINT_WINDOWS_INTRESOURCE_ICON) HintWindowsIntResourceIconSmall Hint = Hint(C.SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL) HintWindowsUseD3d9ex Hint = Hint(C.SDL_HINT_WINDOWS_USE_D3D9EX) HintWindowsEraseBackgroundMode Hint = Hint(C.SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE) HintX11ForceOverrideRedirect Hint = Hint(C.SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT) HintX11WindowType Hint = Hint(C.SDL_HINT_X11_WINDOW_TYPE) HintX11XcbLibrary Hint = Hint(C.SDL_HINT_X11_XCB_LIBRARY) HintXInputEnabled Hint = Hint(C.SDL_HINT_XINPUT_ENABLED) HintAssert Hint = Hint(C.SDL_HINT_ASSERT) HintPenMouseEvents Hint = Hint(C.SDL_HINT_PEN_MOUSE_EVENTS) HintPenTouchEvents Hint = Hint(C.SDL_HINT_PEN_TOUCH_EVENTS) )
Hints mirrors SDL_HINT_* from SDL_hints.h using Go-style names.
type HintPriority ¶
type HintPriority int
HintPriority is an enumeration of hint priorities.
\since This enum is available since SDL 3.2.0.
const ( HintPriorityDefault HintPriority = C.SDL_HINT_DEFAULT HintPriorityNormal HintPriority = C.SDL_HINT_NORMAL HintPriorityOverride HintPriority = C.SDL_HINT_OVERRIDE )
type HitTestResult ¶
type HitTestResult int
HitTestResult represents possible return values from the SDL_HitTest callback.
const ( HitTestNormal HitTestResult = C.SDL_HITTEST_NORMAL HitTestDraggable HitTestResult = C.SDL_HITTEST_DRAGGABLE HitTestResizeTopLeft HitTestResult = C.SDL_HITTEST_RESIZE_TOPLEFT HitTestResizeTop HitTestResult = C.SDL_HITTEST_RESIZE_TOP HitTestResizeTopRight HitTestResult = C.SDL_HITTEST_RESIZE_TOPRIGHT HitTestResizeRight HitTestResult = C.SDL_HITTEST_RESIZE_RIGHT HitTestResizeBottomRight HitTestResult = C.SDL_HITTEST_RESIZE_BOTTOMRIGHT HitTestResizeBottom HitTestResult = C.SDL_HITTEST_RESIZE_BOTTOM HitTestResizeBottomLeft HitTestResult = C.SDL_HITTEST_RESIZE_BOTTOMLEFT HitTestResizeLeft HitTestResult = C.SDL_HITTEST_RESIZE_LEFT )
Hit-test result values.
type InitFlags ¶
type InitFlags uint32
InitFlags for SDL_Init and/or SDL_InitSubSystem.
These are the flags which may be passed to SDL_Init(). You should specify the subsystems which you will be using in your application.
const ( InitFlagAudio InitFlags = C.SDL_INIT_AUDIO InitFlagVideo InitFlags = C.SDL_INIT_VIDEO InitFlagJoystick InitFlags = C.SDL_INIT_JOYSTICK InitFlagHaptic InitFlags = C.SDL_INIT_HAPTIC InitFlagGamepad InitFlags = C.SDL_INIT_GAMEPAD InitFlagEvents InitFlags = C.SDL_INIT_EVENTS InitFlagSensor InitFlags = C.SDL_INIT_SENSOR InitFlagCamera InitFlags = C.SDL_INIT_CAMERA )
These flags may be passed to SDL_Init().
type JoyAxisEvent ¶
JoyAxisEvent is joystick axis motion event structure.
func (*JoyAxisEvent) Base ¶
func (e *JoyAxisEvent) Base() BaseEvent
type JoyBallEvent ¶
JoyBallEvent is joystick trackball motion event structure.
func (*JoyBallEvent) Base ¶
func (e *JoyBallEvent) Base() BaseEvent
type JoyBatteryEvent ¶
JoyBatteryEvent is joystick battery level change event structure.
func (*JoyBatteryEvent) Base ¶
func (e *JoyBatteryEvent) Base() BaseEvent
type JoyButtonEvent ¶
JoyButtonEvent is joystick button event structure.
func (*JoyButtonEvent) Base ¶
func (e *JoyButtonEvent) Base() BaseEvent
type JoyDeviceEvent ¶
JoyDeviceEvent is joystick device event structure.
func (*JoyDeviceEvent) Base ¶
func (e *JoyDeviceEvent) Base() BaseEvent
type JoyHatEvent ¶
JoyHatEvent is joystick hat position change event structure.
func (*JoyHatEvent) Base ¶
func (e *JoyHatEvent) Base() BaseEvent
type Joystick ¶
type Joystick struct {
// contains filtered or unexported fields
}
Joystick is the joystick structure used to identify an SDL joystick.
This is opaque data.
func GetJoystickFromID ¶
func GetJoystickFromID(instanceID JoystickID) (*Joystick, bool)
GetJoystickFromID gets the SDL_Joystick associated with an instance ID, if it has been opened.
func GetJoystickFromPlayerIndex ¶
GetJoystickFromPlayerIndex gets the SDL_Joystick associated with a player index.
func OpenJoystick ¶
func OpenJoystick(instanceID JoystickID) (*Joystick, error)
OpenJoystick opens a joystick for use.
The joystick subsystem must be initialized before a joystick can be opened for use.
func (*Joystick) Close ¶
func (j *Joystick) Close()
Close closes a joystick previously opened with SDL_OpenJoystick().
func (*Joystick) ConnectionState ¶
func (j *Joystick) ConnectionState() JoystickConnectionState
ConnectionState gets the connection state of a joystick.
func (*Joystick) FirmwareVersion ¶
FirmwareVersion gets the firmware version of an opened joystick, if available.
func (*Joystick) GetAxisInitialState ¶
GetAxisInitialState gets the initial state of an axis control on a joystick.
func (*Joystick) GetProperties ¶
GetProperties gets the properties associated with a joystick.
func (*Joystick) ID ¶
func (j *Joystick) ID() JoystickID
ID gets the instance ID of an opened joystick.
func (*Joystick) NumButtons ¶
NumButtons gets the number of buttons on a joystick.
func (*Joystick) PlayerIndex ¶
PlayerIndex gets the player index of an opened joystick.
func (*Joystick) ProductVersion ¶
ProductVersion gets the product version of an opened joystick, if available.
func (*Joystick) RumbleTriggers ¶
RumbleTriggers starts a rumble effect in the joystick's triggers.
func (*Joystick) SendEffect ¶
SendEffect sends a joystick specific effect packet.
func (*Joystick) SendVirtualSensorData ¶
func (j *Joystick) SendVirtualSensorData(sensorType int32, sensorTimestamp uint64, values []float32) bool
SendVirtualSensorData sends a sensor update for an opened virtual joystick.
func (*Joystick) SetPlayerIndex ¶
SetPlayerIndex sets the player index of an opened joystick.
func (*Joystick) SetVirtualAxis ¶
SetVirtualAxis sets the state of an axis on an opened virtual joystick.
func (*Joystick) SetVirtualBall ¶
SetVirtualBall generates ball motion on an opened virtual joystick.
func (*Joystick) SetVirtualButton ¶
SetVirtualButton sets the state of a button on an opened virtual joystick.
func (*Joystick) SetVirtualHat ¶
SetVirtualHat sets the state of a hat on an opened virtual joystick.
func (*Joystick) SetVirtualTouchpad ¶
SetVirtualTouchpad sets touchpad finger state on an opened virtual joystick.
func (*Joystick) Type ¶
func (j *Joystick) Type() JoystickType
Type gets the type of an opened joystick.
type JoystickConnectionState ¶
type JoystickConnectionState int32
JoystickConnectionState is the possible connection states for a joystick device.
const ( JoystickConnectionInvalid JoystickConnectionState = C.SDL_JOYSTICK_CONNECTION_INVALID JoystickConnectionUnknown JoystickConnectionState = C.SDL_JOYSTICK_CONNECTION_UNKNOWN JoystickConnectionWired JoystickConnectionState = C.SDL_JOYSTICK_CONNECTION_WIRED JoystickConnectionWireless JoystickConnectionState = C.SDL_JOYSTICK_CONNECTION_WIRELESS )
JoystickConnectionState values report how a joystick is connected to the system.
type JoystickID ¶
type JoystickID uint32
JoystickID 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.
func AttachVirtualJoystick ¶
func AttachVirtualJoystick(desc unsafe.Pointer) JoystickID
AttachVirtualJoystick attaches a new virtual joystick.
func GetJoysticks ¶
func GetJoysticks() ([]JoystickID, error)
GetJoysticks returns a list of currently connected joysticks.
type JoystickType ¶
type JoystickType uint32
JoystickType is an enum of some common joystick types.
const ( JoystickTypeUnknown JoystickType = C.SDL_JOYSTICK_TYPE_UNKNOWN JoystickTypeGamepad JoystickType = C.SDL_JOYSTICK_TYPE_GAMEPAD JoystickTypeWheel JoystickType = C.SDL_JOYSTICK_TYPE_WHEEL JoystickTypeArcadeStick JoystickType = C.SDL_JOYSTICK_TYPE_ARCADE_STICK JoystickTypeFlightStick JoystickType = C.SDL_JOYSTICK_TYPE_FLIGHT_STICK JoystickTypeDancePad JoystickType = C.SDL_JOYSTICK_TYPE_DANCE_PAD JoystickTypeGuitar JoystickType = C.SDL_JOYSTICK_TYPE_GUITAR JoystickTypeDrumKit JoystickType = C.SDL_JOYSTICK_TYPE_DRUM_KIT JoystickTypeArcadePad JoystickType = C.SDL_JOYSTICK_TYPE_ARCADE_PAD JoystickTypeThrottle JoystickType = C.SDL_JOYSTICK_TYPE_THROTTLE )
JoystickType values report common low-level joystick types.
func GetJoystickTypeForID ¶
func GetJoystickTypeForID(instanceID JoystickID) JoystickType
GetJoystickTypeForID gets the type of a joystick, if available.
This can be called before any joysticks are opened.
type KeyCode ¶
type KeyCode uint32
const ( KeyCodeExtendedMask KeyCode = C.SDLK_EXTENDED_MASK KeyCodeScancodeMask KeyCode = C.SDLK_SCANCODE_MASK KeyCodeUnknown KeyCode = C.SDLK_UNKNOWN KeyCodeReturn KeyCode = C.SDLK_RETURN KeyCodeEscape KeyCode = C.SDLK_ESCAPE KeyCodeBackspace KeyCode = C.SDLK_BACKSPACE KeyCodeTab KeyCode = C.SDLK_TAB KeyCodeSpace KeyCode = C.SDLK_SPACE KeyCodeExclaim KeyCode = C.SDLK_EXCLAIM KeyCodeDblApostrophe KeyCode = C.SDLK_DBLAPOSTROPHE KeyCodeHash KeyCode = C.SDLK_HASH KeyCodeDollar KeyCode = C.SDLK_DOLLAR KeyCodePercent KeyCode = C.SDLK_PERCENT KeyCodeAmpersand KeyCode = C.SDLK_AMPERSAND KeyCodeApostrophe KeyCode = C.SDLK_APOSTROPHE KeyCodeLeftParen KeyCode = C.SDLK_LEFTPAREN KeyCodeRightParen KeyCode = C.SDLK_RIGHTPAREN KeyCodeAsterisk KeyCode = C.SDLK_ASTERISK KeyCodePlus KeyCode = C.SDLK_PLUS KeyCodeComma KeyCode = C.SDLK_COMMA KeyCodeMinus KeyCode = C.SDLK_MINUS KeyCodePeriod KeyCode = C.SDLK_PERIOD KeyCodeSlash KeyCode = C.SDLK_SLASH KeyCode0 KeyCode = C.SDLK_0 KeyCode1 KeyCode = C.SDLK_1 KeyCode2 KeyCode = C.SDLK_2 KeyCode3 KeyCode = C.SDLK_3 KeyCode4 KeyCode = C.SDLK_4 KeyCode5 KeyCode = C.SDLK_5 KeyCode6 KeyCode = C.SDLK_6 KeyCode7 KeyCode = C.SDLK_7 KeyCode8 KeyCode = C.SDLK_8 KeyCode9 KeyCode = C.SDLK_9 KeyCodeColon KeyCode = C.SDLK_COLON KeyCodeSemicolon KeyCode = C.SDLK_SEMICOLON KeyCodeLess KeyCode = C.SDLK_LESS KeyCodeEquals KeyCode = C.SDLK_EQUALS KeyCodeGreater KeyCode = C.SDLK_GREATER KeyCodeQuestion KeyCode = C.SDLK_QUESTION KeyCodeAt KeyCode = C.SDLK_AT KeyCodeLeftBracket KeyCode = C.SDLK_LEFTBRACKET KeyCodeBackslash KeyCode = C.SDLK_BACKSLASH KeyCodeRightBracket KeyCode = C.SDLK_RIGHTBRACKET KeyCodeCaret KeyCode = C.SDLK_CARET KeyCodeUnderscore KeyCode = C.SDLK_UNDERSCORE KeyCodeGrave KeyCode = C.SDLK_GRAVE KeyCodeA KeyCode = C.SDLK_A KeyCodeB KeyCode = C.SDLK_B KeyCodeC KeyCode = C.SDLK_C KeyCodeD KeyCode = C.SDLK_D KeyCodeE KeyCode = C.SDLK_E KeyCodeF KeyCode = C.SDLK_F KeyCodeG KeyCode = C.SDLK_G KeyCodeH KeyCode = C.SDLK_H KeyCodeI KeyCode = C.SDLK_I KeyCodeJ KeyCode = C.SDLK_J KeyCodeK KeyCode = C.SDLK_K KeyCodeL KeyCode = C.SDLK_L KeyCodeM KeyCode = C.SDLK_M KeyCodeN KeyCode = C.SDLK_N KeyCodeO KeyCode = C.SDLK_O KeyCodeP KeyCode = C.SDLK_P KeyCodeQ KeyCode = C.SDLK_Q KeyCodeR KeyCode = C.SDLK_R KeyCodeS KeyCode = C.SDLK_S KeyCodeT KeyCode = C.SDLK_T KeyCodeU KeyCode = C.SDLK_U KeyCodeV KeyCode = C.SDLK_V KeyCodeW KeyCode = C.SDLK_W KeyCodeX KeyCode = C.SDLK_X KeyCodeY KeyCode = C.SDLK_Y KeyCodeZ KeyCode = C.SDLK_Z KeyCodeLeftBrace KeyCode = C.SDLK_LEFTBRACE KeyCodePipe KeyCode = C.SDLK_PIPE KeyCodeRightBrace KeyCode = C.SDLK_RIGHTBRACE KeyCodeTilde KeyCode = C.SDLK_TILDE KeyCodeDelete KeyCode = C.SDLK_DELETE KeyCodePlusMinus KeyCode = C.SDLK_PLUSMINUS KeyCodeCapsLock KeyCode = C.SDLK_CAPSLOCK KeyCodeF1 KeyCode = C.SDLK_F1 KeyCodeF2 KeyCode = C.SDLK_F2 KeyCodeF3 KeyCode = C.SDLK_F3 KeyCodeF4 KeyCode = C.SDLK_F4 KeyCodeF5 KeyCode = C.SDLK_F5 KeyCodeF6 KeyCode = C.SDLK_F6 KeyCodeF7 KeyCode = C.SDLK_F7 KeyCodeF8 KeyCode = C.SDLK_F8 KeyCodeF9 KeyCode = C.SDLK_F9 KeyCodeF10 KeyCode = C.SDLK_F10 KeyCodeF11 KeyCode = C.SDLK_F11 KeyCodeF12 KeyCode = C.SDLK_F12 KeyCodePrintScreen KeyCode = C.SDLK_PRINTSCREEN KeyCodeScrollLock KeyCode = C.SDLK_SCROLLLOCK KeyCodePause KeyCode = C.SDLK_PAUSE KeyCodeInsert KeyCode = C.SDLK_INSERT KeyCodeHome KeyCode = C.SDLK_HOME KeyCodePageUp KeyCode = C.SDLK_PAGEUP KeyCodeEnd KeyCode = C.SDLK_END KeyCodePageDown KeyCode = C.SDLK_PAGEDOWN KeyCodeRight KeyCode = C.SDLK_RIGHT KeyCodeLeft KeyCode = C.SDLK_LEFT KeyCodeDown KeyCode = C.SDLK_DOWN KeyCodeUp KeyCode = C.SDLK_UP KeyCodeNumLockClear KeyCode = C.SDLK_NUMLOCKCLEAR KeyCodeKpDivide KeyCode = C.SDLK_KP_DIVIDE KeyCodeKpMultiply KeyCode = C.SDLK_KP_MULTIPLY KeyCodeKpMinus KeyCode = C.SDLK_KP_MINUS KeyCodeKpPlus KeyCode = C.SDLK_KP_PLUS KeyCodeKpEnter KeyCode = C.SDLK_KP_ENTER KeyCodeKp1 KeyCode = C.SDLK_KP_1 KeyCodeKp2 KeyCode = C.SDLK_KP_2 KeyCodeKp3 KeyCode = C.SDLK_KP_3 KeyCodeKp4 KeyCode = C.SDLK_KP_4 KeyCodeKp5 KeyCode = C.SDLK_KP_5 KeyCodeKp6 KeyCode = C.SDLK_KP_6 KeyCodeKp7 KeyCode = C.SDLK_KP_7 KeyCodeKp8 KeyCode = C.SDLK_KP_8 KeyCodeKp9 KeyCode = C.SDLK_KP_9 KeyCodeKp0 KeyCode = C.SDLK_KP_0 KeyCodeKpPeriod KeyCode = C.SDLK_KP_PERIOD KeyCodeApplication KeyCode = C.SDLK_APPLICATION KeyCodePower KeyCode = C.SDLK_POWER KeyCodeKpEquals KeyCode = C.SDLK_KP_EQUALS KeyCodeF13 KeyCode = C.SDLK_F13 KeyCodeF14 KeyCode = C.SDLK_F14 KeyCodeF15 KeyCode = C.SDLK_F15 KeyCodeF16 KeyCode = C.SDLK_F16 KeyCodeF17 KeyCode = C.SDLK_F17 KeyCodeF18 KeyCode = C.SDLK_F18 KeyCodeF19 KeyCode = C.SDLK_F19 KeyCodeF20 KeyCode = C.SDLK_F20 KeyCodeF21 KeyCode = C.SDLK_F21 KeyCodeF22 KeyCode = C.SDLK_F22 KeyCodeF23 KeyCode = C.SDLK_F23 KeyCodeF24 KeyCode = C.SDLK_F24 KeyCodeExecute KeyCode = C.SDLK_EXECUTE KeyCodeHelp KeyCode = C.SDLK_HELP KeyCodeMenu KeyCode = C.SDLK_MENU KeyCodeSelect KeyCode = C.SDLK_SELECT KeyCodeStop KeyCode = C.SDLK_STOP KeyCodeAgain KeyCode = C.SDLK_AGAIN KeyCodeUndo KeyCode = C.SDLK_UNDO KeyCodeCut KeyCode = C.SDLK_CUT KeyCodeCopy KeyCode = C.SDLK_COPY KeyCodePaste KeyCode = C.SDLK_PASTE KeyCodeFind KeyCode = C.SDLK_FIND KeyCodeMute KeyCode = C.SDLK_MUTE KeyCodeVolumeUp KeyCode = C.SDLK_VOLUMEUP KeyCodeVolumeDown KeyCode = C.SDLK_VOLUMEDOWN KeyCodeKpComma KeyCode = C.SDLK_KP_COMMA KeyCodeKpEqualsAs400 KeyCode = C.SDLK_KP_EQUALSAS400 KeyCodeAltErase KeyCode = C.SDLK_ALTERASE KeyCodeSysReq KeyCode = C.SDLK_SYSREQ KeyCodeCancel KeyCode = C.SDLK_CANCEL KeyCodeClear KeyCode = C.SDLK_CLEAR KeyCodePrior KeyCode = C.SDLK_PRIOR KeyCodeReturn2 KeyCode = C.SDLK_RETURN2 KeyCodeSeparator KeyCode = C.SDLK_SEPARATOR KeyCodeOut KeyCode = C.SDLK_OUT KeyCodeOper KeyCode = C.SDLK_OPER KeyCodeClearAgain KeyCode = C.SDLK_CLEARAGAIN KeyCodeCrSel KeyCode = C.SDLK_CRSEL KeyCodeExSel KeyCode = C.SDLK_EXSEL KeyCodeKp00 KeyCode = C.SDLK_KP_00 KeyCodeKp000 KeyCode = C.SDLK_KP_000 KeyCodeThousandsSeparator KeyCode = C.SDLK_THOUSANDSSEPARATOR KeyCodeDecimalSeparator KeyCode = C.SDLK_DECIMALSEPARATOR KeyCodeCurrencyUnit KeyCode = C.SDLK_CURRENCYUNIT KeyCodeCurrencySubUnit KeyCode = C.SDLK_CURRENCYSUBUNIT KeyCodeKpLeftParen KeyCode = C.SDLK_KP_LEFTPAREN KeyCodeKpRightParen KeyCode = C.SDLK_KP_RIGHTPAREN KeyCodeKpLeftBrace KeyCode = C.SDLK_KP_LEFTBRACE KeyCodeKpRightBrace KeyCode = C.SDLK_KP_RIGHTBRACE KeyCodeKpTab KeyCode = C.SDLK_KP_TAB KeyCodeKpBackspace KeyCode = C.SDLK_KP_BACKSPACE KeyCodeKpA KeyCode = C.SDLK_KP_A KeyCodeKpB KeyCode = C.SDLK_KP_B KeyCodeKpC KeyCode = C.SDLK_KP_C KeyCodeKpD KeyCode = C.SDLK_KP_D KeyCodeKpE KeyCode = C.SDLK_KP_E KeyCodeKpF KeyCode = C.SDLK_KP_F KeyCodeKpXor KeyCode = C.SDLK_KP_XOR KeyCodeKpPower KeyCode = C.SDLK_KP_POWER KeyCodeKpPercent KeyCode = C.SDLK_KP_PERCENT KeyCodeKpLess KeyCode = C.SDLK_KP_LESS KeyCodeKpGreater KeyCode = C.SDLK_KP_GREATER KeyCodeKpAmpersand KeyCode = C.SDLK_KP_AMPERSAND KeyCodeKpDoubleAmpersand KeyCode = C.SDLK_KP_DBLAMPERSAND KeyCodeKpVerticalBar KeyCode = C.SDLK_KP_VERTICALBAR KeyCodeKpDoubleVerticalBar KeyCode = C.SDLK_KP_DBLVERTICALBAR KeyCodeKpColon KeyCode = C.SDLK_KP_COLON KeyCodeKpHash KeyCode = C.SDLK_KP_HASH KeyCodeKpSpace KeyCode = C.SDLK_KP_SPACE KeyCodeKpAt KeyCode = C.SDLK_KP_AT KeyCodeKpExclam KeyCode = C.SDLK_KP_EXCLAM KeyCodeKpMemStore KeyCode = C.SDLK_KP_MEMSTORE KeyCodeKpMemRecall KeyCode = C.SDLK_KP_MEMRECALL KeyCodeKpMemClear KeyCode = C.SDLK_KP_MEMCLEAR KeyCodeKpMemAdd KeyCode = C.SDLK_KP_MEMADD KeyCodeKpMemSubtract KeyCode = C.SDLK_KP_MEMSUBTRACT KeyCodeKpMemMultiply KeyCode = C.SDLK_KP_MEMMULTIPLY KeyCodeKpMemDivide KeyCode = C.SDLK_KP_MEMDIVIDE KeyCodeKpPlusMinus KeyCode = C.SDLK_KP_PLUSMINUS KeyCodeKpClear KeyCode = C.SDLK_KP_CLEAR KeyCodeKpClearEntry KeyCode = C.SDLK_KP_CLEARENTRY KeyCodeKpBinary KeyCode = C.SDLK_KP_BINARY KeyCodeKpOctal KeyCode = C.SDLK_KP_OCTAL KeyCodeKpDecimal KeyCode = C.SDLK_KP_DECIMAL KeyCodeKpHexadecimal KeyCode = C.SDLK_KP_HEXADECIMAL KeyCodeLCtrl KeyCode = C.SDLK_LCTRL KeyCodeLShift KeyCode = C.SDLK_LSHIFT KeyCodeLAlt KeyCode = C.SDLK_LALT KeyCodeLGUI KeyCode = C.SDLK_LGUI KeyCodeRCtrl KeyCode = C.SDLK_RCTRL KeyCodeRShift KeyCode = C.SDLK_RSHIFT KeyCodeRAlt KeyCode = C.SDLK_RALT KeyCodeRGUI KeyCode = C.SDLK_RGUI KeyCodeMode KeyCode = C.SDLK_MODE KeyCodeSleep KeyCode = C.SDLK_SLEEP KeyCodeWake KeyCode = C.SDLK_WAKE KeyCodeChannelIncrement KeyCode = C.SDLK_CHANNEL_INCREMENT KeyCodeChannelDecrement KeyCode = C.SDLK_CHANNEL_DECREMENT KeyCodeMediaPlay KeyCode = C.SDLK_MEDIA_PLAY KeyCodeMediaPause KeyCode = C.SDLK_MEDIA_PAUSE KeyCodeMediaRecord KeyCode = C.SDLK_MEDIA_RECORD KeyCodeMediaFastForward KeyCode = C.SDLK_MEDIA_FAST_FORWARD KeyCodeMediaRewind KeyCode = C.SDLK_MEDIA_REWIND KeyCodeMediaNextTrack KeyCode = C.SDLK_MEDIA_NEXT_TRACK KeyCodeMediaPreviousTrack KeyCode = C.SDLK_MEDIA_PREVIOUS_TRACK KeyCodeMediaStop KeyCode = C.SDLK_MEDIA_STOP KeyCodeMediaEject KeyCode = C.SDLK_MEDIA_EJECT KeyCodeMediaPlayPause KeyCode = C.SDLK_MEDIA_PLAY_PAUSE KeyCodeMediaSelect KeyCode = C.SDLK_MEDIA_SELECT KeyCodeAcNew KeyCode = C.SDLK_AC_NEW KeyCodeAcOpen KeyCode = C.SDLK_AC_OPEN KeyCodeAcClose KeyCode = C.SDLK_AC_CLOSE KeyCodeAcExit KeyCode = C.SDLK_AC_EXIT KeyCodeAcSave KeyCode = C.SDLK_AC_SAVE KeyCodeAcPrint KeyCode = C.SDLK_AC_PRINT KeyCodeAcProperties KeyCode = C.SDLK_AC_PROPERTIES KeyCodeAcSearch KeyCode = C.SDLK_AC_SEARCH KeyCodeAcHome KeyCode = C.SDLK_AC_HOME KeyCodeAcBack KeyCode = C.SDLK_AC_BACK KeyCodeAcForward KeyCode = C.SDLK_AC_FORWARD KeyCodeAcStop KeyCode = C.SDLK_AC_STOP KeyCodeAcRefresh KeyCode = C.SDLK_AC_REFRESH KeyCodeAcBookmarks KeyCode = C.SDLK_AC_BOOKMARKS KeyCodeSoftLeft KeyCode = C.SDLK_SOFTLEFT KeyCodeSoftRight KeyCode = C.SDLK_SOFTRIGHT KeyCodeCall KeyCode = C.SDLK_CALL KeyCodeEndCall KeyCode = C.SDLK_ENDCALL KeyCodeLeftTab KeyCode = C.SDLK_LEFT_TAB KeyCodeLevel5Shift KeyCode = C.SDLK_LEVEL5_SHIFT KeyCodeMultiKeyCompose KeyCode = C.SDLK_MULTI_KEY_COMPOSE KeyCodeLMeta KeyCode = C.SDLK_LMETA KeyCodeRMeta KeyCode = C.SDLK_RMETA KeyCodeLHyper KeyCode = C.SDLK_LHYPER KeyCodeRHyper KeyCode = C.SDLK_RHYPER )
type KeyboardDeviceEvent ¶
KeyboardDeviceEvent is keyboard device event structure.
func (*KeyboardDeviceEvent) Base ¶
func (e *KeyboardDeviceEvent) Base() BaseEvent
type KeyboardEvent ¶
type KeyboardEvent struct {
BaseEvent
WindowID uint32
Which uint32
Scancode uint32
Key KeyCode
Mod uint16
Raw uint16
Down bool
Repeat bool
}
KeyboardEvent is keyboard button event structure.
func (*KeyboardEvent) Base ¶
func (e *KeyboardEvent) Base() BaseEvent
type MouseButtonEvent ¶
type MouseButtonEvent struct {
BaseEvent
WindowID uint32
Which uint32
Button uint8
Down bool
Clicks uint8
X float32
Y float32
}
MouseButtonEvent is mouse button event structure.
func (*MouseButtonEvent) Base ¶
func (e *MouseButtonEvent) Base() BaseEvent
type MouseDeviceEvent ¶
MouseDeviceEvent is mouse device event structure.
func (*MouseDeviceEvent) Base ¶
func (e *MouseDeviceEvent) Base() BaseEvent
type MouseMotionEvent ¶
type MouseMotionEvent struct {
BaseEvent
WindowID uint32
Which uint32
State uint32
X float32
Y float32
XRel float32
YRel float32
}
MouseMotionEvent is mouse motion event structure.
func (*MouseMotionEvent) Base ¶
func (e *MouseMotionEvent) Base() BaseEvent
type MouseWheelEvent ¶
type MouseWheelEvent struct {
BaseEvent
WindowID uint32
Which uint32
X float32
Y float32
Direction uint32
MouseX float32
MouseY float32
IntegerX int32
IntegerY int32
}
MouseWheelEvent is mouse wheel event structure.
func (*MouseWheelEvent) Base ¶
func (e *MouseWheelEvent) Base() BaseEvent
type PenAxisEvent ¶
type PenAxisEvent struct {
BaseEvent
WindowID uint32
Which uint32
PenState uint32
X float32
Y float32
Axis uint32
Value float32
}
PenAxisEvent is pressure-sensitive pen pressure/angle event structure.
func (*PenAxisEvent) Base ¶
func (e *PenAxisEvent) Base() BaseEvent
type PenButtonEvent ¶
type PenButtonEvent struct {
BaseEvent
WindowID uint32
Which uint32
PenState uint32
X float32
Y float32
Button uint8
Down bool
}
PenButtonEvent is pressure-sensitive pen button event structure.
func (*PenButtonEvent) Base ¶
func (e *PenButtonEvent) Base() BaseEvent
type PenMotionEvent ¶
type PenMotionEvent struct {
BaseEvent
WindowID uint32
Which uint32
PenState uint32
X float32
Y float32
}
PenMotionEvent is pressure-sensitive pen motion event structure.
func (*PenMotionEvent) Base ¶
func (e *PenMotionEvent) Base() BaseEvent
type PenProximityEvent ¶
PenProximityEvent is pressure-sensitive pen proximity event structure.
func (*PenProximityEvent) Base ¶
func (e *PenProximityEvent) Base() BaseEvent
type PenTouchEvent ¶
type PenTouchEvent struct {
BaseEvent
WindowID uint32
Which uint32
PenState uint32
X float32
Y float32
Eraser bool
Down bool
}
PenTouchEvent is pressure-sensitive pen touched event structure.
func (*PenTouchEvent) Base ¶
func (e *PenTouchEvent) Base() BaseEvent
type PinchFingerEvent ¶
PinchFingerEvent is pinch event structure.
func (*PinchFingerEvent) Base ¶
func (e *PinchFingerEvent) Base() BaseEvent
type RenderEvent ¶
RenderEvent is renderer event structure.
func (*RenderEvent) Base ¶
func (e *RenderEvent) Base() BaseEvent
type Renderer ¶
type Renderer interface {
// Destroy releases the rendering context.
Destroy()
// SetRenderDrawColor sets the color used for drawing operations.
//
// Set the color for drawing or filling rectangles, lines, and points, and for
// SDL_RenderClear().
SetRenderDrawColor(r, g, b, a uint8) error
// RenderClear clears the current rendering target with the drawing color.
RenderClear() error
// RenderPresent updates the screen with any rendering performed since the previous call.
RenderPresent() error
}
Renderer is a 2D rendering context.
type SDLError ¶
type SDLError struct {
// contains filtered or unexported fields
}
SDLError wraps the SDL error message for the current thread.
type SensorEvent ¶
type SensorEvent struct {
BaseEvent
Which uint32
Data0 float32
Data1 float32
Data2 float32
Data3 float32
Data4 float32
Data5 float32
SensorTimestamp uint64
}
SensorEvent is sensor event structure.
func (*SensorEvent) Base ¶
func (e *SensorEvent) Base() BaseEvent
type SensorType ¶
type SensorType int32
const ( SensorTypeAccelerometer SensorType = C.SDL_SENSOR_ACCEL SensorTypeGyroscope SensorType = C.SDL_SENSOR_GYRO )
type TextEditingCandidatesEvent ¶
type TextEditingCandidatesEvent struct {
BaseEvent
WindowID uint32
Candidates unsafe.Pointer
NumCandidates int32
SelectedCandidate int32
Horizontal bool
}
TextEditingCandidatesEvent is keyboard IME candidates event structure.
func (*TextEditingCandidatesEvent) Base ¶
func (e *TextEditingCandidatesEvent) Base() BaseEvent
type TextEditingEvent ¶
type TextEditingEvent struct {
BaseEvent
WindowID uint32
Text unsafe.Pointer
Start int32
Length int32
}
TextEditingEvent is keyboard text editing event structure.
func (*TextEditingEvent) Base ¶
func (e *TextEditingEvent) Base() BaseEvent
type TextInputEvent ¶
TextInputEvent is keyboard text input event structure.
func (*TextInputEvent) Base ¶
func (e *TextInputEvent) Base() BaseEvent
type TouchFingerEvent ¶
type TouchFingerEvent struct {
BaseEvent
TouchID uint64
FingerID uint64
X float32
Y float32
DX float32
DY float32
Pressure float32
WindowID uint32
}
TouchFingerEvent is touch finger event structure.
func (*TouchFingerEvent) Base ¶
func (e *TouchFingerEvent) Base() BaseEvent
type UnknownEvent ¶
type UnknownEvent struct {
BaseEvent
}
UnknownEvent is emitted for event types without a specific wrapper.
func (*UnknownEvent) Base ¶
func (e *UnknownEvent) Base() BaseEvent
type UserEvent ¶
type UserEvent struct {
BaseEvent
WindowID uint32
Code int32
Data1 unsafe.Pointer
Data2 unsafe.Pointer
}
UserEvent is a user-defined event type.
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window is the opaque handle to an SDL window.
func CreateWindow ¶
func CreateWindow(title string, width, height int, flags WindowFlags) (*Window, error)
CreateWindow creates a window with the specified dimensions and flags.
The window size is a request and may be different than expected based on desktop layout and window manager policies.
func (*Window) GetPointerProperty ¶
func (w *Window) GetPointerProperty(property WindowPointerProperty) uintptr
GetPointerProperty gets a platform-specific native window pointer property.
func (*Window) GetWindowFlags ¶
func (w *Window) GetWindowFlags() WindowFlags
GetWindowFlags gets the window flags.
func (*Window) GetWindowKeyboardGrab ¶
GetWindowKeyboardGrab gets a window's keyboard grab mode.
func (*Window) GetWindowMouseGrab ¶
GetWindowMouseGrab gets a window's mouse grab mode.
func (*Window) GetWindowPosition ¶
GetWindowPosition gets the position of a window.
func (*Window) GetWindowRelativeMouseMode ¶
GetWindowRelativeMouseMode gets a window's relative mouse mode.
func (*Window) GetWindowSafeArea ¶
GetWindowSafeArea gets the safe area for this window.
func (*Window) GetWindowSize ¶
GetWindowSize gets the size of a window's client area.
func (*Window) GetWindowTitle ¶
GetWindowTitle gets the title of a window.
func (*Window) GetX11WindowNumber ¶
GetX11WindowNumber gets the native X11 window ID for this SDL window. Returns 0 when unavailable (non-X11 backend or missing property).
func (*Window) MaximizeWindow ¶
func (w *Window) MaximizeWindow()
MaximizeWindow requests that the window be made as large as possible.
func (*Window) MinimizeWindow ¶
func (w *Window) MinimizeWindow()
MinimizeWindow requests that the window be minimized to an iconic representation.
func (*Window) RaiseWindow ¶
func (w *Window) RaiseWindow()
RaiseWindow requests that a window be raised above other windows and gain input focus.
func (*Window) RestoreWindow ¶
func (w *Window) RestoreWindow()
RestoreWindow requests that the size and position of a minimized or maximized window be restored.
func (*Window) SetWindowAlwaysOnTop ¶
SetWindowAlwaysOnTop sets the window to always be above the others.
func (*Window) SetWindowBordered ¶
SetWindowBordered sets the border state of a window.
func (*Window) SetWindowFillDocument ¶
SetWindowFillDocument sets the window to fill the current document space (Emscripten only).
func (*Window) SetWindowFocusable ¶
SetWindowFocusable sets whether the window may have input focus.
func (*Window) SetWindowFullscreen ¶
SetWindowFullscreen requests that the window's fullscreen state be changed.
func (*Window) SetWindowFullscreenMode ¶
func (w *Window) SetWindowFullscreenMode(mode *DisplayMode) error
SetWindowFullscreenMode sets the display mode to use when a window is visible and fullscreen.
func (*Window) SetWindowHitTest ¶
func (w *Window) SetWindowHitTest(callback WindowHitTestFunc) error
SetWindowHitTest provides a callback that decides if a window region has special properties.
func (*Window) SetWindowIcon ¶
SetWindowIcon sets the icon for a window.
func (*Window) SetWindowKeyboardGrab ¶
SetWindowKeyboardGrab sets a window's keyboard grab mode.
func (*Window) SetWindowMouseGrab ¶
SetWindowMouseGrab sets a window's mouse grab mode.
func (*Window) SetWindowPosition ¶
SetWindowPosition requests that the window's position be set.
func (*Window) SetWindowRelativeMouseMode ¶
SetWindowRelativeMouseMode sets a window's relative mouse mode.
func (*Window) SetWindowResizable ¶
SetWindowResizable sets the user-resizable state of a window.
func (*Window) SetWindowSize ¶
SetWindowSize requests that the size of a window's client area be set.
func (*Window) SetWindowTitle ¶
SetWindowTitle sets the title of a window.
This string is expected to be in UTF-8 encoding.
type WindowEvent ¶
WindowEvent is window state change event data.
func (*WindowEvent) Base ¶
func (e *WindowEvent) Base() BaseEvent
type WindowFlags ¶
type WindowFlags uint64
WindowFlags are the flags on a window.
const ( WindowFlagFullscreen WindowFlags = C.SDL_WINDOW_FULLSCREEN WindowFlagOpenGL WindowFlags = C.SDL_WINDOW_OPENGL WindowFlagOccluded WindowFlags = C.SDL_WINDOW_OCCLUDED WindowFlagHidden WindowFlags = C.SDL_WINDOW_HIDDEN WindowFlagBorderless WindowFlags = C.SDL_WINDOW_BORDERLESS WindowFlagResizable WindowFlags = C.SDL_WINDOW_RESIZABLE WindowFlagMinimized WindowFlags = C.SDL_WINDOW_MINIMIZED WindowFlagMaximized WindowFlags = C.SDL_WINDOW_MAXIMIZED WindowFlagMouseGrabbed WindowFlags = C.SDL_WINDOW_MOUSE_GRABBED WindowFlagInputFocus WindowFlags = C.SDL_WINDOW_INPUT_FOCUS WindowFlagMouseFocus WindowFlags = C.SDL_WINDOW_MOUSE_FOCUS WindowFlagExternal WindowFlags = C.SDL_WINDOW_EXTERNAL WindowFlagModal WindowFlags = C.SDL_WINDOW_MODAL WindowFlagHighPixelDensity WindowFlags = C.SDL_WINDOW_HIGH_PIXEL_DENSITY WindowFlagMouseCapture WindowFlags = C.SDL_WINDOW_MOUSE_CAPTURE WindowFlagMouseRelativeMode WindowFlags = C.SDL_WINDOW_MOUSE_RELATIVE_MODE WindowFlagAlwaysOnTop WindowFlags = C.SDL_WINDOW_ALWAYS_ON_TOP WindowFlagUtility WindowFlags = C.SDL_WINDOW_UTILITY WindowFlagTooltip WindowFlags = C.SDL_WINDOW_TOOLTIP WindowFlagPopupMenu WindowFlags = C.SDL_WINDOW_POPUP_MENU WindowFlagKeyboardGrabbed WindowFlags = C.SDL_WINDOW_KEYBOARD_GRABBED WindowFlagFillDocument WindowFlags = C.SDL_WINDOW_FILL_DOCUMENT WindowFlagVulkan WindowFlags = C.SDL_WINDOW_VULKAN WindowFlagMetal WindowFlags = C.SDL_WINDOW_METAL WindowFlagTransparent WindowFlags = C.SDL_WINDOW_TRANSPARENT WindowFlagNotFocusable WindowFlags = C.SDL_WINDOW_NOT_FOCUSABLE )
Window flags.
type WindowHitTestFunc ¶
type WindowHitTestFunc func(window *Window, x, y int) HitTestResult
WindowHitTestFunc is the callback type used by SetWindowHitTest.
type WindowPointerProperty ¶
type WindowPointerProperty int
const ( WindowPointerPropertyWin32HWND WindowPointerProperty = iota WindowPointerPropertyWin32HDC WindowPointerPropertyWin32Instance WindowPointerPropertyWaylandDisplay WindowPointerPropertyWaylandSurface WindowPointerPropertyX11Display )