Versions in this module Expand all Collapse all v0 v0.1.1 Jan 18, 2020 v0.1.0 Aug 9, 2019 Changes in this version + const Key0 + const Key1 + const Key2 + const Key3 + const Key4 + const Key5 + const Key6 + const Key7 + const Key8 + const Key9 + const KeyA + const KeyApostrophe + const KeyB + const KeyBackslash + const KeyBackspace + const KeyC + const KeyCapsLock + const KeyComma + const KeyD + const KeyDelete + const KeyDown + const KeyE + const KeyEnd + const KeyEnter + const KeyEqual + const KeyEscape + const KeyF + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF13 + const KeyF14 + const KeyF15 + const KeyF16 + const KeyF17 + const KeyF18 + const KeyF19 + const KeyF2 + const KeyF20 + const KeyF21 + const KeyF22 + const KeyF23 + const KeyF24 + const KeyF25 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyG + const KeyGraveAccent + const KeyH + const KeyHome + const KeyI + const KeyInsert + const KeyJ + const KeyK + const KeyKP0 + const KeyKP1 + const KeyKP2 + const KeyKP3 + const KeyKP4 + const KeyKP5 + const KeyKP6 + const KeyKP7 + const KeyKP8 + const KeyKP9 + const KeyKPAdd + const KeyKPDecimal + const KeyKPDivide + const KeyKPEnter + const KeyKPEqual + const KeyKPMultiply + const KeyKPSubtract + const KeyL + const KeyLast + const KeyLeft + const KeyLeftAlt + const KeyLeftBracket + const KeyLeftCtrl + const KeyLeftShift + const KeyLeftSuper + const KeyM + const KeyMenu + const KeyMinus + const KeyN + const KeyNumLock + const KeyO + const KeyP + const KeyPageDown + const KeyPageUp + const KeyPause + const KeyPeriod + const KeyPrintScreen + const KeyQ + const KeyR + const KeyRight + const KeyRightAlt + const KeyRightBracket + const KeyRightCtrl + const KeyRightShift + const KeyRightSuper + const KeyS + const KeyScrollLock + const KeySemiColon + const KeySemicolon + const KeySlash + const KeySpace + const KeyT + const KeyTab + const KeyU + const KeyUnknown + const KeyUp + const KeyV + const KeyW + const KeyWorld1 + const KeyWorld2 + const KeyX + const KeyY + const KeyZ + const MouseButton1 + const MouseButton2 + const MouseButton3 + const MouseButton4 + const MouseButton5 + const MouseButton6 + const MouseButton7 + const MouseButton8 + const MouseButtonLast + const MouseButtonLeft + const MouseButtonMiddle + const MouseButtonRight + var ErrorAlreadyUnsubscribed = errors.New("already unsubscribed, or never subscribed") + type Event interface + Message func() interface{} + Type func() EventName + type EventManager struct + func NewEventManager() *EventManager + func (service *EventManager) Publish(event Event) error + func (service *EventManager) Subscribe(eventName EventName, callback func(event Event), owner interface{}) error + func (service *EventManager) Unsubscribe(eventName EventName, owner interface{}) error + type EventName string + type Key int + type Keyboard struct + func NewKeyboard() *Keyboard + func (keyboard *Keyboard) AddCharInputCallback(callback glfw.CharCallback) + func (keyboard *Keyboard) AddKeyCallback(callback glfw.KeyCallback) + func (keyboard *Keyboard) IsKeyDown(key Key) bool + func (keyboard *Keyboard) RegisterCallbacks(win *Window) + type Mouse struct + func NewMouse() *Mouse + func (mouse *Mouse) AddMouseButtonCallback(callback glfw.MouseButtonCallback) + func (mouse *Mouse) AddMousePosCallback(callback glfw.CursorPosCallback) + func (mouse *Mouse) AddMouseScrollCallback(callback glfw.ScrollCallback) + func (mouse *Mouse) IsButtonPressed(key Key) bool + func (mouse *Mouse) RegisterCallbacks(win *Window) + func (mouse *Mouse) X() float64 + func (mouse *Mouse) Y() float64 + type Window struct + func NewWindow(width int, height int, name string) (*Window, error) + func (w *Window) Handle() *glfw.Window