-
Notifications
You must be signed in to change notification settings - Fork 88
/
ffi.rs
41 lines (37 loc) · 915 Bytes
/
ffi.rs
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
#![allow(non_camel_case_types)]
macro_rules! decl_opaque {
($($(#[$attr:meta])* $name:ident;)+) => {
$(
$(#[$attr])*
#[repr(C)]
#[derive(Debug)]
#[allow(missing_copy_implementations)]
pub struct $name {
_opaque: [u8; 0],
}
)+
};
}
#[cfg(feature = "audio")]
pub(crate) mod audio;
#[cfg(feature = "graphics")]
pub(crate) mod graphics;
pub(crate) mod system;
#[cfg(any(feature = "window", feature = "graphics"))]
pub(crate) mod window;
use {
crate::{
sf_box::Dispose,
system::{Vector2, Vector3},
},
std::{
ffi::c_void,
fmt::Display,
os::raw::{c_char, c_int, c_uint},
str::Utf8Error,
},
};
pub type sfVector3f = Vector3<f32>;
pub type sfVector2i = Vector2<c_int>;
pub type sfVector2u = Vector2<c_uint>;
pub type sfVector2f = Vector2<f32>;