(* $M- *)
DEFINITION MODULE GamePort;

FROM Exec IMPORT
 nonstd;

CONST
 gamePortName="gameport.device";
 readEvent=nonstd+0;
 askCType=nonstd+1;
 setCType=nonstd+2;
 askTrigger=nonstd+3;
 setTrigger=nonstd+4;
 allocated=-1;
 errSetCType=1;

TYPE
 Keys=(downKeys,upKeys,k2,k3,k4,k5,k6,k7,k8);
 KeySet=SET OF Keys;
 GamePortTrigger=RECORD
  keys:KeySet;
  timeout:CARDINAL;
  xDelta:CARDINAL;
  yDelta:CARDINAL;
 END;
 Controller=(noController,mouse,relJoystick,absJoystick);

END GamePort.
