platform

package
v0.0.0-...-c67ce8d Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2017 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyUnknown = iota
	KeyUp
	KeyDown
	KeyLeft
	KeyRight
	KeyEsc
	KeyReturn
)

Variables

View Source
var (
	ConfigPath string
)

Functions

func CfgRootJoin

func CfgRootJoin(p ...string) string

func ConfigWithDebug

func ConfigWithDebug(rnd *sdlRenderer) error

func ConfigWithFullscreen

func ConfigWithFullscreen(rnd *sdlRenderer) error

func ConfigWithNoVSync

func ConfigWithNoVSync(rnd *sdlRenderer) error

func Init

func Init() error

func NewId64

func NewId64() uint64

func NewRenderer

func NewRenderer(configs ...Config) (*sdlRenderer, error)

func Shutdown

func Shutdown()

Types

type Config

type Config func(*sdlRenderer) error

func ConfigWithDiv

func ConfigWithDiv(n int) Config

func ConfigWithSize

func ConfigWithSize(w, h int) Config

func ConfigWithTitle

func ConfigWithTitle(title string) Config

type Event

type Event interface{}

func PollEvent

func PollEvent() Event

type KeyDownEvent

type KeyDownEvent KeyUpEvent

type KeyUpEvent

type KeyUpEvent struct {
	Rune rune
	Key  int
}

type QuitEvent

type QuitEvent struct{}

type Renderer

type Renderer interface {
	Clear()
	Present()
	Shutdown()
	BackBuffer() *image.Paletted
	SetPalette(pal color.Palette)
	ToggleFullscreen()
	SetWindowTitle(title string)
}

Jump to

Keyboard shortcuts

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