terminal

package
v0.0.0-...-1ab0d2a Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Canvas

type Canvas struct {
	*gowidterminal.ViewPortCanvas
}

func NewCanvasOfSize

func NewCanvasOfSize(cols, rows int) *Canvas

func (*Canvas) Resize

func (c *Canvas) Resize(width, height int)

func (*Canvas) ScrollBuffer

func (c *Canvas) ScrollBuffer(dir ScrollDir, reset bool, linesOpt gwutil.IntOption) int

type IWidget

type IWidget interface {
	io.Writer
	gowid.IWidget
	gowidterminal.IHotKeyProvider
	gowidterminal.IHotKeyPersistence
	MouseSupport() gowidterminal.IMouseSupport
	Terminfo() *terminfo.Terminfo
	HotKeyActive() bool
	SetHotKeyActive(app gowid.IApp, down bool)
	HotKeyDownTime() time.Time
	Scroll(dir ScrollDir, page bool, lines int)
	ResetScroll()
	Scrolling() bool
}

type ProcessExited

type ProcessExited struct{}

type ScrollDir

type ScrollDir int
const (
	ScrollNone ScrollDir = iota
	ScrollDown
	ScrollUp
)

type TitleChanged

type TitleChanged struct{}

type Widget

type Widget struct {
	gowidterminal.IHotKeyProvider
	gowidterminal.IHotKeyPersistence
	Callbacks *gowid.Callbacks

	gowid.IsSelectable
	// contains filtered or unexported fields
}

func New

func New(defaultID, lastID string) (*Widget, error)

func (*Widget) Canvas

func (w *Widget) Canvas() *Canvas

func (*Widget) Connected

func (w *Widget) Connected() bool

func (*Widget) HotKeyActive

func (w *Widget) HotKeyActive() bool

func (*Widget) HotKeyDownTime

func (w *Widget) HotKeyDownTime() time.Time

func (*Widget) MouseSupport

func (w *Widget) MouseSupport() gowidterminal.IMouseSupport

func (*Widget) OnProcessExited

func (w *Widget) OnProcessExited(f gowid.IWidgetChangedCallback)

func (*Widget) OnTitleChanged

func (w *Widget) OnTitleChanged(f gowid.IWidgetChangedCallback)

func (*Widget) Render

func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas

func (*Widget) RenderSize

func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox

func (*Widget) RenderTerminal

func (w *Widget) RenderTerminal(cols, rows int, app gowid.IApp)

func (*Widget) ResetScroll

func (w *Widget) ResetScroll()

func (*Widget) Scroll

func (w *Widget) Scroll(dir ScrollDir, page bool, lines int)

func (*Widget) Scrolling

func (w *Widget) Scrolling() bool

func (*Widget) SetHotKeyActive

func (w *Widget) SetHotKeyActive(app gowid.IApp, down bool)

func (*Widget) String

func (w *Widget) String() string

func (*Widget) Terminfo

func (w *Widget) Terminfo() *terminfo.Terminfo

func (*Widget) TouchTerminal

func (w *Widget) TouchTerminal(width, height int, app gowid.IApp)

func (*Widget) UserInput

func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool

func (*Widget) Write

func (w *Widget) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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