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]; TurnOffColorCursor: PROC; HasPenType: TYPE = {main, color, turnoff}; HasPen: PROC [display: HasPenType]; END. `Interminal.mesa Maureen Stone, June 5, 1982 12:57 pm, pen and color cursor Swinehart, 24-Nov-81 9:26:43, mouse grains Paul Rovner, August 15, 1983 10:00 am Russ Atkinson, September 23, 1983 10:15 am color=true indicates that the mouse is on the colordisplay added pen instead of x7 m.stone allUp is generated when full keyboard state is entered; action readers should interpret keyStillDown[allUp] as a request to clear the current state in preparation for starting over. Offsets origin of cursor bitmap by the specified number of screen points doTrack_FALSE to disable automatic cursor tracking. Sets the cursor position directly to the desired value (useful for cursor gridding) doTrack_FALSE to disable automatic cursor tracking. Position may not be in synch with Inscript fetches. Returns the current cursor position. Position may not be in synch with Inscript fetches. modifies hardware interpretation of mouse position; to be used at own peril!! possibly useful for locking mouse into nearby position, etc. returns the current position, may be out of synch with inscript fetches!! Recording grain hints. This are provided by higher levels at the time those levels are created. Subsequent recorded events will be entered at the specified grain. Unless the higher levels are running in more or less real time, these hints will not be too valuable. changes the cursor bit array fetches the cursor bit array ... 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 this declares on which display the pen is located Ê瘚œ™Jšœ:™:Jšœ+™+Jšœ%™%J™*—J˜šÏk ˜ Jšœœ ˜Jšœœ ˜Jšœ œ˜(J˜—šœ œ˜Jš˜J˜JšœÏc˜:J˜JšÏnœœ˜8J˜Jšœ:™:š œœœ œœ˜0Jšœœ œ˜:J˜—Jšœ œ˜"J˜Jšœ œ˜,J˜Jšœœ˜J˜Jšœ œ&˜3š œ œœ œœ˜+šœœ ˜Jšœœœ œ ˜/J˜J˜!J˜$Jšœ˜ J˜———šœ ™ šœ œ˜J˜MJš œ$œ œœœœœ˜HJšœœœœœœœœœœœ˜JJšœœœœœœœœœ˜DJš œ-œœœœœœ˜LJšœœ<ž œ˜RJšœM™MJšœT™TJšœ™J˜—š Ÿœ œ œœœ˜CJšœœ ˜J˜—š Ÿœ œ œœœœ˜DJšœœ ˜J˜—Jšœ œ˜)Jšœœ˜,Jšœœ˜1J˜Jš œ œœœœ˜&J˜š œ œœ œœ˜+J˜J˜ J˜4J˜šœœ œœœœœœ˜KJšœ ˜ —šœ œœœœœœœœ%˜MJšœ ˜ —šœœœœœœœœ'˜IJšœœ˜—šœœœœœ œœ.˜HJšœ ž œ˜&J˜——š œ œœ œœ˜,J˜"J˜ J˜J˜Jšœœœœ˜J˜—Jšœ œ+˜;š œ œœ œœ˜*šœœ ˜J˜'J˜*J˜*Jšœ˜ J˜——Jš œ œœ œœ˜IJšœ œœ œ˜Ašœ œœ œ˜&J˜KJ˜J˜—Jšœ œ+˜;š œ œœ œœ˜*šœœ ˜J˜'J˜*J˜*Jšœ˜ J˜——šœ œœ˜J˜5—šœ œœ œ˜%J˜<—šœ œœ œ˜&J˜EJ˜ —J˜J˜Jšœ œœ˜!Jšœ œœ˜!Jšœ œœ˜!Jšœ œœ˜&Jšœ œœ˜&Jšœ œœ˜&—J˜š Ÿœœœœœ˜MJšœH™HJšœ3™3—Jš Ÿœœœœœ˜QJ˜š Ÿœœ œœœ˜KJ™SJšœ3™3J™3—š Ÿœœœœœ˜SJšœ$™$J™3J˜—šŸœœ˜+JšœM™MJšœ<™<—šŸœœœ˜4JšœI™I—J˜Jšœ‹™‹J˜JšŸœœœœ˜GJšŸ œœœ˜:J˜šŸœ œ˜9Jšœ™—šŸœ œœ˜AJšœ™—J˜š Ÿœœœ œœ˜