1SDL_MouseMotionEvent(3)        SDL API Reference       SDL_MouseMotionEvent(3)
2
3
4

NAME

6       SDL_MouseMotionEvent - Mouse motion event structure
7

STRUCTURE DEFINITION

9       typedef struct{
10         Uint8 type;
11         Uint8 state;
12         Uint16 x, y;
13         Sint16 xrel, yrel;
14       } SDL_MouseMotionEvent;
15

STRUCTURE DATA

17       type                SDL_MOUSEMOTION
18
19       state               The current button state
20
21       x, y                The X/Y coordinates of the mouse
22
23       xrel, yrel          Relative motion in the X/Y direction
24

DESCRIPTION

26       SDL_MouseMotionEvent  is  a  member  of the SDL_Event union and is used
27       when an event of type SDL_MOUSEMOTION is reported.
28
29       Simply put, a SDL_MOUSEMOTION type event occurs when a user  moves  the
30       mouse  within  the  application window or when SDL_WarpMouse is called.
31       Both the absolute (x and y) and relative (xrel  and  yrel)  coordinates
32       are  reported  along with the current button states (state). The button
33       state can be interpreted using the SDL_BUTTON macro (see SDL_GetMouseSā€
34       tate).
35
36       If  the  cursor  is hidden (SDL_ShowCursor(0)) and the input is grabbed
37       (SDL_WM_GrabInput(SDL_GRAB_ON)), then  the  mouse  will  give  relative
38       motion events even when the cursor reaches the edge fo the screen. This
39       is currently only implemented on Windows and Linux/Unix-a-likes.
40

SEE ALSO

42       SDL_Event, SDL_MouseButtonEvent
43
44
45
46SDL                         Tue 11 Sep 2001, 22:59     SDL_MouseMotionEvent(3)
Impressum