TIPTables.mesa
Copyright Ó 1985, 1986, 1991, 1992 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
Bier, August 8, 1990 3:37 pm PDT
Doug Wyatt, April 14, 1985 9:07:11 pm PST
Christian Jacobi, February 20, 1992 11:16 am PST
In spite of the nice name, this is a private interface.
Kenneth A. Pier, August 5, 1992 6:35 pm PDT
DIRECTORY
CardTab, KeyStateTypes, KeyTypes, TIPUser, Vector2;
TIPTables: CEDAR DEFINITIONS
= BEGIN
UpDown: TYPE = KeyStateTypes.UpDown;
KeySym: TYPE = KeyTypes.KeySym;
TIPScreenCoords: TYPE ~ TIPUser.TIPScreenCoords;
TIPScreenCoords are used to pass the hardware cursor information. [0,0] is lower left.
TIPTime: TYPE ~ TIPUser.TIPTime;
TIPFastTable: TYPE = CardTab.Ref;
TIPTableImpl: TYPE = REF TIPTableImplRep;
TIPTableImplRep: TYPE = RECORD [
ignore: IgnoreBits ¬ IgnoreEverything,
variants: SELECT flavor: * FROM
transparent => [],
identity => [plusTime: BOOL], -- see TIPIdentity.mesa
other => [ref: REF],
small => [all: TIPChoiceSeries],
fast => [
mouse: TIPChoice,
keyDown, keyUp: TIPFastTable, -- a CardTab mapping KeySym to 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,
trackballTrigger => NULL,
thumbwheelTrigger => NULL,
timeTrigger => [flavor: TimeoutFlavor, mSecs: CARDINAL],
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],
trackballChange => [vec: REF Vector2.VEC],
thumbwheelChange => [v: REF INTEGER],
time => [time: TIPTime],
nested => [statement: TIPChoiceSeries],
result => [list: TIPResults],
ENDCASE
];
TIPResults: TYPE = LIST OF REF ANY ¬ NIL;
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 [
keySym: KeySym,
state: UpDown ¬ down
];
END.