Module ttyutil - A utility library for terminal-based input and output

A utility library for terminal-based input and output.

This library provides various utilities for use with VT220 compatible terminals.

Index

Declarations

ttyutil.inc:33Group ANSI

VT220/ANSI rendering attributes.

ttyutil.inc:34Constant ANSI.NORMAL

VAL BYTE ANSI.NORMAL

Normal/reset.

ttyutil.inc:35Constant ANSI.BOLD

VAL BYTE ANSI.BOLD

Bold rendering.

ttyutil.inc:36Constant ANSI.INVERSE

VAL BYTE ANSI.INVERSE

Inverse rendering.

ttyutil.inc:39Constant ANSI.FG.BLACK

VAL BYTE ANSI.FG.BLACK

Black foreground.

ttyutil.inc:40Constant ANSI.FG.RED

VAL BYTE ANSI.FG.RED

Red foreground.

ttyutil.inc:41Constant ANSI.FG.GREEN

VAL BYTE ANSI.FG.GREEN

Green foreground.

ttyutil.inc:42Constant ANSI.FG.YELLOW

VAL BYTE ANSI.FG.YELLOW

Yellow foreground.

ttyutil.inc:43Constant ANSI.FG.BLUE

VAL BYTE ANSI.FG.BLUE

Blue foreground.

ttyutil.inc:44Constant ANSI.FG.MAGENTA

VAL BYTE ANSI.FG.MAGENTA

Magenta foreground.

ttyutil.inc:45Constant ANSI.FG.CYAN

VAL BYTE ANSI.FG.CYAN

Cyan foreground.

ttyutil.inc:46Constant ANSI.FG.WHITE

VAL BYTE ANSI.FG.WHITE

White foreground.

ttyutil.inc:48Constant ANSI.BG.BLACK

VAL BYTE ANSI.BG.BLACK

Black background.

ttyutil.inc:49Constant ANSI.BG.RED

VAL BYTE ANSI.BG.RED

Red background.

ttyutil.inc:50Constant ANSI.BG.GREEN

VAL BYTE ANSI.BG.GREEN

Green background.

ttyutil.inc:51Constant ANSI.BG.YELLOW

VAL BYTE ANSI.BG.YELLOW

Yellow background.

ttyutil.inc:52Constant ANSI.BG.BLUE

VAL BYTE ANSI.BG.BLUE

Blue background.

ttyutil.inc:53Constant ANSI.BG.MAGENTA

VAL BYTE ANSI.BG.MAGENTA

Magenta background.

ttyutil.inc:54Constant ANSI.BG.CYAN

VAL BYTE ANSI.BG.CYAN

Cyan background.

ttyutil.inc:55Constant ANSI.BG.WHITE

VAL BYTE ANSI.BG.WHITE

White background.

ttyutil.inc:57Group KEY

Key constants. Values of 0-255 represent ASCII/locale-specific characters.

ttyutil.inc:60Constant KEY.UP

VAL INT KEY.UP

Arrow keys.

ttyutil.inc:66Constant KEY.F1

VAL INT KEY.F1

Function keys.

ttyutil.inc:97Protocol TTYUTIL.DPY

PROTOCOL TTYUTIL.DPY

Basic display protocol.

ttyutil.inc:99Tag following

following; INT

Number of outputs to follow (when dealing with an unshared

ttyutil.inc:103Tag clear.screen

clear.screen

Clear the screen.

ttyutil.inc:104Tag int.xy

int.xy; INT; INT; INT

Integer at specific position (x, y, value).

ttyutil.inc:105Tag string.xy

string.xy; INT; INT; MOBILE []BYTE

String at specific position (x, y, string).

ttyutil.inc:106Tag colours

colours; MOBILE []BYTE

Set ANSI/VT220 attributes (see ANSI).

ttyutil.inc:108Tag quit

quit

Quit the display process.

ttyutil.inc:112Protocol TTYUTIL.MENU.IN

PROTOCOL TTYUTIL.MENU.IN

Menu item handler input protocol (menu -> handler).

ttyutil.inc:114Tag get.text

get.text

Get item text.

ttyutil.inc:115Tag key.left

key.left

Key item left.

ttyutil.inc:116Tag key.right

key.right

Key item right.

ttyutil.inc:117Tag key.other

key.other; INT

Other key (e.g. return).

ttyutil.inc:119Tag quit

quit

Menu quit (signals handler to quit).

ttyutil.inc:123Protocol TTYUTIL.MENU.OUT

PROTOCOL TTYUTIL.MENU.OUT

Menu item handler output protocol (handler -> menu).

ttyutil.inc:125Tag text

text; MOBILE []BYTE

Text update for menu.

ttyutil.inc:126Tag remove

remove

Remove this item (self).

ttyutil.inc:130Channel type TTYUTIL.MENUITEM

CHAN TYPE TTYUTIL.MENUITEM

Menu item channel type.

ttyutil.inc:132Variable in?

CHAN TTYUTIL.MENU.IN

Menu item handler requests.

ttyutil.inc:133Variable out!

CHAN TTYUTIL.MENU.OUT

Menu item handler responses.

ttyutil.inc:137Protocol TTYUTIL.MENU

PROTOCOL TTYUTIL.MENU

Menu control protocol.

ttyutil.inc:139Tag add.item

add.item; TTYUTIL.MENUITEM!

Add menu item.

ttyutil.inc:140Tag insert.item

insert.item; INT; TTYUTIL.MENUITEM!

Add menu item at a specific position.

ttyutil.inc:141Tag del.item

del.item; INT

Delete a particular item.

ttyutil.inc:142Tag quit

quit

Shutdown menu.

ttyutil.inc:144Tag key.in

key.in; INT

Incoming key press.

ttyutil.occ:33Protocol TU.MENU.IN

PROTOCOL TU.MENU.IN

ttyutil.occ:42Channel type TU.MENU.ITEM

CHAN TYPE TU.MENU.ITEM

ttyutil.occ:57Process ttyutil.display

PROC ttyutil.display (CHAN TTYUTIL.DPY in?, CHAN BYTE out!)

Basic display process.

Parameters:

CHAN TTYUTIL.DPY in Display commands in.
CHAN BYTE out Screen output.

ttyutil.occ:112Process ttyutil.display.shared

PROC ttyutil.display.shared (CHAN TTYUTIL.DPY in?, SHARED CHAN BYTE out!)

Display process for shared screen output.

Parameters:

CHAN TTYUTIL.DPY in Display commands in.
SHARED CHAN BYTE out Screen output.

ttyutil.occ:229Process ttyutil.keyhandler

PROC ttyutil.keyhandler (CHAN BYTE in?, CHAN INT kill?, CHAN INT out!)

Keyboard handler.

Parameters:

CHAN BYTE in Raw keyboard input in.
CHAN INT kill Kill channel.
CHAN INT out Processed keystrokes (see KEY).

ttyutil.occ:285Process ttyutil.menu

PROC ttyutil.menu (VAL INT x, y, width, height, VAL BOOL border, CHAN TTYUTIL.MENU in?, SHARED CHAN TTYUTIL.DPY out!)

Produces a controllable on-screen menu. Expects the first inputs to be addition of new menu items.

Parameters:

VAL INT x X position on screen.
VAL INT y Y position on screen.
VAL INT width Width of menu.
VAL INT height Height of menu.
VAL BOOL border Whether or not to draw a border.
CHAN TTYUTIL.MENU in Menu control channel (including keys).
SHARED CHAN TTYUTIL.DPY out Display output channel.