DIRECTORY Process USING [Ticks], Rope USING [ROPE], WindowManager USING [ScreenPos]; ColorDisplay: CEDAR DEFINITIONS ~ { ScreenPos: TYPE ~ WindowManager.ScreenPos; CDState: TYPE ~ RECORD [ on, onLeft: BOOLEAN, bpp: CARDINAL, monitorType: Rope.ROPE ]; SetColorDisplayStatus: PROC [on: BOOLEAN _ DefaultOn[], onLeft: BOOLEAN _ DefaultOnLeft[], bpp: CARDINAL _ DefaultBpp[], monitorType: Rope.ROPE _ DefaultMonitorType[]]; GetColorDisplayStatus: PROC RETURNS [on: BOOLEAN, onLeft: BOOLEAN, bpp: CARDINAL, monitorType: Rope.ROPE]; GetColorDisplayProfile: PROC RETURNS [on: BOOLEAN, onLeft: BOOLEAN, bpp: CARDINAL, monitorType: Rope.ROPE]; CDNotifyProc: TYPE ~ PROC [old, new: CDState]; RegisterCDNotifyProc: PROC [proc: CDNotifyProc]; SleepColorDisplay: PROC [ticks: Process.Ticks]; DefaultOn: PRIVATE PROC RETURNS[BOOLEAN]; DefaultOnLeft: PRIVATE PROC RETURNS[BOOLEAN]; DefaultBpp: PRIVATE PROC RETURNS [CARDINAL]; DefaultMonitorType: PRIVATE PROC RETURNS [Rope.ROPE]; }. bColorDisplay.mesa Mik Lamming - February 10, 1984 2:32:16 pm PST Last Edited by: Pier, February 17, 1984 2:03:00 pm PST Last Edited by Eric Nickell, April 1, 1985 4:51:41 am PST 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 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. 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. Ê5˜™J™.J™6J™9—J˜šÏk ˜ Icodešœœ ˜Jšœœœ˜Jšœœ ˜ —J˜šœœ œ˜ Jšœ˜Jšœ œ˜*šœ œœ˜Kšœ œ˜Kšœœ˜Kšœ˜Kšœ˜—J˜š Ïnœœœœœ#œ˜¨™$™>J™&J™3J™JšœI™I—™oJ™;J™B—J™G™3J™W™—J˜—šžœœœœ œœœ˜k™%J™TJ™H—J˜—J™Kšž œœœ˜.šžœœ˜0K™sK™—šžœœ˜/K™ÂK™—šœÇÏsœ-™ùJš ž œœœœœ˜)Jš ž œœœœœ˜-Jš ž œœœœœ˜,Jš žœœœœœ˜5—Jšœ˜——…—Òi