Documentation ¶
Index ¶
- Constants
- Variables
- type Data
- type Entry
- type Event
- type Filter
- type KeyboardEvent
- type Mouse
- type MouseButton
- type Pumper
- type Queue
- func (q *Queue) Add(ev Event) error
- func (q *Queue) AddWatch(watcher *Watcher)
- func (q *Queue) Cut(entry *Entry)
- func (q *Queue) DelWatch(watcher *Watcher)
- func (q *Queue) Disable(eventType uint32)
- func (q *Queue) Enable(eventType uint32)
- func (q *Queue) Enabled(eventType uint32) bool
- func (q *Queue) Filter(f Filter, userdata interface{}) error
- func (q *Queue) FlushType(evType uint32) error
- func (q *Queue) FlushTypes(minType, maxType uint32) error
- func (q *Queue) GetFilterr() (Filter, interface{})
- func (q *Queue) HasType(evType uint32) (bool, error)
- func (q *Queue) HasTypes(minType, maxType uint32) (bool, error)
- func (q *Queue) Peep(events []Event, action int, minType, maxType uint32) (int, error)
- func (q *Queue) Poll() (Event, error)
- func (q *Queue) Pump()
- func (q *Queue) Push(ev Event) (bool, error)
- func (q *Queue) SetFilter(f Filter, userdata interface{}) error
- func (q *Queue) Start() error
- func (q *Queue) Stop()
- func (q *Queue) Wait() (Event, error)
- func (q *Queue) WaitTimeout(timeout time.Duration) (Event, error)
- type Watcher
- type Window
Constants ¶
View Source
const ( FirstEvent = 0x0000 UserEvent = 0x8000 LastEvent = 0xFFFF )
View Source
const ( Quit = 0x100 + iota AppTerminating AppLowMemory AppWillEnterBackground AppDidEnterBackground AppWillEnterForeground AppDidEnterForeground )
Application Events
View Source
const ( JoyAxisMotion = 0x600 + iota JoyBallMotion JoyHatMotion JoyButtonDown JoyButtonUp JoyDeviceAdded JoyDeviceRemoved )
Joystick Events
View Source
const ( ControllerAxisMotion = 0x650 + iota ControllerButtonDown ControllerButtonUp ControllerDeviceAdded ControllerDeviceRemoved ControllerDeviceRemapped )
Game Controller Events
View Source
const ( FingerDown = 0x700 + iota FingerUp FingerMotion )
Touch Events
View Source
const ( DollarGesture = 0x800 + iota DollarRecord MultiGesture )
Gesture Events
View Source
const ( DropFile = 0x1000 + iota DropText DropBegin DropComplete )
Drag and Drop Events
View Source
const ( AudioDeviceAdded = 0x1100 + iota AudioDeviceRemoved )
Audio Hotplug Events
View Source
const ( RenderTargetsReset = 0x2000 + iota RenderDeviceReset )
Render Events
View Source
const ( KeyDown = 0x300 + iota KeyUp TextEditing TextInput KeyMapChanged )
Keyboard Events
View Source
const ( MouseMotion = 0x400 + iota MouseButtonDown MouseButtonUp MouseWheel )
Mouse Events
View Source
const ( Add = iota Peek Get )
View Source
const ( WindowStateChange = 0x200 + iota SysWMEvent )
Window Events
View Source
const ( WindowNone = iota WindowShown WindowHidden WindowExposed WindowMoved WindowResized WindowSizeChanged WindowMinimized WindowMaximized WindowRestored WindowEnter WindowLeave WindowFocusGained WindowFocusLost WindowClose WindowTakeFocus WindowHitTest )
View Source
const (
ClipboardUpdate = 0x900 + iota
)
Clipboard Events
View Source
const KeyPressed = 1
View Source
const KeyReleased = 0
View Source
const MaxQueued = 65535
Variables ¶
View Source
var WaitTimeoutExceeded error = eventFilteredError{}
Functions ¶
This section is empty.
Types ¶
type KeyboardEvent ¶
type KeyboardEvent Data
Keyboard button event structure (event.key.*)
func (KeyboardEvent) KeyCode ¶
func (ke KeyboardEvent) KeyCode() int32
func (KeyboardEvent) Mod ¶
func (ke KeyboardEvent) Mod() uint16
func (KeyboardEvent) Repeat ¶
func (ke KeyboardEvent) Repeat() uint8
func (KeyboardEvent) ScanCode ¶
func (ke KeyboardEvent) ScanCode() uint32
func (KeyboardEvent) State ¶
func (ke KeyboardEvent) State() uint8
func (KeyboardEvent) WindowID ¶
func (ke KeyboardEvent) WindowID() uint32
type Mouse ¶
type Mouse struct { }
var M *Mouse
func (*Mouse) FreeCursor ¶
func (m *Mouse) FreeCursor()
type MouseButton ¶
type MouseButton Data
Keyboard button event structure (event.key.*)
func (MouseButton) Button ¶
func (mbe MouseButton) Button() uint8
func (MouseButton) Clicks ¶
func (mbe MouseButton) Clicks() uint8
func (MouseButton) State ¶
func (mbe MouseButton) State() uint8
func (MouseButton) Which ¶
func (mbe MouseButton) Which() uint32
func (MouseButton) WindowID ¶
func (mbe MouseButton) WindowID() uint32
func (MouseButton) X ¶
func (mbe MouseButton) X() int32
func (MouseButton) Y ¶
func (mbe MouseButton) Y() int32
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
var Q *Queue
func (*Queue) FlushTypes ¶
func (*Queue) GetFilterr ¶
Click to show internal directories.
Click to hide internal directories.