d88-jwa@dront.nada.kth.se (Jon W{tte) (02/09/91)
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 ? Also, the man page for /mac/bin/launch(1) and the program itself are not very consistent. This is under A/UX 2.0 from CD. Cheers, Jon "The IM-IV file manager chapter documents zillions of calls, all of which seem to do almost the same thing and none of which seem to do what I want them to do." -- Juri Munkki in comp.sys.mac.programmer
ksand@Apple.COM (Kent Sandvik) (02/09/91)
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..."
d88-jwa@dront.nada.kth.se (Jon W{tte) (02/09/91)
In article <48983@apple.Apple.COM> ksand@Apple.COM (Kent Sandvik) writes: >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: Hmm... I thin it's too bad that the online manuals don't contain toolbox information as well - like an online copy of Inside Mac for A/UX :-) The screensaver shouldn't _post_ events, though, just listen in to them. Is there a way using AUXDispatch ? >>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. Okay, here goes: h+mac.h+:1> man 1 launch ... launch -[it] filename [document...] launch -p[it] filename document... ... h+mac.h+:2> launch -t Storm launch: illegal option -- t usage: launch [-padr] appName [docName ...] h+mac.h+:3> Now, what does "adr" and "it" have in common - the intersection is the empty set :-( Anyway, thanx for a great OS, h+ "The IM-IV file manager chapter documents zillions of calls, all of which seem to do almost the same thing and none of which seem to do what I want them to do." -- Juri Munkki in comp.sys.mac.programmer
ksand@Apple.COM (Kent Sandvik) (02/10/91)
In article <1991Feb9.093939.12415@nada.kth.se> d88-jwa@dront.nada.kth.se (Jon W{tte) writes: >Hmm... I thin it's too bad that the online manuals don't contain >toolbox information as well - like an online copy of Inside Mac for A/UX :-) >The screensaver shouldn't _post_ events, though, just listen in to them. >Is there a way using AUXDispatch ? Oh, sorry, you could also listen for events with AUXDispatch: AUXDispatch(AUX_FIND_EVENT,p); where p is a pointer to a FindEvent struct (mask and pointer to an Event Record). > >h+mac.h+:1> man 1 launch >... > launch -[it] filename [document...] > launch -p[it] filename document... >... > >h+mac.h+:2> launch -t Storm >launch: illegal option -- t Yep, this seems to be a bug, found it also in 2.0.1. Will report it, thx. Regards, Kent Sandvik -- 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..."