platform

package
v0.0.0-...-07f2a93 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyUnknown = iota
	KeyUp
	KeyDown
	KeyLeft
	KeyRight
	KeyEsc
	KeySpace
	KeyBackSpace
)
View Source
const (
	KeyModNone   = 0x0000
	KeyModLshift = 0x0001
	KeyModRshift = 0x0002
	KeyModLctrl  = 0x0040
	KeyModRctrl  = 0x0080
	KeyModLalt   = 0x0100
	KeyModRalt   = 0x0200
	KeyModLgui   = 0x0400
	KeyModRgui   = 0x0400
	KeyModCaps   = 0x2000
)
View Source
const (
	KeyModAlt   = KeyModLalt | KeyModRalt
	KeyModGui   = KeyModLgui | KeyModRgui
	KeyModCtrl  = KeyModLctrl | KeyModRctrl
	KeyModShift = KeyModLshift | KeyModRshift
)
View Source
const (
	MouseButtonDown = iota
	MouseButtonUp
	MouseWheel
)
View Source
const (
	KeyboardDown = iota
	KeyboardUp
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface{}

type Input

type Input interface {
	PollEvent() Event
}

type KeyboardEvent

type KeyboardEvent struct {
	Type, Mod, Key int
	Name           string
}

func (*KeyboardEvent) IsMod

func (e *KeyboardEvent) IsMod(m int) bool

type MouseButtonEvent

type MouseButtonEvent struct {
	X, Y, Button, Type int
}

type MouseMotionEvent

type MouseMotionEvent struct {
	X, Y, XRel, YRel int
}

type MouseState

type MouseState struct {
	X, Y    int
	Buttons [3]bool
}

type QuitEvent

type QuitEvent struct{}

type Renderer

type Renderer interface {
	Present(image.Image) error
	Resolution() image.Point
	ToggleFullscreen() (bool, error)
}

type UnknownEvent

type UnknownEvent struct{}

Jump to

Keyboard shortcuts

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