screen

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectedClient

type ConnectedClient struct {
	WritePermission bool

	Client *client.Client
	// contains filtered or unexported fields
}

type Manager

type Manager struct {
	Screens []*Screen
}

func NewManager

func NewManager() *Manager

func (*Manager) AttachClient

func (m *Manager) AttachClient(c *client.Client)

attach a client to a screen

func (*Manager) DetachClient

func (m *Manager) DetachClient(c *client.Client)

detach a client from a screen

func (*Manager) GetScreenByID

func (m *Manager) GetScreenByID(id int) (bool, *Screen)

get screen by id

func (*Manager) GetScreenByTitle

func (m *Manager) GetScreenByTitle(title string) (bool, *Screen)

get screen by Title

type Screen

type Screen struct {
	Title   string
	Columns int
	Rows    int
	Clients []*ConnectedClient
	Stream  *stream.Stream
	// contains filtered or unexported fields
}

func New

func New(rows, columns int) *Screen

func (*Screen) CursorPos

func (s *Screen) CursorPos() (rows, columns int)

CursorPos() returns the cursor position

func (*Screen) GetScreenAsANSI

func (s *Screen) GetScreenAsANSI() []byte

GetScreenAsANSI returns the screen as ANSI

func (*Screen) Resize

func (s *Screen) Resize(rows, columns int)

Resize screen

func (*Screen) Size added in v0.0.17

func (s *Screen) Size() (rows, columns int)

Get screen size

func (*Screen) Write

func (s *Screen) Write(p []byte) (n int, err error)

Writer interface

Jump to

Keyboard shortcuts

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