Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Frontend ¶
Frontend is the basic interface for graphical output. A frontend might be implemented by SDL, opengl or similar libraries.
type Input ¶
type Input interface {
Poll() *KeyEvent
}
Input is an interface for a provider of keypresses.
type SdlFrontend ¶
type SdlFrontend struct {
// contains filtered or unexported fields
}
SdlFrontend implements basic drawing using SDL2.
func NewSdlFrontend ¶
func NewSdlFrontend() SdlFrontend
NewSdlFrontend creates a new uninitialized frontend that uses SDL2.
func (*SdlFrontend) Close ¶
func (sf *SdlFrontend) Close()
Close will free any resources, the window and quit the application. Best used with defer.
func (*SdlFrontend) Draw ¶
func (sf *SdlFrontend) Draw(framebuffer []uint8)
Draw will draw on the window the contents of the emulator framebuffer.
func (*SdlFrontend) Initialize ¶
func (sf *SdlFrontend) Initialize()
Initialize creates the window and sets up any internal state for the frontend.
type SdlInput ¶
type SdlInput struct { }
SdlInput implements basic drawing using SDL2.
func NewSdlInput ¶
func NewSdlInput() SdlInput
NewSdlInput creates a new uninitialized Input that uses SDL2.