DEFINITION MODULE Device;

EXPORT QUALIFIED

          DEV,
          CurDev,
          
          red,
          green,
          blue,
          
	  InitDevice,
          Surface,

          Box,
          Trapeze,

          Move,
          Line,
          
          View,
          
          Grid,
          MinorDevice;

TYPE
          DEV = (DEBUG, BBCdevice, HPdevice, Polydevice);

VAR
          MinorDevice,
          red, green, blue                     (* Only valid for "Line" *)
                                  :INTEGER;
          Grid                    :BOOLEAN;
          CurDev                  :DEV;

PROCEDURE InitDevice (Device      :ARRAY OF CHAR);
   
PROCEDURE Surface (Xl, Yb, Xr, Yt :INTEGER);

PROCEDURE Box     (Layer,
                   Xl, Yb, Xr, Yt :INTEGER;
                   Text           :ARRAY OF CHAR);

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

PROCEDURE Move    (AbsX, AbsY     :INTEGER);

PROCEDURE Line    (Colour,                    (* Device dependent        *)
                   AbsX, AbsY     :INTEGER);  (* - only red, green, blue *)
                                              (* guaranteed.             *)

PROCEDURE View    ();

END Device.
