Mercurial > sdl-ios-xcode
comparison docs/html/sdlmousebuttonevent.html @ 0:74212992fb08
Initial revision
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Thu, 26 Apr 2001 16:45:43 +0000 |
parents | |
children | 55f1f1b3e27d |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:74212992fb08 |
---|---|
1 <HTML | |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_MouseButtonEvent</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.61 | |
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_MouseMotionEvent" | |
17 HREF="sdlmousemotionevent.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_JoyAxisEvent" | |
20 HREF="sdljoyaxisevent.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="sdlmousemotionevent.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="sdljoyaxisevent.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="SDLMOUSEBUTTONEVENT" | |
71 >SDL_MouseButtonEvent</A | |
72 ></H1 | |
73 ><DIV | |
74 CLASS="REFNAMEDIV" | |
75 ><A | |
76 NAME="AEN3636" | |
77 ></A | |
78 ><H2 | |
79 >Name</H2 | |
80 >SDL_MouseButtonEvent -- Mouse button event structure</DIV | |
81 ><DIV | |
82 CLASS="REFSECT1" | |
83 ><A | |
84 NAME="AEN3639" | |
85 ></A | |
86 ><H2 | |
87 >Structure Definition</H2 | |
88 ><PRE | |
89 CLASS="PROGRAMLISTING" | |
90 >typedef struct{ | |
91 Uint8 type; | |
92 Uint8 button; | |
93 Uint8 state; | |
94 Uint16 x, y; | |
95 } SDL_MouseButtonEvent;</PRE | |
96 ></DIV | |
97 ><DIV | |
98 CLASS="REFSECT1" | |
99 ><A | |
100 NAME="AEN3642" | |
101 ></A | |
102 ><H2 | |
103 >Structure Data</H2 | |
104 ><DIV | |
105 CLASS="INFORMALTABLE" | |
106 ><A | |
107 NAME="AEN3644" | |
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_MOUSEBUTTONDOWN</TT | |
131 > or <TT | |
132 CLASS="LITERAL" | |
133 >SDL_MOUSEBUTTONUP</TT | |
134 ></TD | |
135 ></TR | |
136 ><TR | |
137 ><TD | |
138 ALIGN="LEFT" | |
139 VALIGN="TOP" | |
140 ><TT | |
141 CLASS="STRUCTFIELD" | |
142 ><I | |
143 >button</I | |
144 ></TT | |
145 ></TD | |
146 ><TD | |
147 ALIGN="LEFT" | |
148 VALIGN="TOP" | |
149 >The mouse button index (SDL_BUTTON_LEFT, SDL_BUTTON_MIDDLE, SDL_BUTTON_RIGHT)</TD | |
150 ></TR | |
151 ><TR | |
152 ><TD | |
153 ALIGN="LEFT" | |
154 VALIGN="TOP" | |
155 ><TT | |
156 CLASS="STRUCTFIELD" | |
157 ><I | |
158 >state</I | |
159 ></TT | |
160 ></TD | |
161 ><TD | |
162 ALIGN="LEFT" | |
163 VALIGN="TOP" | |
164 ><TT | |
165 CLASS="LITERAL" | |
166 >SDL_PRESSED</TT | |
167 > or <TT | |
168 CLASS="LITERAL" | |
169 >SDL_RELEASED</TT | |
170 ></TD | |
171 ></TR | |
172 ><TR | |
173 ><TD | |
174 ALIGN="LEFT" | |
175 VALIGN="TOP" | |
176 ><TT | |
177 CLASS="STRUCTFIELD" | |
178 ><I | |
179 >x</I | |
180 ></TT | |
181 >, <TT | |
182 CLASS="STRUCTFIELD" | |
183 ><I | |
184 >y</I | |
185 ></TT | |
186 ></TD | |
187 ><TD | |
188 ALIGN="LEFT" | |
189 VALIGN="TOP" | |
190 >The X/Y coordinates of the mouse at press/release time</TD | |
191 ></TR | |
192 ></TBODY | |
193 ></TABLE | |
194 ><P | |
195 ></P | |
196 ></DIV | |
197 ></DIV | |
198 ><DIV | |
199 CLASS="REFSECT1" | |
200 ><A | |
201 NAME="AEN3668" | |
202 ></A | |
203 ><H2 | |
204 >Description</H2 | |
205 ><P | |
206 ><SPAN | |
207 CLASS="STRUCTNAME" | |
208 >SDL_MouseButtonEvent</SPAN | |
209 > is a member of the <A | |
210 HREF="sdlevent.html" | |
211 ><SPAN | |
212 CLASS="STRUCTNAME" | |
213 >SDL_Event</SPAN | |
214 ></A | |
215 > union and is used when an event of type <TT | |
216 CLASS="LITERAL" | |
217 >SDL_MOUSEBUTTONDOWN</TT | |
218 > or <TT | |
219 CLASS="LITERAL" | |
220 >SDL_MOUSEBUTTONUP</TT | |
221 > is reported.</P | |
222 ><P | |
223 >When a mouse button press or release is detected then number of the button pressed (from 1 to 255, with 1 usually being the left button and 2 the right) is placed into <TT | |
224 CLASS="STRUCTFIELD" | |
225 ><I | |
226 >button</I | |
227 ></TT | |
228 >, the position of the mouse when this event occured is stored in the <TT | |
229 CLASS="STRUCTFIELD" | |
230 ><I | |
231 >x</I | |
232 ></TT | |
233 > and the <TT | |
234 CLASS="STRUCTFIELD" | |
235 ><I | |
236 >y</I | |
237 ></TT | |
238 > fields. Like <A | |
239 HREF="sdlkeyboardevent.html" | |
240 ><SPAN | |
241 CLASS="STRUCTNAME" | |
242 >SDL_KeyboardEvent</SPAN | |
243 ></A | |
244 >, information on whether the event was a press or a release event is stored in both the <TT | |
245 CLASS="STRUCTFIELD" | |
246 ><I | |
247 >type</I | |
248 ></TT | |
249 > and <TT | |
250 CLASS="STRUCTFIELD" | |
251 ><I | |
252 >state</I | |
253 ></TT | |
254 > fields, but this should be obvious.</P | |
255 ></DIV | |
256 ><DIV | |
257 CLASS="REFSECT1" | |
258 ><A | |
259 NAME="AEN3684" | |
260 ></A | |
261 ><H2 | |
262 >See Also</H2 | |
263 ><P | |
264 ><A | |
265 HREF="sdlevent.html" | |
266 ><SPAN | |
267 CLASS="STRUCTNAME" | |
268 >SDL_Event</SPAN | |
269 ></A | |
270 >, | |
271 <A | |
272 HREF="sdlmousemotionevent.html" | |
273 ><SPAN | |
274 CLASS="STRUCTNAME" | |
275 >SDL_MouseMotionEvent</SPAN | |
276 ></A | |
277 ></P | |
278 ></DIV | |
279 ><DIV | |
280 CLASS="NAVFOOTER" | |
281 ><HR | |
282 ALIGN="LEFT" | |
283 WIDTH="100%"><TABLE | |
284 WIDTH="100%" | |
285 BORDER="0" | |
286 CELLPADDING="0" | |
287 CELLSPACING="0" | |
288 ><TR | |
289 ><TD | |
290 WIDTH="33%" | |
291 ALIGN="left" | |
292 VALIGN="top" | |
293 ><A | |
294 HREF="sdlmousemotionevent.html" | |
295 >Prev</A | |
296 ></TD | |
297 ><TD | |
298 WIDTH="34%" | |
299 ALIGN="center" | |
300 VALIGN="top" | |
301 ><A | |
302 HREF="index.html" | |
303 >Home</A | |
304 ></TD | |
305 ><TD | |
306 WIDTH="33%" | |
307 ALIGN="right" | |
308 VALIGN="top" | |
309 ><A | |
310 HREF="sdljoyaxisevent.html" | |
311 >Next</A | |
312 ></TD | |
313 ></TR | |
314 ><TR | |
315 ><TD | |
316 WIDTH="33%" | |
317 ALIGN="left" | |
318 VALIGN="top" | |
319 >SDL_MouseMotionEvent</TD | |
320 ><TD | |
321 WIDTH="34%" | |
322 ALIGN="center" | |
323 VALIGN="top" | |
324 ><A | |
325 HREF="eventstructures.html" | |
326 >Up</A | |
327 ></TD | |
328 ><TD | |
329 WIDTH="33%" | |
330 ALIGN="right" | |
331 VALIGN="top" | |
332 >SDL_JoyAxisEvent</TD | |
333 ></TR | |
334 ></TABLE | |
335 ></DIV | |
336 ></BODY | |
337 ></HTML | |
338 > |