Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!ksand From: ksand@Apple.COM (Kent Sandvik) Newsgroups: comp.unix.aux Subject: Re: A/UX and the toolbox Message-ID: <48983@apple.Apple.COM> Date: 8 Feb 91 23:47:42 GMT References: <1991Feb8.203339.23101@nada.kth.se> Organization: Apple Computer Inc., Cupertino, CA Lines: 40 In article <1991Feb8.203339.23101@nada.kth.se> d88-jwa@dront.nada.kth.se (Jon W{tte) writes: > >Hi gurus ! > >Let's say we don't want to tail-patch GetNextEvent nor any of its >equivalents. Still we want to have a screen saver that wakes up >on keyDowns. PostEvent isn't called for keyDOwns under A/UX, it >seems. So how do you do ? > >Does anyone know ? Kent ? The TN229 states that applications can't access the event queue under A/UX, and patch the PostEvent mechanism. The event queue is deep deep inside the kernel memory space. There's a way to push in events under A/UX MultiFinder mode, and that is with AUXDispatch(). The A/UX Toolbox Macintosh ROM interface descibes the various options with AUXDispatch (alas this is not included in the on-line manual...). In the case of posting events, it looks like: AUXDispatch(AUX_POST_MODIFIED, p); where p points at the Event Record (char *p). So in order to write the most portable Macintosh screen saver in the world you need to write a small snippet of A/UX code with AUXDispatch, disasm the piece, and include it - after testing with Gestalt if the underlying system is A/UX 2.0 or higher - in the posting of event calls for KeyDowns. >Also, the man page for /mac/bin/launch(1) and the program itself >are not very consistent. I would like to know more about this. Regards, Kent Sandvik, MacDTS -- Kent Sandvik, Apple Computer Inc, Developer Technical Support NET:ksand@apple.com, AppleLink: KSAND DISCLAIMER: Private mumbo-jumbo Zippy++ says: "Read my lips, no more C++ syntax..."