GKS organizes data that can be input to an applications program into six types, each related to a Logical Input Device. The actual physical input devices are mapped onto these logical devices, which makes it possible for GKS to organize the different forms of data in a device-independent way, and thus helps to make the code more portable. A logical input device is identified by 3 items:
Returns a position (an x,y value) in World Coordinates and a Normalization Transformation number corresponding to that used to map back from Normalized Device Coordinates to World Coordinates. The NT used corresponds to that viewport with the highest Viewport Input Priority (set by calling GSVPIP). Warning: If there is no viewport input priority set then NT 0 is used as default, in which case the coordinates are returned in NDC. This may not be what is expected!
CALL GSVPIP(TNR, RTNR, RELPRI)
Returns a sequence of (x,y) points in World Coordinates and a Normalization Transformation as for the Locator.
Returns a real value, for example, to control some sort of analogue device.
Returns a non-negative integer which represents a choice from a selection of several possibilities. This could be implemented as a menu, for example.
Returns a string of characters from the keyboard.
Returns a segment name and a pick identifier of an object pointed at by the user. Thus, the application does not have to use the locator to return a position, and then try to find out to which object the position corresponds.