-- N.Wirth June 1, 1977
-- S.Andler August 24, 1977 10:35 PM
-- C.Geschke August 31, 1977 11:34 AM
-- J.Sandman October 19, 1977 10:19 AM
DIRECTORY
PupDefs: FROM "PupDefs",
RectangleDefs: FROM "RectangleDefs",
SegmentDefs: FROM "SegmentDefs";
TeleSilDefs: DEFINITIONS=
BEGIN
-- Constants --
white: INTEGER = -1;
gray: INTEGER = 6;
black: INTEGER = 7;
maxCARDINAL: CARDINAL = 177777B;
sandBarOK: BOOLEAN = TRUE;
zoneChecking: BOOLEAN = FALSE;
rebuildChunk: CARDINAL = 50;
-- Definition of the display --
BMWordsPerLine: CARDINAL = 38;
BMBitsPerLine: CARDINAL = BMWordsPerLine*16;
BMMaxHeight: CARDINAL = 798; -- in no. of scan lines
FontDesc: TYPE = RECORD[name: STRING, height: CARDINAL,
fnt: RectangleDefs.FAptr,
fsh: SegmentDefs.FileSegmentHandle];
-- Types --
CursorIcon: TYPE = {arrow, blackArrow, greyArrow, rebuild, input};
Coord: TYPE = RECORD[x,y: INTEGER];
Zone: TYPE = RECORD[point: Coord, w,h: CARDINAL];
GrayTone: TYPE = [white .. black];
GridSpacing: TYPE = [0..6];
FontNumber: TYPE = [0..3];
ConnId: TYPE = [0..16); -- Ethernet connection identification
GrayToneMap: TYPE= ARRAY [0..4) OF WORD;
CursorBitMap: TYPE = ARRAY[0..15] OF WORD;
ObjKind: TYPE = {line, area, text};
ObjState: TYPE = {dead, active, marked, selected};
Object: TYPE = RECORD[
next: ObjPtr,
zone: Zone,
state: ObjState,
body: SELECT kind: ObjKind FROM
line => NULL,
area => [shade: GrayTone],
text => [fontno: FontNumber, str: STRING],
ENDCASE];
ObjPtr: TYPE = POINTER TO Object;
CmdObj: TYPE = RECORD[
SELECT cmdType:* FROM
mouse => [mouseEvent: CARDINAL, oldCoord, newCoord: Coord],
keyboard => [char: CHARACTER, info: UNSPECIFIED],
text => [z: Zone, s: STRING],
ether => [etherCmd: EtherCommand],
cursor => [point: Coord],
mark => [point: Coord, icon: CursorIcon],
setCursorIcon => [icon: CursorIcon],
control => [action: {request, grant, reject}, address: RECORD[CARDINAL, CARDINAL]],
ENDCASE];
CmdPtr: TYPE = POINTER TO CmdObj;
EtherCommand: TYPE = {input, closing, connecting};
END.