Documentation
¶
Index ¶
- Constants
- func Events() <-chan Event
- func Initialize(f func() error, configs ...Config) error
- func Present(img image.Image) (*sync.WaitGroup, error)
- func ToggleFullscreen() (bool, error)
- type Config
- type Error
- type Event
- type KeyDownEvent
- type KeyUpEvent
- type Keycode
- type Keysym
- type MouseButtonEvent
- type MouseMotionEvent
- type MouseWheelEvent
- type QuitEvent
- type WindowEvent
Constants ¶
View Source
const ( NoMod uint16 = 0x0000 LeftShiftMod uint16 = 0x0001 RightShiftMod uint16 = 0x0002 LeftCtrlMod uint16 = 0x0040 RightCtrlMod uint16 = 0x0080 LeftAltMod uint16 = 0x0100 RightAltMod uint16 = 0x0200 LeftGuiMod uint16 = 0x0400 RightGuiMod uint16 = 0x0800 NumMod uint16 = 0x1000 CapsMod uint16 = 0x2000 ModeMod uint16 = 0x4000 )
View Source
const ( CtrlMod = LeftCtrlMod | RightCtrlMod ShiftMod = LeftShiftMod | RightShiftMod AltMod = LeftAltMod | RightAltMod GuiMod = LeftGuiMod | RightGuiMod )
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func ToggleFullscreen ¶
Types ¶
type Config ¶
type Config func() error
func ConfigWithLibrary ¶
func ConfigWithLogger ¶
func ConfigWithRenderer ¶
type KeyDownEvent ¶
type KeyUpEvent ¶
type Keysym ¶
Keysym (https://wiki.libsdl.org/SDL_Keysym)
type MouseButtonEvent ¶
type MouseButtonEvent struct { Which uint32 Button uint8 State uint8 X int32 Y int32 // contains filtered or unexported fields }
MouseButtonEvent (https://wiki.libsdl.org/SDL_MouseButtonEvent)
type MouseMotionEvent ¶
type MouseMotionEvent struct { Which uint32 State uint32 X int32 Y int32 XRel int32 YRel int32 // contains filtered or unexported fields }
MouseMotionEvent (https://wiki.libsdl.org/SDL_MouseMotionEvent)
type MouseWheelEvent ¶
type MouseWheelEvent struct { Which uint32 X int32 Y int32 Direction uint32 // contains filtered or unexported fields }
MouseWheelEvent (https://wiki.libsdl.org/SDL_MouseWheelEvent)
type WindowEvent ¶
type WindowEvent struct { Event uint8 Data1 int32 Data2 int32 // contains filtered or unexported fields }
WindowEvent (https://wiki.libsdl.org/SDL_WindowEvent)
Click to show internal directories.
Click to hide internal directories.