terminal

package
v0.7.12 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: GPL-3.0 Imports: 17 Imported by: 9

Documentation

Index

Constants

View Source
const (
	MainBuffer     uint8 = 0
	AltBuffer      uint8 = 1
	InternalBuffer uint8 = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Modes

type Modes struct {
	ShowCursor            bool
	ApplicationCursorKeys bool
	BlinkingCursor        bool
}

type MouseMode

type MouseMode uint
const (
	MouseModeNone MouseMode = iota
	MouseModeX10
	MouseModeVT200
	MouseModeVT200Highlight
	MouseModeButtonEvent
	MouseModeAnyEvent
)

type Terminal

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

func New

func New(pty *os.File, logger *zap.SugaredLogger, config *config.Config) *Terminal

func (*Terminal) ActiveBuffer

func (terminal *Terminal) ActiveBuffer() *buffer.Buffer

func (*Terminal) AttachTitleChangeHandler

func (terminal *Terminal) AttachTitleChangeHandler(handler chan bool)

func (*Terminal) CheckDirty

func (terminal *Terminal) CheckDirty() bool

func (*Terminal) Clear

func (terminal *Terminal) Clear()

func (*Terminal) ExitInternalBuffer

func (terminal *Terminal) ExitInternalBuffer()

func (*Terminal) GetCell

func (terminal *Terminal) GetCell(col uint16, row uint16) *buffer.Cell

func (*Terminal) GetLogicalCursorX

func (terminal *Terminal) GetLogicalCursorX() uint16

func (*Terminal) GetLogicalCursorY

func (terminal *Terminal) GetLogicalCursorY() uint16

func (*Terminal) GetMouseMode

func (terminal *Terminal) GetMouseMode() MouseMode

func (*Terminal) GetScrollOffset

func (terminal *Terminal) GetScrollOffset() uint

func (*Terminal) GetSize

func (terminal *Terminal) GetSize() (int, int)

func (*Terminal) GetTitle

func (terminal *Terminal) GetTitle() string

func (*Terminal) GetVisibleLines

func (terminal *Terminal) GetVisibleLines() []buffer.Line

func (*Terminal) IsApplicationCursorKeysModeEnabled

func (terminal *Terminal) IsApplicationCursorKeysModeEnabled() bool

func (*Terminal) Modes

func (terminal *Terminal) Modes() Modes

func (*Terminal) Paste

func (terminal *Terminal) Paste(data []byte) error

func (*Terminal) Read

func (terminal *Terminal) Read() error

Read needs to be run on a goroutine, as it continually reads output to set on the terminal

func (*Terminal) ScrollDown

func (terminal *Terminal) ScrollDown(lines uint16)

func (*Terminal) ScrollPageDown

func (terminal *Terminal) ScrollPageDown()

func (*Terminal) ScrollPageUp

func (terminal *Terminal) ScrollPageUp()

func (*Terminal) ScrollToEnd

func (terminal *Terminal) ScrollToEnd()

func (*Terminal) ScrollUp

func (terminal *Terminal) ScrollUp(lines uint16)

func (*Terminal) SetBracketedPasteMode

func (terminal *Terminal) SetBracketedPasteMode(enabled bool)

func (*Terminal) SetCharSize

func (terminal *Terminal) SetCharSize(w float32, h float32)

func (*Terminal) SetDirty

func (terminal *Terminal) SetDirty()

func (*Terminal) SetMouseMode

func (terminal *Terminal) SetMouseMode(mode MouseMode)

func (*Terminal) SetProgram

func (terminal *Terminal) SetProgram(program uint32)

func (*Terminal) SetSize

func (terminal *Terminal) SetSize(newCols uint, newLines uint) error

func (*Terminal) SetTitle

func (terminal *Terminal) SetTitle(title string)

func (*Terminal) UseAltBuffer

func (terminal *Terminal) UseAltBuffer()

func (*Terminal) UseInternalBuffer

func (terminal *Terminal) UseInternalBuffer()

func (*Terminal) UseMainBuffer

func (terminal *Terminal) UseMainBuffer()

func (*Terminal) UsingMainBuffer

func (terminal *Terminal) UsingMainBuffer() bool

func (*Terminal) Write

func (terminal *Terminal) Write(data []byte) error

Write sends data, i.e. locally typed keystrokes to the pty

type TerminalCharSet

type TerminalCharSet int

type Winsize

type Winsize struct {
	Height uint16
	Width  uint16
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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