Devices.mesa
Copyright Ó 1991, 1992 by Xerox Corporation. All rights reserved.
Bier, November 6, 1991 1:18 pm PST
Contents: Routines on devices and device classes (e.g., keyboards, mice, pens, etc.).
Devices: CEDAR DEFINITIONS = BEGIN
Device: TYPE = DeviceTypes.Device;
DeviceClass: TYPE = DeviceTypes.DeviceClass;
DeviceState: TYPE = DeviceTypes.DeviceState;
QuaClass:
PROC [ref:
REF]
RETURNS [class: DeviceClass];
Narrows ref to DeviceClass. Clients can't do this themselves because DeviceTypes.DeviceClass is an Opaque type. Returns NIL if ref is the wrong type.
NameOfClass: PROC [class: DeviceClass] RETURNS [name: ATOM];
ClassOfDevice: PROC [device: Device] RETURNS [class: DeviceClass];
RegisterClass: PROC [class: DeviceClass, name: ATOM];
ClassFromName: PROC [name: ATOM] RETURNS [class: DeviceClass ¬ NIL];
StateOfDevice:
PROC [device: Device]
RETURNS [DeviceState];
For keyboards and mice, this returns the state with all keys up. For pointing devices, the device begins at position [0,0] in 2D, [0,0,0] in 3D, etc.
END.