(****************************************************************************) (* *) (* GSX Input Module *) (* ================ *) (* This Module contains all GSX input functions. Input is available from *) (* CRT and (maybe) PLOTTER devices. Not all functions may be implemented. *) (* *) (* 26.1.1988 Wolfgang Muees, Hagenring 22, 3300 Braunschweig *) (* *) (****************************************************************************) DEFINITION MODULE GSXIN; CONST Keyboard = 1; Mouse = 2; (* Predefined Input Locator Devices *) locator = 1; valuator = 2; (* Constants for changing input modes *) choice = 3; string = 4; request = 1; sample = 2; (* Available input modes *) VAR CursorX, CursorY : CARDINAL; (* Actual cursor ( locator ) position *) Value : CARDINAL; (* Actual valuator position *) PROCEDURE Tablet ( ) : BOOLEAN; (* Returns TRUE if a graphic input, like a mouse, joystick, lightpen etc, is connected to this device. If Tablet is TRUE you can access the locator with Device = Mouse, else you have to use the Device Keyboard. *) PROCEDURE Locator ( Device : CARDINAL; (* Access Device, gets a coordinate and/or a *) VAR C : CHAR; (* terminator, and report this action. *) VAR Moved, Terminated : BOOLEAN ); PROCEDURE Valuator ( VAR C : CHAR; (* Simulates a variable resistor. May be used to *) VAR Changed, (* regulate analog functions like intensities. *) Terminated : BOOLEAN ); PROCEDURE Choice ( Device : CARDINAL; (* Request function keys, get a key number or *) VAR N : CARDINAL; (* a nonchoice character. *) VAR C : CHAR; VAR Choiced, Terminated : BOOLEAN ); PROCEDURE String ( Device : CARDINAL; (* Request input of string, echo string on screen *) Echo : BOOLEAN; (* if desired. *) X,Y : CARDINAL; VAR Text : ARRAY OF CHAR; VAR Done : BOOLEAN ); PROCEDURE InputMode ( Device, Mode : CARDINAL ); (* Sets Device to request or sample. *) END GSXIN.