MODULE Evnt; (* SJ *)

(* the procedure of the aes event library with constant definitions *)


CONST (* predefined messages *)
  MNSELECTED* = 10;
  WMREDRAW*   = 20; WMTOPPED* = 21; WMCLOSED* = 22; WMFULLED*   = 23;
  WMARROWED*  = 24; WMHSLID*  = 25; WMVSLID*  = 26; WMSIZED*    = 27;
  WMMOVED*    = 28; WMNEWTOP* = 29;
  ACOPEN*     = 40; ACCLOSE*  = 41;

  (* event bits *)
  KEYBOARD* = 0; BUTTON* = 1; MOUSE1* = 2; MOUSE2* = 3;
  MESSAGE* = 4; TIME* = 5;

  (* button bits *)
  LEFT* = 0; RIGHT* = 1;

  (* direction *)
  ENTER* = 0; LEAVE* = 1;

  (* shift bits *)
  RSHIFT* = 0; LSHIFT* = 1; CONTROL* = 2; ALTERNATE* = 3; CAPSLOCK* = 4;


TYPE msgbuf* = ARRAY 8 OF INTEGER;


PROCEDURE Keybd* (VAR Scan : INTEGER; VAR Ascii : CHAR);


PROCEDURE Button* (Clicks : INTEGER; Mask,State : SET;
                   VAR Nclicks,Mx,My : INTEGER; VAR Button,Shifts : SET);


PROCEDURE Mouse* (Flag,X,Y,W,H : INTEGER; VAR Mx,My : INTEGER;
                  VAR Button,Shifts : SET);


PROCEDURE Mesag* (VAR Msgbuf : msgbuf);


PROCEDURE Timer* (Count : LONGINT);


PROCEDURE Multi* (Type : SET; Clicks : INTEGER; Mask,State : SET;
                  M1flags,M1x,M1y,M1w,M1h,M2flags,M2x,M2y,M2w,M2h : INTEGER;
                  VAR Msgbuf : msgbuf; Count : LONGINT; VAR Mx,My : INTEGER;
                  VAR Mbut,Shifts : SET; VAR Scan : INTEGER;
                  VAR Ascii : CHAR; VAR Nclicks : INTEGER) : SET;


PROCEDURE KeyMsg* (VAR Msgbuf : msgbuf; VAR Shifts : SET;
                   VAR Scan : INTEGER; VAR Ascii : CHAR) : SET;

(* wait for message and keys *)


PROCEDURE MKstate* (VAR Mx,My : INTEGER; VAR Button,Shifts : SET);

(* originally in module Graf, but fits here better *)


PROCEDURE Dclick* (NewSpeed : INTEGER) : INTEGER;


END Evnt.
