DIRECTORY ColorDisplayDefs USING [ChannelsVisible, ChannelValue, ColorDisplayType, ColorMode, ColorValue]; ColorDisplayFace: CEDAR DEFINITIONS ~ BEGIN ColorMode: TYPE ~ ColorDisplayDefs.ColorMode; ColorDisplayType: TYPE ~ ColorDisplayDefs.ColorDisplayType; ChannelValue: TYPE ~ ColorDisplayDefs.ChannelValue; ColorValue: TYPE ~ ColorDisplayDefs.ColorValue; ChannelsVisible: TYPE ~ ColorDisplayDefs.ChannelsVisible; globalStateSize: READONLY NAT; -- number of words required by Initialize Initialize: UNSAFE PROC [globalState: LONG POINTER]; InitializeCleanup: UNSAFE PROC; displayType: READONLY ColorDisplayType; -- type of display, if any width: READONLY NAT; -- display width, in pixels height: READONLY NAT; -- display height, in pixels pixelsPerInch: READONLY NAT; -- approximate number of pixels per inch SetDisplayType: PROC [type: ColorDisplayType] RETURNS [ok: BOOL]; nullMode: ColorMode ~ [FALSE, 0, 0]; HasMode: PROC [mode: ColorMode] RETURNS [BOOL]; NextMode: PROC [mode: ColorMode _ nullMode] RETURNS [ColorMode]; ColorMap: TYPE ~ LONG POINTER TO ColorMapRep; ColorMapRep: TYPE; wordsForColorMap: READONLY NAT; InitializeColorMap: UNSAFE PROC [mode: ColorMode, pointer: LONG POINTER] RETURNS [ColorMap]; SetColor: UNSAFE PROC [map: ColorMap, pixelA, pixelB: ChannelValue, r, g, b: ColorValue]; GetColor: PROC [map: ColorMap, pixelA, pixelB: ChannelValue] RETURNS [r, g, b: ColorValue]; SetR: UNSAFE PROC [map: ColorMap, in: ChannelValue, out: ColorValue]; SetG: UNSAFE PROC [map: ColorMap, in: ChannelValue, out: ColorValue]; SetB: UNSAFE PROC [map: ColorMap, in: ChannelValue, out: ColorValue]; GetR: PROC [map: ColorMap, in: ChannelValue] RETURNS [out: ColorValue]; GetG: PROC [map: ColorMap, in: ChannelValue] RETURNS [out: ColorValue]; GetB: PROC [map: ColorMap, in: ChannelValue] RETURNS [out: ColorValue]; Connect: UNSAFE PROC[mode: ColorMode, baseA, baseB: LONG POINTER, map: ColorMap]; Disconnect: PROC; TurnOn: UNSAFE PROC; TurnOff: PROC; SetVisibility: PROC[visibility: ChannelsVisible]; END. ΤColorDisplayFace.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Created by Doug Wyatt, 9-Jul-81 15:21:55 Levin, August 8, 1983 2:43 pm Russ Atkinson (RRA) January 29, 1985 0:38:13 am PST Doug Wyatt, May 1, 1985 4:20:29 pm PDT Processor-independent interface to color display. Initialization Initializes the implementation; caller must supply a block of globalStateSize words, permanently allocated in first 64K of address space. Initializes the DeviceCleanup coroutine. Client should call this exactly once. Display characteristics ... establishes a new display type. Returns TRUE iff the operation is implemented on this machine and the specified type is recognized. ... indicates whether the given mode is supported. ... enumerates the available modes; enumeration starts and ends with nullMode. Color maps Initializes the content of a color map. Caller supplies the intended ColorMode and the address of a block of wordsForColorMap words. ... sets a color map entry. ... gets a color map entry. ... sets a red, green, or blue map entry. ... gets a red, green, or blue map entry. Display control Connects frame buffer(s) and color map to the display hardware. Subsequent frame buffer or color map changes will affect the color image, but the image will not appear on the screen until TurnOn is called. Disconnects the display; releases all references to the memory supplied to Connect. Turns display on, causing an image to appear on the screen. Caution: the connected pages must be pinned before TurnOn is called! Turns display off, causing the screen to be dark; bitmap(s) and colormap remain connected. The connected pages may be unpinned after TurnOff returns. Controls which channels are visible. Κ™˜codešœ™Kšœ Οmœ1™