Chapter 5 - Input 93 0 Errors get_last_requested_input function. ENOTVSAC [ 4] CGI not in proper state: CGI shall be in state VSAC. EINDNOEX [80] Input device does not exist EINDINIT [81] Input device not initialized. EINNTASD [85] No triggers associated with device. 5.4. Event Queue Input Toe event queue is a single FIFO buffer that holds events from input devices. Since the event queue has a fixed length, it must be processed in a timely fashion . or it will overflow. Events can be removed from the event queue in three ways:
the event at the head of the event queue can be processed with await_event; the entire event queue can be emptied with flush_event_queue; and the events from a particular device can be removed from the event queue with selective_flush_of_event_queue. Figure 5-3 contains an example program that illustrates how to use the event queue input functions to get information from an input device. First, a IC STRING device is initialized and associated with a trigger (the keyboard). Toe tracking method for the IC_ S'I'RING is defined to be a string that echos the keyboard input on the bottom of the viewpon. Toe IC_STRING is put into the QUEUE_EVENT state with enable_events.
After the trigger fires, the measure of the IC_STRING device is determined with await event. Finally, the LOCATOR is dissociated from the mouse button and released. Toe program then exits. 0 0 Ver.ion C of 17 March 1986