5131
clevermous
1
2
>
3
>
4
>SDL_MouseMotionEvent
5
>
6
NAME="GENERATOR"
7
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
8
">
9
REL="HOME"
10
TITLE="SDL Library Documentation"
11
HREF="index.html">
12
REL="UP"
13
TITLE="SDL Event Structures."
14
HREF="eventstructures.html">
15
REL="PREVIOUS"
16
TITLE="SDL_KeyboardEvent"
17
HREF="sdlkeyboardevent.html">
18
REL="NEXT"
19
TITLE="SDL_MouseButtonEvent"
20
HREF="sdlmousebuttonevent.html">
21
>
22
CLASS="REFENTRY"
23
BGCOLOR="#FFF8DC"
24
TEXT="#000000"
25
LINK="#0000ee"
26
VLINK="#551a8b"
27
ALINK="#ff0000"
28
>
29
CLASS="NAVHEADER"
30
>
31
WIDTH="100%"
32
BORDER="0"
33
CELLPADDING="0"
34
CELLSPACING="0"
35
>
36
>
37
COLSPAN="3"
38
ALIGN="center"
39
>SDL Library Documentation
40
>
41
>
42
>
43
WIDTH="10%"
44
ALIGN="left"
45
VALIGN="bottom"
46
>
47
HREF="sdlkeyboardevent.html"
48
>Prev
49
>
50
>
51
WIDTH="80%"
52
ALIGN="center"
53
VALIGN="bottom"
54
>
55
>
56
WIDTH="10%"
57
ALIGN="right"
58
VALIGN="bottom"
59
>
60
HREF="sdlmousebuttonevent.html"
61
>Next
62
>
63
>
64
>
65
>
66
ALIGN="LEFT"
67
WIDTH="100%">
68
>
69
>
70
NAME="SDLMOUSEMOTIONEVENT"
71
>SDL_MouseMotionEvent
72
>
73
>
74
CLASS="REFNAMEDIV"
75
>
76
NAME="AEN3646"
77
>
78
>
79
>Name
80
>SDL_MouseMotionEvent -- Mouse motion event structure
81
>
82
CLASS="REFSECT1"
83
>
84
NAME="AEN3649"
85
>
86
>
87
>Structure Definition
88
>
89
CLASS="PROGRAMLISTING"
90
>typedef struct{
91
Uint8 type;
92
Uint8 state;
93
Uint16 x, y;
94
Sint16 xrel, yrel;
95
} SDL_MouseMotionEvent;
96
>
97
>
98
CLASS="REFSECT1"
99
>
100
NAME="AEN3652"
101
>
102
>
103
>Structure Data
104
>
105
CLASS="INFORMALTABLE"
106
>
107
NAME="AEN3654"
108
>
109
>
110
>
111
>
190
>
191
>
192
>
193
>
194
>
195
CLASS="REFSECT1"
196
>
197
NAME="AEN3676"
198
>
199
>
200
>Description
201
>
202
>
203
CLASS="STRUCTNAME"
204
>SDL_MouseMotionEvent
205
> is a member of the
206
HREF="sdlevent.html"
207
>
208
CLASS="STRUCTNAME"
209
>SDL_Event
210
>
211
> union and is used when an event of type
212
CLASS="LITERAL"
213
>SDL_MOUSEMOTION
214
> is reported.
215
>
216
>Simply put, a
217
CLASS="LITERAL"
218
>SDL_MOUSEMOTION
219
> type event occurs when a user moves the mouse within the application window or when
220
HREF="sdlwarpmouse.html"
221
>
222
CLASS="FUNCTION"
223
>SDL_WarpMouse
224
>
225
> is called. Both the absolute (
226
CLASS="STRUCTFIELD"
227
>
228
>x
229
>
230
> and
231
CLASS="STRUCTFIELD"
232
>
233
>y
234
>
235
>) and relative (
236
CLASS="STRUCTFIELD"
237
>
238
>xrel
239
>
240
> and
241
CLASS="STRUCTFIELD"
242
>
243
>yrel
244
>
245
>) coordinates are reported along with the current button states (
246
CLASS="STRUCTFIELD"
247
>
248
>state
249
>
250
>). The button state can be interpreted using the
251
CLASS="LITERAL"
252
>SDL_BUTTON
253
> macro (see
254
HREF="sdlgetmousestate.html"
255
>
256
CLASS="FUNCTION"
257
>SDL_GetMouseState
258
>
259
>).
260
>
261
>If the cursor is hidden (
262
HREF="sdlshowcursor.html"
263
>
264
CLASS="FUNCTION"
265
>SDL_ShowCursor
266
>(0)
267
>) and the input is grabbed (
268
HREF="sdlwmgrabinput.html"
269
>
270
CLASS="FUNCTION"
271
>SDL_WM_GrabInput
272
>(SDL_GRAB_ON)
273
>), then the mouse will give relative motion events even when the cursor reaches the edge fo the screen. This is currently only implemented on Windows and Linux/Unix-a-likes.
274
>
275
>
276
CLASS="REFSECT1"
277
>
278
NAME="AEN3700"
279
>
280
>
281
>See Also
282
>
283
>
284
HREF="sdlevent.html"
285
>
286
CLASS="STRUCTNAME"
287
>SDL_Event
288
>
289
>,
290
291
HREF="sdlmousebuttonevent.html"
292
>
293
CLASS="STRUCTNAME"
294
>SDL_MouseButtonEvent
295
>
296
>
297
>
298
>
299
CLASS="NAVFOOTER"
300
>
301
ALIGN="LEFT"
302
WIDTH="100%">
354
>
355
>
356
>
357
>