[comp.sys.atari.st.tech] Windows and Events Questions

vsnyder@jato.jpl.nasa.gov (Van Snyder) (04/22/91)

In ONE of several similarly designed programs, the name and info lines
of windows get crud when another window is topped, e.g. Control Panel.
I remember reading something to be careful about with these data, but
I'll be damned if I can find it again!  I was careful to make both of
them static (non-stack) strings.  Does anybody remember what to do so
this doesn't happen?

If I create a window with WindowCreate(...Closer+InfoLine+Name...), then
do WindowSet(...Closer+Name...) and then WindowGet(...WorkXYWH,x,y,w,h),
the rectangle that comes back is as though the InfoLine were still there.
The picture on the screen, and the behaviour when redrawing or topping
verifies this.  Is there a way to make the InfoLine temporarily go away,
or must one destroy the window and re-create it?

When window B is atop window A, and window B is moved, window A is told
to redraw everything of it that shows.  How can one repaint just those
parts that are newly exposed?  It's not too hard when dealing only with
windows the program owns, but what about DA windows?

How can one wait for left OR right mouse button with Event<...>?
EventButton and EventMultiple wait for left AND right mouse button down
if the mask and button arguments are both 3.

Any help, on any question, would be appreciated.  To ensure me receiving
it, please e-mail answers.  Of course, if you think others will be
interested, post also.

-- 
vsnyder@jato.Jpl.Nasa.Gov
ames!elroy!jato!vsnyder
vsnyder@jato.uucp

csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) (04/22/91)

vsnyder@jato.jpl.nasa.gov (Van Snyder) writes:
>How can one wait for left OR right mouse button with Event<...>?
>EventButton and EventMultiple wait for left AND right mouse button down
>if the mask and button arguments are both 3.

A method that works with all GEM versions so far is the following:
Set bit 8 in the evnt_button mclicks parameter. This negates the
event condition in the mclicks, mmask and mstate parameters. To
wait for left OR right button, use the following evnt_button
call:
	mclicks = 1 | 256;
	mmask = 3;
	mstate = 0;
	evnt_button(mclicks, mmask, mstate);

This instructs the AES to come back with a mouse click event when
the two mouse buttons are NOT both released, in other words, when
one of the mouse buttons is pressed.

This method works reliably and is currently being tested at Atari.
I hope they will finally document it and relieve us from mixing
AES and VDI calls to poll the mouse states.

----------------------------------------------------------------------
Claus Brod, Am Felsenkeller 2,			Things. Take. Time.
D-8772 Marktheidenfeld, West Germany		(Piet Hein)
csbrod@medusa.informatik.uni-erlangen.de
Claus Brod@wue.maus.de
----------------------------------------------------------------------