Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!nerm From: nerm@Apple.COM (Dean Yu) Newsgroups: comp.sys.mac.programmer Subject: Re: A couple of color questions... Message-ID: <52262@apple.Apple.COM> Date: 1 May 91 19:06:25 GMT References: <1991Apr29.234748.27798@lynx.CS.ORST.EDU> <1991May01.014734.25231@lynx.CS.ORST.EDU> Organization: Apple Computer Inc., Cupertino, CA Lines: 23 In article <1991May01.014734.25231@lynx.CS.ORST.EDU> boerned@mist.CS.ORST.EDU (Dan Boerner) writes: >Question #2, choosing the best icon to draw >Greg Anderson from Apple was nice enough to drop me a note and suggested >I walk the GDevice list and draw the appropriate icon for each monitor that >the icon intersects. > >So, I've decided to give up trying to statically determine the best icon to >display and instead let my draw code pick the best based upon the GDevice list. >Anyone out there that thinks this might not be safe? > Not only is this perfectly safe, but it's totally cool. In System 7, we provide a new call, _DeviceLoop, which does the walking for you, and all you have to do is pass a pointer to your drawing routine. If you want your program to work under 6 as well as 7, I can post the interface for _DeviceLoop (if you don't have access to IM VI) so you can use the supplied call under 7, and use your own call under System 6, but the two can share the same interface. -- Dean Yu Blue Meanie, Negative Ethnic Role Model, etc. Apple Computer, Inc. My opinions and so on and so forth...