{ EDWIN routine specs added }
%option '-NONS'

{ Routines for initialisation and termination }
Procedure InitialiseFor     %alias 'EDWIN_INIT'          (DEVICE : INTEGER);         Extern;
Procedure TerminateEdwin    %alias 'EDWIN_TERM';                                          Extern;

{ Output primitives }
Procedure MoveAbs           %alias 'EDWIN_MOVE_ABS'      (X, Y : INTEGER);                Extern;
Procedure MoveRel           %alias 'EDWIN_MOVE_REL'      (DX, DY : INTEGER);              Extern;
Procedure LineAbs           %alias 'EDWIN_LINE_ABS'      (X, Y : INTEGER);                Extern;
Procedure LineRel           %alias 'EDWIN_LINE_REL'      (DX, DY : INTEGER);              Extern;
Procedure MarkerAbs         %alias 'EDWIN_MARK_ABS'      (N, X, Y : INTEGER);             Extern;
Procedure MarkerRel         %alias 'EDWIN_MARK_REL'      (N, DX, DY : INTEGER);           Extern;
Procedure Character         %alias 'EDWIN_CHAR'          (SYM : CHAR);                 Extern;

{ Text output }
Procedure DrawText          %alias 'EDWIN_TEXT'          (ST : STRING);                   Extern;
Procedure TextColourEscape  %alias 'EDWIN_TEXT_COL_ESC'  (CH : INTEGER);                  Extern;
Procedure TextFontEscape    %alias 'EDWIN_TEXT_FONT_ESC' (CH : INTEGER);                  Extern;

{ Control }
Procedure NewFrame          %alias 'EDWIN_NEW_FRAME';                                     Extern;
Procedure Update            %alias 'EDWIN_UPDATE';                                        Extern;
Procedure ClipOn            %alias 'EDWIN_CLIP_ON';                                       Extern;
Procedure ClipOff           %alias 'EDWIN_CLIP_OFF';                                      Extern;
Procedure SetOut           (stream : Integer ); EXTERN;
Procedure StoreOn           %alias 'EDWIN_STORE_ON'      (STREAM : INTEGER);              Extern;
Procedure StoreOff          %alias 'EDWIN_STORE_OFF';                                     Extern;
Procedure ViewOn            %alias 'EDWIN_VIEW_ON'       (STREAM : INTEGER);              Extern;
Procedure ViewOff           %alias 'EDWIN_VIEW_OFF';                                      Extern;
Procedure AspectRatioing    %alias 'EDWIN_ASPECT_RATIO'  (MODE : INTEGER);                Extern;
Procedure Window            %alias 'EDWIN_WINDOW'        (XL, XR, YB, YT : INTEGER);      Extern;
Procedure Viewport          %alias 'EDWIN_VIEWPORT'      (XL, XR, YB, YT : INTEGER);      Extern;

{ Attributes }
Procedure SetColour         %alias 'EDWIN_SET_COLOUR'    (COLOUR : INTEGER);              Extern;
Procedure SetColourMode     %alias 'EDWIN_SET_COL_MODE'  (MODE : INTEGER);                Extern;
Procedure SetMarkerSize     %alias 'EDWIN_SET_MARK_SIZE' (S : INTEGER);                   Extern;
Procedure SetLineStyle      %alias 'EDWIN_SET_STYLE'     (STYLE : INTEGER);               Extern;
Procedure SetCharSize       %alias 'EDWIN_SET_CHAR_SIZE' (SIZE : INTEGER);                Extern;
Procedure SetCharRot        %alias 'EDWIN_SET_CHAR_ROT'  (ROT : INTEGER);                 Extern;
Procedure SetCharQuality    %alias 'EDWIN_SET_CHAR_QUAL' (WHICH : INTEGER);               Extern;
Procedure SetCharFont       %alias 'EDWIN_SET_CHAR_FONT' (WHICH : INTEGER);               Extern;
Procedure SetCharSlant      %alias 'EDWIN_SET_CHAR_SLANT'(ANGLE : INTEGER);               Extern;
Procedure SetSpeed          %alias 'EDWIN_SET_SPEED'     (SPEED : INTEGER);               Extern;
Procedure SetChordStep      %alias 'EDWIN_SET_CHORD_STEP'(NUM : INTEGER);                 Extern;
Procedure SetShadeMode      %alias 'EDWIN_SET_SHADE_MODE'(MODE : INTEGER);                Extern;

{ Miscellaneous routines }
Procedure Review            %alias 'EDWIN_REVIEW';                                        Extern;
Procedure InquirePosition   %alias 'EDWIN_INQ_POSITION'  (Var X, Y : INTEGER);            Extern;
Procedure InquireWindow     %alias 'EDWIN_INQ_WINDOW'    (Var XL, XR, YB, YT : INTEGER);  Extern;
Procedure InquireViewport   %alias 'EDWIN_INQ_VIEWPORT'  (Var XL, XR, YB, YT : INTEGER);  Extern;
Procedure MapToDeviceCoords %alias 'EDWIN_MAP_TO_DCS' (Var X, Y : INTEGER);               Extern;
Procedure MapToVirtualCoords %alias 'EDWIN_MAP_TO_VCS' (Var X, Y : INTEGER);              Extern;
Function  EdwinError         %alias 'EDWIN_ERROR'      (X : INTEGER) : STRING;            Extern;

{ Input primitives }
Procedure RequestInput      %alias 'EDWIN_REQUEST'    (Var STATE, X, Y : INTEGER);        Extern;
Procedure SampleInput       %alias 'EDWIN_SAMPLE'     (Var STATE, X, Y : INTEGER);        Extern;
Procedure AreaInput         %alias 'EDWIN_AREA'       (Var XL, YB, XR, YT : INTEGER);     Extern;

{ Device specifics }
Procedure RequestDevice     %alias 'EDWIN_REQUEST_DEV'   (Var STATE, X, Y : INTEGER);     Extern;
Procedure SampleDevice      %alias 'EDWIN_SAMPLE_DEV'    (Var STATE, X, Y : INTEGER);     Extern;
Procedure AreaDevice        %alias 'EDWIN_AREA_DEV'      (Var XL, YB, XR, YT : INTEGER);  Extern;
Procedure DriveDevice       %alias 'EDWIN_DRIVE_DEV'     (COM, X, Y : INTEGER);           Extern;
Function  defaultDevice     %alias 'EDWIN_DEFAULT_DEV' : INTEGER;                         Extern;
