90 SunCGJ Reference Manual 0 EINDINIT (81] Input device not initialized. 5.2. Synchronous Input The synchronous input function request_ input allows the application pro- gram to obtain the currem measure an of input device. This function requires explicit identification of an input device ( through the associate function). Figure 5-2 contains an example program that illustrates how to use the synchro- nous input functions to get information from an input device. First, a IC_LOCATOR device is initialized and associated with a trigger (the left mouse button). The tracking method fl!!" the IC_LOCATOR is defined to be a printer's fist.
Then measure of the IC_ LOCATOR is requested with a timeout period of ten seconds. If the trigger is activated during this period, request_input relllrns a valid measure in ivalue . Finally, the JC_ LOCATOR is dissociated from the mouse button and released. The program exits. 0 0 YersionC of 17 March 1986