5131
clevermous
1
2
>
3
>
4
>SDL_MouseButtonEvent
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_MouseMotionEvent"
17
HREF="sdlmousemotionevent.html">
18
REL="NEXT"
19
TITLE="SDL_JoyAxisEvent"
20
HREF="sdljoyaxisevent.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="sdlmousemotionevent.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="sdljoyaxisevent.html"
61
>Next
62
>
63
>
64
>
65
>
66
ALIGN="LEFT"
67
WIDTH="100%">
68
>
69
>
70
NAME="SDLMOUSEBUTTONEVENT"
71
>SDL_MouseButtonEvent
72
>
73
>
74
CLASS="REFNAMEDIV"
75
>
76
NAME="AEN3711"
77
>
78
>
79
>Name
80
>SDL_MouseButtonEvent -- Mouse button event structure
81
>
82
CLASS="REFSECT1"
83
>
84
NAME="AEN3714"
85
>
86
>
87
>Structure Definition
88
>
89
CLASS="PROGRAMLISTING"
90
>typedef struct{
91
Uint8 type;
92
Uint8 button;
93
Uint8 state;
94
Uint16 x, y;
95
} SDL_MouseButtonEvent;
96
>
97
>
98
CLASS="REFSECT1"
99
>
100
NAME="AEN3717"
101
>
102
>
103
>Structure Data
104
>
105
CLASS="INFORMALTABLE"
106
>
107
NAME="AEN3719"
108
>
109
>
110
>
111
>
194
>
195
>
196
>
197
>
198
>
199
CLASS="REFSECT1"
200
>
201
NAME="AEN3743"
202
>
203
>
204
>Description
205
>
206
>
207
CLASS="STRUCTNAME"
208
>SDL_MouseButtonEvent
209
> is a member of the
210
HREF="sdlevent.html"
211
>
212
CLASS="STRUCTNAME"
213
>SDL_Event
214
>
215
> union and is used when an event of type
216
CLASS="LITERAL"
217
>SDL_MOUSEBUTTONDOWN
218
> or
219
CLASS="LITERAL"
220
>SDL_MOUSEBUTTONUP
221
> is reported.
222
>
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
224
CLASS="STRUCTFIELD"
225
>
226
>button
227
>
228
>, the position of the mouse when this event occured is stored in the
229
CLASS="STRUCTFIELD"
230
>
231
>x
232
>
233
> and the
234
CLASS="STRUCTFIELD"
235
>
236
>y
237
>
238
> fields. Like
239
HREF="sdlkeyboardevent.html"
240
>
241
CLASS="STRUCTNAME"
242
>SDL_KeyboardEvent
243
>
244
>, information on whether the event was a press or a release event is stored in both the
245
CLASS="STRUCTFIELD"
246
>
247
>type
248
>
249
> and
250
CLASS="STRUCTFIELD"
251
>
252
>state
253
>
254
> fields, but this should be obvious.
255
>
256
>
257
CLASS="REFSECT1"
258
>
259
NAME="AEN3759"
260
>
261
>
262
>See Also
263
>
264
>
265
HREF="sdlevent.html"
266
>
267
CLASS="STRUCTNAME"
268
>SDL_Event
269
>
270
>,
271
272
HREF="sdlmousemotionevent.html"
273
>
274
CLASS="STRUCTNAME"
275
>SDL_MouseMotionEvent
276
>
277
>
278
>
279
>
280
CLASS="NAVFOOTER"
281
>
282
ALIGN="LEFT"
283
WIDTH="100%">
335
>
336
>
337
>
338
>