0 5 Input CG! has a collection of functions for managing input devices. The design of these functions has two purposes: provide an interface close to the acrual input device and maintain portability of applications. CG! accomplishes the first goal with dif- ferent input device classes and methods of extracting input values. The second goal is achieved through CGI's model of logical input devices (LID), an abstrac- tion whereby logical input devices required by the CG! standard are mapped onto the physical devices available to a CG! implementation. This section will intro- duce some of the terms used in describing the functionality of the CG! input prim- itives.
0 A CGI input device consists of a measure associated with a trigger. A measure is the current value of a logical input device. For example, the IC_LOCATOR dev- ice reports an x-y position. This device is useful for determining a position on the screen. A trigger is a physical device used by an operator to accept a current value. A trigger fire corresponds to an event on a physical input device. At the request of the application program, SunCGI associates a measure with a trigger. Table 5-1 has a list of the five logical input devices available to SunCGI applica- tion programs and the available triggers.
For example, a mouse button on a Sun workstation is a trigger that can be associated with a IC_LOCATOR device. When the mouse button is pressed, the x-y position of the mouse is returned as the measure of the IC _LOCATOR input device. An input event is the information saved when a trigger fires. This includes the measure of a logical input device associated with a trigger. 0 81 Version C of 17 March 1986