TIPTables.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last Edited by McGregor, August 23, 1982 2:13 pm
Last Edited by: Maxwell, December 17, 1982 9:52 am
Doug Wyatt, April 14, 1985 9:07:11 pm PST
DIRECTORY
Intime USING [EventTime, MsTicks],
TerminalDefs USING [KeyName, DownUp],
TIPUser USING [TIPScreenCoords, TIPTime];
TIPTables: CEDAR DEFINITIONS
= BEGIN
TIPScreenCoords: TYPE ~ TIPUser.TIPScreenCoords;
TIPScreenCoords are used to pass the hardware cursor information. [0,0] is lower left.
TIPTime: TYPE ~ TIPUser.TIPTime;
TIPTableImpl: TYPE = REF TIPTableImplRep;
TIPTableImplRep: TYPE = RECORD [
ignore: IgnoreBits ← IgnoreEverything,
variants: SELECT flavor: * FROM
transparent => [],
small => [all: TIPChoiceSeries],
fast => [
mouse: TIPChoice,
keyDown, keyUp: ARRAY TerminalDefs.KeyName OF TIPChoice,
time: TIPChoice
],
ENDCASE
];
IgnoreBits: TYPE = MACHINE DEPENDENT RECORD [
up, down, move: BOOL,
unused: [0..17777B] ← 0
];
IgnoreEverything: IgnoreBits = [TRUE, TRUE, TRUE];
TIPChoiceSeries: TYPE = LIST OF TIPChoice;
TIPChoice: TYPE = LIST OF TIPTerm ← NIL;
TIPTerm: TYPE = RECORD [
variants: SELECT flavor: * FROM
keyTrigger => [keyState: TIPKeyState],
mouseTrigger => NULL,
timeTrigger => [flavor: TimeoutFlavor, mSecs: Intime.MsTicks],
keyEnable => [keyState: TIPKeyState],
key2Enable => [keyState1, keyState2: TIPKeyState], -- true if either
keyEnableList => [lst: LIST OF TIPKeyState], -- true if any
predEnable => [predicate: ATOM],
char => [ch: REF CHAR],
coords => [xy: TIPScreenCoords],
time => [time: TIPTime],
nested => [statement: TIPChoiceSeries],
result => [list: TIPResults],
ENDCASE
];
TIPResults: TYPE = LIST OF REF ANYNIL;
actually LIST OF ( ATOM | REF INT | REF TEXT | stdChar | stdCoords | stdTime )
TimeoutFlavor: TYPE = {gt, lt};
TIPActionFlavor: TYPE = {key, mouse, time};
TIPEnablesFlavor: TYPE = {key, pred};
TIPKeyState: TYPE = RECORD [
key: TerminalDefs.KeyName,
state: TerminalDefs.DownUp ← down
];
END.