objc2_io_surface/io_surface.rs
1use core::cell::UnsafeCell;
2use core::marker::{PhantomData, PhantomPinned};
3
4/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/iosurfaceref?language=objc)
5#[repr(C)]
6pub struct IOSurfaceRef {
7 inner: [u8; 0],
8 _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
9}
10
11#[cfg(feature = "objc2-core-foundation")]
12objc2_core_foundation::cf_type!(
13 unsafe impl IOSurfaceRef {}
14);
15
16#[cfg(feature = "objc2")]
17objc2::cf_objc2_type!(
18 unsafe impl RefEncode<"__IOSurface"> for IOSurfaceRef {}
19);