Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Control ¶
type Control interface {
IsTerminal() bool
Size() (cols, rows int)
MakeRaw() (restore func(), err error)
OnResize(func(cols, rows int)) func()
Close() error
}
Control exposes optional terminal capabilities for a byte stream.
type Remote ¶
type Remote struct {
Terminal *Terminal
// contains filtered or unexported fields
}
Remote owns a Terminal backed by a Carrier.
type RemoteOptions ¶
RemoteOptions configures a carrier-backed terminal.
type StreamControl ¶
type StreamControl struct {
// contains filtered or unexported fields
}
StreamControl is a reusable in-memory terminal control implementation.
func NewControl ¶
func NewControl(isTerminal bool, cols, rows int) *StreamControl
NewControl returns a mutable terminal control object.
func (*StreamControl) Close ¶
func (c *StreamControl) Close() error
func (*StreamControl) IsTerminal ¶
func (c *StreamControl) IsTerminal() bool
func (*StreamControl) MakeRaw ¶
func (c *StreamControl) MakeRaw() (func(), error)
func (*StreamControl) OnResize ¶
func (c *StreamControl) OnResize(fn func(int, int)) func()
func (*StreamControl) SetSize ¶
func (c *StreamControl) SetSize(cols, rows int)
func (*StreamControl) Size ¶
func (c *StreamControl) Size() (int, int)
Click to show internal directories.
Click to hide internal directories.