DIRECTORY Process USING [Ticks], Rope USING [ROPE]; ColorDisplay: CEDAR DEFINITIONS ~ { CDState: TYPE ~ RECORD [ on, onLeft: BOOLEAN, gray: BOOL, -- The display is in gray mode rather than dither. bpp, bppB: CARDINAL, monitorType: Rope.ROPE ]; SetColorDisplayStatus: PROC [on: BOOLEAN _ DefaultOn[], onLeft: BOOLEAN _ DefaultOnLeft[], gray: BOOL _ DefaultGray[], bpp: CARDINAL _ DefaultBpp[], bppB: CARDINAL _ DefaultBppB[], monitorType: Rope.ROPE _ DefaultMonitorType[]]; GetColorDisplayStatus: PROC RETURNS [on, onLeft, gray: BOOL, bpp, bppB: CARDINAL, monitorType: Rope.ROPE]; GetColorDisplayProfile: PROC RETURNS [on, onLeft, gray: BOOL, bpp, bppB: CARDINAL, monitorType: Rope.ROPE]; CDNotifyProc: TYPE ~ PROC [old, new: CDState, clientData: REF]; CDRegistration: TYPE ~ REF; RegisterCDNotifyProc: PROC [proc: CDNotifyProc, clientData: REF] RETURNS [reg: CDRegistration]; UnregisterCDNotifyProc: PROC [reg: CDRegistration]; SleepColorDisplay: UNSAFE PROC [ticks: Process.Ticks]; DefaultOn: PRIVATE PROC RETURNS[BOOLEAN]; DefaultOnLeft: PRIVATE PROC RETURNS[BOOLEAN]; DefaultGray: PRIVATE PROC RETURNS[BOOLEAN]; DefaultBpp: PRIVATE PROC RETURNS [CARDINAL]; DefaultBppB: PRIVATE PROC RETURNS [CARDINAL]; DefaultMonitorType: PRIVATE PROC RETURNS [Rope.ROPE]; }. 0ColorDisplay.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Mik Lamming - February 10, 1984 2:32:16 pm PST Last Edited by: Pier, February 17, 1984 2:03:00 pm PST Tim Diebert: May 15, 1986 9:18:16 am PDT Last Edited by Eric Nickell, June 13, 1985 10:58:03 pm PDT Philosophy of SetColorDisplayStatus: There are four arguments of significance to the color display: on Whether or not the display is on onLeft Whether it is on the left side or the right gray Whether in gray scale or dither mode. bpp Bits Per Pixel (or Point) monitorType ... (Only "640x480" and "1024x768" have special significance) The SetColorDisplayStatus proc has been set up so that all arguments can be defaulted, and the defaults will be 1. The current state of the display, if the display is on. 2. The last known state of that parameter, if the display is off. The known state is set whenever any procedure in this module is called. The initial values for the `known' state are set to 3. The value found in the User Profile, if an entry exists (see ColorDisplayDoc.tioga) 4. The following values, if there is no User Profile entry: onLeft: TRUE bpp: 8 monitorType "640x480" Philosophy of GetColorDisplayStatus: on, of course, tells you whether or not the color display is on. onLeft and bpp are determined as follows: 1. If the display is on, then they are the actual state of the display 2. Otherwise, they are the last known state, or the default state. monitorType is the last set (or default) value of monitorType. Philosophy of GetColorDisplayProfile: For each parameter, if there is an entry in the User Profile, it returns that value. Otherwise, it returns the current or last known state of that parameter. Allows a client to be called with a FORKed process whenever anyone a change is noticed in the color display status. Called once at registration. OK to call from CDNotifyProc Turns off the color display (without deallocating the screen or affecting the viewers) for so many ticks. Mostly used as a hack to speed processing while the color display would normally be on. The Procs below here are private. They return the same info as GetColorDisplayStatus. The only reason they are here is to provide defaults to the SetColorDisplayStatus proc in the interface, since CEDAR didn't seem to make that easy any other way. Κ’˜™Icodešœ Οmœ1™Kšœ žœ˜Kšœž˜Kšœ˜—J˜šΟnœžœžœžœžœžœžœ$žœ˜δ™$™>J™&J™3J™,J™JšœI™I—™oJ™;J™B—J™G™3J™W™—J˜—š ‘œžœžœžœ žœžœ˜k™%J™TJ™H—J˜—J™Kš‘ œžœžœ!žœ˜?Kšœžœžœ˜š‘œžœ"žœžœ˜_K™‘—š‘œžœ˜3K™K™—š‘œžœžœ˜7K™ΒK™—šœΗΟsœ-™ωJš ‘ œžœžœžœžœ˜)Jš ‘ œžœžœžœžœ˜-Jš ‘ œžœžœžœžœ˜+Jš ‘ œžœžœžœžœ˜,Jš ‘ œžœžœžœžœ˜-Jš ‘œžœžœžœžœ˜5—Jšœ˜——…—ϊΜ