render

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer struct {
	Pause  chan bool
	Resume chan bool

	DemoText string

	OutFd int
	// contains filtered or unexported fields
}

Renderer is our simplified implemention of ncurses

func NewRenderer

func NewRenderer(out int) *Renderer

NewRenderer returns an initialized Renderer

func (*Renderer) DemoKeypress

func (r *Renderer) DemoKeypress(str string)

DemoKeypress is used for demos of 3mux

func (*Renderer) HandleCh

func (r *Renderer) HandleCh(ch ecma48.PositionedChar)

HandleCh places a PositionedChar in the pending screen buffer

func (*Renderer) HardRefresh

func (r *Renderer) HardRefresh()

HardRefresh force clears all cached chars. Used for handling terminal resize

func (*Renderer) Render added in v1.1.0

func (r *Renderer) Render()

func (*Renderer) RenderSingleFrame added in v1.1.0

func (r *Renderer) RenderSingleFrame() bool

func (*Renderer) RenderViaFrames added in v1.1.0

func (r *Renderer) RenderViaFrames()

RenderViaFrames sets a framerate at which it writes all new characters. This is best during high load, such as dumping a file to stdout, where the renderer can quickly show the final display state instead of slowly scrolling to get there. Exits during low load.

func (*Renderer) RenderViaQueue added in v1.1.0

func (r *Renderer) RenderViaQueue()

RenderViaQueue displays characters immediately after they are sent to HandleCh. This rendering mode has lowest latency but can "fall behind" when panes are outputting characters faster than the host terminal will accept them. Exits during high load.

func (*Renderer) Resize

func (r *Renderer) Resize(w, h int)

Resize changes the size of the framebuffers to match the host terminal size

func (*Renderer) SetCursor

func (r *Renderer) SetCursor(x, y int)

SetCursor sets the position of the physical cursor

func (*Renderer) UpdateOut added in v1.0.0

func (r *Renderer) UpdateOut(out int)

func (*Renderer) Write added in v1.0.0

func (r *Renderer) Write(data []byte)

Jump to

Keyboard shortcuts

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