Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac Subject: Re: Delphi digest volume 3, issue 36 Message-ID: <19944@ucbvax.BERKELEY.EDU> Date: Mon, 3-Aug-87 20:05:34 EDT Article-I.D.: ucbvax.19944 Posted: Mon Aug 3 20:05:34 1987 Date-Received: Tue, 4-Aug-87 06:16:28 EDT References: <2640@husc6.UUCP> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Distribution: world Organization: School of Education, UC-Berkeley Lines: 49 In article <2640@husc6.UUCP> fry@huma1.UUCP (David Fry) writes: >From: JIMH >Subject: changing pixel depth >Does anyone know how the monitor cdev cause the desktop (or any >programs) to redraw themselve with the new screen depth? I want a fkey >to toggle between 1 and 8 bit mode. It pretty straightforward to set >the mode to whatever depth you need and when you r elaunch the finder >(return to finder you have new depth set. what is less straightforward >is to get the desktop to draw itself without a launch. best jim The following works well: 1.) Get a rectangle as big as the entire desktop (all the multiple displays): bigRect = (**GrayRgn).rgnBBox; 2.) turn painting of new windows off, so we'll get a transparent window: saveWhite = paintWhite; paintWhite = 0; 3.) Create a new, big window, in front of everything tempWindow = NewWindow(... 4.) DisposeWindow(tempWindow) and restore paintWhite This makes the window manager send everybody an update event, and things are just cool. Now: I've got a problem of my own: I'd like to extend Stars so that it does the right thing on a color display. One of the things I want to do is do a smooth fade to black by playing with the color table, then at the end of Stars, restore the original color table. I've written code that uses SetEntries to smoothly decrease the brightness of all the colors until the whole screen is black. The problem is that some things call ReserveEntires and ProtectEntries, and my call to SetEntries won't change these slots in the color table. How do I find out which slots are protected so that I can temporarily un-protect them? How do I convince the system to let me re-protect them under their old owners? Is there an easier way to do this right? --- David Phillip Oster --My Good News: "I'm a perfectionist." Arpa: oster@dewey.soe.berkeley.edu --My Bad News: "I don't charge by the hour." Uucp: {seismo,decvax,...}!ucbvax!oster%dewey.soe.berkeley.edu