1#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)]
5
6extern crate csfml_system_sys; use csfml_system_sys::*; extern "C" {
10 pub fn sfListener_setGlobalVolume(volume: f32);
11}
12extern "C" {
13 pub fn sfListener_getGlobalVolume() -> f32;
14}
15extern "C" {
16 pub fn sfListener_setPosition(position: sfVector3f);
17}
18extern "C" {
19 pub fn sfListener_getPosition() -> sfVector3f;
20}
21extern "C" {
22 pub fn sfListener_setDirection(direction: sfVector3f);
23}
24extern "C" {
25 pub fn sfListener_getDirection() -> sfVector3f;
26}
27extern "C" {
28 pub fn sfListener_setUpVector(upVector: sfVector3f);
29}
30extern "C" {
31 pub fn sfListener_getUpVector() -> sfVector3f;
32}
33pub const sfSoundStatus_sfStopped: sfSoundStatus = 0;
34pub const sfSoundStatus_sfPaused: sfSoundStatus = 1;
35pub const sfSoundStatus_sfPlaying: sfSoundStatus = 2;
36pub type sfSoundStatus = ::std::os::raw::c_uint;
37#[repr(C)]
38#[derive(Debug, Copy, Clone)]
39pub struct sfMusic {
40 _unused: [u8; 0],
41}
42#[repr(C)]
43#[derive(Debug, Copy, Clone)]
44pub struct sfSound {
45 _unused: [u8; 0],
46}
47#[repr(C)]
48#[derive(Debug, Copy, Clone)]
49pub struct sfSoundBuffer {
50 _unused: [u8; 0],
51}
52#[repr(C)]
53#[derive(Debug, Copy, Clone)]
54pub struct sfSoundBufferRecorder {
55 _unused: [u8; 0],
56}
57#[repr(C)]
58#[derive(Debug, Copy, Clone)]
59pub struct sfSoundRecorder {
60 _unused: [u8; 0],
61}
62#[repr(C)]
63#[derive(Debug, Copy, Clone)]
64pub struct sfSoundStream {
65 _unused: [u8; 0],
66}
67pub type wchar_t = ::std::os::raw::c_int;
68#[repr(C)]
69#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
70pub struct sfTimeSpan {
71 pub offset: sfTime,
72 pub length: sfTime,
73}
74#[test]
75fn bindgen_test_layout_sfTimeSpan() {
76 assert_eq!(
77 ::std::mem::size_of::<sfTimeSpan>(),
78 16usize,
79 concat!("Size of: ", stringify!(sfTimeSpan))
80 );
81 assert_eq!(
82 ::std::mem::align_of::<sfTimeSpan>(),
83 8usize,
84 concat!("Alignment of ", stringify!(sfTimeSpan))
85 );
86 assert_eq!(
87 unsafe { &(*(::std::ptr::null::<sfTimeSpan>())).offset as *const _ as usize },
88 0usize,
89 concat!(
90 "Offset of field: ",
91 stringify!(sfTimeSpan),
92 "::",
93 stringify!(offset)
94 )
95 );
96 assert_eq!(
97 unsafe { &(*(::std::ptr::null::<sfTimeSpan>())).length as *const _ as usize },
98 8usize,
99 concat!(
100 "Offset of field: ",
101 stringify!(sfTimeSpan),
102 "::",
103 stringify!(length)
104 )
105 );
106}
107extern "C" {
108 pub fn sfMusic_createFromFile(filename: *const ::std::os::raw::c_char) -> *mut sfMusic;
109}
110extern "C" {
111 pub fn sfMusic_createFromMemory(
112 data: *const ::std::os::raw::c_void,
113 sizeInBytes: usize,
114 ) -> *mut sfMusic;
115}
116extern "C" {
117 pub fn sfMusic_createFromStream(stream: *mut sfInputStream) -> *mut sfMusic;
118}
119extern "C" {
120 pub fn sfMusic_destroy(music: *mut sfMusic);
121}
122extern "C" {
123 pub fn sfMusic_setLoop(music: *mut sfMusic, loop_: sfBool);
124}
125extern "C" {
126 pub fn sfMusic_getLoop(music: *const sfMusic) -> sfBool;
127}
128extern "C" {
129 pub fn sfMusic_getDuration(music: *const sfMusic) -> sfTime;
130}
131extern "C" {
132 pub fn sfMusic_getLoopPoints(music: *const sfMusic) -> sfTimeSpan;
133}
134extern "C" {
135 pub fn sfMusic_setLoopPoints(music: *mut sfMusic, timePoints: sfTimeSpan);
136}
137extern "C" {
138 pub fn sfMusic_play(music: *mut sfMusic);
139}
140extern "C" {
141 pub fn sfMusic_pause(music: *mut sfMusic);
142}
143extern "C" {
144 pub fn sfMusic_stop(music: *mut sfMusic);
145}
146extern "C" {
147 pub fn sfMusic_getChannelCount(music: *const sfMusic) -> ::std::os::raw::c_uint;
148}
149extern "C" {
150 pub fn sfMusic_getSampleRate(music: *const sfMusic) -> ::std::os::raw::c_uint;
151}
152extern "C" {
153 pub fn sfMusic_getStatus(music: *const sfMusic) -> sfSoundStatus;
154}
155extern "C" {
156 pub fn sfMusic_getPlayingOffset(music: *const sfMusic) -> sfTime;
157}
158extern "C" {
159 pub fn sfMusic_setPitch(music: *mut sfMusic, pitch: f32);
160}
161extern "C" {
162 pub fn sfMusic_setVolume(music: *mut sfMusic, volume: f32);
163}
164extern "C" {
165 pub fn sfMusic_setPosition(music: *mut sfMusic, position: sfVector3f);
166}
167extern "C" {
168 pub fn sfMusic_setRelativeToListener(music: *mut sfMusic, relative: sfBool);
169}
170extern "C" {
171 pub fn sfMusic_setMinDistance(music: *mut sfMusic, distance: f32);
172}
173extern "C" {
174 pub fn sfMusic_setAttenuation(music: *mut sfMusic, attenuation: f32);
175}
176extern "C" {
177 pub fn sfMusic_setPlayingOffset(music: *mut sfMusic, timeOffset: sfTime);
178}
179extern "C" {
180 pub fn sfMusic_getPitch(music: *const sfMusic) -> f32;
181}
182extern "C" {
183 pub fn sfMusic_getVolume(music: *const sfMusic) -> f32;
184}
185extern "C" {
186 pub fn sfMusic_getPosition(music: *const sfMusic) -> sfVector3f;
187}
188extern "C" {
189 pub fn sfMusic_isRelativeToListener(music: *const sfMusic) -> sfBool;
190}
191extern "C" {
192 pub fn sfMusic_getMinDistance(music: *const sfMusic) -> f32;
193}
194extern "C" {
195 pub fn sfMusic_getAttenuation(music: *const sfMusic) -> f32;
196}
197extern "C" {
198 pub fn sfSound_create() -> *mut sfSound;
199}
200extern "C" {
201 pub fn sfSound_copy(sound: *const sfSound) -> *mut sfSound;
202}
203extern "C" {
204 pub fn sfSound_destroy(sound: *mut sfSound);
205}
206extern "C" {
207 pub fn sfSound_play(sound: *mut sfSound);
208}
209extern "C" {
210 pub fn sfSound_pause(sound: *mut sfSound);
211}
212extern "C" {
213 pub fn sfSound_stop(sound: *mut sfSound);
214}
215extern "C" {
216 pub fn sfSound_setBuffer(sound: *mut sfSound, buffer: *const sfSoundBuffer);
217}
218extern "C" {
219 pub fn sfSound_getBuffer(sound: *const sfSound) -> *const sfSoundBuffer;
220}
221extern "C" {
222 pub fn sfSound_setLoop(sound: *mut sfSound, loop_: sfBool);
223}
224extern "C" {
225 pub fn sfSound_getLoop(sound: *const sfSound) -> sfBool;
226}
227extern "C" {
228 pub fn sfSound_getStatus(sound: *const sfSound) -> sfSoundStatus;
229}
230extern "C" {
231 pub fn sfSound_setPitch(sound: *mut sfSound, pitch: f32);
232}
233extern "C" {
234 pub fn sfSound_setVolume(sound: *mut sfSound, volume: f32);
235}
236extern "C" {
237 pub fn sfSound_setPosition(sound: *mut sfSound, position: sfVector3f);
238}
239extern "C" {
240 pub fn sfSound_setRelativeToListener(sound: *mut sfSound, relative: sfBool);
241}
242extern "C" {
243 pub fn sfSound_setMinDistance(sound: *mut sfSound, distance: f32);
244}
245extern "C" {
246 pub fn sfSound_setAttenuation(sound: *mut sfSound, attenuation: f32);
247}
248extern "C" {
249 pub fn sfSound_setPlayingOffset(sound: *mut sfSound, timeOffset: sfTime);
250}
251extern "C" {
252 pub fn sfSound_getPitch(sound: *const sfSound) -> f32;
253}
254extern "C" {
255 pub fn sfSound_getVolume(sound: *const sfSound) -> f32;
256}
257extern "C" {
258 pub fn sfSound_getPosition(sound: *const sfSound) -> sfVector3f;
259}
260extern "C" {
261 pub fn sfSound_isRelativeToListener(sound: *const sfSound) -> sfBool;
262}
263extern "C" {
264 pub fn sfSound_getMinDistance(sound: *const sfSound) -> f32;
265}
266extern "C" {
267 pub fn sfSound_getAttenuation(sound: *const sfSound) -> f32;
268}
269extern "C" {
270 pub fn sfSound_getPlayingOffset(sound: *const sfSound) -> sfTime;
271}
272extern "C" {
273 pub fn sfSoundBuffer_createFromFile(
274 filename: *const ::std::os::raw::c_char,
275 ) -> *mut sfSoundBuffer;
276}
277extern "C" {
278 pub fn sfSoundBuffer_createFromMemory(
279 data: *const ::std::os::raw::c_void,
280 sizeInBytes: usize,
281 ) -> *mut sfSoundBuffer;
282}
283extern "C" {
284 pub fn sfSoundBuffer_createFromStream(stream: *mut sfInputStream) -> *mut sfSoundBuffer;
285}
286extern "C" {
287 pub fn sfSoundBuffer_createFromSamples(
288 samples: *const sfInt16,
289 sampleCount: sfUint64,
290 channelCount: ::std::os::raw::c_uint,
291 sampleRate: ::std::os::raw::c_uint,
292 ) -> *mut sfSoundBuffer;
293}
294extern "C" {
295 pub fn sfSoundBuffer_copy(soundBuffer: *const sfSoundBuffer) -> *mut sfSoundBuffer;
296}
297extern "C" {
298 pub fn sfSoundBuffer_destroy(soundBuffer: *mut sfSoundBuffer);
299}
300extern "C" {
301 pub fn sfSoundBuffer_saveToFile(
302 soundBuffer: *const sfSoundBuffer,
303 filename: *const ::std::os::raw::c_char,
304 ) -> sfBool;
305}
306extern "C" {
307 pub fn sfSoundBuffer_getSamples(soundBuffer: *const sfSoundBuffer) -> *const sfInt16;
308}
309extern "C" {
310 pub fn sfSoundBuffer_getSampleCount(soundBuffer: *const sfSoundBuffer) -> sfUint64;
311}
312extern "C" {
313 pub fn sfSoundBuffer_getSampleRate(soundBuffer: *const sfSoundBuffer)
314 -> ::std::os::raw::c_uint;
315}
316extern "C" {
317 pub fn sfSoundBuffer_getChannelCount(
318 soundBuffer: *const sfSoundBuffer,
319 ) -> ::std::os::raw::c_uint;
320}
321extern "C" {
322 pub fn sfSoundBuffer_getDuration(soundBuffer: *const sfSoundBuffer) -> sfTime;
323}
324extern "C" {
325 pub fn sfSoundBufferRecorder_create() -> *mut sfSoundBufferRecorder;
326}
327extern "C" {
328 pub fn sfSoundBufferRecorder_destroy(soundBufferRecorder: *mut sfSoundBufferRecorder);
329}
330extern "C" {
331 pub fn sfSoundBufferRecorder_start(
332 soundBufferRecorder: *mut sfSoundBufferRecorder,
333 sampleRate: ::std::os::raw::c_uint,
334 ) -> sfBool;
335}
336extern "C" {
337 pub fn sfSoundBufferRecorder_stop(soundBufferRecorder: *mut sfSoundBufferRecorder);
338}
339extern "C" {
340 pub fn sfSoundBufferRecorder_getSampleRate(
341 soundBufferRecorder: *const sfSoundBufferRecorder,
342 ) -> ::std::os::raw::c_uint;
343}
344extern "C" {
345 pub fn sfSoundBufferRecorder_getBuffer(
346 soundBufferRecorder: *const sfSoundBufferRecorder,
347 ) -> *const sfSoundBuffer;
348}
349extern "C" {
350 pub fn sfSoundBufferRecorder_setDevice(
351 soundBufferRecorder: *mut sfSoundBufferRecorder,
352 name: *const ::std::os::raw::c_char,
353 ) -> sfBool;
354}
355extern "C" {
356 pub fn sfSoundBufferRecorder_getDevice(
357 soundBufferRecorder: *mut sfSoundBufferRecorder,
358 ) -> *const ::std::os::raw::c_char;
359}
360pub type sfSoundRecorderStartCallback =
361 ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> sfBool>;
362pub type sfSoundRecorderProcessCallback = ::std::option::Option<
363 unsafe extern "C" fn(
364 arg1: *const sfInt16,
365 arg2: usize,
366 arg3: *mut ::std::os::raw::c_void,
367 ) -> sfBool,
368>;
369pub type sfSoundRecorderStopCallback =
370 ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>;
371extern "C" {
372 pub fn sfSoundRecorder_create(
373 onStart: sfSoundRecorderStartCallback,
374 onProcess: sfSoundRecorderProcessCallback,
375 onStop: sfSoundRecorderStopCallback,
376 userData: *mut ::std::os::raw::c_void,
377 ) -> *mut sfSoundRecorder;
378}
379extern "C" {
380 pub fn sfSoundRecorder_destroy(soundRecorder: *mut sfSoundRecorder);
381}
382extern "C" {
383 pub fn sfSoundRecorder_start(
384 soundRecorder: *mut sfSoundRecorder,
385 sampleRate: ::std::os::raw::c_uint,
386 ) -> sfBool;
387}
388extern "C" {
389 pub fn sfSoundRecorder_stop(soundRecorder: *mut sfSoundRecorder);
390}
391extern "C" {
392 pub fn sfSoundRecorder_getSampleRate(
393 soundRecorder: *const sfSoundRecorder,
394 ) -> ::std::os::raw::c_uint;
395}
396extern "C" {
397 pub fn sfSoundRecorder_isAvailable() -> sfBool;
398}
399extern "C" {
400 pub fn sfSoundRecorder_setProcessingInterval(
401 soundRecorder: *mut sfSoundRecorder,
402 interval: sfTime,
403 );
404}
405extern "C" {
406 pub fn sfSoundRecorder_getAvailableDevices(
407 count: *mut usize,
408 ) -> *mut *const ::std::os::raw::c_char;
409}
410extern "C" {
411 pub fn sfSoundRecorder_getDefaultDevice() -> *const ::std::os::raw::c_char;
412}
413extern "C" {
414 pub fn sfSoundRecorder_setDevice(
415 soundRecorder: *mut sfSoundRecorder,
416 name: *const ::std::os::raw::c_char,
417 ) -> sfBool;
418}
419extern "C" {
420 pub fn sfSoundRecorder_getDevice(
421 soundRecorder: *mut sfSoundRecorder,
422 ) -> *const ::std::os::raw::c_char;
423}
424extern "C" {
425 pub fn sfSoundRecorder_setChannelCount(
426 soundRecorder: *mut sfSoundRecorder,
427 channelCount: ::std::os::raw::c_uint,
428 );
429}
430extern "C" {
431 pub fn sfSoundRecorder_getChannelCount(
432 soundRecorder: *const sfSoundRecorder,
433 ) -> ::std::os::raw::c_uint;
434}
435#[repr(C)]
436#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
437pub struct sfSoundStreamChunk {
438 pub samples: *mut sfInt16,
439 pub sampleCount: ::std::os::raw::c_uint,
440}
441#[test]
442fn bindgen_test_layout_sfSoundStreamChunk() {
443 assert_eq!(
444 ::std::mem::size_of::<sfSoundStreamChunk>(),
445 16usize,
446 concat!("Size of: ", stringify!(sfSoundStreamChunk))
447 );
448 assert_eq!(
449 ::std::mem::align_of::<sfSoundStreamChunk>(),
450 8usize,
451 concat!("Alignment of ", stringify!(sfSoundStreamChunk))
452 );
453 assert_eq!(
454 unsafe { &(*(::std::ptr::null::<sfSoundStreamChunk>())).samples as *const _ as usize },
455 0usize,
456 concat!(
457 "Offset of field: ",
458 stringify!(sfSoundStreamChunk),
459 "::",
460 stringify!(samples)
461 )
462 );
463 assert_eq!(
464 unsafe { &(*(::std::ptr::null::<sfSoundStreamChunk>())).sampleCount as *const _ as usize },
465 8usize,
466 concat!(
467 "Offset of field: ",
468 stringify!(sfSoundStreamChunk),
469 "::",
470 stringify!(sampleCount)
471 )
472 );
473}
474pub type sfSoundStreamGetDataCallback = ::std::option::Option<
475 unsafe extern "C" fn(
476 arg1: *mut sfSoundStreamChunk,
477 arg2: *mut ::std::os::raw::c_void,
478 ) -> sfBool,
479>;
480pub type sfSoundStreamSeekCallback =
481 ::std::option::Option<unsafe extern "C" fn(arg1: sfTime, arg2: *mut ::std::os::raw::c_void)>;
482extern "C" {
483 pub fn sfSoundStream_create(
484 onGetData: sfSoundStreamGetDataCallback,
485 onSeek: sfSoundStreamSeekCallback,
486 channelCount: ::std::os::raw::c_uint,
487 sampleRate: ::std::os::raw::c_uint,
488 userData: *mut ::std::os::raw::c_void,
489 ) -> *mut sfSoundStream;
490}
491extern "C" {
492 pub fn sfSoundStream_destroy(soundStream: *mut sfSoundStream);
493}
494extern "C" {
495 pub fn sfSoundStream_play(soundStream: *mut sfSoundStream);
496}
497extern "C" {
498 pub fn sfSoundStream_pause(soundStream: *mut sfSoundStream);
499}
500extern "C" {
501 pub fn sfSoundStream_stop(soundStream: *mut sfSoundStream);
502}
503extern "C" {
504 pub fn sfSoundStream_getStatus(soundStream: *const sfSoundStream) -> sfSoundStatus;
505}
506extern "C" {
507 pub fn sfSoundStream_getChannelCount(
508 soundStream: *const sfSoundStream,
509 ) -> ::std::os::raw::c_uint;
510}
511extern "C" {
512 pub fn sfSoundStream_getSampleRate(soundStream: *const sfSoundStream)
513 -> ::std::os::raw::c_uint;
514}
515extern "C" {
516 pub fn sfSoundStream_setPitch(soundStream: *mut sfSoundStream, pitch: f32);
517}
518extern "C" {
519 pub fn sfSoundStream_setVolume(soundStream: *mut sfSoundStream, volume: f32);
520}
521extern "C" {
522 pub fn sfSoundStream_setPosition(soundStream: *mut sfSoundStream, position: sfVector3f);
523}
524extern "C" {
525 pub fn sfSoundStream_setRelativeToListener(soundStream: *mut sfSoundStream, relative: sfBool);
526}
527extern "C" {
528 pub fn sfSoundStream_setMinDistance(soundStream: *mut sfSoundStream, distance: f32);
529}
530extern "C" {
531 pub fn sfSoundStream_setAttenuation(soundStream: *mut sfSoundStream, attenuation: f32);
532}
533extern "C" {
534 pub fn sfSoundStream_setPlayingOffset(soundStream: *mut sfSoundStream, timeOffset: sfTime);
535}
536extern "C" {
537 pub fn sfSoundStream_setLoop(soundStream: *mut sfSoundStream, loop_: sfBool);
538}
539extern "C" {
540 pub fn sfSoundStream_getPitch(soundStream: *const sfSoundStream) -> f32;
541}
542extern "C" {
543 pub fn sfSoundStream_getVolume(soundStream: *const sfSoundStream) -> f32;
544}
545extern "C" {
546 pub fn sfSoundStream_getPosition(soundStream: *const sfSoundStream) -> sfVector3f;
547}
548extern "C" {
549 pub fn sfSoundStream_isRelativeToListener(soundStream: *const sfSoundStream) -> sfBool;
550}
551extern "C" {
552 pub fn sfSoundStream_getMinDistance(soundStream: *const sfSoundStream) -> f32;
553}
554extern "C" {
555 pub fn sfSoundStream_getAttenuation(soundStream: *const sfSoundStream) -> f32;
556}
557extern "C" {
558 pub fn sfSoundStream_getLoop(soundStream: *const sfSoundStream) -> sfBool;
559}
560extern "C" {
561 pub fn sfSoundStream_getPlayingOffset(soundStream: *const sfSoundStream) -> sfTime;
562}