Toolbox Access
Rick Daley
rpd at apple.com
Thu Jun 1 07:18:01 AEST 1989
In article <1917 at aucs.UUCP> ifocs9d at aucs.UUCP (Rick Giles) writes:
> Is it possible to access the Macintosh Toolbox without linking in
> /usr/lib/maccrt0.o with an A/UX application? The reason I ask is
> I'm writing an X Window System client which accesses Macintosh
> resources, and, as soon as the client terminates, the X
> screen is garbled. /usr/lib/maccrt0.0 initializations appear to
> be responsible. (I'm using A/UX 1.0).
If I understand your problem correctly, you want to be able to use the
Macintosh toolbox, but not as your user interface. There is a method for
doing this. I'm pretty sure this is documented in the A/UX Toolbox Guide.
If you include the line:
int noEvents = 1;
in your program outside of the scope of any routine, this has several
effects:
1) The Event Manager is not initialized. Normally, the keyboard is
taken over by the Toolbox, which means that Toolbox programs can't use
stdin, and can't be killed with ^C. This does not happen when noEvents is
set.
2) The screen is not reset when the Toolbox program quits. This is
normally done whenever a Toolbox application quits. Toolbox programs that
use the noEvents flag should not draw on the screen.
3) Toolbox programs with the noEvents flag set can run concurrently
with other Toolbox programs. Normally, the system can run only one
Toolbox application at a time.
The noEvents flag is useful when you want to write programs which use the
Toolbox to do non-user interface type things. Examples include accessing
resource files, and using QuickDraw to draw to off-screen bitmaps.
Rick Daley
rpd at apple.COM
More information about the Comp.unix.aux
mailing list