renderer

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 9 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 {
	// contains filtered or unexported fields
}

A Renderer produces the stream of bytes necessary to render a Screen to a destination terminal. Conceptually, it is the opposite of a Screen, which takes a Stream and feeds it to a virtual terminal emulator. A Renderer takes a Screen and makes a Stream. This is useful because a Stream may produce many more writes than are actually necessary to change the screen; a Renderer can make optimizations to only update the parts of the screen that have changed.

func NewRenderer

func NewRenderer(
	ctx context.Context,
	info *terminfo.Terminfo,
	initialSize geom.Size,
	screen mux.Screen,
) *Renderer

func (*Renderer) Kill added in v0.2.0

func (r *Renderer) Kill()

func (*Renderer) Read

func (r *Renderer) Read(p []byte) (n int, err error)

func (*Renderer) Resize

func (r *Renderer) Resize(size geom.Size) error

func (*Renderer) Send

func (r *Renderer) Send(msg mux.Msg)

func (*Renderer) Write

func (r *Renderer) Write(data []byte) (n int, err error)

Jump to

Keyboard shortcuts

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