@@ -81,229 +81,229 @@ pub mod ll {
81
81
pub static SDL_LASTEVENT : SDL_EventType = 65535 ;
82
82
83
83
pub struct SDL_CommonEvent {
84
- _type : uint32_t ,
85
- timestamp : uint32_t ,
84
+ pub _type : uint32_t ,
85
+ pub timestamp : uint32_t ,
86
86
}
87
87
88
88
pub struct SDL_WindowEvent {
89
- _type : uint32_t ,
90
- timestamp : uint32_t ,
91
- windowID : uint32_t ,
92
- event : uint8_t ,
93
- padding1 : uint8_t ,
94
- padding2 : uint8_t ,
95
- padding3 : uint8_t ,
96
- data1 : int32_t ,
97
- data2 : int32_t ,
89
+ pub _type : uint32_t ,
90
+ pub timestamp : uint32_t ,
91
+ pub windowID : uint32_t ,
92
+ pub event : uint8_t ,
93
+ pub padding1 : uint8_t ,
94
+ pub padding2 : uint8_t ,
95
+ pub padding3 : uint8_t ,
96
+ pub data1 : int32_t ,
97
+ pub data2 : int32_t ,
98
98
}
99
99
100
100
pub struct SDL_KeyboardEvent {
101
- _type : uint32_t ,
102
- timestamp : uint32_t ,
103
- windowID : uint32_t ,
104
- state : uint8_t ,
105
- repeat : uint8_t ,
106
- padding2 : uint8_t ,
107
- padding3 : uint8_t ,
108
- keysym : SDL_Keysym ,
101
+ pub _type : uint32_t ,
102
+ pub timestamp : uint32_t ,
103
+ pub windowID : uint32_t ,
104
+ pub state : uint8_t ,
105
+ pub repeat : uint8_t ,
106
+ pub padding2 : uint8_t ,
107
+ pub padding3 : uint8_t ,
108
+ pub keysym : SDL_Keysym ,
109
109
}
110
110
111
111
pub struct SDL_TextEditingEvent {
112
- _type : uint32_t ,
113
- timestamp : uint32_t ,
114
- windowID : uint32_t ,
115
- text : [ c_schar , ..32 u] ,
116
- start : int32_t ,
117
- length : int32_t ,
112
+ pub _type : uint32_t ,
113
+ pub timestamp : uint32_t ,
114
+ pub windowID : uint32_t ,
115
+ pub text : [ c_schar , ..32 u] ,
116
+ pub start : int32_t ,
117
+ pub length : int32_t ,
118
118
}
119
119
120
120
pub struct SDL_TextInputEvent {
121
- _type : uint32_t ,
122
- timestamp : uint32_t ,
123
- windowID : uint32_t ,
124
- text : [ c_schar , ..32 u] ,
121
+ pub _type : uint32_t ,
122
+ pub timestamp : uint32_t ,
123
+ pub windowID : uint32_t ,
124
+ pub text : [ c_schar , ..32 u] ,
125
125
}
126
126
127
127
pub struct SDL_MouseMotionEvent {
128
- _type : uint32_t ,
129
- timestamp : uint32_t ,
130
- windowID : uint32_t ,
131
- which : uint32_t ,
132
- state : uint32_t ,
133
- x : int32_t ,
134
- y : int32_t ,
135
- xrel : int32_t ,
136
- yrel : int32_t ,
128
+ pub _type : uint32_t ,
129
+ pub timestamp : uint32_t ,
130
+ pub windowID : uint32_t ,
131
+ pub which : uint32_t ,
132
+ pub state : uint32_t ,
133
+ pub x : int32_t ,
134
+ pub y : int32_t ,
135
+ pub xrel : int32_t ,
136
+ pub yrel : int32_t ,
137
137
}
138
138
139
139
pub struct SDL_MouseButtonEvent {
140
- _type : uint32_t ,
141
- timestamp : uint32_t ,
142
- windowID : uint32_t ,
143
- which : uint32_t ,
144
- button : uint8_t ,
145
- state : uint8_t ,
146
- padding1 : uint8_t ,
147
- padding2 : uint8_t ,
148
- x : int32_t ,
149
- y : int32_t ,
140
+ pub _type : uint32_t ,
141
+ pub timestamp : uint32_t ,
142
+ pub windowID : uint32_t ,
143
+ pub which : uint32_t ,
144
+ pub button : uint8_t ,
145
+ pub state : uint8_t ,
146
+ pub padding1 : uint8_t ,
147
+ pub padding2 : uint8_t ,
148
+ pub x : int32_t ,
149
+ pub y : int32_t ,
150
150
}
151
151
152
152
pub struct SDL_MouseWheelEvent {
153
- _type : uint32_t ,
154
- timestamp : uint32_t ,
155
- windowID : uint32_t ,
156
- which : uint32_t ,
157
- x : int32_t ,
158
- y : int32_t ,
153
+ pub _type : uint32_t ,
154
+ pub timestamp : uint32_t ,
155
+ pub windowID : uint32_t ,
156
+ pub which : uint32_t ,
157
+ pub x : int32_t ,
158
+ pub y : int32_t ,
159
159
}
160
160
161
161
pub struct SDL_JoyAxisEvent {
162
- _type : uint32_t ,
163
- timestamp : uint32_t ,
164
- which : int32_t ,
165
- axis : uint8_t ,
166
- padding1 : uint8_t ,
167
- padding2 : uint8_t ,
168
- padding3 : uint8_t ,
169
- value : int16_t ,
170
- padding4 : uint16_t ,
162
+ pub _type : uint32_t ,
163
+ pub timestamp : uint32_t ,
164
+ pub which : int32_t ,
165
+ pub axis : uint8_t ,
166
+ pub padding1 : uint8_t ,
167
+ pub padding2 : uint8_t ,
168
+ pub padding3 : uint8_t ,
169
+ pub value : int16_t ,
170
+ pub padding4 : uint16_t ,
171
171
}
172
172
173
173
pub struct SDL_JoyBallEvent {
174
- _type : uint32_t ,
175
- timestamp : uint32_t ,
176
- which : int32_t ,
177
- ball : uint8_t ,
178
- padding1 : uint8_t ,
179
- padding2 : uint8_t ,
180
- padding3 : uint8_t ,
181
- xrel : int16_t ,
182
- yrel : int16_t ,
174
+ pub _type : uint32_t ,
175
+ pub timestamp : uint32_t ,
176
+ pub which : int32_t ,
177
+ pub ball : uint8_t ,
178
+ pub padding1 : uint8_t ,
179
+ pub padding2 : uint8_t ,
180
+ pub padding3 : uint8_t ,
181
+ pub xrel : int16_t ,
182
+ pub yrel : int16_t ,
183
183
}
184
184
185
185
pub struct SDL_JoyHatEvent {
186
- _type : uint32_t ,
187
- timestamp : uint32_t ,
188
- which : int32_t ,
189
- hat : uint8_t ,
190
- value : uint8_t ,
191
- padding1 : uint8_t ,
192
- padding2 : uint8_t ,
186
+ pub _type : uint32_t ,
187
+ pub timestamp : uint32_t ,
188
+ pub which : int32_t ,
189
+ pub hat : uint8_t ,
190
+ pub value : uint8_t ,
191
+ pub padding1 : uint8_t ,
192
+ pub padding2 : uint8_t ,
193
193
}
194
194
195
195
pub struct SDL_JoyButtonEvent {
196
- _type : uint32_t ,
197
- timestamp : uint32_t ,
198
- which : int32_t ,
199
- button : uint8_t ,
200
- state : uint8_t ,
201
- padding1 : uint8_t ,
202
- padding2 : uint8_t ,
196
+ pub _type : uint32_t ,
197
+ pub timestamp : uint32_t ,
198
+ pub which : int32_t ,
199
+ pub button : uint8_t ,
200
+ pub state : uint8_t ,
201
+ pub padding1 : uint8_t ,
202
+ pub padding2 : uint8_t ,
203
203
}
204
204
205
205
pub struct SDL_JoyDeviceEvent {
206
- _type : uint32_t ,
207
- timestamp : uint32_t ,
208
- which : int32_t ,
206
+ pub _type : uint32_t ,
207
+ pub timestamp : uint32_t ,
208
+ pub which : int32_t ,
209
209
}
210
210
211
211
pub struct SDL_ControllerAxisEvent {
212
- _type : uint32_t ,
213
- timestamp : uint32_t ,
214
- which : int32_t ,
215
- axis : uint8_t ,
216
- padding1 : uint8_t ,
217
- padding2 : uint8_t ,
218
- padding3 : uint8_t ,
219
- value : int16_t ,
220
- padding4 : uint16_t ,
212
+ pub _type : uint32_t ,
213
+ pub timestamp : uint32_t ,
214
+ pub which : int32_t ,
215
+ pub axis : uint8_t ,
216
+ pub padding1 : uint8_t ,
217
+ pub padding2 : uint8_t ,
218
+ pub padding3 : uint8_t ,
219
+ pub value : int16_t ,
220
+ pub padding4 : uint16_t ,
221
221
}
222
222
223
223
pub struct SDL_ControllerButtonEvent {
224
- _type : uint32_t ,
225
- timestamp : uint32_t ,
226
- which : int32_t ,
227
- button : uint8_t ,
228
- state : uint8_t ,
229
- padding1 : uint8_t ,
230
- padding2 : uint8_t ,
224
+ pub _type : uint32_t ,
225
+ pub timestamp : uint32_t ,
226
+ pub which : int32_t ,
227
+ pub button : uint8_t ,
228
+ pub state : uint8_t ,
229
+ pub padding1 : uint8_t ,
230
+ pub padding2 : uint8_t ,
231
231
}
232
232
233
233
pub struct SDL_ControllerDeviceEvent {
234
- _type : uint32_t ,
235
- timestamp : uint32_t ,
236
- which : int32_t ,
234
+ pub _type : uint32_t ,
235
+ pub timestamp : uint32_t ,
236
+ pub which : int32_t ,
237
237
}
238
238
239
239
pub struct SDL_TouchFingerEvent {
240
- _type : uint32_t ,
241
- timestamp : uint32_t ,
242
- touchId : SDL_TouchID ,
243
- fingerId : SDL_FingerID ,
244
- x : c_float ,
245
- y : c_float ,
246
- dx : c_float ,
247
- dy : c_float ,
248
- pressure : c_float ,
240
+ pub _type : uint32_t ,
241
+ pub timestamp : uint32_t ,
242
+ pub touchId : SDL_TouchID ,
243
+ pub fingerId : SDL_FingerID ,
244
+ pub x : c_float ,
245
+ pub y : c_float ,
246
+ pub dx : c_float ,
247
+ pub dy : c_float ,
248
+ pub pressure : c_float ,
249
249
}
250
250
251
251
pub struct SDL_MultiGestureEvent {
252
- _type : uint32_t ,
253
- timestamp : uint32_t ,
254
- touchId : SDL_TouchID ,
255
- dTheta : c_float ,
256
- dDist : c_float ,
257
- x : c_float ,
258
- y : c_float ,
259
- numFingers : uint16_t ,
260
- padding : uint16_t ,
252
+ pub _type : uint32_t ,
253
+ pub timestamp : uint32_t ,
254
+ pub touchId : SDL_TouchID ,
255
+ pub dTheta : c_float ,
256
+ pub dDist : c_float ,
257
+ pub x : c_float ,
258
+ pub y : c_float ,
259
+ pub numFingers : uint16_t ,
260
+ pub padding : uint16_t ,
261
261
}
262
262
263
263
pub struct SDL_DollarGestureEvent {
264
- _type : uint32_t ,
265
- timestamp : uint32_t ,
266
- touchId : SDL_TouchID ,
267
- gestureId : SDL_GestureID ,
268
- numFingers : uint32_t ,
269
- error : c_float ,
270
- x : c_float ,
271
- y : c_float ,
264
+ pub _type : uint32_t ,
265
+ pub timestamp : uint32_t ,
266
+ pub touchId : SDL_TouchID ,
267
+ pub gestureId : SDL_GestureID ,
268
+ pub numFingers : uint32_t ,
269
+ pub error : c_float ,
270
+ pub x : c_float ,
271
+ pub y : c_float ,
272
272
}
273
273
274
274
pub struct SDL_DropEvent {
275
- _type : uint32_t ,
276
- timestamp : uint32_t ,
277
- file : * c_schar ,
275
+ pub _type : uint32_t ,
276
+ pub timestamp : uint32_t ,
277
+ pub file : * c_schar ,
278
278
}
279
279
280
280
pub struct SDL_QuitEvent {
281
- _type : uint32_t ,
282
- timestamp : uint32_t ,
281
+ pub _type : uint32_t ,
282
+ pub timestamp : uint32_t ,
283
283
}
284
284
285
285
pub struct SDL_OSEvent {
286
- _type : uint32_t ,
287
- timestamp : uint32_t ,
286
+ pub _type : uint32_t ,
287
+ pub timestamp : uint32_t ,
288
288
}
289
289
290
290
pub struct SDL_UserEvent {
291
- _type : uint32_t ,
292
- timestamp : uint32_t ,
293
- windowID : uint32_t ,
294
- code : int32_t ,
295
- data1 : * c_void ,
296
- data2 : * c_void ,
291
+ pub _type : uint32_t ,
292
+ pub timestamp : uint32_t ,
293
+ pub windowID : uint32_t ,
294
+ pub code : int32_t ,
295
+ pub data1 : * c_void ,
296
+ pub data2 : * c_void ,
297
297
}
298
298
299
299
pub struct SDL_SysWMEvent {
300
- _type : uint32_t ,
301
- timestamp : uint32_t ,
302
- msg : * SDL_SysWMmsg ,
300
+ pub _type : uint32_t ,
301
+ pub timestamp : uint32_t ,
302
+ pub msg : * SDL_SysWMmsg ,
303
303
}
304
304
305
305
pub struct SDL_Event {
306
- data : [ uint8_t , ..56 u] ,
306
+ pub data : [ uint8_t , ..56 u] ,
307
307
}
308
308
309
309
impl SDL_Event {
0 commit comments