ifocs9d@aucs.UUCP (Rick Giles) (05/30/89)
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). Rick Giles Bitnet: FRGILES@Acadia | Procrastinators Internet: FRGILES%Acadia.BITNET@CUNYVM.CUNY.EDU | finish UUCP: uunet!dalcs!aucs!ifocs9d | first.
rpd@apple.com (Rick Daley) (06/01/89)
In article <1917@aucs.UUCP> ifocs9d@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@apple.COM