[comp.sys.mac] Terminal window

iand@munnari.oz (Ian Robert Dobson) (10/19/88)

I am implementing a terminal program on the Macintosh and am having trouble
handling scrolling at fast speeds while preserving all relevant window
information in case my terminal window gets written on by another window.
   It would make my program much faster if, while the terminal window is
fully visible, frontmost, and active, I just write to that window and, when
the window is going to be covered up, I revert to also saving the window
information elsewhere (in an offscreen bitmap).  Before any window management
that might cover my program window, I would copy its contents into an
offscreen buffer.
   However, it seems that the only way that i can detect another window
wants to come up is to look for a deactivate event on my terminal window.
This is not going to help me however, as the deactivate event is posted after
the new window is drawn.
   Is there any way to detect that another window is about to be drawn on
top of my terminal window, and if so then save its contents before the
new window is drawn?  I have thought of patching the Trap Dispatcher Table
with a series of calls to my own routines, however this to me is undesirable
because a) it would probably make my code machine dependent
        b) it's a lot of extra mucking around
        c) I have no experience doing this kind of thing and it would
           probably give me headaches working it all out.

Any assistance would be appreciated.


Ian R. Dobson
University of Melbourne
iand@munnari