IdleBackdoor.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Spreitzer, March 20, 1986 2:06:42 pm PST
Russ Atkinson (RRA) May 12, 1986 8:10:48 pm PDT
DIRECTORY
Terminal USING [Virtual],
TerminalDefs USING [KeyName];
IdleBackdoor: CEDAR DEFINITIONS = {
UseAlternateVT: PROC [vtProc: VTProc, logout: BOOLTRUE]
RETURNS [wasAlreadyAlternate: BOOL];
The general way to idle; lets vtProc play with an alternate (not managed by Viewers) virtual terminal.
vtProc is responsible for deciding when to stop playing.
wasAlreadyAlternate indicates whether this was already being done at the time of the call. If it was, UseAlternateVT waits before returning.
VTProc: TYPE = PROC [Terminal.Virtual];
KeyTyped: PROC [watch: KeyFilter] RETURNS [BOOL];
A standard way to decide if it's time to quit from a VTProc.
Waits for all watched keys to be released before returning.
KeyName: TYPE = TerminalDefs.KeyName;
KeyFilter: TYPE = RECORD [
first, last: KeyName,
pass: PACKED ARRAY KeyName OF BOOL
elts outside [first .. last] always considered FALSE
];
defaultKeyFilter: READONLY KeyFilter;
}.