DEFINITION VDIControl; (* SJ *)

(* VDIControl also contains a routine to check is GDOS is installed.
   If a task leaves opened workstations, they will be closed automatically *)

TYPE workin*    = RECORD
                    Id*          : INTEGER; (* 1 = screen *)
                    LineType*    : INTEGER;
                    LineColor*   : INTEGER;
                    MarkType*    : INTEGER;
                    MarkColor*   : INTEGER;
                    Font*        : INTEGER;
                    TextColor*   : INTEGER;
                    FillStyle*   : INTEGER;
                    FillPat*     : INTEGER;
                    FillColor*   : INTEGER;
                    KoorType*    : INTEGER;
                  END(*RECORD*);
     workout*   = RECORD
                    MaxX*,MaxY*       : INTEGER;
                    Scaled*  : INTEGER;
                    PixelW*,PixelH*   : INTEGER;
                    CharSno* : INTEGER;
                    LineTno*,LineWno* : INTEGER;
                    MarkTno*,MarkSno* : INTEGER;
                    Fontsno* : INTEGER;
                    Patno*   : INTEGER;
                    HatchTno*: INTEGER;
                    Colorno* : INTEGER;
                    GDPno*   : INTEGER;
                    GDPs*,GDPattr* : ARRAY 10 OF INTEGER;
                    Color*,Turn*,Fill*,Cell* : INTEGER;
                    NumColor*  : INTEGER;
                    Scrctrlno* : INTEGER;
                    Inputdevno*: INTEGER;
                    Keydevno*  : INTEGER;
                    Textdevno* : INTEGER;
                    StationType* : INTEGER;
                    CharWmin*,CharHmin*,CharWmax*,CharHmax* : INTEGER;
                    LineWmin*,z1,LineWmax*,z2 : INTEGER;
                    MarkWmin*,MarkHmin*,MarkWmax*,MarkHmax* : INTEGER;
                  END(*RECORD*);


PROCEDURE VOpnwk*(VAR Workin : workin; VAR Handle : INTEGER;
                  VAR Workout : workout);

PROCEDURE VUpdwk*(Handle : INTEGER);

PROCEDURE VClrwk*(Handle : INTEGER);

PROCEDURE VstLoadFonts*(Handle,Select : INTEGER) : INTEGER;

PROCEDURE VstUnloadFonts*(Handle,Select : INTEGER);

PROCEDURE VClswk*(Handle : INTEGER);

PROCEDURE VOpnvwk*(VAR Workin : workin; VAR Handle : INTEGER;
                   VAR Workout : workout);

PROCEDURE VClsvwk*(Handle : INTEGER);

PROCEDURE VsClip*(Handle : INTEGER; ClipOn : BOOLEAN; x1,y1,x2,y2 : INTEGER);

PROCEDURE GDOSinstalled*() : BOOLEAN;
 (* returns TRUE if GDOS is installed *)

END VDIControl.
