<> <> <> <> <> DIRECTORY ClassInscript USING [Inscript], Intime USING [MsTicks], Terminal USING[BWCursorBitmap, Virtual]; Interminal: DEFINITIONS = BEGIN terminal: Terminal.Virtual; -- exported by InterminalImpl StartActionRecorder: PROC [scr: ClassInscript.Inscript]; <> MousePosition: TYPE = MACHINE DEPENDENT RECORD [ mouseX: INTEGER, color: BOOLEAN, mouseY: [-16383..16383]]; PenPosition: TYPE = MousePosition; CursorArray: TYPE = Terminal.BWCursorBitmap; updown: TYPE = {down, up}; KeyView: TYPE = {keyNames, keyFields, words, bits}; KeyState: TYPE = MACHINE DEPENDENT RECORD [ SELECT OVERLAID KeyView FROM bits => [bits: PACKED ARRAY KeyName OF updown], words => [words: KeyArray], keyNames => [keyNames: KeyNames], keyFields => [keyFields: KeyFields], ENDCASE]; <> KeyName: TYPE = { x0, x1, x2, x3, x4, x5, x6, pen, Keyset1, Keyset2, Keyset3, Keyset4, Keyset5, Red, Blue, Yellow, Five, Four, Six, E, Seven, D, U, V, Zero, K, Dash, P, Slash, BackSlash, LF, BS, Three, Two, W, Q, S, A, Nine, I, X, O, L, Comma, Quote, RightBracket, Spare2, BW, One, ESC, TAB, F, Ctrl, C, J, B, Z, LeftShift, Period, SemiColon, Return, Arrow, DEL, FL3, R, T, G, Y, H, Eight, N, M, Lock, Space, LeftBracket, Equal, RightShift, Spare3, FL4, -- FR5, -- allUp}; <> <> <> Kn: PROCEDURE [value: UNSPECIFIED] RETURNS [kN: KeyName] = INLINE { kN _ LOOPHOLE[value]}; Kv: PROCEDURE [value: UNSPECIFIED] RETURNS [kV: CARDINAL] = INLINE { kV _ LOOPHOLE[value]}; KbdKeyName: TYPE = KeyName [Five..allUp]; ButtonKeyName: TYPE = KeyName [Red..Yellow]; PaddleKeyName: TYPE = KeyName [Keyset1..Keyset5]; KeyArray: TYPE = ARRAY [0..5) OF WORD; KeyNames: TYPE = MACHINE DEPENDENT RECORD [ blank: [0..177B], pen: updown, Keyset1, Keyset2, Keyset3, Keyset4, Keyset5: updown, Red, Blue, Yellow: updown, Five, Four, Six, E, Seven, D, U, V, Zero, K, Dash, P, Slash, BackSlash, LF, BS: updown, Three, Two, W, Q, S, A, Nine, I, X, O, L, Comma, Quote, RightBracket, Spare2, BW: updown, One, ESC, TAB, F, Ctrl, C, J, B, Z, LeftShift, Period, SemiColon, Return, Arrow, DEL, FL3: updown, R, T, G, Y, H, Eight, N, M, Lock, Space, LeftBracket, Equal, RightShift, Spare3, FL4, -- FR5 -- allUp: updown]; KeyFields: TYPE = MACHINE DEPENDENT RECORD [ mesaMemorialBlankField: [0..177B], pen: [0..1], paddles: Paddles, buttons: Buttons, keys: ARRAY [0..3] OF WORD]; ButtonView: TYPE = {buttonChord, buttonNames, buttonValue}; Buttons: TYPE = MACHINE DEPENDENT RECORD [ SELECT OVERLAID ButtonView FROM buttonChord => [buttonChord: [0..10B)], buttonNames => [buttonNames: ButtonNames], buttonValue => [buttonValue: ButtonValue], ENDCASE]; ButtonNames: TYPE = MACHINE DEPENDENT RECORD [Red, Blue, Yellow: updown]; ButtonName: TYPE = MACHINE DEPENDENT{Red(0), Blue(1), Yellow(2)}; ButtonValue: TYPE = MACHINE DEPENDENT{ RedYellowBlue(0), RedBlue(1), RedYellow(2), Red(3), BlueYellow(4), Blue(5), Yellow(6), None(7)}; PaddleView: TYPE = {paddleChord, paddleNames, paddleValue}; Paddles: TYPE = MACHINE DEPENDENT RECORD [ SELECT OVERLAID PaddleView FROM paddleChord => [paddleChord: [0..40B)], paddleNames => [paddleNames: PaddleNames], paddleValue => [paddleValue: PaddleValue], ENDCASE]; PaddleNames: TYPE = RECORD [ Keyset1, Keyset2, Keyset3, Keyset4, Keyset5: updown]; PaddleName: TYPE = MACHINE DEPENDENT{ Keyset1(0), Keyset2(1), Keyset3(2), Keyset4(3), Keyset5(4)}; PaddleValue: TYPE = MACHINE DEPENDENT{ Keyset1(17B), Keyset2(27B), Keyset3(33B), Keyset4(35B), Keyset5(36B), None(37B)}; allUp: KeyState; Spare1: CHARACTER=LOOPHOLE[201B]; Spare2: CHARACTER=LOOPHOLE[202B]; Spare3: CHARACTER=LOOPHOLE[203B]; ShiftSpare1: CHARACTER=LOOPHOLE[204B]; ShiftSpare2: CHARACTER=LOOPHOLE[205B]; ShiftSpare3: CHARACTER=LOOPHOLE[206B]; SetCursorOffset: PROC[deltaX, deltaY: INTEGER, enableTracking: BOOLEAN_TRUE]; <> <> GetCursorOffset: PROC RETURNS[deltaX, deltaY: INTEGER, trackingEnabled: BOOLEAN]; SetCursorPosition: PROC[posX, posY: INTEGER, enableTracking: BOOLEAN_TRUE]; <> <> <> GetCursorPosition: PROC RETURNS[deltaX, deltaY: INTEGER, trackingEnabled: BOOLEAN]; <> <> SetMousePosition: PROC[pos: MousePosition]; <> <> GetMousePosition: PROC RETURNS [pos: MousePosition]; <> <> DefaultMouseGrain: PROC RETURNS [ticks: Intime.MsTicks, dots: INTEGER]; SetMouseGrain: PROC[ticks: Intime.MsTicks, dots: INTEGER]; SetCursorPattern: PROCEDURE [cursorPattern: CursorArray]; <> GetCursorPattern: PROCEDURE RETURNS [cursorPattern: CursorArray]; <> TurnOnColorCursor: PROC[nbits: NAT, onLeft: BOOLEAN _ TRUE]; <<... initializes the Color display. If onLeft is false, it is assumed that the display is on the right. The mouse and cursor will slide between the two displays>> TurnOffColorCursor: PROC; HasPenType: TYPE = {main, color, turnoff}; HasPen: PROC [display: HasPenType]; <> END.