tcell

package
v0.0.0-...-b5b2f04 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Terminal) error

Option define an option for Terminal object.

func Screen

func Screen(screen tcell.Screen) Option

Screen returns an Option that sets the underlying tcell.Screen used by the Terminal.

type Terminal

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

Terminal is a wrapper around https://www.github.com/gdamore/tcell Screen that satisfy the backend.Terminal interface.

func NewTerminal

func NewTerminal(options ...Option) (*Terminal, error)

NewTerminal returns a new Terminal object configured with the given options.

func (*Terminal) Clear

func (c *Terminal) Clear()

Clear implements the backend.Terminal interface.

func (*Terminal) Flush

func (c *Terminal) Flush()

Flush implements the backend.Terminal interface.

func (*Terminal) Get

func (c *Terminal) Get(pos geometry.Vec2D) draw.Cell

Get implements the draw.Surface interface.

func (*Terminal) Set

func (c *Terminal) Set(pos geometry.Vec2D, cell draw.Cell)

Set implements the draw.Surface interface.

func (*Terminal) Size

func (c *Terminal) Size() geometry.Size

Size implements the geometry.Sized interface.

func (*Terminal) Start

func (c *Terminal) Start(evch chan<- events.Event) error

Start implements the backend.Terminal interface.

func (*Terminal) Stop

func (c *Terminal) Stop()

Stop implements the backend.Terminal interface.

Jump to

Keyboard shortcuts

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