Documentation ¶
Index ¶
- type Window
- func (window *Window) Center()
- func (window *Window) DPI() float64
- func (window *Window) Destroy()
- func (window *Window) Dimensions() common.Rectangle[int]
- func (window *Window) GL() *opengl.Context
- func (window *Window) HideMouseCursor()
- func (window *Window) IsFullscreen() bool
- func (window *Window) IsMaximized() bool
- func (window *Window) IsMinimized() bool
- func (window *Window) IsVisible() bool
- func (window *Window) KeepAlive()
- func (window *Window) Maximize()
- func (window *Window) Minimize()
- func (window *Window) Move(pos common.Vector2[int])
- func (window *Window) PollEvents()
- func (window *Window) Raise()
- func (window *Window) Resize(size common.Vector2[int])
- func (window *Window) SetEventHandler(eventHandler func(event WindowEvent))
- func (window *Window) SetIcon(icons [3]image.Image)
- func (window *Window) SetMinSize(minSize common.Vector2[int])
- func (window *Window) SetTitle(title string)
- func (window *Window) Show()
- func (window *Window) ShowMouseCursor()
- func (window *Window) Size() common.Vector2[int]
- func (window *Window) ToggleFullscreen()
- func (window *Window) Viewport() common.Rectangle[int]
- type WindowEvent
- type WindowEventStack
- type WindowEventType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func New ¶
New creates a window and initializes an opengl context for it Im order to use context just call GL function of window You must call the Show function to show the window
func (*Window) HideMouseCursor ¶
func (window *Window) HideMouseCursor()
func (*Window) IsFullscreen ¶
func (*Window) IsMaximized ¶
func (*Window) IsMinimized ¶
func (*Window) KeepAlive ¶
func (window *Window) KeepAlive()
You can use this if window closed by user but you don't want to close Immediately call after WindowEventClose received
func (*Window) PollEvents ¶
func (window *Window) PollEvents()
func (*Window) SetEventHandler ¶
func (window *Window) SetEventHandler(eventHandler func(event WindowEvent))
func (*Window) ShowMouseCursor ¶
func (window *Window) ShowMouseCursor()
func (*Window) ToggleFullscreen ¶
func (window *Window) ToggleFullscreen()
type WindowEvent ¶
type WindowEvent struct { Type WindowEventType Params []any }
type WindowEventStack ¶
type WindowEventStack []WindowEvent
func (*WindowEventStack) Push ¶
func (stack *WindowEventStack) Push(eventType WindowEventType, params ...any)
type WindowEventType ¶
type WindowEventType uint32
const ( WindowEventRefresh WindowEventType = iota WindowEventResize WindowEventKeyInput WindowEventCharInput WindowEventMouseInput WindowEventMouseMove WindowEventScroll WindowEventDrop WindowEventScaleChanged WindowEventClose )
func (WindowEventType) String ¶
func (Type WindowEventType) String() string
Click to show internal directories.
Click to hide internal directories.