-- CIFDevicesDefs.Mesa
-- Written by Martin Newell, March 1980
-- Last updated: March 27, 1981 5:19 PM
-- Provides multiple implementations of Trapezoid for different devices
DIRECTORY
CIFUtilitiesDefs USING [Rectangle],
Graphics USING [DeviceContext];
CIFDevicesDefs: DEFINITIONS =
BEGIN OPEN CIFUtilitiesDefs;
DeviceDescriptor: TYPE = POINTER TO DeviceDescriptorRecord;
DeviceDescriptorRecord: TYPE = RECORD [
next:DeviceDescriptor,
name:STRING,
deviceSelect: PROCEDURE RETURNS[BOOLEAN],
deviceDrawFrame: PROCEDURE,
deviceSetScale: PROCEDURE [factor: REAL],
deviceSetClipRegion: PROCEDURE [rt: Rectangle],
deviceOutput: PROCEDURE,
deviceLayer: PROCEDURE [layer: CARDINAL],
deviceLoadLayer: PROCEDURE [layer: CARDINAL, v0,v1,v2,v3: CARDINAL],
deviceRectangle: PROCEDURE [r: Rectangle],
deviceStartPoly: PROCEDURE [x,y: REAL],
devicePolyVertex: PROCEDURE [x,y: REAL],
deviceEndPoly: PROCEDURE,
deviceText: PROCEDURE [text: STRING, x,y: REAL]
];
SelectDevice: PUBLIC PROCEDURE [deviceName: STRING] RETURNS[ok: BOOLEAN];
DrawFrame: PUBLIC PROCEDURE;
SetScale: PUBLIC PROCEDURE [factor: REAL];
SetClipRegion: PUBLIC PROCEDURE [rt: Rectangle];
OutputDevice: PUBLIC PROCEDURE;
Draw: PUBLIC PROCEDURE;
LookupLayer: PUBLIC PROCEDURE [s: PACKED ARRAY [0..4) OF CHARACTER] RETURNS[CARDINAL];
LookupLayerString: PUBLIC PROCEDURE[layerName: STRING] RETURNS[CARDINAL];
SetLayer: PUBLIC PROCEDURE [CARDINAL];
LoadLayer: PUBLIC PROCEDURE[layer: CARDINAL, v0,v1,v2,v3: CARDINAL];
SetLayerVisible: PUBLIC PROCEDURE[layer: CARDINAL, visible: BOOLEAN];
LayerVisible: PUBLIC PROCEDURE[layer: CARDINAL] RETURNS[visible: BOOLEAN];
OutputText: PUBLIC PROCEDURE[text: STRING, x,y: REAL];
RegisterDevice: PUBLIC PROCEDURE[device: DeviceDescriptor];
UnRegisterDevice: PUBLIC PROCEDURE[deviceName: STRING];
GetCIFOutDevice: PUBLIC PROCEDURE RETURNS[device: Graphics.DeviceContext];
LENGTHLayerArray: PUBLIC CARDINAL;
MaxLENGTHLayerArray: CARDINAL = 20;
END.