nano

package module
v0.0.0-...-3e2c1b1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2018 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Gyro Nano Backend

  • GLFW
  • OpenGL
  • NanoVGo

Documentation

Index

Constants

View Source
const (
	FPS = time.Second / 30 // TODO: make this configurable through NewApp(opts)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*closer.Closer
	// contains filtered or unexported fields
}

func (*App) CloseChan

func (a *App) CloseChan() <-chan struct{}

func (*App) Lock

func (a *App) Lock()

Lock the app rendering routine. Prefer to use Sync.

func (*App) Run

func (a *App) Run() (err error)

func (*App) Sync

func (a *App) Sync(f func())

Sync calls the function in a locked context and synchronizes with the main app rendering routine.

func (*App) Unlock

func (a *App) Unlock()

Unlock the app rendering routine and continue rendering. Prefer to use Sync.

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func New

func New() *Backend

func (*Backend) App

func (b *Backend) App() gyro.App

func (*Backend) NewApp

func (b *Backend) NewApp(f gyro.AppInitFunc) (gyro.App, error)

func (*Backend) NewRect

func (b *Backend) NewRect() gyro.Rect

func (*Backend) NewText

func (b *Backend) NewText() gyro.Text

func (*Backend) NewWindow

func (b *Backend) NewWindow(
	title string,
	width, height int,
) (gyro.Window, error)

type Rect

type Rect struct {
	// contains filtered or unexported fields
}

func (Rect) AddWidget

func (ws Rect) AddWidget(gw gyro.Widget)

func (*Rect) Border

func (r *Rect) Border() int

func (*Rect) BorderColor

func (r *Rect) BorderColor() gyro.Color

func (*Rect) Bottom

func (r *Rect) Bottom() int

func (*Rect) Color

func (r *Rect) Color() gyro.Color

func (*Rect) Height

func (r *Rect) Height() int

func (*Rect) Radius

func (r *Rect) Radius() int

func (*Rect) Right

func (r *Rect) Right() int

func (*Rect) SetBorder

func (r *Rect) SetBorder(b int)

func (*Rect) SetBorderColor

func (r *Rect) SetBorderColor(c gyro.Color)

func (*Rect) SetColor

func (r *Rect) SetColor(c gyro.Color)

func (*Rect) SetHeight

func (r *Rect) SetHeight(h int)

func (*Rect) SetRadius

func (r *Rect) SetRadius(rr int)

func (*Rect) SetWidth

func (r *Rect) SetWidth(w int)

func (*Rect) SetX

func (r *Rect) SetX(x int)

func (*Rect) SetY

func (r *Rect) SetY(y int)

func (*Rect) Width

func (r *Rect) Width() int

func (*Rect) X

func (r *Rect) X() int

func (*Rect) Y

func (r *Rect) Y() int

type Window

type Window struct {
	*closer.Closer
	// contains filtered or unexported fields
}

func (Window) AddWidget

func (ws Window) AddWidget(gw gyro.Widget)

func (*Window) CloseChan

func (w *Window) CloseChan() <-chan struct{}

Jump to

Keyboard shortcuts

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