Versions in this module Expand all Collapse all v0 v0.2.0 Aug 19, 2021 Changes in this version + const CursorInputMode + const CursorLast + const StickyKeysInputMode + const StickyMouseButtonsInputMode + func Init(canvasId string) error — js/wasm + func Init(width, height int, title string) error — darwin/amd64, linux/amd64, windows/amd64 + type Cursor int type CursorEvent + Mods ModifierKey + type GlfwWindow struct — darwin/amd64, linux/amd64, windows/amd64 + func (w *GlfwWindow) CreateCursor(imgFile string, xhot, yhot int) (Cursor, error) + func (w *GlfwWindow) Destroy() + func (w *GlfwWindow) DisposeAllCustomCursors() + func (w *GlfwWindow) DisposeCursor(cursor Cursor) + func (w *GlfwWindow) Fullscreen() bool + func (w *GlfwWindow) GetScale() (x float64, y float64) + func (w *GlfwWindow) Gls() *gls.GLS + func (w *GlfwWindow) PollEvents() + func (w *GlfwWindow) ScreenResolution(p interface{}) (width, height int) + func (w *GlfwWindow) SetCursor(cursor Cursor) + func (w *GlfwWindow) SetFullscreen(full bool) + func (w *GlfwWindow) SetSwapInterval(interval int) type IWindow + func Get() IWindow + CreateCursor func(imgFile string, xhot, yhot int) (Cursor, error) + DisposeAllCustomCursors func() + GetFramebufferSize func() (width int, height int) + GetScale func() (x float64, y float64) + GetSize func() (width int, height int) + Gls func() *gls.GLS + SetCursor func(cursor Cursor) type KeyEvent + Key Key + type KeyState struct + func NewKeyState(win core.IDispatcher) *KeyState + func (ks *KeyState) Dispose() + func (ks *KeyState) Pressed(k Key) bool type ScrollEvent + Mods ModifierKey + type WebGlCanvas struct — js/wasm + func (w *WebGlCanvas) Canvas() js.Value + func (w *WebGlCanvas) CreateCursor(imgFile string, xhot, yhot int) (Cursor, error) + func (w *WebGlCanvas) Destroy() + func (w *WebGlCanvas) DisposeAllCustomCursors() + func (w *WebGlCanvas) FullScreen() bool + func (w *WebGlCanvas) GetFramebufferSize() (width int, height int) + func (w *WebGlCanvas) GetScale() (x float64, y float64) + func (w *WebGlCanvas) GetSize() (width int, height int) + func (w *WebGlCanvas) Gls() *gls.GLS + func (w *WebGlCanvas) SetCursor(cursor Cursor) + func (w *WebGlCanvas) SetFullScreen(full bool) + func (w *WebGlCanvas) SetSize(width int, height int) v0.1.0 Mar 14, 2019 Changes in this version + const ArrowCursor + const CrosshairCursor + const CursorDisabled + const CursorHidden + const CursorMode + const CursorNormal + const DiagResize1Cursor + const DiagResize2Cursor + const HResizeCursor + const HandCursor + const IBeamCursor + 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 KeyLeftControl + 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 KeyRightControl + const KeyRightShift + const KeyRightSuper + const KeyS + const KeyScrollLock + 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 ModAlt + const ModControl + const ModShift + const ModSuper + const MouseButton1 + const MouseButton2 + const MouseButton3 + const MouseButton4 + const MouseButton5 + const MouseButton6 + const MouseButton7 + const MouseButton8 + const MouseButtonLast + const MouseButtonLeft + const MouseButtonMiddle + const MouseButtonRight + const OnChar + const OnCursor + const OnFrame + const OnKeyDown + const OnKeyRepeat + const OnKeyUp + const OnMouseDown + const OnMouseUp + const OnScroll + const OnWindowPos + const OnWindowSize + const Press + const Release + const Repeat + const StickyKeysMode + const StickyMouseButtonsMode + const VResizeCursor + type Action int + type CharEvent struct + Char rune + Mods ModifierKey + W IWindow + type CursorEvent struct + W IWindow + Xpos float32 + Ypos float32 + type IWindow interface + Destroy func() + FramebufferSize func() (width int, height int) + FullScreen func() bool + MakeContextCurrent func() + Manager func() IWindowManager + Pos func() (xpos, ypos int) + Scale func() (x float64, y float64) + SetCursorPos func(xpos, ypos float64) + SetCustomCursor func(int) + SetFullScreen func(bool) + SetInputMode func(mode InputMode, state int) + SetPos func(xpos, ypos int) + SetShouldClose func(bool) + SetSize func(width int, height int) + SetStandardCursor func(cursor StandardCursor) + SetTitle func(title string) + ShouldClose func() bool + Size func() (width int, height int) + SwapBuffers func() + type IWindowManager interface + CreateCursor func(imgFile string, xhot, yhot int) (int, error) + CreateWindow func(width, height int, title string, full bool) (IWindow, error) + DisposeAllCursors func() + DisposeCursor func(key int) + PollEvents func() + ScreenResolution func(interface{}) (width, height int) + SetSwapInterval func(interval int) + Terminate func() + func Glfw() (IWindowManager, error) + func Manager(wtype string) (IWindowManager, error) + type InputMode int + type Key int + type KeyEvent struct + Action Action + Keycode Key + Mods ModifierKey + Scancode int + W IWindow + type ModifierKey int + type MouseButton int + type MouseEvent struct + Action Action + Button MouseButton + Mods ModifierKey + W IWindow + Xpos float32 + Ypos float32 + type PosEvent struct + W IWindow + Xpos int + Ypos int + type ScrollEvent struct + W IWindow + Xoffset float32 + Yoffset float32 + type SizeEvent struct + Height int + W IWindow + Width int + type StandardCursor int