DEFINITION MODULE Interactive;


EXPORT QUALIFIED
          FlashSuppress,
          CursorType,
          ScreenX, ScreenY,
          Buttons,
          ButtonSet,
          SetLineColour,
          SetAreaColour,
          Surface,
          Trapeze,
          Move,
          Line,
          Cursor,
          GetMouse,
          View,
          Restore;
   
TYPE
   CursorType = (char, drag, stretch);
   Buttons = (middle, left, right);   (* Assumes 4 - left button
                                          bits   2 - centre button
                                                 1 - right button ?????
                                       *)
   ButtonSet = SET OF Buttons;
   
VAR
   FlashSuppress :BOOLEAN;  (* If true, will suppres mode change for next
                               call to Surface (temp frig) *)

PROCEDURE ScreenX (ChipX :INTEGER) :INTEGER;

PROCEDURE ScreenY (ChipY :INTEGER) :INTEGER;

PROCEDURE SetLineColour (Colour :INTEGER);

PROCEDURE SetAreaColour (C1, C2, C3, C4 :INTEGER);

PROCEDURE Surface (Xl, Yb, Xr, Yt :INTEGER);

PROCEDURE Trapeze (Xlb, Yb, dxb,
                   Xlt, Yt, dxt    :INTEGER);

PROCEDURE Move    (AbsX, AbsY     :INTEGER);

PROCEDURE Line    (AbsX, AbsY     :INTEGER);

PROCEDURE Cursor  (Type    :CursorType;
               VAR X, Y    :INTEGER;
               VAR Buttons :ButtonSet);
              (*  multiple key presses are allowed on the mouse, and are
                  de-bounced on the BBC.  Keyboard input cannot generate
                  multiple key-presses. *)

PROCEDURE GetMouse (CursorChar        :CursorType;
                VAR Buttons           :ButtonSet;
                VAR ScreenX, ScreenY,
                    ChipX, ChipY      :INTEGER);

PROCEDURE View    ();

PROCEDURE Restore ();

END Interactive.
