Mercurial > sdl-ios-xcode
annotate docs/html/sdlmousemotionevent.html @ 587:f00ccf8d8edc
Added code to testsprite to detect tearing when flipping
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 01 Feb 2003 19:56:45 +0000 |
parents | e5bc29de3f0a |
children | 355632dca928 |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_MouseMotionEvent</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="UP" | |
13 TITLE="SDL Event Structures." | |
14 HREF="eventstructures.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_KeyboardEvent" | |
17 HREF="sdlkeyboardevent.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_MouseButtonEvent" | |
20 HREF="sdlmousebuttonevent.html"></HEAD | |
21 ><BODY | |
22 CLASS="REFENTRY" | |
23 BGCOLOR="#FFF8DC" | |
24 TEXT="#000000" | |
25 LINK="#0000ee" | |
26 VLINK="#551a8b" | |
27 ALINK="#ff0000" | |
28 ><DIV | |
29 CLASS="NAVHEADER" | |
30 ><TABLE | |
31 WIDTH="100%" | |
32 BORDER="0" | |
33 CELLPADDING="0" | |
34 CELLSPACING="0" | |
35 ><TR | |
36 ><TH | |
37 COLSPAN="3" | |
38 ALIGN="center" | |
39 >SDL Library Documentation</TH | |
40 ></TR | |
41 ><TR | |
42 ><TD | |
43 WIDTH="10%" | |
44 ALIGN="left" | |
45 VALIGN="bottom" | |
46 ><A | |
47 HREF="sdlkeyboardevent.html" | |
48 >Prev</A | |
49 ></TD | |
50 ><TD | |
51 WIDTH="80%" | |
52 ALIGN="center" | |
53 VALIGN="bottom" | |
54 ></TD | |
55 ><TD | |
56 WIDTH="10%" | |
57 ALIGN="right" | |
58 VALIGN="bottom" | |
59 ><A | |
60 HREF="sdlmousebuttonevent.html" | |
61 >Next</A | |
62 ></TD | |
63 ></TR | |
64 ></TABLE | |
65 ><HR | |
66 ALIGN="LEFT" | |
67 WIDTH="100%"></DIV | |
68 ><H1 | |
69 ><A | |
70 NAME="SDLMOUSEMOTIONEVENT" | |
71 >SDL_MouseMotionEvent</A | |
72 ></H1 | |
73 ><DIV | |
74 CLASS="REFNAMEDIV" | |
75 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
76 NAME="AEN3695" |
0 | 77 ></A |
78 ><H2 | |
79 >Name</H2 | |
80 >SDL_MouseMotionEvent -- Mouse motion event structure</DIV | |
81 ><DIV | |
82 CLASS="REFSECT1" | |
83 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
84 NAME="AEN3698" |
0 | 85 ></A |
86 ><H2 | |
87 >Structure Definition</H2 | |
88 ><PRE | |
89 CLASS="PROGRAMLISTING" | |
90 >typedef struct{ | |
91 Uint8 type; | |
92 Uint8 state; | |
93 Uint16 x, y; | |
94 Sint16 xrel, yrel; | |
95 } SDL_MouseMotionEvent;</PRE | |
96 ></DIV | |
97 ><DIV | |
98 CLASS="REFSECT1" | |
99 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
100 NAME="AEN3701" |
0 | 101 ></A |
102 ><H2 | |
103 >Structure Data</H2 | |
104 ><DIV | |
105 CLASS="INFORMALTABLE" | |
106 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
107 NAME="AEN3703" |
0 | 108 ></A |
109 ><P | |
110 ></P | |
111 ><TABLE | |
112 BORDER="0" | |
113 CLASS="CALSTABLE" | |
114 ><TBODY | |
115 ><TR | |
116 ><TD | |
117 ALIGN="LEFT" | |
118 VALIGN="TOP" | |
119 ><TT | |
120 CLASS="STRUCTFIELD" | |
121 ><I | |
122 >type</I | |
123 ></TT | |
124 ></TD | |
125 ><TD | |
126 ALIGN="LEFT" | |
127 VALIGN="TOP" | |
128 ><TT | |
129 CLASS="LITERAL" | |
130 >SDL_MOUSEMOTION</TT | |
131 ></TD | |
132 ></TR | |
133 ><TR | |
134 ><TD | |
135 ALIGN="LEFT" | |
136 VALIGN="TOP" | |
137 ><TT | |
138 CLASS="STRUCTFIELD" | |
139 ><I | |
140 >state</I | |
141 ></TT | |
142 ></TD | |
143 ><TD | |
144 ALIGN="LEFT" | |
145 VALIGN="TOP" | |
146 >The current button state</TD | |
147 ></TR | |
148 ><TR | |
149 ><TD | |
150 ALIGN="LEFT" | |
151 VALIGN="TOP" | |
152 ><TT | |
153 CLASS="STRUCTFIELD" | |
154 ><I | |
155 >x</I | |
156 ></TT | |
157 >, <TT | |
158 CLASS="STRUCTFIELD" | |
159 ><I | |
160 >y</I | |
161 ></TT | |
162 ></TD | |
163 ><TD | |
164 ALIGN="LEFT" | |
165 VALIGN="TOP" | |
166 >The X/Y coordinates of the mouse</TD | |
167 ></TR | |
168 ><TR | |
169 ><TD | |
170 ALIGN="LEFT" | |
171 VALIGN="TOP" | |
172 ><TT | |
173 CLASS="STRUCTFIELD" | |
174 ><I | |
175 >xrel</I | |
176 ></TT | |
177 >, <TT | |
178 CLASS="STRUCTFIELD" | |
179 ><I | |
180 >yrel</I | |
181 ></TT | |
182 ></TD | |
183 ><TD | |
184 ALIGN="LEFT" | |
185 VALIGN="TOP" | |
186 >Relative motion in the X/Y direction</TD | |
187 ></TR | |
188 ></TBODY | |
189 ></TABLE | |
190 ><P | |
191 ></P | |
192 ></DIV | |
193 ></DIV | |
194 ><DIV | |
195 CLASS="REFSECT1" | |
196 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
197 NAME="AEN3725" |
0 | 198 ></A |
199 ><H2 | |
200 >Description</H2 | |
201 ><P | |
202 ><SPAN | |
203 CLASS="STRUCTNAME" | |
204 >SDL_MouseMotionEvent</SPAN | |
205 > is a member of the <A | |
206 HREF="sdlevent.html" | |
207 ><SPAN | |
208 CLASS="STRUCTNAME" | |
209 >SDL_Event</SPAN | |
210 ></A | |
211 > union and is used when an event of type <TT | |
212 CLASS="LITERAL" | |
213 >SDL_MOUSEMOTION</TT | |
214 > is reported.</P | |
215 ><P | |
216 >Simply put, a <TT | |
217 CLASS="LITERAL" | |
218 >SDL_MOUSEMOTION</TT | |
219 > type event occurs when a user moves the mouse within the application window or when <A | |
220 HREF="sdlwarpmouse.html" | |
221 ><TT | |
222 CLASS="FUNCTION" | |
223 >SDL_WarpMouse</TT | |
224 ></A | |
225 > is called. Both the absolute (<TT | |
226 CLASS="STRUCTFIELD" | |
227 ><I | |
228 >x</I | |
229 ></TT | |
230 > and <TT | |
231 CLASS="STRUCTFIELD" | |
232 ><I | |
233 >y</I | |
234 ></TT | |
235 >) and relative (<TT | |
236 CLASS="STRUCTFIELD" | |
237 ><I | |
238 >xrel</I | |
239 ></TT | |
240 > and <TT | |
241 CLASS="STRUCTFIELD" | |
242 ><I | |
243 >yrel</I | |
244 ></TT | |
245 >) coordinates are reported along with the current button states (<TT | |
246 CLASS="STRUCTFIELD" | |
247 ><I | |
248 >state</I | |
249 ></TT | |
250 >). The button state can be interpreted using the <TT | |
251 CLASS="LITERAL" | |
252 >SDL_BUTTON</TT | |
253 > macro (see <A | |
254 HREF="sdlgetmousestate.html" | |
255 ><TT | |
256 CLASS="FUNCTION" | |
257 >SDL_GetMouseState</TT | |
258 ></A | |
259 >).</P | |
260 ><P | |
261 >If the cursor is hidden (<A | |
262 HREF="sdlshowcursor.html" | |
263 ><TT | |
264 CLASS="FUNCTION" | |
265 >SDL_ShowCursor</TT | |
266 >(0)</A | |
267 >) and the input is grabbed (<A | |
268 HREF="sdlwmgrabinput.html" | |
269 ><TT | |
270 CLASS="FUNCTION" | |
271 >SDL_WM_GrabInput</TT | |
272 >(SDL_GRAB_ON)</A | |
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.</P | |
274 ></DIV | |
275 ><DIV | |
276 CLASS="REFSECT1" | |
277 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
278 NAME="AEN3749" |
0 | 279 ></A |
280 ><H2 | |
281 >See Also</H2 | |
282 ><P | |
283 ><A | |
284 HREF="sdlevent.html" | |
285 ><SPAN | |
286 CLASS="STRUCTNAME" | |
287 >SDL_Event</SPAN | |
288 ></A | |
289 >, | |
290 <A | |
291 HREF="sdlmousebuttonevent.html" | |
292 ><SPAN | |
293 CLASS="STRUCTNAME" | |
294 >SDL_MouseButtonEvent</SPAN | |
295 ></A | |
296 ></P | |
297 ></DIV | |
298 ><DIV | |
299 CLASS="NAVFOOTER" | |
300 ><HR | |
301 ALIGN="LEFT" | |
302 WIDTH="100%"><TABLE | |
303 WIDTH="100%" | |
304 BORDER="0" | |
305 CELLPADDING="0" | |
306 CELLSPACING="0" | |
307 ><TR | |
308 ><TD | |
309 WIDTH="33%" | |
310 ALIGN="left" | |
311 VALIGN="top" | |
312 ><A | |
313 HREF="sdlkeyboardevent.html" | |
314 >Prev</A | |
315 ></TD | |
316 ><TD | |
317 WIDTH="34%" | |
318 ALIGN="center" | |
319 VALIGN="top" | |
320 ><A | |
321 HREF="index.html" | |
322 >Home</A | |
323 ></TD | |
324 ><TD | |
325 WIDTH="33%" | |
326 ALIGN="right" | |
327 VALIGN="top" | |
328 ><A | |
329 HREF="sdlmousebuttonevent.html" | |
330 >Next</A | |
331 ></TD | |
332 ></TR | |
333 ><TR | |
334 ><TD | |
335 WIDTH="33%" | |
336 ALIGN="left" | |
337 VALIGN="top" | |
338 >SDL_KeyboardEvent</TD | |
339 ><TD | |
340 WIDTH="34%" | |
341 ALIGN="center" | |
342 VALIGN="top" | |
343 ><A | |
344 HREF="eventstructures.html" | |
345 >Up</A | |
346 ></TD | |
347 ><TD | |
348 WIDTH="33%" | |
349 ALIGN="right" | |
350 VALIGN="top" | |
351 >SDL_MouseButtonEvent</TD | |
352 ></TR | |
353 ></TABLE | |
354 ></DIV | |
355 ></BODY | |
356 ></HTML | |
357 > |