SimpleTerminal.mesa
last edited by Levin on September 22, 1983 12:21 pm
DIRECTORY
IO USING [STREAM],
Process USING [Ticks],
Rope USING [ROPE];
SimpleTerminal: CEDAR DEFINITIONS =
BEGIN
TurnOn: PROC [nameStripe: Rope.ROPENIL] RETURNS [in, out: IO.STREAM];
This procedure sets up a virtual terminal and initializes it for typescript-style I/O. The virtual terminal remains in use until TurnOff is called, at which time the screen reverts to its original state. If "nameStripe" is NIL, the implementation supplies a rope that includes the system version and build date. Note that the streams returned are extremely simple; the input stream offers no editing, comment filtering, or echoing to the output stream. The client is free to layer these features on top using the IO interface.
TurnOff: PROC;
This procedure undoes the effect of TurnOn.
SetInputTimeout: PROC [ticks: Process.Ticks];
This procedure alters the semantics of IO.GetChar as applied to the input stream returned by TurnOn. If a call on GetChar waits for the specified interval without receiving input, it will raise InputTimeout. Resuming this signal is equivalent to calling GetChar anew. If the parameter is 0, GetChar will wait indefinitely (this is the initial state).
InputTimeout: SIGNAL;
EnableCursorTracking: PROC;
DisableCursorTracking: PROC;
END.