Documentation ¶
Index ¶
- Constants
- func Init() error
- func PollEvents()
- func SetMonitorCallback(cbfun func(monitor *Monitor, event PeripheralEvent))
- func SwapInterval(interval int)
- func Terminate()
- func WindowHint(target Hint, hint int)
- type Action
- type CharModsCallback
- type ErrorCode
- type FramebufferSizeCallback
- type Hint
- type InputMode
- type Joystick
- type Key
- type ModifierKey
- type Monitor
- type MouseButton
- type PeripheralEvent
- type ScrollCallback
- type SizeCallback
- type VidMode
- type Window
- func (w *Window) Destroy()
- func (w *Window) GetAttrib(attrib Hint) int
- func (w *Window) GetCursorPos() (x, y float64)
- 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) GetPos() (x, y int)
- func (w *Window) GetSize() (width, height int)
- func (w *Window) Iconify()
- func (w *Window) MakeContextCurrent()
- func (w *Window) Maximize()
- func (w *Window) Restore()
- func (w *Window) SetAttrib(attrib Hint, value int)
- func (w *Window) SetCharModsCallback(cbfun CharModsCallback) (previous CharModsCallback)
- func (w *Window) SetFramebufferSizeCallback(cbfun FramebufferSizeCallback) (previous FramebufferSizeCallback)
- func (w *Window) SetIcon(images []image.Image)
- func (w *Window) SetInputMode(mode InputMode, value int)
- func (w *Window) SetMonitor(monitor *Monitor, xpos, ypos, width, height, refreshRate int)
- func (w *Window) SetPos(xpos, ypos int)
- func (w *Window) SetScrollCallback(cbfun ScrollCallback) (previous ScrollCallback)
- func (w *Window) SetSize(width, height int)
- func (w *Window) SetSizeCallback(cbfun SizeCallback) (previous SizeCallback)
- func (w *Window) SetTitle(title string)
- func (w *Window) ShouldClose() bool
- func (w *Window) Show()
- func (w *Window) SwapBuffers()
Constants ¶
View Source
const ( False = 0 True = 1 )
View Source
const ( Release = Action(0) Press = Action(1) Repeat = Action(2) )
View Source
const ( ModShift = ModifierKey(0x0001) ModControl = ModifierKey(0x0002) ModAlt = ModifierKey(0x0004) )
View Source
const ( MouseButtonLeft = MouseButton(0) MouseButtonRight = MouseButton(1) MouseButtonMiddle = MouseButton(2) )
View Source
const ( Joystick1 = Joystick(0) Joystick2 = Joystick(1) Joystick3 = Joystick(2) Joystick4 = Joystick(3) Joystick5 = Joystick(4) Joystick6 = Joystick(5) Joystick7 = Joystick(6) Joystick8 = Joystick(7) Joystick9 = Joystick(8) Joystick10 = Joystick(9) Joystick11 = Joystick(10) Joystick12 = Joystick(11) Joystick13 = Joystick(12) Joystick14 = Joystick(13) Joystick15 = Joystick(14) Joystick16 = Joystick(15) )
View Source
const ( AutoIconify = Hint(0x00020006) ClientAPI = Hint(0x00022001) ContextVersionMajor = Hint(0x00022002) ContextVersionMinor = Hint(0x00022003) Decorated = Hint(0x00020005) Floating = Hint(0x00020007) Focused = Hint(0x00020001) FocusOnShow = Hint(0x0002000C) Iconified = Hint(0x00020002) Maximized = Hint(0x00020008) Resizable = Hint(0x00020003) TransparentFramebuffer = Hint(0x0002000A) Visible = Hint(0x00020004) )
View Source
const ( CursorMode = InputMode(0x00033001) StickyKeysMode = InputMode(0x00033002) StickyMouseButtonsMode = InputMode(0x00033003) )
View Source
const ( CursorDisabled = 0x00034003 CursorHidden = 0x00034002 CursorNormal = 0x00034001 NoAPI = 0 OpenGLAPI = 0x00030001 )
View Source
const ( NotInitialized = ErrorCode(0x00010001) NoCurrentContext = ErrorCode(0x00010002) InvalidEnum = ErrorCode(0x00010003) InvalidValue = ErrorCode(0x00010004) OutOfMemory = ErrorCode(0x00010005) PlatformError = ErrorCode(0x00010008) NoWindowContext = ErrorCode(0x0001000A) )
View Source
const ( Key0 = Key(48) Key1 = Key(49) Key2 = Key(50) Key3 = Key(51) Key4 = Key(52) Key5 = Key(53) Key6 = Key(54) Key7 = Key(55) Key8 = Key(56) Key9 = Key(57) KeyA = Key(65) KeyApostrophe = Key(39) KeyB = Key(66) KeyBackslash = Key(92) KeyBackspace = Key(259) KeyC = Key(67) KeyCapsLock = Key(280) KeyComma = Key(44) KeyD = Key(68) KeyDelete = Key(261) KeyDown = Key(264) KeyE = Key(69) KeyEnd = Key(269) KeyEnter = Key(257) KeyEqual = Key(61) KeyEscape = Key(256) KeyF = Key(70) KeyF1 = Key(290) KeyF10 = Key(299) KeyF11 = Key(300) KeyF12 = Key(301) KeyF2 = Key(291) KeyF3 = Key(292) KeyF4 = Key(293) KeyF5 = Key(294) KeyF6 = Key(295) KeyF7 = Key(296) KeyF8 = Key(297) KeyF9 = Key(298) KeyG = Key(71) KeyGraveAccent = Key(96) KeyH = Key(72) KeyHome = Key(268) KeyI = Key(73) KeyInsert = Key(260) KeyJ = Key(74) KeyK = Key(75) KeyKP0 = Key(320) KeyKP1 = Key(321) KeyKP2 = Key(322) KeyKP3 = Key(323) KeyKP4 = Key(324) KeyKP5 = Key(325) KeyKP6 = Key(326) KeyKP7 = Key(327) KeyKP8 = Key(328) KeyKP9 = Key(329) KeyKPAdd = Key(334) KeyKPDecimal = Key(330) KeyKPDivide = Key(331) KeyKPEnter = Key(335) KeyKPEqual = Key(336) KeyKPMultiply = Key(332) KeyKPSubtract = Key(333) KeyL = Key(76) KeyLast = Key(348) KeyLeft = Key(263) KeyLeftAlt = Key(342) KeyLeftBracket = Key(91) KeyLeftControl = Key(341) KeyLeftShift = Key(340) KeyLeftSuper = Key(343) KeyM = Key(77) KeyMenu = Key(348) KeyMinus = Key(45) KeyN = Key(78) KeyNumLock = Key(282) KeyO = Key(79) KeyP = Key(80) KeyPageDown = Key(267) KeyPageUp = Key(266) KeyPause = Key(284) KeyPeriod = Key(46) KeyPrintScreen = Key(283) KeyQ = Key(81) KeyR = Key(82) KeyRight = Key(262) KeyRightAlt = Key(346) KeyRightBracket = Key(93) KeyRightControl = Key(345) KeyRightShift = Key(344) KeyRightSuper = Key(347) KeyS = Key(83) KeyScrollLock = Key(281) KeySemicolon = Key(59) KeySlash = Key(47) KeySpace = Key(32) KeyT = Key(84) KeyTab = Key(258) KeyU = Key(85) KeyUnknown = Key(-1) KeyUp = Key(265) KeyV = Key(86) KeyW = Key(87) KeyWorld1 = Key(161) KeyWorld2 = Key(162) KeyX = Key(88) KeyY = Key(89) KeyZ = Key(90) )
Variables ¶
This section is empty.
Functions ¶
func PollEvents ¶
func PollEvents()
func SetMonitorCallback ¶
func SetMonitorCallback(cbfun func(monitor *Monitor, event PeripheralEvent))
func SwapInterval ¶
func SwapInterval(interval int)
func WindowHint ¶
Types ¶
type CharModsCallback ¶
type CharModsCallback func(w *Window, char rune, mods ModifierKey)
type FramebufferSizeCallback ¶
type ModifierKey ¶
type ModifierKey int
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func GetMonitors ¶
func GetMonitors() []*Monitor
func GetPrimaryMonitor ¶
func GetPrimaryMonitor() *Monitor
func (*Monitor) GetContentScale ¶
func (*Monitor) GetVideoMode ¶
type MouseButton ¶
type MouseButton int
type PeripheralEvent ¶
type PeripheralEvent int
type ScrollCallback ¶
type SizeCallback ¶
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func CreateWindow ¶
func (*Window) GetCursorPos ¶
func (*Window) GetInputMode ¶
func (*Window) GetMonitor ¶
func (*Window) GetMouseButton ¶
func (w *Window) GetMouseButton(button MouseButton) Action
func (*Window) MakeContextCurrent ¶
func (w *Window) MakeContextCurrent()
func (*Window) SetCharModsCallback ¶
func (w *Window) SetCharModsCallback(cbfun CharModsCallback) (previous CharModsCallback)
func (*Window) SetFramebufferSizeCallback ¶
func (w *Window) SetFramebufferSizeCallback(cbfun FramebufferSizeCallback) (previous FramebufferSizeCallback)
func (*Window) SetInputMode ¶
func (*Window) SetMonitor ¶
func (*Window) SetScrollCallback ¶
func (w *Window) SetScrollCallback(cbfun ScrollCallback) (previous ScrollCallback)
func (*Window) SetSizeCallback ¶
func (w *Window) SetSizeCallback(cbfun SizeCallback) (previous SizeCallback)
func (*Window) ShouldClose ¶
func (*Window) SwapBuffers ¶
func (w *Window) SwapBuffers()
Click to show internal directories.
Click to hide internal directories.