term

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 18 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventAPC added in v0.5.0

type EventAPC struct {
	Payload string
}

EventAPC is emitted when an APC sequence is received in the terminal

type EventBell

type EventBell struct{}

EventBell is emitted when BEL is received

type EventClosed

type EventClosed struct {
	Term  *Model
	Error error
}

type EventNotify added in v0.5.0

type EventNotify struct {
	Title string
	Body  string
}

type EventPanic

type EventPanic error

type EventTitle added in v0.1.2

type EventTitle string

type Image added in v0.6.0

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

type Model

type Model struct {
	// If true, OSC8 enables the output of OSC8 strings. Otherwise, any OSC8
	// sequences will be stripped
	OSC8 bool
	// Set the TERM environment variable to be passed to the command's
	// environment. If not set, xterm-256color will be used
	TERM string
	// contains filtered or unexported fields
}

Model models a virtual terminal

func New

func New() *Model

func (*Model) Attach added in v0.1.2

func (vt *Model) Attach(fn func(ev vaxis.Event))

func (*Model) Blur added in v0.1.2

func (vt *Model) Blur()

func (*Model) Close

func (vt *Model) Close()

func (*Model) Detach added in v0.1.2

func (vt *Model) Detach()

func (*Model) Draw

func (vt *Model) Draw(win vaxis.Window)

func (*Model) Focus added in v0.1.2

func (vt *Model) Focus()

func (*Model) Resize

func (vt *Model) Resize(w int, h int)

func (*Model) Start

func (vt *Model) Start(cmd *exec.Cmd) error

Start starts the terminal with the specified command. Start returns when the command has been successfully started.

func (*Model) StartWithSize added in v0.7.1

func (vt *Model) StartWithSize(cmd *exec.Cmd, width int, height int) error

func (*Model) String

func (vt *Model) String() string

func (*Model) Update

func (vt *Model) Update(msg vaxis.Event)

Update is called from the host application. This is user input

Jump to

Keyboard shortcuts

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