Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!kth.se!news From: h+@nada.kth.se Newsgroups: comp.sys.mac.programmer Subject: Re: Drawing all over the desktop Message-ID: <1990Jun30.160944.1007@kth.se> Date: 30 Jun 90 16:09:44 GMT Sender: news@kth.se (News Administrator) Organization: Royal Institute of Technology Lines: 29 larsen@ginger.Princeton.EDU writes: --- I know that Apple doesn't want applications to draw all over the desktop. Since I'm doing it anyway, though, I need advice in order to do it as cleanly as possible. At the moment I'm checking screen depth and writing into video memory, but I would prefer a quickdraw solution. --- The stuff to do is drawing into the WMgrPort. This is as compatible as it gets, though that isn't very. You have to be VERY careful to restore everything as it was before you call {Get/Wait}NextEvent. This means ony XORing, among other things. (Well, if it's a game and you don't want it to be MF compatible nor System 7 compatible, you don't have to restore the drawings, just the state of the WMgrPort) I have written an INIT that, among other things, needs to draw in the WMgrPort, called SetWindow INIT. The source and the init is available via FTP from rascal.ics.utexas.edu, and is in the directory mac/hacking (if memory serves me right, might be programming or somewhere completely else...) Generally, it is a VERY BAD idea to draw outside of windows. Only newly-converted MS-DOS programmers try and do this without a good reason. (And I mean GOOD) Happy hacking, h+