Annotated edit history of
SDL_MouseMotionEvent(3) version 2, including all changes.
View license author blame.
Rev |
Author |
# |
Line |
2 |
perry |
1 |
SDL_!MouseMotionEvent |
|
|
2 |
!!!SDL_!MouseMotionEvent |
1 |
perry |
3 |
NAME |
|
|
4 |
STRUCTURE DEFINITION |
|
|
5 |
STRUCTURE DATA |
|
|
6 |
DESCRIPTION |
|
|
7 |
SEE ALSO |
|
|
8 |
---- |
|
|
9 |
!!NAME |
|
|
10 |
|
|
|
11 |
|
2 |
perry |
12 |
SDL_!MouseMotionEvent- Mouse motion event structure |
1 |
perry |
13 |
!!STRUCTURE DEFINITION |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
typedef struct{ |
|
|
17 |
Uint8 type; |
|
|
18 |
Uint8 state; |
|
|
19 |
Uint16 x, y; |
|
|
20 |
Sint16 xrel, yrel; |
2 |
perry |
21 |
} SDL_!MouseMotionEvent; |
1 |
perry |
22 |
!!STRUCTURE DATA |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
__type SDL_MOUSEMOTION__ |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
__state__ The current button state |
|
|
29 |
|
|
|
30 |
|
|
|
31 |
__x__, __y__ The X/Y coordinates of the |
|
|
32 |
mouse |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
__xrel__, __yrel__ Relative motion in the X/Y |
|
|
36 |
direction |
|
|
37 |
!!DESCRIPTION |
|
|
38 |
|
|
|
39 |
|
2 |
perry |
40 |
__SDL_!MouseMotionEvent__ is a member of the |
1 |
perry |
41 |
__SDL_Event__ union and is used when an event of type |
|
|
42 |
__SDL_MOUSEMOTION__ is reported. |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
Simply put, a __SDL_MOUSEMOTION__ type event occurs when |
|
|
46 |
a user moves the mouse within the application window or when |
2 |
perry |
47 |
__SDL_!WarpMouse__ is called. Both the absolute (__x__ |
1 |
perry |
48 |
and __y__) and relative (__xrel__ and __yrel__) |
|
|
49 |
coordinates are reported along with the current button |
|
|
50 |
states (__state__). The button state can be interpreted |
|
|
51 |
using the __SDL_BUTTON__ macro (see |
2 |
perry |
52 |
__SDL_!GetMouseState__). |
1 |
perry |
53 |
|
|
|
54 |
|
2 |
perry |
55 |
If the cursor is hidden (__SDL_!ShowCursor__''(0)'') |
1 |
perry |
56 |
and the input is grabbed |
2 |
perry |
57 |
(__SDL_WM_!GrabInput__''(SDL_GRAB_ON)''), then the |
1 |
perry |
58 |
mouse will give relative motion events even when the cursor |
|
|
59 |
reaches the edge fo the screen. This is currently only |
|
|
60 |
implemented on Windows and Linux/Unix-a-likes. |
|
|
61 |
!!SEE ALSO |
|
|
62 |
|
|
|
63 |
|
2 |
perry |
64 |
__SDL_Event__, __SDL_!MouseButtonEvent__ |
1 |
perry |
65 |
---- |
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.