@@ -86,11 +86,13 @@ pub mod ll {
86
86
pub const SDL_USEREVENT : SDL_EventType = 32768 ;
87
87
pub const SDL_LASTEVENT : SDL_EventType = 65535 ;
88
88
89
+ #[ repr( C ) ]
89
90
pub struct SDL_CommonEvent {
90
91
pub _type : uint32_t ,
91
92
pub timestamp : uint32_t ,
92
93
}
93
94
95
+ #[ repr( C ) ]
94
96
pub struct SDL_WindowEvent {
95
97
pub _type : uint32_t ,
96
98
pub timestamp : uint32_t ,
@@ -103,6 +105,7 @@ pub mod ll {
103
105
pub data2 : int32_t ,
104
106
}
105
107
108
+ #[ repr( C ) ]
106
109
pub struct SDL_KeyboardEvent {
107
110
pub _type : uint32_t ,
108
111
pub timestamp : uint32_t ,
@@ -114,6 +117,7 @@ pub mod ll {
114
117
pub keysym : SDL_Keysym ,
115
118
}
116
119
120
+ #[ repr( C ) ]
117
121
pub struct SDL_TextEditingEvent {
118
122
pub _type : uint32_t ,
119
123
pub timestamp : uint32_t ,
@@ -123,13 +127,15 @@ pub mod ll {
123
127
pub length : int32_t ,
124
128
}
125
129
130
+ #[ repr( C ) ]
126
131
pub struct SDL_TextInputEvent {
127
132
pub _type : uint32_t ,
128
133
pub timestamp : uint32_t ,
129
134
pub windowID : uint32_t ,
130
135
pub text : [ c_char , ..32 u] ,
131
136
}
132
137
138
+ #[ repr( C ) ]
133
139
pub struct SDL_MouseMotionEvent {
134
140
pub _type : uint32_t ,
135
141
pub timestamp : uint32_t ,
@@ -142,6 +148,7 @@ pub mod ll {
142
148
pub yrel : int32_t ,
143
149
}
144
150
151
+ #[ repr( C ) ]
145
152
pub struct SDL_MouseButtonEvent {
146
153
pub _type : uint32_t ,
147
154
pub timestamp : uint32_t ,
@@ -155,6 +162,7 @@ pub mod ll {
155
162
pub y : int32_t ,
156
163
}
157
164
165
+ #[ repr( C ) ]
158
166
pub struct SDL_MouseWheelEvent {
159
167
pub _type : uint32_t ,
160
168
pub timestamp : uint32_t ,
@@ -164,6 +172,7 @@ pub mod ll {
164
172
pub y : int32_t ,
165
173
}
166
174
175
+ #[ repr( C ) ]
167
176
pub struct SDL_JoyAxisEvent {
168
177
pub _type : uint32_t ,
169
178
pub timestamp : uint32_t ,
@@ -176,6 +185,7 @@ pub mod ll {
176
185
pub padding4 : uint16_t ,
177
186
}
178
187
188
+ #[ repr( C ) ]
179
189
pub struct SDL_JoyBallEvent {
180
190
pub _type : uint32_t ,
181
191
pub timestamp : uint32_t ,
@@ -188,6 +198,7 @@ pub mod ll {
188
198
pub yrel : int16_t ,
189
199
}
190
200
201
+ #[ repr( C ) ]
191
202
pub struct SDL_JoyHatEvent {
192
203
pub _type : uint32_t ,
193
204
pub timestamp : uint32_t ,
@@ -198,6 +209,7 @@ pub mod ll {
198
209
pub padding2 : uint8_t ,
199
210
}
200
211
212
+ #[ repr( C ) ]
201
213
pub struct SDL_JoyButtonEvent {
202
214
pub _type : uint32_t ,
203
215
pub timestamp : uint32_t ,
@@ -208,12 +220,14 @@ pub mod ll {
208
220
pub padding2 : uint8_t ,
209
221
}
210
222
223
+ #[ repr( C ) ]
211
224
pub struct SDL_JoyDeviceEvent {
212
225
pub _type : uint32_t ,
213
226
pub timestamp : uint32_t ,
214
227
pub which : int32_t ,
215
228
}
216
229
230
+ #[ repr( C ) ]
217
231
pub struct SDL_ControllerAxisEvent {
218
232
pub _type : uint32_t ,
219
233
pub timestamp : uint32_t ,
@@ -226,6 +240,7 @@ pub mod ll {
226
240
pub padding4 : uint16_t ,
227
241
}
228
242
243
+ #[ repr( C ) ]
229
244
pub struct SDL_ControllerButtonEvent {
230
245
pub _type : uint32_t ,
231
246
pub timestamp : uint32_t ,
@@ -236,12 +251,14 @@ pub mod ll {
236
251
pub padding2 : uint8_t ,
237
252
}
238
253
254
+ #[ repr( C ) ]
239
255
pub struct SDL_ControllerDeviceEvent {
240
256
pub _type : uint32_t ,
241
257
pub timestamp : uint32_t ,
242
258
pub which : int32_t ,
243
259
}
244
260
261
+ #[ repr( C ) ]
245
262
pub struct SDL_TouchFingerEvent {
246
263
pub _type : uint32_t ,
247
264
pub timestamp : uint32_t ,
@@ -254,6 +271,7 @@ pub mod ll {
254
271
pub pressure : c_float ,
255
272
}
256
273
274
+ #[ repr( C ) ]
257
275
pub struct SDL_MultiGestureEvent {
258
276
pub _type : uint32_t ,
259
277
pub timestamp : uint32_t ,
@@ -266,6 +284,7 @@ pub mod ll {
266
284
pub padding : uint16_t ,
267
285
}
268
286
287
+ #[ repr( C ) ]
269
288
pub struct SDL_DollarGestureEvent {
270
289
pub _type : uint32_t ,
271
290
pub timestamp : uint32_t ,
@@ -277,22 +296,26 @@ pub mod ll {
277
296
pub y : c_float ,
278
297
}
279
298
299
+ #[ repr( C ) ]
280
300
pub struct SDL_DropEvent {
281
301
pub _type : uint32_t ,
282
302
pub timestamp : uint32_t ,
283
303
pub file : * const c_char ,
284
304
}
285
305
306
+ #[ repr( C ) ]
286
307
pub struct SDL_QuitEvent {
287
308
pub _type : uint32_t ,
288
309
pub timestamp : uint32_t ,
289
310
}
290
311
312
+ #[ repr( C ) ]
291
313
pub struct SDL_OSEvent {
292
314
pub _type : uint32_t ,
293
315
pub timestamp : uint32_t ,
294
316
}
295
317
318
+ #[ repr( C ) ]
296
319
pub struct SDL_UserEvent {
297
320
pub _type : uint32_t ,
298
321
pub timestamp : uint32_t ,
@@ -302,6 +325,7 @@ pub mod ll {
302
325
pub data2 : * const c_void ,
303
326
}
304
327
328
+ #[ repr( C ) ]
305
329
pub struct SDL_SysWMEvent {
306
330
pub _type : uint32_t ,
307
331
pub timestamp : uint32_t ,
@@ -852,7 +876,7 @@ impl Event {
852
876
event. x as int , event. y as int )
853
877
}
854
878
MouseWheelEventType => {
855
- let event = * raw. button ( ) ;
879
+ let event = * raw. wheel ( ) ;
856
880
857
881
let window = video:: Window :: from_id ( event. windowID ) ;
858
882
let window = match window {
0 commit comments