home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!pacbell.com!network.ucsd.edu!ucsbcsl!mcl!scott
- From: scott@mcl.ucsb.edu (Scott Bronson)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: GetKeys, Events, Sound Manager
- Message-ID: <scott.714611988@mcl>
- Date: 23 Aug 92 23:19:48 GMT
- References: <9208102354.aa06431@Paris.ics.uci.edu> <Bsu03H.8Cn@taligent.com> <1992Aug11.203247.15836@athena.mit.edu> <1992Aug11.214555.19599@midway.uchicago.edu>
- Sender: root@ucsbcsl.ucsb.edu
- Lines: 21
-
- In <1992Aug11.214555.19599@midway.uchicago.edu> jcav@quads.uchicago.edu (JohnC) writes:
- >In article <1992Aug11.203247.15836@athena.mit.edu> slchambe@athena.mit.edu (Stephen L Chamberlin) writes:
- >>2. How can I get events without granting any processor time to background
- >>tasks? I'd like to be able to use keyDown and mouseDown events in my program,
- >>but due to the timing-sensitive nature of the program, I don't want to give
- >>any time to background tasks. As far as I can tell, GetNextEvent and and
- >>WaitNextEvent always give some time to background tasks.
-
- >If you need to do this, use _GetOSEvent, which does nothing but retrieve an
- >event from the queue. Be aware that only events created by _PostEvent will
- >be found. You won't see update events, activate events, OS events or
- >high-level events.
-
- Another solution is to put up your window in a dBoxProc-type dialog. This
- will by definition prevent switching. Perhaps put the dBoxProc in front
- offscreen, then HiliteWindow your window to make it look like it's in front
- again. Getting really kludgy, but you will get update events. Trap the
- events using a dialog filter so that you can pass them to your app and
- you can almost pretend the dialog isn't offscreen preventing switching.
-
- - Scott
-