terminal

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: GPL-3.0 Imports: 16 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 platform.Pty, logger *zap.SugaredLogger, config *config.Config) *Terminal

func (*Terminal) ActiveBuffer

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

func (*Terminal) AttachResizeHandler added in v0.8.8

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

func (*Terminal) AttachReverseHandler added in v0.9.0

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

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) IsAutoWrap added in v0.8.9

func (terminal *Terminal) IsAutoWrap() bool

func (*Terminal) IsOSCTerminator added in v0.8.0

func (terminal *Terminal) IsOSCTerminator(char rune) 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) ResetVerticalMargins added in v0.8.9

func (terminal *Terminal) ResetVerticalMargins()

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) SetAutoWrap added in v0.8.9

func (terminal *Terminal) SetAutoWrap(enabled bool)

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) SetInsertMode added in v0.8.9

func (terminal *Terminal) SetInsertMode()

func (*Terminal) SetLineFeedMode added in v0.8.9

func (terminal *Terminal) SetLineFeedMode()

func (*Terminal) SetMouseMode

func (terminal *Terminal) SetMouseMode(mode MouseMode)

func (*Terminal) SetNewLineMode added in v0.8.9

func (terminal *Terminal) SetNewLineMode()

func (*Terminal) SetOriginMode added in v0.8.9

func (terminal *Terminal) SetOriginMode(enabled bool)

func (*Terminal) SetProgram

func (terminal *Terminal) SetProgram(program uint32)

func (*Terminal) SetReplaceMode added in v0.8.9

func (terminal *Terminal) SetReplaceMode()

func (*Terminal) SetScreenMode added in v0.9.0

func (terminal *Terminal) SetScreenMode(enabled bool)

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

func (*Terminal) WriteReturn added in v0.8.8

func (terminal *Terminal) WriteReturn() error

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