iomanager

package
v0.0.0-...-309fd15 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SDL = iota
	WEB
)

Variables

This section is empty.

Functions

func New

func New(lm lm.Location) *ioManager

Types

type DrawSpec

type DrawSpec struct {
	E   entity.Entity
	Loc locationmanager.Combination
}

DrawSpec is a combination of entity and location to send to anyone who might want to output it.

type IoType

type IoType int

type Manager

type Manager interface {
	// Shutdown turns of all IO.
	Shutdown()

	// Add registers an output channel with the Manager.
	Add(t IoType, out chan []DrawSpec)

	// Distribute sends the given entities out down all the output channels.
	Distribute(data []entity.Entity)

	// Handle is called by any input monitors to let the Manager deal with events.
	Handle(e events.Event)
}

Manager is capable of handling multiple input/output paths at once. It abstracts this away from the main thread.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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