//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/iosurfaceid?language=objc)
pub type IOSurfaceID = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/iosurfacelockoptions?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct IOSurfaceLockOptions(pub u32);
bitflags::bitflags! {
    impl IOSurfaceLockOptions: u32 {
        #[doc(alias = "kIOSurfaceLockReadOnly")]
        const ReadOnly = 0x00000001;
        #[doc(alias = "kIOSurfaceLockAvoidSync")]
        const AvoidSync = 0x00000002;
    }
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOSurfaceLockOptions {
    const ENCODING: Encoding = u32::ENCODING;
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for IOSurfaceLockOptions {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/iosurfacepurgeabilitystate?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct IOSurfacePurgeabilityState(pub u32);
bitflags::bitflags! {
    impl IOSurfacePurgeabilityState: u32 {
        #[doc(alias = "kIOSurfacePurgeableNonVolatile")]
        const PurgeableNonVolatile = 0;
        #[doc(alias = "kIOSurfacePurgeableVolatile")]
        const PurgeableVolatile = 1;
        #[doc(alias = "kIOSurfacePurgeableEmpty")]
        const PurgeableEmpty = 2;
        #[doc(alias = "kIOSurfacePurgeableKeepCurrent")]
        const PurgeableKeepCurrent = 3;
    }
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOSurfacePurgeabilityState {
    const ENCODING: Encoding = u32::ENCODING;
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for IOSurfacePurgeabilityState {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacedefaultcache?language=objc)
pub const kIOSurfaceDefaultCache: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfaceinhibitcache?language=objc)
pub const kIOSurfaceInhibitCache: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacewritethrucache?language=objc)
pub const kIOSurfaceWriteThruCache: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacecopybackcache?language=objc)
pub const kIOSurfaceCopybackCache: c_uint = 3;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacewritecombinecache?language=objc)
pub const kIOSurfaceWriteCombineCache: c_uint = 4;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacecopybackinnercache?language=objc)
pub const kIOSurfaceCopybackInnerCache: c_uint = 5;

/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacemapcacheshift?language=objc)
pub const kIOSurfaceMapCacheShift: c_uint = 8;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacemapdefaultcache?language=objc)
pub const kIOSurfaceMapDefaultCache: c_uint = kIOSurfaceDefaultCache << kIOSurfaceMapCacheShift;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacemapinhibitcache?language=objc)
pub const kIOSurfaceMapInhibitCache: c_uint = kIOSurfaceInhibitCache << kIOSurfaceMapCacheShift;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacemapwritethrucache?language=objc)
pub const kIOSurfaceMapWriteThruCache: c_uint = kIOSurfaceWriteThruCache << kIOSurfaceMapCacheShift;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacemapcopybackcache?language=objc)
pub const kIOSurfaceMapCopybackCache: c_uint = kIOSurfaceCopybackCache << kIOSurfaceMapCacheShift;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacemapwritecombinecache?language=objc)
pub const kIOSurfaceMapWriteCombineCache: c_uint =
    kIOSurfaceWriteCombineCache << kIOSurfaceMapCacheShift;
/// [Apple's documentation](https://developer.apple.com/documentation/iosurface/kiosurfacemapcopybackinnercache?language=objc)
pub const kIOSurfaceMapCopybackInnerCache: c_uint =
    kIOSurfaceCopybackInnerCache << kIOSurfaceMapCacheShift;
