Versions in this module Expand all Collapse all v0 v0.4.5-p1 Mar 4, 2023 v0.4.4 Mar 4, 2023 Changes in this version + const AnyReleaseBehavior + const CursorDisabled + const CursorHidden + const CursorNormal + const DontCare + const EGLContextAPI + const False + const LoseContextOnReset + const NativeContextAPI + const NoAPI + const NoResetNotification + const NoRobustness + const OSMesaContextAPI + const OpenGLAPI + const OpenGLAnyProfile + const OpenGLCompatProfile + const OpenGLCoreProfile + const OpenGLESAPI + const ReleaseBehaviorFlush + const ReleaseBehaviorNone + const True + const VersionMajor + const VersionMinor + const VersionRevision + func DefaultWindowHints() + func DetachCurrentContext() + func ExtensionSupported(extension string) bool + func GetClipboardString() string + func GetKeyName(key Key, scancode int) string + func GetKeyScancode(key Key) int + func GetProcAddress(procname string) unsafe.Pointer + func GetTime() float64 + func GetTimerFrequency() uint64 + func GetTimerValue() uint64 + func GetVersion() (major, minor, revision int) + func GetVersionString() string + func GetVulkanGetInstanceProcAddress() unsafe.Pointer + func GetX11Display() *C.Display — linux/amd64 + func GetX11SelectionString() string — linux/amd64 + func Init() error + func InitHint(hint Hint, value int) + func PollEvents() + func PostEmptyEvent() + func RawMouseMotionSupported() bool + func SetClipboardString(str string) + func SetTime(time float64) + func SetX11SelectionString(str string) — linux/amd64 + func SwapInterval(interval int) + func Terminate() + func UpdateGamepadMappings(mapping string) bool + func VulkanSupported() bool + func WaitEvents() + func WaitEventsTimeout(timeout float64) + func WindowHint(target Hint, hint int) + func WindowHintString(hint Hint, value string) + type Action int + const Press + const Release + const Repeat + type CharCallback func(w *Window, char rune) + type CharModsCallback func(w *Window, char rune, mods ModifierKey) + type CloseCallback func(w *Window) + type ContentScaleCallback func(w *Window, x float32, y float32) + type Cursor struct + func CreateCursor(img image.Image, xhot, yhot int) *Cursor + func CreateStandardCursor(shape StandardCursor) *Cursor + func (c *Cursor) Destroy() + type CursorEnterCallback func(w *Window, entered bool) + type CursorPosCallback func(w *Window, xpos float64, ypos float64) + type DropCallback func(w *Window, names []string) + type Error struct + Code ErrorCode + Desc string + func (e *Error) Error() string + type ErrorCode int + const APIUnavailable + const FormatUnavailable + const VersionUnavailable + func (e ErrorCode) String() string + type FocusCallback func(w *Window, focused bool) + type FramebufferSizeCallback func(w *Window, width int, height int) + type GamepadAxis int + const AxisLast + const AxisLeftTrigger + const AxisLeftX + const AxisLeftY + const AxisRightTrigger + const AxisRightX + const AxisRightY + type GamepadButton int + const ButtonA + const ButtonB + const ButtonBack + const ButtonCircle + const ButtonCross + const ButtonDpadDown + const ButtonDpadLeft + const ButtonDpadRight + const ButtonDpadUp + const ButtonGuide + const ButtonLast + const ButtonLeftBumper + const ButtonLeftThumb + const ButtonRightBumper + const ButtonRightThumb + const ButtonSquare + const ButtonStart + const ButtonTriangle + const ButtonX + const ButtonY + type GamepadState struct + Axes [6]float32 + Buttons [15]Action + type GammaRamp struct + Blue []uint16 + Green []uint16 + Red []uint16 + type Hint int + const AccumAlphaBits + const AccumBlueBits + const AccumGreenBits + const AccumRedBits + const AlphaBits + const AutoIconify + const AuxBuffers + const BlueBits + const CenterCursor + const ClientAPI + const CocoaChdirResources + const CocoaFrameNAME + const CocoaGraphicsSwitching + const CocoaMenubar + const CocoaRetinaFramebuffer + const ContextCreationAPI + const ContextReleaseBehavior + const ContextRevision + const ContextRobustness + const ContextVersionMajor + const ContextVersionMinor + const Decorated + const DepthBits + const DoubleBuffer + const Floating + const FocusOnShow + const Focused + const GreenBits + const Hovered + const Iconified + const JoystickHatButtons + const Maximized + const OpenGLDebugContext + const OpenGLForwardCompatible + const OpenGLProfile + const RedBits + const RefreshRate + const Resizable + const SRGBCapable + const Samples + const ScaleToMonitor + const StencilBits + const Stereo + const TransparentFramebuffer + const Visible + const X11ClassName + const X11InstanceName + type IconifyCallback func(w *Window, iconified bool) + type InputMode int + const CursorMode + const LockKeyMods + const RawMouseMotion + const StickyKeysMode + const StickyMouseButtonsMode + type Joystick int + const Joystick1 + const Joystick10 + const Joystick11 + const Joystick12 + const Joystick13 + const Joystick14 + const Joystick15 + const Joystick16 + const Joystick2 + const Joystick3 + const Joystick4 + const Joystick5 + const Joystick6 + const Joystick7 + const Joystick8 + const Joystick9 + const JoystickLast + func (joy Joystick) GetAxes() []float32 + func (joy Joystick) GetButtons() []Action + func (joy Joystick) GetGUID() string + func (joy Joystick) GetGamepadName() string + func (joy Joystick) GetGamepadState() *GamepadState + func (joy Joystick) GetHats() []JoystickHatState + func (joy Joystick) GetName() string + func (joy Joystick) GetUserPointer() unsafe.Pointer + func (joy Joystick) IsGamepad() bool + func (joy Joystick) Present() bool + func (joy Joystick) SetUserPointer(pointer unsafe.Pointer) + type JoystickCallback func(joy Joystick, event PeripheralEvent) + func SetJoystickCallback(cbfun JoystickCallback) (previous JoystickCallback) + type JoystickHatState int + const HatCentered + const HatDown + const HatLeft + const HatLeftDown + const HatLeftUp + const HatRight + const HatRightDown + const HatRightUp + const HatUp + type Key int + 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 + type KeyCallback func(w *Window, key Key, scancode int, action Action, mods ModifierKey) + type MaximizeCallback func(w *Window, maximized bool) + type ModifierKey int + const ModAlt + const ModCapsLock + const ModControl + const ModNumLock + const ModShift + const ModSuper + type Monitor struct + func GetMonitors() []*Monitor + func GetPrimaryMonitor() *Monitor + func (m *Monitor) GetCocoaMonitor() uintptr + func (m *Monitor) GetContentScale() (float32, float32) + func (m *Monitor) GetGammaRamp() *GammaRamp + func (m *Monitor) GetName() string + func (m *Monitor) GetPhysicalSize() (width, height int) + func (m *Monitor) GetPos() (x, y int) + func (m *Monitor) GetUserPointer() unsafe.Pointer + func (m *Monitor) GetVideoMode() *VidMode + func (m *Monitor) GetVideoModes() []*VidMode + func (m *Monitor) GetWin32Adapter() string + func (m *Monitor) GetWin32Monitor() string + func (m *Monitor) GetWorkarea() (x, y, width, height int) + func (m *Monitor) GetX11Adapter() C.RRCrtc + func (m *Monitor) GetX11Monitor() C.RROutput + func (m *Monitor) SetGamma(gamma float32) + func (m *Monitor) SetGammaRamp(ramp *GammaRamp) + func (m *Monitor) SetUserPointer(pointer unsafe.Pointer) + type MonitorCallback func(monitor *Monitor, event PeripheralEvent) + func SetMonitorCallback(cbfun MonitorCallback) MonitorCallback + type MouseButton int + const MouseButton1 + const MouseButton2 + const MouseButton3 + const MouseButton4 + const MouseButton5 + const MouseButton6 + const MouseButton7 + const MouseButton8 + const MouseButtonLast + const MouseButtonLeft + const MouseButtonMiddle + const MouseButtonRight + type MouseButtonCallback func(w *Window, button MouseButton, action Action, mods ModifierKey) + type PeripheralEvent int + const Connected + const Disconnected + type PosCallback func(w *Window, xpos int, ypos int) + type RefreshCallback func(w *Window) + type ScrollCallback func(w *Window, xoff float64, yoff float64) + type SizeCallback func(w *Window, width int, height int) + type StandardCursor int + const ArrowCursor + const CrosshairCursor + const HResizeCursor + const HandCursor + const IBeamCursor + const VResizeCursor + type VidMode struct + BlueBits int + GreenBits int + Height int + RedBits int + RefreshRate int + Width int + type Window struct + func CreateWindow(width, height int, title string, monitor *Monitor, share *Window) (*Window, error) + func GetCurrentContext() *Window + func GoWindow(window unsafe.Pointer) *Window + func (w *Window) Destroy() + func (w *Window) Focus() + func (w *Window) GetAttrib(attrib Hint) int + func (w *Window) GetClipboardString() string + func (w *Window) GetCocoaWindow() unsafe.Pointer + func (w *Window) GetContentScale() (float32, float32) + func (w *Window) GetCursorPos() (x, y float64) + func (w *Window) GetFrameSize() (left, top, right, bottom int) + func (w *Window) GetFramebufferSize() (width, height int) + func (w *Window) GetGLXContext() C.GLXContext + func (w *Window) GetGLXWindow() C.GLXWindow + func (w *Window) GetInputMode(mode InputMode) int + func (w *Window) GetKey(key Key) Action + func (w *Window) GetMonitor() *Monitor + func (w *Window) GetMouseButton(button MouseButton) Action + func (w *Window) GetNSGLContext() unsafe.Pointer + func (w *Window) GetOpacity() float32 + func (w *Window) GetPos() (x, y int) + func (w *Window) GetSize() (width, height int) + func (w *Window) GetUserPointer() unsafe.Pointer + func (w *Window) GetWGLContext() C.HGLRC + func (w *Window) GetWin32Window() C.HWND + func (w *Window) GetX11Window() C.Window + func (w *Window) Handle() unsafe.Pointer + func (w *Window) Hide() + func (w *Window) Iconify() + func (w *Window) MakeContextCurrent() + func (w *Window) Maximize() + func (w *Window) RequestAttention() + func (w *Window) Restore() + func (w *Window) SetAspectRatio(numer, denom int) + func (w *Window) SetAttrib(attrib Hint, value int) + func (w *Window) SetCharCallback(cbfun CharCallback) (previous CharCallback) + func (w *Window) SetCharModsCallback(cbfun CharModsCallback) (previous CharModsCallback) + func (w *Window) SetClipboardString(str string) + func (w *Window) SetCloseCallback(cbfun CloseCallback) (previous CloseCallback) + func (w *Window) SetContentScaleCallback(cbfun ContentScaleCallback) ContentScaleCallback + func (w *Window) SetCursor(c *Cursor) + func (w *Window) SetCursorEnterCallback(cbfun CursorEnterCallback) (previous CursorEnterCallback) + func (w *Window) SetCursorPos(xpos, ypos float64) + func (w *Window) SetCursorPosCallback(cbfun CursorPosCallback) (previous CursorPosCallback) + func (w *Window) SetDropCallback(cbfun DropCallback) (previous DropCallback) + func (w *Window) SetFocusCallback(cbfun FocusCallback) (previous FocusCallback) + func (w *Window) SetFramebufferSizeCallback(cbfun FramebufferSizeCallback) (previous FramebufferSizeCallback) + func (w *Window) SetIcon(images []image.Image) + func (w *Window) SetIconifyCallback(cbfun IconifyCallback) (previous IconifyCallback) + func (w *Window) SetInputMode(mode InputMode, value int) + func (w *Window) SetKeyCallback(cbfun KeyCallback) (previous KeyCallback) + func (w *Window) SetMaximizeCallback(cbfun MaximizeCallback) MaximizeCallback + func (w *Window) SetMonitor(monitor *Monitor, xpos, ypos, width, height, refreshRate int) + func (w *Window) SetMouseButtonCallback(cbfun MouseButtonCallback) (previous MouseButtonCallback) + func (w *Window) SetOpacity(opacity float32) + func (w *Window) SetPos(xpos, ypos int) + func (w *Window) SetPosCallback(cbfun PosCallback) (previous PosCallback) + func (w *Window) SetRefreshCallback(cbfun RefreshCallback) (previous RefreshCallback) + func (w *Window) SetScrollCallback(cbfun ScrollCallback) (previous ScrollCallback) + func (w *Window) SetShouldClose(value bool) + func (w *Window) SetSize(width, height int) + func (w *Window) SetSizeCallback(cbfun SizeCallback) (previous SizeCallback) + func (w *Window) SetSizeLimits(minw, minh, maxw, maxh int) + func (w *Window) SetTitle(title string) + func (w *Window) SetUserPointer(pointer unsafe.Pointer) + func (w *Window) ShouldClose() bool + func (w *Window) Show() + func (w *Window) SwapBuffers() + func (window *Window) CreateWindowSurface(instance interface{}, allocCallbacks unsafe.Pointer) (surface uintptr, err error) + func (window *Window) GetRequiredInstanceExtensions() []string