WtInput Function (Motif Only)
Registers an input source handler procedure.
Usage
status = WtInput(function[, parameters])
Input Parameters
function:
*'Add' — Add input to the source of events. If this function is specified, provide the following parameters:
*file_lun — LUN of the input source file (or pipe).
*handler(optional) A PV‑WAVE procedure that is called when input is available.
*client_data(optional) User data to be passed to the handler procedure.
*'Remove' — Remove a previously registered input source. If this function is specified, provide the following parameter:
*input_id — ID of the input source being removed.
Returned Value
For 'Add':
*status — The input source ID, or zero (0) to indicate failure.
For 'Remove':
*status — One (1) indicates success; zero (0) indicates failure. Keywords
Noparams — If nonzero, calls the input handler procedure with two parameters: top (the top-level shell of the application), and client_data.
If the 'Add' function is specified, the following keywords can be used:
*ExceptIf specified and nonzero, the Xt Intrinsic condition XtInputExceptMask is used to define the input source.
*ReadIf specified and nonzero, the Xt Intrinsic condition XtInputReadMask is used to define the input source (default).
*WriteIf specified and nonzero, the Xt Intrinsic condition XtInputWriteMask is used to define the input.
Discussion
While most GUI applications are driven only by events, some applications need to incorporate other sources of input into the X Toolkit event handling mechanism. WtInput supports input or output gathering from files. The application registers an input source handler procedure and a file with the X Toolkit. When input is pending on the file, the registered handler is invoked.
 
note
This function is not available for Windows.
In this context a “file” should be loosely interpreted to mean any sink (destination of output) or pipe (source of data).
For information on the requirements for writing input handler procedures, see "Adding Input Handler Procedures" in the PV‑WAVE Application Developer’s Guide.
See Also
For detailed information on GUI development, refer to the PV‑WAVE Application Developer’s Guide.
For more information about how to write an application program based on the PV‑WAVE Widget Toolbox, refer to Using the Widget Toolbox in the PV‑WAVE Application Developer’s Guide.