vulkan_headers/
platform.rs

1/// Available if built with `android_extensions`.
2#[cfg(any(doc, feature = "android_extensions"))]
3pub mod android {
4    use crate::prelude::*;
5
6    #[repr(C)]
7    pub struct AHardwareBuffer {
8        _data: (),
9        _marker: PhantomData<(*mut u8, PhantomPinned)>,
10    }
11
12    #[repr(C)]
13    pub struct ANativeWindow {
14        _data: (),
15        _marker: PhantomData<(*mut u8, PhantomPinned)>,
16    }
17}
18
19/// Available if built with `directfb_extensions`.
20#[cfg(any(doc, feature = "directfb_extensions"))]
21pub mod directfb {
22    use crate::prelude::*;
23
24    #[repr(C)]
25    pub struct IDirectFB {
26        _data: (),
27        _marker: PhantomData<(*mut u8, PhantomPinned)>,
28    }
29
30    #[repr(C)]
31    pub struct IDirectFBSurface {
32        _data: (),
33        _marker: PhantomData<(*mut u8, PhantomPinned)>,
34    }
35}
36
37/// Available if built with `fuchsia_extensions`.
38#[cfg(any(doc, feature = "fuchsia_extensions"))]
39pub mod fuchsia {
40    use crate::prelude::*;
41
42    pub type zx_handle_t = u32;
43}
44
45/// Available if built with `ggp_extensions`.
46#[cfg(any(doc, feature = "ggp_extensions"))]
47pub mod ggp {
48    use crate::prelude::*;
49
50    pub type GgpFrameToken = u64;
51    pub type GgpStreamDescriptor = u32;
52}
53
54/// Available if built with `metal_extensions`.
55#[cfg(any(doc, feature = "metal_extensions"))]
56pub mod metal {
57    use crate::prelude::*;
58
59    #[repr(C)]
60    pub struct __IOSurface {
61        _data: (),
62        _marker: PhantomData<(*mut u8, PhantomPinned)>,
63    }
64
65    pub type CAMetalLayer = c_void;
66    pub type IOSurfaceRef = *mut __IOSurface;
67    pub type MTLBuffer_id = *mut c_void;
68    pub type MTLCommandQueue_id = *mut c_void;
69    pub type MTLDevice_id = *mut c_void;
70    pub type MTLSharedEvent_id = *mut c_void;
71    pub type MTLTexture_id = *mut c_void;
72}
73
74/// Available if built with `ohos_extensions`.
75#[cfg(any(doc, feature = "ohos_extensions"))]
76pub mod ohos {
77    use crate::prelude::*;
78
79    #[repr(C)]
80    pub struct OHBufferHandle {
81        _data: (),
82        _marker: PhantomData<(*mut u8, PhantomPinned)>,
83    }
84
85    #[repr(C)]
86    pub struct OHNativeWindow {
87        _data: (),
88        _marker: PhantomData<(*mut u8, PhantomPinned)>,
89    }
90
91    #[repr(C)]
92    pub struct OH_NativeBuffer {
93        _data: (),
94        _marker: PhantomData<(*mut u8, PhantomPinned)>,
95    }
96}
97
98/// Available if built with `screen_extensions`.
99#[cfg(any(doc, feature = "screen_extensions"))]
100pub mod screen {
101    use crate::prelude::*;
102
103    #[repr(C)]
104    pub struct _screen_buffer {
105        _data: (),
106        _marker: PhantomData<(*mut u8, PhantomPinned)>,
107    }
108
109    #[repr(C)]
110    pub struct _screen_context {
111        _data: (),
112        _marker: PhantomData<(*mut u8, PhantomPinned)>,
113    }
114
115    #[repr(C)]
116    pub struct _screen_window {
117        _data: (),
118        _marker: PhantomData<(*mut u8, PhantomPinned)>,
119    }
120}
121
122/// Available if built with `wayland_extensions`.
123#[cfg(any(doc, feature = "wayland_extensions"))]
124pub mod wayland {
125    use crate::prelude::*;
126
127    #[repr(C)]
128    pub struct wl_display {
129        _data: (),
130        _marker: PhantomData<(*mut u8, PhantomPinned)>,
131    }
132
133    #[repr(C)]
134    pub struct wl_surface {
135        _data: (),
136        _marker: PhantomData<(*mut u8, PhantomPinned)>,
137    }
138}
139
140/// Available if built with `win32_extensions`.
141#[cfg(any(doc, feature = "win32_extensions"))]
142pub mod win32 {
143    use crate::prelude::*;
144
145    #[repr(C)]
146    pub struct HINSTANCE__ {
147        _data: (),
148        _marker: PhantomData<(*mut u8, PhantomPinned)>,
149    }
150
151    #[repr(C)]
152    pub struct HMONITOR__ {
153        _data: (),
154        _marker: PhantomData<(*mut u8, PhantomPinned)>,
155    }
156
157    #[repr(C)]
158    pub struct HWND__ {
159        _data: (),
160        _marker: PhantomData<(*mut u8, PhantomPinned)>,
161    }
162
163    #[repr(C)]
164    pub struct _SECURITY_ATTRIBUTES {
165        _data: (),
166        _marker: PhantomData<(*mut u8, PhantomPinned)>,
167    }
168
169    pub type DWORD = u32;
170    pub type HANDLE = *mut c_void;
171    pub type HINSTANCE = *mut HINSTANCE__;
172    pub type HMONITOR = *mut HMONITOR__;
173    pub type HWND = *mut HWND__;
174    pub type LPCWSTR = *const u16;
175    pub type SECURITY_ATTRIBUTES = *mut _SECURITY_ATTRIBUTES;
176}
177
178/// Available if built with `xcb_extensions`.
179#[cfg(any(doc, feature = "xcb_extensions"))]
180pub mod xcb {
181    use crate::prelude::*;
182
183    #[repr(C)]
184    pub struct xcb_connection_t {
185        _data: (),
186        _marker: PhantomData<(*mut u8, PhantomPinned)>,
187    }
188
189    pub type xcb_visualid_t = u32;
190    pub type xcb_window_t = u32;
191}
192
193/// Available if built with `xlib_extensions` or `xlib_xrandr_extensions`.
194#[cfg(any(doc, feature = "xlib_extensions", feature = "xlib_xrandr_extensions"))]
195pub mod xlib {
196    use crate::prelude::*;
197
198    #[repr(C)]
199    pub struct Display {
200        _data: (),
201        _marker: PhantomData<(*mut u8, PhantomPinned)>,
202    }
203
204    pub type VisualID = c_ulong;
205    pub type Window = c_ulong;
206}
207
208/// Available if built with `xlib_xrandr_extensions`.
209#[cfg(any(doc, feature = "xlib_xrandr_extensions"))]
210pub mod xlib_xrandr {
211    use crate::prelude::*;
212
213    pub type RROutput = c_ulong;
214}