1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
/* automatically generated by rust-bindgen */

#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] // added manually

pub const CSFML_VERSION_MAJOR: ::std::os::raw::c_uint = 2;
pub const CSFML_VERSION_MINOR: ::std::os::raw::c_uint = 4;
pub const CSFML_VERSION_PATCH: ::std::os::raw::c_uint = 0;
pub const sfFalse: ::std::os::raw::c_int = 0; // edited manually
pub const sfTrue: ::std::os::raw::c_int = 1; // edited manually
pub type sfBool = ::std::os::raw::c_int;
pub type sfInt8 = ::std::os::raw::c_schar;
pub type sfUint8 = ::std::os::raw::c_uchar;
pub type sfInt16 = ::std::os::raw::c_short;
pub type sfUint16 = ::std::os::raw::c_ushort;
pub type sfInt32 = ::std::os::raw::c_int;
pub type sfUint32 = ::std::os::raw::c_uint;
pub type sfInt64 = ::std::os::raw::c_longlong;
pub type sfUint64 = ::std::os::raw::c_ulonglong;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct sfTime {
    pub microseconds: sfInt64,
}
#[test]
fn bindgen_test_layout_sfTime() {
    assert_eq!(::std::mem::size_of::<sfTime>() , 8usize , concat ! (
               "Size of: " , stringify ! ( sfTime ) ));
    assert_eq! (::std::mem::align_of::<sfTime>() , 8usize , concat ! (
                "Alignment of " , stringify ! ( sfTime ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfTime ) ) . microseconds as * const _ as
                usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( sfTime ) , "::" ,
                stringify ! ( microseconds ) ));
}
impl Clone for sfTime {
    fn clone(&self) -> Self { *self }
}
extern "C" {
    #[link_name = "sfTime_Zero"]
    pub static mut sfTime_Zero: sfTime;
}
extern "C" {
    pub fn sfTime_asSeconds(time: sfTime) -> f32;
}
extern "C" {
    pub fn sfTime_asMilliseconds(time: sfTime) -> sfInt32;
}
extern "C" {
    pub fn sfTime_asMicroseconds(time: sfTime) -> sfInt64;
}
extern "C" {
    pub fn sfSeconds(amount: f32) -> sfTime;
}
extern "C" {
    pub fn sfMilliseconds(amount: sfInt32) -> sfTime;
}
extern "C" {
    pub fn sfMicroseconds(amount: sfInt64) -> sfTime;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sfClock {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sfMutex {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sfThread {
    _unused: [u8; 0],
}
extern "C" {
    pub fn sfClock_create() -> *mut sfClock;
}
extern "C" {
    pub fn sfClock_copy(clock: *const sfClock) -> *mut sfClock;
}
extern "C" {
    pub fn sfClock_destroy(clock: *mut sfClock);
}
extern "C" {
    pub fn sfClock_getElapsedTime(clock: *const sfClock) -> sfTime;
}
extern "C" {
    pub fn sfClock_restart(clock: *mut sfClock) -> sfTime;
}
pub type sfInputStreamReadFunc =
    ::std::option::Option<unsafe extern "C" fn(data:
                                                   *mut ::std::os::raw::c_void,
                                               size: sfInt64,
                                               userData:
                                                   *mut ::std::os::raw::c_void)
                              -> sfInt64>;
pub type sfInputStreamSeekFunc =
    ::std::option::Option<unsafe extern "C" fn(position: sfInt64,
                                               userData:
                                                   *mut ::std::os::raw::c_void)
                              -> sfInt64>;
pub type sfInputStreamTellFunc =
    ::std::option::Option<unsafe extern "C" fn(userData:
                                                   *mut ::std::os::raw::c_void)
                              -> sfInt64>;
pub type sfInputStreamGetSizeFunc =
    ::std::option::Option<unsafe extern "C" fn(userData:
                                                   *mut ::std::os::raw::c_void)
                              -> sfInt64>;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct sfInputStream {
    pub read: sfInputStreamReadFunc,
    pub seek: sfInputStreamSeekFunc,
    pub tell: sfInputStreamTellFunc,
    pub getSize: sfInputStreamGetSizeFunc,
    pub userData: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_sfInputStream() {
    assert_eq!(::std::mem::size_of::<sfInputStream>() , 40usize , concat ! (
               "Size of: " , stringify ! ( sfInputStream ) ));
    assert_eq! (::std::mem::align_of::<sfInputStream>() , 8usize , concat ! (
                "Alignment of " , stringify ! ( sfInputStream ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfInputStream ) ) . read as * const _ as
                usize } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( sfInputStream ) , "::"
                , stringify ! ( read ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfInputStream ) ) . seek as * const _ as
                usize } , 8usize , concat ! (
                "Alignment of field: " , stringify ! ( sfInputStream ) , "::"
                , stringify ! ( seek ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfInputStream ) ) . tell as * const _ as
                usize } , 16usize , concat ! (
                "Alignment of field: " , stringify ! ( sfInputStream ) , "::"
                , stringify ! ( tell ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfInputStream ) ) . getSize as * const _
                as usize } , 24usize , concat ! (
                "Alignment of field: " , stringify ! ( sfInputStream ) , "::"
                , stringify ! ( getSize ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfInputStream ) ) . userData as * const _
                as usize } , 32usize , concat ! (
                "Alignment of field: " , stringify ! ( sfInputStream ) , "::"
                , stringify ! ( userData ) ));
}
impl Clone for sfInputStream {
    fn clone(&self) -> Self { *self }
}
extern "C" {
    pub fn sfMutex_create() -> *mut sfMutex;
}
extern "C" {
    pub fn sfMutex_destroy(mutex: *mut sfMutex);
}
extern "C" {
    pub fn sfMutex_lock(mutex: *mut sfMutex);
}
extern "C" {
    pub fn sfMutex_unlock(mutex: *mut sfMutex);
}
extern "C" {
    pub fn sfSleep(duration: sfTime);
}
extern "C" {
    pub fn sfThread_create(function:
                               ::std::option::Option<unsafe extern "C" fn(arg1:
                                                                              *mut ::std::os::raw::c_void)>,
                           userData: *mut ::std::os::raw::c_void)
     -> *mut sfThread;
}
extern "C" {
    pub fn sfThread_destroy(thread: *mut sfThread);
}
extern "C" {
    pub fn sfThread_launch(thread: *mut sfThread);
}
extern "C" {
    pub fn sfThread_wait(thread: *mut sfThread);
}
extern "C" {
    pub fn sfThread_terminate(thread: *mut sfThread);
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct sfVector2i {
    pub x: ::std::os::raw::c_int,
    pub y: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_sfVector2i() {
    assert_eq!(::std::mem::size_of::<sfVector2i>() , 8usize , concat ! (
               "Size of: " , stringify ! ( sfVector2i ) ));
    assert_eq! (::std::mem::align_of::<sfVector2i>() , 4usize , concat ! (
                "Alignment of " , stringify ! ( sfVector2i ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfVector2i ) ) . x as * const _ as usize
                } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( sfVector2i ) , "::" ,
                stringify ! ( x ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfVector2i ) ) . y as * const _ as usize
                } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( sfVector2i ) , "::" ,
                stringify ! ( y ) ));
}
impl Clone for sfVector2i {
    fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct sfVector2u {
    pub x: ::std::os::raw::c_uint,
    pub y: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_sfVector2u() {
    assert_eq!(::std::mem::size_of::<sfVector2u>() , 8usize , concat ! (
               "Size of: " , stringify ! ( sfVector2u ) ));
    assert_eq! (::std::mem::align_of::<sfVector2u>() , 4usize , concat ! (
                "Alignment of " , stringify ! ( sfVector2u ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfVector2u ) ) . x as * const _ as usize
                } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( sfVector2u ) , "::" ,
                stringify ! ( x ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfVector2u ) ) . y as * const _ as usize
                } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( sfVector2u ) , "::" ,
                stringify ! ( y ) ));
}
impl Clone for sfVector2u {
    fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct sfVector2f {
    pub x: f32,
    pub y: f32,
}
#[test]
fn bindgen_test_layout_sfVector2f() {
    assert_eq!(::std::mem::size_of::<sfVector2f>() , 8usize , concat ! (
               "Size of: " , stringify ! ( sfVector2f ) ));
    assert_eq! (::std::mem::align_of::<sfVector2f>() , 4usize , concat ! (
                "Alignment of " , stringify ! ( sfVector2f ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfVector2f ) ) . x as * const _ as usize
                } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( sfVector2f ) , "::" ,
                stringify ! ( x ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfVector2f ) ) . y as * const _ as usize
                } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( sfVector2f ) , "::" ,
                stringify ! ( y ) ));
}
impl Clone for sfVector2f {
    fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct sfVector3f {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}
#[test]
fn bindgen_test_layout_sfVector3f() {
    assert_eq!(::std::mem::size_of::<sfVector3f>() , 12usize , concat ! (
               "Size of: " , stringify ! ( sfVector3f ) ));
    assert_eq! (::std::mem::align_of::<sfVector3f>() , 4usize , concat ! (
                "Alignment of " , stringify ! ( sfVector3f ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfVector3f ) ) . x as * const _ as usize
                } , 0usize , concat ! (
                "Alignment of field: " , stringify ! ( sfVector3f ) , "::" ,
                stringify ! ( x ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfVector3f ) ) . y as * const _ as usize
                } , 4usize , concat ! (
                "Alignment of field: " , stringify ! ( sfVector3f ) , "::" ,
                stringify ! ( y ) ));
    assert_eq! (unsafe {
                & ( * ( 0 as * const sfVector3f ) ) . z as * const _ as usize
                } , 8usize , concat ! (
                "Alignment of field: " , stringify ! ( sfVector3f ) , "::" ,
                stringify ! ( z ) ));
}
impl Clone for sfVector3f {
    fn clone(&self) -> Self { *self }
}