CDColors.mesa (Viewer definitions for Chipndale)
Copyright © 1984, 1985 by Xerox Corporation. All rights reserved.
by Christian Jacobi, September 19, 1984 6:00:17 pm PDT
last edited by Christian Jacobi, April 11, 1985 3:24:51 pm PST
CDColors:
CEDAR
DEFINITIONS =
BEGIN
DisplayType: TYPE = {bw, bit4, bit8}; --displays supported by chipndale (bits per pixel)
DisplayMode: TYPE = {normal, back, grey}; --usage of brick
Brick: TYPE = ARRAY [0..4) OF CARDINAL; --brick, or'ed into a bitmap
ColorTable: TYPE = ARRAY CD.Layer OF REF Brick;
ColorTableSet: TYPE = ARRAY DisplayMode OF REF ColorTable;
ColorDefinition: TYPE = ARRAY DisplayType OF REF ColorTableSet;
globalColors: READONLY REF ColorDefinition; --everything is readonly except the REF Brick
DefineColor:
PROC[
lev: CD.Layer,
brick: REF Brick ← NIL, -- do no more change the values
display: DisplayType ← bw,
mode: DisplayMode ← normal,
table: REF ColorDefinition ← NIL --NIL uses the global table
];
--Defining a brick with mode normal also clears the back and the grey brick.
--A NIL brick makes a reasonable default.
--The procedure may exchange bricks if they have the same values.
END.