GNU Info

Info Node: (aalib.info)Mouse

(aalib.info)Mouse


Next: Resizing Prev: Keyboard Up: Top
Enter node , (file) or (file)node

Mouse
*****

   AA-lib also provides a simple mouse interface. It needs to be
initialized after the keyboard driver (and uninitialized before) since
it uses it to report events. Its initialization is almost identical to
keyboards (just replace kbd by mouse in function names). If you need
more details read the keyboard section.

   The only difference is mode parameter.  It says what kind of events
you should be informed about.  It is a mask from the following fields:
AA_MOUSEMOVEMASK, AA_MOUSEPRESSMASK and AA_PRESSEDMOVEMAKS.  Note that
mouse driver should ignore this mask. Set it to AA_MOUSEALLMASK to
enables all these events.

   Mouse event is reported by AA_MOUSE value returned by `aa_getevent'
function. Then the mouse possition can be obtained using:

     void aa_getmouse(aa_context *C, int *X, int *Y, int *B);

   `X' and `y' are reported in screen coordinates (not image ones).
`B' contains state of buttons (AA_BUTTON1, AA_BUTTON2, AA_BUTTON3).

     void aa_hidemouse(aa_context *C);
     void aa_showmouse(aa_context *C);

   This functions should be used to hide/show mouse cursor.


automatically generated by info2www version 1.2.2.9