Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KbDown ¶
type KbDown struct{ Key Key }
KbDown is an event that happens when a key on the keyboard gets pressed.
type KbRepeat ¶
type KbRepeat struct{ Key Key }
KbRepeat is an event that happens when a key on the keyboard gets repeated.
This happens when its held down for some time.
type KbType ¶
type KbType struct{ Rune rune }
KbType is an event that happens when a Unicode character gets typed on the keyboard.
type KbUp ¶
type KbUp struct{ Key Key }
KbUp is an event that happens when a key on the keyboard gets released.
type Key ¶
type Key string
Key indicates a keyboard key in an event.
const ( KeyLeft Key = "left" KeyRight Key = "right" KeyUp Key = "up" KeyDown Key = "down" KeyEscape Key = "escape" KeySpace Key = "space" KeyBackspace Key = "backspace" KeyDelete Key = "delete" KeyEnter Key = "enter" KeyTab Key = "tab" KeyHome Key = "home" KeyEnd Key = "end" KeyPageUp Key = "pageup" KeyPageDown Key = "pagedown" KeyShift Key = "shift" KeyCtrl Key = "ctrl" KeyAlt Key = "alt" )
List of all keyboard keys.
type MoScroll ¶
MoScroll is an event that happens on scrolling the mouse.
The Point field tells the amount scrolled in each direction.
type Option ¶
type Option func(*options)
Option is a functional option to the window constructor New.
type WiClose ¶
type WiClose struct{}
WiClose is an event that happens when the user presses the close button on the window.
type Win ¶
type Win struct {
// contains filtered or unexported fields
}
Win is an Env that handles an actual graphical window.
It receives its events from the OS and it draws to the surface of the window.
Warning: only one window can be open at a time. This will be fixed.
func New ¶
New creates a new window with all the supplied options.
The default title is empty and the default size is 640x480.