1mouse_callback(3)               Allegro manual               mouse_callback(3)
2
3
4

NAME

6       mouse_callback  -  User specified mouse callback. Allegro game program‐
7       ming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       extern void (*mouse_callback)(int flags);
14

DESCRIPTION

16       Called by the interrupt handler whenever the mouse moves or one of  the
17       buttons changes state. This function must be in locked memory, and must
18       execute _very_ quickly! It is passed the event flags that triggered the
19       call,  which is a bitmask containing any of the values MOUSE_FLAG_MOVE,
20       MOUSE_FLAG_LEFT_DOWN,    MOUSE_FLAG_LEFT_UP,     MOUSE_FLAG_RIGHT_DOWN,
21       MOUSE_FLAG_RIGHT_UP,  MOUSE_FLAG_MIDDLE_DOWN, MOUSE_FLAG_MIDDLE_UP, and
22       MOUSE_FLAG_MOVE_Z. Note that even if the mouse has more than three but‐
23       tons, only the first three can be trapped using a callback.
24
25

SEE ALSO

27       install_mouse(3)
28
29
30
31Allegro                          version 4.4.2               mouse_callback(3)
Impressum