screen

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithInteractive added in v0.1.5

func WithInteractive(layer *Layer)

func WithOpaque added in v0.1.5

func WithOpaque(layer *Layer)

Types

type ExitEvent added in v0.4.0

type ExitEvent struct {
	Errored bool
	Code    int
}

type Layer

type Layer struct {
	Screen
	// contains filtered or unexported fields
}

type LayerOption added in v0.1.5

type LayerOption func(*Layer)

type Layers

type Layers struct {
	deadlock.RWMutex
	*mux.UpdatePublisher
	// contains filtered or unexported fields
}

Layers allows you to stack several Screens on top of one another. The topmost layer with isInteractive set to true receives all key presses.

func NewLayers

func NewLayers() *Layers

func (*Layers) Kill added in v0.2.0

func (l *Layers) Kill()

func (*Layers) NewLayer

func (l *Layers) NewLayer(ctx context.Context, screen Screen, pos Position, options ...LayerOption) *Layer

func (*Layers) NumLayers

func (l *Layers) NumLayers() int

func (*Layers) Resize

func (l *Layers) Resize(size Size) error

func (*Layers) Send added in v0.1.6

func (l *Layers) Send(msg mux.Msg)

func (*Layers) State

func (l *Layers) State() *tty.State

type Position added in v0.1.5

type Position int
const (
	PositionTop Position = iota
	PositionBottom
)

type RenderLayer

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

type Renderable

type Renderable interface {
	Render(Size) *tty.State
	mux.Resizable
}

type Screen

type Screen = mux.Screen

type Size

type Size = mux.Size

type Stream

type Stream = mux.Stream

type Terminal

type Terminal struct {
	deadlock.RWMutex
	*mux.UpdatePublisher
	// contains filtered or unexported fields
}

func NewTerminal

func NewTerminal(
	ctx context.Context,
	stream Stream,
	size Size,
	params *params.Parameters,
	options ...emu.TerminalOption,
) *Terminal

func (*Terminal) IsAltMode added in v0.1.11

func (t *Terminal) IsAltMode() bool

func (*Terminal) Kill added in v0.2.0

func (t *Terminal) Kill()

func (*Terminal) Resize

func (t *Terminal) Resize(size Size) error

func (*Terminal) Send added in v0.1.6

func (t *Terminal) Send(msg mux.Msg)

func (*Terminal) State

func (t *Terminal) State() *tty.State

func (*Terminal) Write

func (t *Terminal) Write(p []byte) (n int, err error)

type Trigger

type Trigger struct {
	deadlock.RWMutex
	*mux.UpdatePublisher
	// contains filtered or unexported fields
}

func NewTrigger

func NewTrigger(r Renderable) *Trigger

func (*Trigger) Resize

func (t *Trigger) Resize(size Size) error

func (*Trigger) Size

func (t *Trigger) Size() Size

func (*Trigger) State

func (t *Trigger) State() *tty.State

type Updater

type Updater = mux.Updater

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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