[comp.sys.atari.st] Various Mouse Button questions.......

K538915@CZHRZU1A.BITNET (09/27/87)

Date: 26 September 1987, 21:59:22 GMT
From: Simon Poole               056/26 87 43         K538915  at CZHRZU1A
      Bahnnhofstr. 51b
      5430 Wettingen
To:   INFO-ATA at SCORE.ST

There's no way to wait either for the left or right mouse button with
any of the AES event calls (consult Tim Oren's ProGem series). The current
state of the mouse buttons can be found by calling the graf_mkstate (which
seems to have less horrible effects on the event queue) or with the VDI
call vq_mouse, I strongly advise not to use ANY of these calls since they
are VERY VERY slow! What I use in UniTerm 2.0 to detect mouse buttons is
a small assembler routine which is hooked in the VDI mouse handler with
vex_butv, it just saves d0.w and then pushes the old vector on the stack
and then does a rts. To inquire the mouse button status just write a small
function that returns the saved value in d0. This approach is something
like a 100 times faster than vq_mouse, the only problem is that there is
no way to make AES reset the event queue for a particular application,
so if you wait for another mouse button event with event_multi after
you detected that the mouse button is down, you may get rather funny
results.


                            Simon Poole
                            K538915@CZHRZU1A.BITNET

PS: Sorry that V2 of UniTerm is not released yet, it's just waiting
    for me to debug the screen driver code for color monitors, which
    will be done as soon as our Alliant FX/8 is up and running.