DEFINITION MODULE VDIInputs;

FROM GEMVDIbase IMPORT MouseArrayType, SmallArrayType;

FROM SYSTEM IMPORT ADDRESS;


(* input functions *)

PROCEDURE SetInputMode (Handle, DevType, mode: INTEGER);

(* Set input mode *)


PROCEDURE InputLocatorRQ (Handle, x, y: INTEGER;
                          VAR xOut, yOut, term: INTEGER);

(* input locator, request mode *)


PROCEDURE InputLocatorSM (Handle, x, y: INTEGER;
                          VAR xOut, yOut, term: INTEGER): INTEGER;

(* input locator, sample mode *)


PROCEDURE InputValuatorRQ (Handle, ValuatorIn: INTEGER;
                           VAR ValuatorOut, Terminator: INTEGER);

(* input valuator, request mode *)


PROCEDURE InputValuatorSM (Handle, ValIn: INTEGER;
                           VAR ValOut, Term, Status: INTEGER);

(* input valuator, sample mode *)


PROCEDURE InputChoiceRQ (Handle, ChIn: INTEGER; VAR ChOut: INTEGER);

(* input choice, request mode *)


PROCEDURE InputChoiceSM (Handle: INTEGER; VAR choice: INTEGER): INTEGER;

(* input choice, sample mode *)


PROCEDURE InputStringRQ (Handle, maxLength, EchoMode: INTEGER;
                         VAR EchoXY: SmallArrayType;
                         VAR String: ARRAY OF CHAR);

(* input string, request mode *)


PROCEDURE InputStringSM (Handle, MaxLength, EchoMode: INTEGER;
                         VAR EchoXY: SmallArrayType;
                         VAR String: ARRAY OF CHAR): INTEGER;

(* input string, sample mode *)


PROCEDURE SetMouseForm (Handle: INTEGER; PcurForm: MouseArrayType);

(* Set mouse form *)


PROCEDURE ExchangeTimerV (Handle: INTEGER; TimAddr: ADDRESS;
                          VAR OTimAddR: ADDRESS ; TimConv: INTEGER);

(* Exchange timer interrupt vector *)


PROCEDURE ShowCursor (Handle, Reset: INTEGER);

(* show cursor *)


PROCEDURE HideCursor (Handle: INTEGER);

(* Hide cursor *)


PROCEDURE SampleMouseButton (Handle: INTEGER; VAR PStatus, x, y: INTEGER);

(* Sample mouse button state *)


PROCEDURE ExchangeButtonV (Handle: INTEGER; pusrCode: ADDRESS ;
                           VAR psavCode: ADDRESS);

(* Exchange button change vector *)


PROCEDURE ExchangeMovementV (Handle: INTEGER; pusrCode: ADDRESS ;
                             VAR psavCode: ADDRESS);

(* Exchange mouse movement vector *)


PROCEDURE ExchangeCursorV (Handle: INTEGER; pusrCode: ADDRESS ;
                           VAR psavCode: ADDRESS);

(* exchange cursor change vector *)


PROCEDURE SampleKeyboard (Handle: INTEGER; VAR pstatus: INTEGER);

(* sample keyboard state information *)


END VDIInputs.
