renderer

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 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) 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