Adding Input Handler Procedures
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 that a “file” in this context should be loosely interpreted to mean any sink (destination of output) or pipe (source of data).
To register an input handler procedure, use the system function WtInput:
status = WtInput(function [, parameters])
The function parameter is an Add or Remove operation. Add registers an input handler procedure. The parameters used depend on whether an Add or Remove operation is specified.
The form of a Widget Toolbox input handler procedure is:
PRO InputHandlerProc, widget, client_data, $
nparams, inputid, lun, source
where:
widget—The top application shell widget ID.
client_data—The client data passed to WtInput.
nparams—The number of input handler-specific parameters after
nparams. This number is always three, for the
inputid,
lun, and
source parameters.
inputid—A unique input handler ID.
lun—The logical unit number of the source (could be a file) generating the event.
source—The file descriptor of the source (could be a file) generating the event.
For more information on WtInput, see the PV‑WAVE Reference.
note | Rogue Wave has ported a subset of the Widget Toolbox (Wt) functionality that is available for Motif to Microsoft Windows. Because the Widget Toolbox under Windows is not a complete implementation, we recommend that Windows developers use the PV-WAVE 10.0 Widgets (Ww) layer or the VDA Tools when developing GUI applications. |
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.