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 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] extern crate csfml_system_sys; use csfml_system_sys::*; extern "C" { pub fn sfListener_setGlobalVolume(volume: f32); } extern "C" { pub fn sfListener_getGlobalVolume() -> f32; } extern "C" { pub fn sfListener_setPosition(position: sfVector3f); } extern "C" { pub fn sfListener_getPosition() -> sfVector3f; } extern "C" { pub fn sfListener_setDirection(direction: sfVector3f); } extern "C" { pub fn sfListener_getDirection() -> sfVector3f; } extern "C" { pub fn sfListener_setUpVector(upVector: sfVector3f); } extern "C" { pub fn sfListener_getUpVector() -> sfVector3f; } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum sfSoundStatus { sfStopped = 0, sfPaused = 1, sfPlaying = 2, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sfMusic([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sfSound([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sfSoundBuffer([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sfSoundBufferRecorder([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sfSoundRecorder([u8; 0]); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sfSoundStream([u8; 0]); pub type wchar_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy)] pub struct max_align_t { pub __clang_max_align_nonce1: ::std::os::raw::c_longlong, pub __bindgen_padding_0: u64, pub __clang_max_align_nonce2: f64, } #[test] fn bindgen_test_layout_max_align_t() { assert_eq!(::std::mem::size_of::<max_align_t>() , 32usize , concat ! ( "Size of: " , stringify ! ( max_align_t ) )); assert_eq! (unsafe { & ( * ( 0 as * const max_align_t ) ) . __clang_max_align_nonce1 as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __clang_max_align_nonce1 ) )); assert_eq! (unsafe { & ( * ( 0 as * const max_align_t ) ) . __clang_max_align_nonce2 as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( max_align_t ) , "::" , stringify ! ( __clang_max_align_nonce2 ) )); } impl Clone for max_align_t { fn clone(&self) -> Self { *self } } extern "C" { pub fn sfMusic_createFromFile(filename: *const ::std::os::raw::c_schar) -> *mut sfMusic; } extern "C" { pub fn sfMusic_createFromMemory(data: *const ::std::os::raw::c_void, sizeInBytes: usize) -> *mut sfMusic; } extern "C" { pub fn sfMusic_createFromStream(stream: *mut sfInputStream) -> *mut sfMusic; } extern "C" { pub fn sfMusic_destroy(music: *mut sfMusic); } extern "C" { pub fn sfMusic_setLoop(music: *mut sfMusic, loop_: sfBool); } extern "C" { pub fn sfMusic_getLoop(music: *const sfMusic) -> sfBool; } extern "C" { pub fn sfMusic_getDuration(music: *const sfMusic) -> sfTime; } extern "C" { pub fn sfMusic_play(music: *mut sfMusic); } extern "C" { pub fn sfMusic_pause(music: *mut sfMusic); } extern "C" { pub fn sfMusic_stop(music: *mut sfMusic); } extern "C" { pub fn sfMusic_getChannelCount(music: *const sfMusic) -> ::std::os::raw::c_uint; } extern "C" { pub fn sfMusic_getSampleRate(music: *const sfMusic) -> ::std::os::raw::c_uint; } extern "C" { pub fn sfMusic_getStatus(music: *const sfMusic) -> sfSoundStatus; } extern "C" { pub fn sfMusic_getPlayingOffset(music: *const sfMusic) -> sfTime; } extern "C" { pub fn sfMusic_setPitch(music: *mut sfMusic, pitch: f32); } extern "C" { pub fn sfMusic_setVolume(music: *mut sfMusic, volume: f32); } extern "C" { pub fn sfMusic_setPosition(music: *mut sfMusic, position: sfVector3f); } extern "C" { pub fn sfMusic_setRelativeToListener(music: *mut sfMusic, relative: sfBool); } extern "C" { pub fn sfMusic_setMinDistance(music: *mut sfMusic, distance: f32); } extern "C" { pub fn sfMusic_setAttenuation(music: *mut sfMusic, attenuation: f32); } extern "C" { pub fn sfMusic_setPlayingOffset(music: *mut sfMusic, timeOffset: sfTime); } extern "C" { pub fn sfMusic_getPitch(music: *const sfMusic) -> f32; } extern "C" { pub fn sfMusic_getVolume(music: *const sfMusic) -> f32; } extern "C" { pub fn sfMusic_getPosition(music: *const sfMusic) -> sfVector3f; } extern "C" { pub fn sfMusic_isRelativeToListener(music: *const sfMusic) -> sfBool; } extern "C" { pub fn sfMusic_getMinDistance(music: *const sfMusic) -> f32; } extern "C" { pub fn sfMusic_getAttenuation(music: *const sfMusic) -> f32; } extern "C" { pub fn sfSound_create() -> *mut sfSound; } extern "C" { pub fn sfSound_copy(sound: *const sfSound) -> *mut sfSound; } extern "C" { pub fn sfSound_destroy(sound: *mut sfSound); } extern "C" { pub fn sfSound_play(sound: *mut sfSound); } extern "C" { pub fn sfSound_pause(sound: *mut sfSound); } extern "C" { pub fn sfSound_stop(sound: *mut sfSound); } extern "C" { pub fn sfSound_setBuffer(sound: *mut sfSound, buffer: *const sfSoundBuffer); } extern "C" { pub fn sfSound_getBuffer(sound: *const sfSound) -> *const sfSoundBuffer; } extern "C" { pub fn sfSound_setLoop(sound: *mut sfSound, loop_: sfBool); } extern "C" { pub fn sfSound_getLoop(sound: *const sfSound) -> sfBool; } extern "C" { pub fn sfSound_getStatus(sound: *const sfSound) -> sfSoundStatus; } extern "C" { pub fn sfSound_setPitch(sound: *mut sfSound, pitch: f32); } extern "C" { pub fn sfSound_setVolume(sound: *mut sfSound, volume: f32); } extern "C" { pub fn sfSound_setPosition(sound: *mut sfSound, position: sfVector3f); } extern "C" { pub fn sfSound_setRelativeToListener(sound: *mut sfSound, relative: sfBool); } extern "C" { pub fn sfSound_setMinDistance(sound: *mut sfSound, distance: f32); } extern "C" { pub fn sfSound_setAttenuation(sound: *mut sfSound, attenuation: f32); } extern "C" { pub fn sfSound_setPlayingOffset(sound: *mut sfSound, timeOffset: sfTime); } extern "C" { pub fn sfSound_getPitch(sound: *const sfSound) -> f32; } extern "C" { pub fn sfSound_getVolume(sound: *const sfSound) -> f32; } extern "C" { pub fn sfSound_getPosition(sound: *const sfSound) -> sfVector3f; } extern "C" { pub fn sfSound_isRelativeToListener(sound: *const sfSound) -> sfBool; } extern "C" { pub fn sfSound_getMinDistance(sound: *const sfSound) -> f32; } extern "C" { pub fn sfSound_getAttenuation(sound: *const sfSound) -> f32; } extern "C" { pub fn sfSound_getPlayingOffset(sound: *const sfSound) -> sfTime; } extern "C" { pub fn sfSoundBuffer_createFromFile(filename: *const ::std::os::raw::c_schar) -> *mut sfSoundBuffer; } extern "C" { pub fn sfSoundBuffer_createFromMemory(data: *const ::std::os::raw::c_void, sizeInBytes: usize) -> *mut sfSoundBuffer; } extern "C" { pub fn sfSoundBuffer_createFromStream(stream: *mut sfInputStream) -> *mut sfSoundBuffer; } extern "C" { pub fn sfSoundBuffer_createFromSamples(samples: *const sfInt16, sampleCount: sfUint64, channelCount: ::std::os::raw::c_uint, sampleRate: ::std::os::raw::c_uint) -> *mut sfSoundBuffer; } extern "C" { pub fn sfSoundBuffer_copy(soundBuffer: *const sfSoundBuffer) -> *mut sfSoundBuffer; } extern "C" { pub fn sfSoundBuffer_destroy(soundBuffer: *mut sfSoundBuffer); } extern "C" { pub fn sfSoundBuffer_saveToFile(soundBuffer: *const sfSoundBuffer, filename: *const ::std::os::raw::c_schar) -> sfBool; } extern "C" { pub fn sfSoundBuffer_getSamples(soundBuffer: *const sfSoundBuffer) -> *const sfInt16; } extern "C" { pub fn sfSoundBuffer_getSampleCount(soundBuffer: *const sfSoundBuffer) -> sfUint64; } extern "C" { pub fn sfSoundBuffer_getSampleRate(soundBuffer: *const sfSoundBuffer) -> ::std::os::raw::c_uint; } extern "C" { pub fn sfSoundBuffer_getChannelCount(soundBuffer: *const sfSoundBuffer) -> ::std::os::raw::c_uint; } extern "C" { pub fn sfSoundBuffer_getDuration(soundBuffer: *const sfSoundBuffer) -> sfTime; } extern "C" { pub fn sfSoundBufferRecorder_create() -> *mut sfSoundBufferRecorder; } extern "C" { pub fn sfSoundBufferRecorder_destroy(soundBufferRecorder: *mut sfSoundBufferRecorder); } extern "C" { pub fn sfSoundBufferRecorder_start(soundBufferRecorder: *mut sfSoundBufferRecorder, sampleRate: ::std::os::raw::c_uint) -> sfBool; } extern "C" { pub fn sfSoundBufferRecorder_stop(soundBufferRecorder: *mut sfSoundBufferRecorder); } extern "C" { pub fn sfSoundBufferRecorder_getSampleRate(soundBufferRecorder: *const sfSoundBufferRecorder) -> ::std::os::raw::c_uint; } extern "C" { pub fn sfSoundBufferRecorder_getBuffer(soundBufferRecorder: *const sfSoundBufferRecorder) -> *const sfSoundBuffer; } extern "C" { pub fn sfSoundBufferRecorder_setDevice(soundBufferRecorder: *mut sfSoundBufferRecorder, name: *const ::std::os::raw::c_schar) -> sfBool; } extern "C" { pub fn sfSoundBufferRecorder_getDevice(soundBufferRecorder: *mut sfSoundBufferRecorder) -> *const ::std::os::raw::c_schar; } pub type sfSoundRecorderStartCallback = ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> sfBool>; pub type sfSoundRecorderProcessCallback = ::std::option::Option<unsafe extern "C" fn(arg1: *const sfInt16, arg2: usize, arg3: *mut ::std::os::raw::c_void) -> sfBool>; pub type sfSoundRecorderStopCallback = ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>; extern "C" { pub fn sfSoundRecorder_create(onStart: sfSoundRecorderStartCallback, onProcess: sfSoundRecorderProcessCallback, onStop: sfSoundRecorderStopCallback, userData: *mut ::std::os::raw::c_void) -> *mut sfSoundRecorder; } extern "C" { pub fn sfSoundRecorder_destroy(soundRecorder: *mut sfSoundRecorder); } extern "C" { pub fn sfSoundRecorder_start(soundRecorder: *mut sfSoundRecorder, sampleRate: ::std::os::raw::c_uint) -> sfBool; } extern "C" { pub fn sfSoundRecorder_stop(soundRecorder: *mut sfSoundRecorder); } extern "C" { pub fn sfSoundRecorder_getSampleRate(soundRecorder: *const sfSoundRecorder) -> ::std::os::raw::c_uint; } extern "C" { pub fn sfSoundRecorder_isAvailable() -> sfBool; } extern "C" { pub fn sfSoundRecorder_setProcessingInterval(soundRecorder: *mut sfSoundRecorder, interval: sfTime); } extern "C" { pub fn sfSoundRecorder_getAvailableDevices(count: *mut usize) -> *mut *const ::std::os::raw::c_schar; } extern "C" { pub fn sfSoundRecorder_getDefaultDevice() -> *const ::std::os::raw::c_schar; } extern "C" { pub fn sfSoundRecorder_setDevice(soundRecorder: *mut sfSoundRecorder, name: *const ::std::os::raw::c_schar) -> sfBool; } extern "C" { pub fn sfSoundRecorder_getDevice(soundRecorder: *mut sfSoundRecorder) -> *const ::std::os::raw::c_schar; } extern "C" { pub fn sfSoundRecorder_setChannelCount(soundRecorder: *mut sfSoundRecorder, channelCount: ::std::os::raw::c_uint); } extern "C" { pub fn sfSoundRecorder_getChannelCount(soundRecorder: *const sfSoundRecorder) -> ::std::os::raw::c_uint; } #[repr(C)] #[derive(Debug, Copy)] pub struct sfSoundStreamChunk { pub samples: *mut sfInt16, pub sampleCount: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout_sfSoundStreamChunk() { assert_eq!(::std::mem::size_of::<sfSoundStreamChunk>() , 16usize , concat ! ( "Size of: " , stringify ! ( sfSoundStreamChunk ) )); assert_eq! (::std::mem::align_of::<sfSoundStreamChunk>() , 8usize , concat ! ( "Alignment of " , stringify ! ( sfSoundStreamChunk ) )); assert_eq! (unsafe { & ( * ( 0 as * const sfSoundStreamChunk ) ) . samples as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( sfSoundStreamChunk ) , "::" , stringify ! ( samples ) )); assert_eq! (unsafe { & ( * ( 0 as * const sfSoundStreamChunk ) ) . sampleCount as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( sfSoundStreamChunk ) , "::" , stringify ! ( sampleCount ) )); } impl Clone for sfSoundStreamChunk { fn clone(&self) -> Self { *self } } pub type sfSoundStreamGetDataCallback = ::std::option::Option<unsafe extern "C" fn(arg1: *mut sfSoundStreamChunk, arg2: *mut ::std::os::raw::c_void) -> sfBool>; pub type sfSoundStreamSeekCallback = ::std::option::Option<unsafe extern "C" fn(arg1: sfTime, arg2: *mut ::std::os::raw::c_void)>; extern "C" { pub fn sfSoundStream_create(onGetData: sfSoundStreamGetDataCallback, onSeek: sfSoundStreamSeekCallback, channelCount: ::std::os::raw::c_uint, sampleRate: ::std::os::raw::c_uint, userData: *mut ::std::os::raw::c_void) -> *mut sfSoundStream; } extern "C" { pub fn sfSoundStream_destroy(soundStream: *mut sfSoundStream); } extern "C" { pub fn sfSoundStream_play(soundStream: *mut sfSoundStream); } extern "C" { pub fn sfSoundStream_pause(soundStream: *mut sfSoundStream); } extern "C" { pub fn sfSoundStream_stop(soundStream: *mut sfSoundStream); } extern "C" { pub fn sfSoundStream_getStatus(soundStream: *const sfSoundStream) -> sfSoundStatus; } extern "C" { pub fn sfSoundStream_getChannelCount(soundStream: *const sfSoundStream) -> ::std::os::raw::c_uint; } extern "C" { pub fn sfSoundStream_getSampleRate(soundStream: *const sfSoundStream) -> ::std::os::raw::c_uint; } extern "C" { pub fn sfSoundStream_setPitch(soundStream: *mut sfSoundStream, pitch: f32); } extern "C" { pub fn sfSoundStream_setVolume(soundStream: *mut sfSoundStream, volume: f32); } extern "C" { pub fn sfSoundStream_setPosition(soundStream: *mut sfSoundStream, position: sfVector3f); } extern "C" { pub fn sfSoundStream_setRelativeToListener(soundStream: *mut sfSoundStream, relative: sfBool); } extern "C" { pub fn sfSoundStream_setMinDistance(soundStream: *mut sfSoundStream, distance: f32); } extern "C" { pub fn sfSoundStream_setAttenuation(soundStream: *mut sfSoundStream, attenuation: f32); } extern "C" { pub fn sfSoundStream_setPlayingOffset(soundStream: *mut sfSoundStream, timeOffset: sfTime); } extern "C" { pub fn sfSoundStream_setLoop(soundStream: *mut sfSoundStream, loop_: sfBool); } extern "C" { pub fn sfSoundStream_getPitch(soundStream: *const sfSoundStream) -> f32; } extern "C" { pub fn sfSoundStream_getVolume(soundStream: *const sfSoundStream) -> f32; } extern "C" { pub fn sfSoundStream_getPosition(soundStream: *const sfSoundStream) -> sfVector3f; } extern "C" { pub fn sfSoundStream_isRelativeToListener(soundStream: *const sfSoundStream) -> sfBool; } extern "C" { pub fn sfSoundStream_getMinDistance(soundStream: *const sfSoundStream) -> f32; } extern "C" { pub fn sfSoundStream_getAttenuation(soundStream: *const sfSoundStream) -> f32; } extern "C" { pub fn sfSoundStream_getLoop(soundStream: *const sfSoundStream) -> sfBool; } extern "C" { pub fn sfSoundStream_getPlayingOffset(soundStream: *const sfSoundStream) -> sfTime; }