backend

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, provider EnvironmentProvider)

Types

type Deployer

type Deployer interface {
	//Deploy copia a imagem im para a tela(screen). a imagem im deve ter ordem MSB(Most Significant Byte First)
	Deploy(im *image.RGBA, area image.Rectangle)
}

Deployer é responsável por instalar a imagem na tela(screen)

type Drawable

type Drawable interface {
	Draw(Drawer)
}

type Drawer

type Drawer interface {
}

type Environment

type Environment interface {
	// CreateHandler creates a new handler.
	CreateHandler(Title string, X, Y, Width, Height int) (Handler, error)

	// Run the application.
	// this function must handler all events and must draw the window.
	Run() error
}

Environment is where the gui will run.

type EnvironmentProvider

type EnvironmentProvider func() Environment

EnvironmentProvider provides a new environment.

func Get

func Get(name string) EnvironmentProvider

type Event

type Event struct {
	Handler Handler
	Type    EventType

	Height int
	Width  int
}

type EventType

type EventType uint32
const (
	EventTypeNoEvent EventType = iota
	EventTypeClose
	EventTypeExpose
	EventTypeResize
)

type Handler

type Handler interface {
	SetDrawable(Drawable)
	Drawable() Drawable

	SetVisibility(bool)
	Destroy()
}

Handler is the native window handler.

Jump to

Keyboard shortcuts

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