ImagerStdColorDisplay.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Frank Crow, June 15, 1984 11:51:57 am PDT
DIRECTORY
ImagerBasic   USING [DeviceRectangle, Color, ConstantColor],
ImagerDisplay  USING [DisplayClass, DisplayData],
ImagerMasks   USING [Mask],
ColorModels   USING [Calibration],
WindowManager USING [ScreenPos],
Terminal    USING [ColorMode, Virtual];
ImagerStdColorDisplay: CEDAR DEFINITIONS
~ BEGIN
This provides support for the Dorado color display hardware common to standard displays.
DisplayClass: TYPE ~ ImagerDisplay.DisplayClass;
DisplayData: TYPE ~ ImagerDisplay.DisplayData;
Color: TYPE ~ ImagerBasic.Color;
Mask: TYPE ~ ImagerMasks.Mask;
DeviceRectangle: TYPE ~ ImagerBasic.DeviceRectangle;
ColorSequence: TYPE ~ RECORD[SEQUENCE length: NAT OF ImagerBasic.ConstantColor];
RGBSequence: TYPE ~ RECORD[SEQUENCE length: NAT OF RECORD[ r, g, b: [0..256) ] ];
ColorMapData: TYPE ~ RECORD [
pixelValueList: LIST OF CARDINAL,
colorCalibration: ColorModels.Calibration,
nextEntry: NAT,
map: REF ColorSequence
];
ColorDisplayError: SIGNAL [reason: ATOM];
displaySide: WindowManager.ScreenPos;
colorCalibration: ColorModels.Calibration;
callback for initializing the colormap
SetUpMapProc: TYPE ~ PROC[displayData: DisplayData];
callback for loading a color into the map
LoadColorProc: TYPE ~ PROC [ color: ImagerBasic.ConstantColor,
          colorCalibration: ColorModels.Calibration,
           mapEntry: [0..1024) ];
callback for updating colormap cache
CachedColorProc: TYPE ~ PROC[displayData: DisplayData, color: Color]; 
Create: PUBLIC PROC [vt: Terminal.Virtual, mode: Terminal.ColorMode,
       displayClass: DisplayClass, creationData: REF,
       bitsPerPixel: NAT, setUpMapProc: ImagerStdColorDisplay.SetUpMapProc]
   RETURNS [displayData: DisplayData];
DoUnderLock: PUBLIC PROC [displayData: DisplayData, action: PROC, rectangle: DeviceRectangle];
ApplyMask: PUBLIC PROC [displayData: DisplayData,
         color: Color, mask: Mask, sTranslate, fTranslate: INTEGER,
         cachedColorProc: ImagerStdColorDisplay.CachedColorProc];
PinPixelMap: PUBLIC PROC [vt: Terminal.Virtual, data: DisplayData, mode: Terminal.ColorMode];
Pin a pixel map to the color display replacing whatever was there before.
ReleasePixelMap: PUBLIC PROC [vt: Terminal.Virtual, data: DisplayData];
MoveOverlay: PUBLIC PROC [vt: Terminal.Virtual, data: REF ANY];
SwitchBuffers: PUBLIC PROC [];
LoadColorMap: PUBLIC PROC [vt: Terminal.Virtual, data: REF ANY,
          displayData: DisplayData,
          loadColor: ImagerStdColorDisplay.LoadColorProc];
END.