sfml/
ffi.rs

1#![allow(non_camel_case_types)]
2
3macro_rules! decl_opaque {
4    ($($(#[$attr:meta])* $v:vis $name:ident;)+) => {
5        $(
6            $(#[$attr])*
7            #[repr(C)]
8            #[allow(missing_copy_implementations)]
9            $v struct $name {
10                _opaque: [u8; 0],
11            }
12            impl ::std::fmt::Debug for $name {
13                fn fmt(&self, f: &mut ::std::fmt::Formatter) -> std::fmt::Result {
14                    write!(f, concat!(stringify!($name), "(<opaque> @ {:p})"), self)
15                }
16            }
17        )+
18    };
19}
20
21#[cfg(feature = "audio")]
22pub(crate) mod audio;
23#[cfg(feature = "graphics")]
24pub(crate) mod graphics;
25pub(crate) mod system;
26#[cfg(any(feature = "window", feature = "graphics"))]
27pub(crate) mod window;
28
29use {
30    crate::system::{Vector2, Vector3},
31    std::{
32        ffi::c_void,
33        os::raw::{c_char, c_int, c_uint},
34    },
35};
36
37pub type sfVector3f = Vector3<f32>;
38pub type sfVector2i = Vector2<c_int>;
39pub type sfVector2u = Vector2<c_uint>;
40pub type sfVector2f = Vector2<f32>;