win

package
v0.0.0-...-f623fcb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option is a functional option to the window constructor New.

func Resizable

func Resizable() Option

Resizable option makes the window resizable by the user.

func ShowFPS

func ShowFPS() Option

ShowFPS sets the window to show FPS.

func Size

func Size(width, height int) Option

Size option sets the width and height of the window.

func Title

func Title(title string) Option

Title option sets the title (caption) of the window.

type Win

type Win struct {
	// contains filtered or unexported fields
}

Win represents a window.

func NewWindow

func NewWindow(opts ...Option) (*Win, error)

NewWindow constructs a new graphical window.

func (*Win) Closed

func (w *Win) Closed() bool

Closed asserts if the given window is closed.

func (*Win) Run

func (w *Win) Run()

Run runs the given window and enters event handling loop and blocks until it should be close and destroyed.

func (*Win) SetRenderer

func (w *Win) SetRenderer(r *rend.Renderer)

SetRenderer sets fn as the renderer callback

func (*Win) Stop

func (w *Win) Stop()

Stop stops the given window.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL