terminal

package
v0.0.0-...-dd3e944 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Terminal

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

Terminal holds the terminal instance and provides io abilities

func New

func New(t js.Value) *Terminal

New creates a new Terminal object

func (*Terminal) BreakCheck

func (t *Terminal) BreakCheck() bool

returns true if CTRL+C has been seen if it has flag is cleared before returning

func (*Terminal) Cls

func (t *Terminal) Cls()

Cls clears the terminal of all text

func (*Terminal) GetCursor

func (t *Terminal) GetCursor() (int, int)

GetCursor retrieves the current cursor position NOTE: Cursor position is based on the upper left position being 0,0

func (*Terminal) Locate

func (t *Terminal) Locate(row, col int)

Locate moves the cursor to the passed row/col NOTE: When issuing the Locate sequence, the upper left screen position is 1,1

func (*Terminal) Log

func (t *Terminal) Log(msg string)

Log basicwasm information via call to javascript function

func (*Terminal) Print

func (t *Terminal) Print(msg string)

Print sends the passed string to the terminal at the current cursor position

func (*Terminal) Println

func (t *Terminal) Println(msg string)

Println prints the string follow by CRLF

func (*Terminal) Read

func (t *Terminal) Read(col, row, len int) string

Read pulls the contents of the selected area

func (*Terminal) ReadKeys

func (t *Terminal) ReadKeys(count int) []byte

ReadKeys reads the requested number of keystrokes

func (*Terminal) SoundBell

func (t *Terminal) SoundBell()

SoundBell plays the current bell sound

Jump to

Keyboard shortcuts

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