Path: utzoo!dciem!nrcaer!sce!cognos!emoffatt From: emoffatt@cognos.uucp (Eric Moffatt) Newsgroups: comp.cog-eng Subject: Re: The Window Focus Problem Message-ID: <4853@enterprise.UUCP> Date: 14 Dec 88 19:32:32 GMT Article-I.D.: enterpri.4853 References: <318@aratar.UUCP> <651@sdics.ucsd.EDU> <1073@arctic.nprdc.arpa> <663@sdics.ucsd.EDU> 14 Dec 88 19:32:32 GMT Reply-To: emoffatt@cognos.UUCP (Eric Moffatt) Organization: Cognos Inc., Ottawa, Canada Lines: 61 In article johnm@amdahl.uts.amdahl.com (John Murray) writes: [stuff deleted] > >Given the subject line of this discussion, I find it odd that no-one >has mentioned the possibility of actually de-focussing the non-active >windows. I envision making them fuzzy enough to be difficult to read, >but not so much that changes and incoming messages could not be noticed. >For many terminal displays, the resolution may not be good enough to >achieve the right effect, but I haven't heard of anyone trying the idea. > I too have never seen anything on this. It certainly is not used in any interface I have ever encountered. We have discussed the problem here, however, in relation to a multi-window application I'm doing the UI for so I can give a couple of possible implementations for interested parties: DE-FOCUS vers 1.0: a) Pick a dithering pattern of a desired density (amout of "defocus"). b) BLT the pattern to the WHOLE screen using INVERT raster op. c) BLT the pattern again ONLY in the areas which have "Focus". The result is that the areas with focus are "clear" while the rest of the screen is "smeared". Note that this implementation does not need to know ANYTHING about the status of the other areas of the screen. This version could be used on monochrome devices. DE-FOCUS vers 2.0 a) reserve a bitplane (ie. the highest) for this purpose. b) arrange the colour lookup table so that all colours which have '1' in the selected bitplane are "full colour" while those colours which have '0' are shown at some %age of the desired "full" colour. c) Draw a FILLED RECT on the selected bitplane (only) over the areas which have "focus" The result is a variable contrast adjustment (0-100% of "full colour") over ANY AREA of the screen. You could just as easily "hilite" circles, polygons, individual lines... It's a little expensive (costs half your colours) but produces a nice controllable "Fader" effect. Note that both these examples effectively do the same operation; they "dim/blurr" the WHOLE screen and then "hilight" are desired areas. This allows window focus to be accomplished only knowing about the window to be focused, not ALL the windows. Eric (Pixel Pusher) Moffatt P.S. While I'm posting, does anybody have any ideas on how to reflect that a given window is "Out of Date" (ie. MAY contain invalid data) ?? -- Eric Moffatt - Cognos Incorporated: 3755 Riverside Drive Voice: (613)738-1440 (Research) FAX: (613)738-0002 P.O. Box 9707 uucp: uunet!mitel!sce!cognos!emoffatt Ottawa, Ontario, arpa/internet: emoffatt%cognos.uucp@uunet.uu.net CANADA K1G 3Z4