Input subroutines allow users to supply input to your application. There are six logical input device classes: locator, stroke, valuator, choice, pick, and string. There are three modes of interaction with the input devices: sample, request, and event.
The subroutines discussed in this section perform the following operations:
To determine the actual input capabilities of a specific workstation, use the appropriate inquiry subroutines.
The measure and trigger of each logical input device is described in terms of the physical devices available on a workstation. See The graPHIGS Programming Interface: Technical Reference for the details of each logical device supported on a workstation
The default size of the input queue is 16K. You can control this size with the IQSIZE default, which is explained in the The graPHIGS Programming Interface: Technical Reference.
The input queue elements all have a header of 16 bytes. Use the information supplied in Appendix B of The graPHIGS Programming Interface: Technical Reference to interpret the information after the header.
Purpose
Use Await Event to move the next event from the input queue into the current event report. If the input queue is empty, then the graPHIGS API is placed in a wait state until at least one of the following occurs:
The graPHIGS API uses the operating system's timing facility. (See The graPHIGS Programming Interface: Writing Applications).
When a timeout or error situation occurs, the graPHIGS API returns NONE for the input class parameter. Otherwise, the graPHIGS API returns the workstation identifier, input class, and the logical device number. Input classes include: LOCATOR, STROKE, VALUATOR, CHOICE, PICK, and STRING.
The application must use the appropriate "Get" subroutine call to obtain the value(s) of the input residing in the current event report (i.e., Get Choice, Get Locator 3, Get String).
Language Bindings
pawait_event (timeout, ws_id, dev_class, in_num) |
PWAIT (tout, wkid, icl, idnr) |
Errors
Note:
The graPHIGS API performs this operation even if error 256 occurs.
Related Subroutines