//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::cell::UnsafeCell;
use core::ffi::*;
use core::marker::{PhantomData, PhantomPinned};
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
use objc2_core_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioacceleratorclassname?language=objc)
pub const kIOAcceleratorClassName: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOAccelerator\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kcurrentgraphicsinterfaceversion?language=objc)
pub const kCurrentGraphicsInterfaceVersion: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kcurrentgraphicsinterfacerevision?language=objc)
pub const kCurrentGraphicsInterfaceRevision: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioacceltypeskey?language=objc)
pub const kIOAccelTypesKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOAccelTypes\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioaccelindexkey?language=objc)
pub const kIOAccelIndexKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOAccelIndex\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioaccelrevisionkey?language=objc)
pub const kIOAccelRevisionKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOAccelRevision\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io1bitindexedpixels?language=objc)
pub const IO1BitIndexedPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"P\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io2bitindexedpixels?language=objc)
pub const IO2BitIndexedPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"PP\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io4bitindexedpixels?language=objc)
pub const IO4BitIndexedPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"PPPP\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io8bitindexedpixels?language=objc)
pub const IO8BitIndexedPixels: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"PPPPPPPP\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io16bitdirectpixels?language=objc)
pub const IO16BitDirectPixels: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"-RRRRRGGGGGBBBBB\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io32bitdirectpixels?language=objc)
pub const IO32BitDirectPixels: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"--------RRRRRRRRGGGGGGGGBBBBBBBB\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio30bitdirectpixels?language=objc)
pub const kIO30BitDirectPixels: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"--RRRRRRRRRRGGGGGGGGGGBBBBBBBBBB\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio64bitdirectpixels?language=objc)
pub const kIO64BitDirectPixels: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"-16R16G16B16\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16bitfloatpixels?language=objc)
pub const kIO16BitFloatPixels: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"-16FR16FG16FB16\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32bitfloatpixels?language=objc)
pub const kIO32BitFloatPixels: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"-32FR32FG32FB32\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioyuv422pixels?language=objc)
pub const IOYUV422Pixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Y4U2V2\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io8bitoverlaypixels?language=objc)
pub const IO8BitOverlayPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"O8\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iopagedpixels?language=objc)
pub const IOPagedPixels: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Page1\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io_sampletypealpha?language=objc)
pub const IO_SampleTypeAlpha: c_uint = b'A' as _;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/io_sampletypeskip?language=objc)
pub const IO_SampleTypeSkip: c_uint = b'-' as _;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsetgammasyncnotspecified?language=objc)
pub const kIOFBSetGammaSyncNotSpecified: c_int = -1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsetgammasyncnosync?language=objc)
pub const kIOFBSetGammaSyncNoSync: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsetgammasyncverticalblanksync?language=objc)
pub const kIOFBSetGammaSyncVerticalBlankSync: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayattributeskey?language=objc)
pub const kIODisplayAttributesKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayAttributes\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaysupportsunderscankey?language=objc)
pub const kIODisplaySupportsUnderscanKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplaySupportsUnderscan\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaysupportsbasicaudiokey?language=objc)
pub const kIODisplaySupportsBasicAudioKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplaySupportsBasicAudio\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaysupportsycbcr444key?language=objc)
pub const kIODisplaySupportsYCbCr444Key: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplaySupportsYCbCr444\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaysupportsycbcr422key?language=objc)
pub const kIODisplaySupportsYCbCr422Key: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplaySupportsYCbCr422\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayselectedcolormodekey?language=objc)
pub const kIODisplaySelectedColorModeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"cmod\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioframebufferinfokey?language=objc)
pub const kIOFramebufferInfoKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFramebufferInformation\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbwidthkey?language=objc)
pub const kIOFBWidthKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBWidth\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbheightkey?language=objc)
pub const kIOFBHeightKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBHeight\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbrefreshratekey?language=objc)
pub const kIOFBRefreshRateKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBRefreshRate\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbflagskey?language=objc)
pub const kIOFBFlagsKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBFlags\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbytesperrowkey?language=objc)
pub const kIOFBBytesPerRowKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBBytesPerRow\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbytesperplanekey?language=objc)
pub const kIOFBBytesPerPlaneKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBBytesPerPlane\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitsperpixelkey?language=objc)
pub const kIOFBBitsPerPixelKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBBitsPerPixel\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcomponentcountkey?language=objc)
pub const kIOFBComponentCountKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBComponentCount\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitspercomponentkey?language=objc)
pub const kIOFBBitsPerComponentKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBBitsPerComponent\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdetailedtimingskey?language=objc)
pub const kIOFBDetailedTimingsKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBDetailedTimings\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbtimingrangekey?language=objc)
pub const kIOFBTimingRangeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBTimingRange\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbscalerinfokey?language=objc)
pub const kIOFBScalerInfoKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBScalerInfo\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcursorinfokey?language=objc)
pub const kIOFBCursorInfoKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBCursorInfo\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdmidongleromkey?language=objc)
pub const kIOFBHDMIDongleROMKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBHDMIDongleROM\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhostaccessflagskey?language=objc)
pub const kIOFBHostAccessFlagsKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBHostAccessFlags\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmemorysizekey?language=objc)
pub const kIOFBMemorySizeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBMemorySize\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbneedsrefreshkey?language=objc)
pub const kIOFBNeedsRefreshKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBNeedsRefresh\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbprobeoptionskey?language=objc)
pub const kIOFBProbeOptionsKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBProbeOptions\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbgammawidthkey?language=objc)
pub const kIOFBGammaWidthKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBGammaWidth\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbgammacountkey?language=objc)
pub const kIOFBGammaCountKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBGammaCount\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbclutdeferkey?language=objc)
pub const kIOFBCLUTDeferKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBCLUTDefer\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplayportconfigurationdatakey?language=objc)
pub const kIOFBDisplayPortConfigurationDataKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"dpcd-registers\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohibernatepreviewactivekey?language=objc)
pub const kIOHibernatePreviewActiveKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOHibernatePreviewActive\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohibernateefigfxstatuskey?language=objc)
pub const kIOHibernateEFIGfxStatusKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IOHibernateEFIGfxStatus\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypekey?language=objc)
pub const kIOFBAVSignalTypeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"av-signal-type\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbconfigkey?language=objc)
pub const kIOFBConfigKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBConfig\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodeskey?language=objc)
pub const kIOFBModesKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"IOFBModes\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodeidkey?language=objc)
pub const kIOFBModeIDKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"ID\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodedmkey?language=objc)
pub const kIOFBModeDMKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"DM\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodetmkey?language=objc)
pub const kIOFBModeTMKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"TM\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodeaidkey?language=objc)
pub const kIOFBModeAIDKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"AID\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodedfkey?language=objc)
pub const kIOFBModeDFKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"DF\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmodepikey?language=objc)
pub const kIOFBModePIKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"PI\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayedidkey?language=objc)
pub const kIODisplayEDIDKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayEDID\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayedidoriginalkey?language=objc)
pub const kIODisplayEDIDOriginalKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayEDIDOriginal\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaylocationkey?language=objc)
pub const kIODisplayLocationKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayLocation\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayconnectflagskey?language=objc)
pub const kIODisplayConnectFlagsKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayConnectFlags\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayhasbacklightkey?language=objc)
pub const kIODisplayHasBacklightKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayHasBacklight\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayisdigitalkey?language=objc)
pub const kIODisplayIsDigitalKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayIsDigital\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybundlekey?language=objc)
pub const kDisplayBundleKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBundle\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kappledisplaytypekey?language=objc)
pub const kAppleDisplayTypeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"AppleDisplayType\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kapplesensekey?language=objc)
pub const kAppleSenseKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"AppleSense\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymccsversionkey?language=objc)
pub const kIODisplayMCCSVersionKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayMCCSVersion\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaytechnologytypekey?language=objc)
pub const kIODisplayTechnologyTypeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayTechnologyType\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayusagetimekey?language=objc)
pub const kIODisplayUsageTimeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayUsageTime\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayfirmwarelevelkey?language=objc)
pub const kIODisplayFirmwareLevelKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayFirmwareLevel\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayvendorid?language=objc)
pub const kDisplayVendorID: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayVendorID\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayproductid?language=objc)
pub const kDisplayProductID: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayProductID\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayserialnumber?language=objc)
pub const kDisplaySerialNumber: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySerialNumber\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayserialstring?language=objc)
pub const kDisplaySerialString: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySerialString\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayweekofmanufacture?language=objc)
pub const kDisplayWeekOfManufacture: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayWeekManufacture\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayyearofmanufacture?language=objc)
pub const kDisplayYearOfManufacture: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayYearManufacture\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayproductname?language=objc)
pub const kDisplayProductName: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayProductName\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaywhitepointx?language=objc)
pub const kDisplayWhitePointX: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayWhitePointX\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaywhitepointy?language=objc)
pub const kDisplayWhitePointY: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayWhitePointY\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayredpointx?language=objc)
pub const kDisplayRedPointX: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayRedPointX\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayredpointy?language=objc)
pub const kDisplayRedPointY: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayRedPointY\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygreenpointx?language=objc)
pub const kDisplayGreenPointX: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGreenPointX\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygreenpointy?language=objc)
pub const kDisplayGreenPointY: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGreenPointY\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybluepointx?language=objc)
pub const kDisplayBluePointX: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBluePointX\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybluepointy?language=objc)
pub const kDisplayBluePointY: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBluePointY\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaywhitegamma?language=objc)
pub const kDisplayWhiteGamma: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayWhiteGamma\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayredgamma?language=objc)
pub const kDisplayRedGamma: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayRedGamma\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygreengamma?language=objc)
pub const kDisplayGreenGamma: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGreenGamma\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybluegamma?language=objc)
pub const kDisplayBlueGamma: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBlueGamma\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygammachannels?language=objc)
pub const kDisplayGammaChannels: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGammaChannels\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygammaentrycount?language=objc)
pub const kDisplayGammaEntryCount: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGammaEntryCount\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygammaentrysize?language=objc)
pub const kDisplayGammaEntrySize: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGammaEntrySize\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaygammatable?language=objc)
pub const kDisplayGammaTable: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayGammaTable\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaybrightnessaffectsgamma?language=objc)
pub const kDisplayBrightnessAffectsGamma: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayBrightnessAffectsGamma\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayviewangleaffectsgamma?language=objc)
pub const kDisplayViewAngleAffectsGamma: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayViewAngleAffectsGamma\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaycsprofile?language=objc)
pub const kDisplayCSProfile: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayCSProfile\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayhorizontalimagesize?language=objc)
pub const kDisplayHorizontalImageSize: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayHorizontalImageSize\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayverticalimagesize?language=objc)
pub const kDisplayVerticalImageSize: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayVerticalImageSize\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayfixedpixelformat?language=objc)
pub const kDisplayFixedPixelFormat: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplayFixedPixelFormat\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayout?language=objc)
pub const kDisplaySubPixelLayout: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySubPixelLayout\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfiguration?language=objc)
pub const kDisplaySubPixelConfiguration: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySubPixelConfiguration\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshape?language=objc)
pub const kDisplaySubPixelShape: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"DisplaySubPixelShape\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayoverridematchingkey?language=objc)
pub const kIODisplayOverrideMatchingKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayOverrideMatching\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparameterskey?language=objc)
pub const kIODisplayParametersKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayParameters\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayguidkey?language=objc)
pub const kIODisplayGUIDKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayGUID\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayvaluekey?language=objc)
pub const kIODisplayValueKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"value\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayminvaluekey?language=objc)
pub const kIODisplayMinValueKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"min\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymaxvaluekey?language=objc)
pub const kIODisplayMaxValueKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"max\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaybrightnessprobekey?language=objc)
pub const kIODisplayBrightnessProbeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"brightness-probe\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaylinearbrightnessprobekey?language=objc)
pub const kIODisplayLinearBrightnessProbeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"linear-brightness-probe\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaybrightnesskey?language=objc)
pub const kIODisplayBrightnessKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"brightness\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaylinearbrightnesskey?language=objc)
pub const kIODisplayLinearBrightnessKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"linear-brightness\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayusablelinearbrightnesskey?language=objc)
pub const kIODisplayUsableLinearBrightnessKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"usable-linear-brightness\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaybrightnessfadekey?language=objc)
pub const kIODisplayBrightnessFadeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"brightness-fade\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaycontrastkey?language=objc)
pub const kIODisplayContrastKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"contrast\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayhorizontalpositionkey?language=objc)
pub const kIODisplayHorizontalPositionKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"horizontal-position\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayhorizontalsizekey?language=objc)
pub const kIODisplayHorizontalSizeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"horizontal-size\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayverticalpositionkey?language=objc)
pub const kIODisplayVerticalPositionKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"vertical-position\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayverticalsizekey?language=objc)
pub const kIODisplayVerticalSizeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"vertical-size\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaytrapezoidkey?language=objc)
pub const kIODisplayTrapezoidKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"trapezoid\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypincushionkey?language=objc)
pub const kIODisplayPincushionKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"pincushion\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparallelogramkey?language=objc)
pub const kIODisplayParallelogramKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"parallelogram\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrotationkey?language=objc)
pub const kIODisplayRotationKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"rotation\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaytheatremodekey?language=objc)
pub const kIODisplayTheatreModeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"theatre-mode\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaytheatremodewindowkey?language=objc)
pub const kIODisplayTheatreModeWindowKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"theatre-mode-window\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayoverscankey?language=objc)
pub const kIODisplayOverscanKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"oscn\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayvideobestkey?language=objc)
pub const kIODisplayVideoBestKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"vbst\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayspeakervolumekey?language=objc)
pub const kIODisplaySpeakerVolumeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"speaker-volume\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayspeakerselectkey?language=objc)
pub const kIODisplaySpeakerSelectKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"speaker-select\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymicrophonevolumekey?language=objc)
pub const kIODisplayMicrophoneVolumeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"microphone-volume\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayambientlightsensorkey?language=objc)
pub const kIODisplayAmbientLightSensorKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"ambient-light-sensor\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudiomuteandscreenblankkey?language=objc)
pub const kIODisplayAudioMuteAndScreenBlankKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-mute-and-screen-blank\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudiotreblekey?language=objc)
pub const kIODisplayAudioTrebleKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-treble\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudiobasskey?language=objc)
pub const kIODisplayAudioBassKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-bass\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudiobalancelrkey?language=objc)
pub const kIODisplayAudioBalanceLRKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-balance-LR\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayaudioprocessormodekey?language=objc)
pub const kIODisplayAudioProcessorModeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"audio-processor-mode\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowermodekey?language=objc)
pub const kIODisplayPowerModeKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"power-mode\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymanufacturerspecifickey?language=objc)
pub const kIODisplayManufacturerSpecificKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"manufacturer-specific\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowerstatekey?language=objc)
pub const kIODisplayPowerStateKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"dsyp\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaycontrolleridkey?language=objc)
pub const kIODisplayControllerIDKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayControllerID\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaycapabilitystringkey?language=objc)
pub const kIODisplayCapabilityStringKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"IODisplayCapabilityString\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayredgammascalekey?language=objc)
pub const kIODisplayRedGammaScaleKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"rgsc\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaygreengammascalekey?language=objc)
pub const kIODisplayGreenGammaScaleKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"ggsc\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaybluegammascalekey?language=objc)
pub const kIODisplayBlueGammaScaleKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"bgsc\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaygammascalekey?language=objc)
pub const kIODisplayGammaScaleKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"gsc \0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparameterscommitkey?language=objc)
pub const kIODisplayParametersCommitKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"commit\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparametersdefaultkey?language=objc)
pub const kIODisplayParametersDefaultKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"defaults\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayparametersflushkey?language=objc)
pub const kIODisplayParametersFlushKey: &CStr =
    unsafe { CStr::from_bytes_with_nul_unchecked(b"flush\0") };
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioacceleratorclienttypes?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct eIOAcceleratorClientTypes(pub c_uint);
impl eIOAcceleratorClientTypes {
    #[doc(alias = "kIOAccelSurfaceClientType")]
    pub const IOAccelSurfaceClientType: Self = Self(0);
    #[doc(alias = "kIOAccelNumClientTypes")]
    pub const IOAccelNumClientTypes: Self = Self(1);
    #[doc(alias = "kIOAccelSurface2ClientType")]
    pub const IOAccelSurface2ClientType: Self = Self(0x20);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelbounds?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOAccelBounds {
    pub x: i16,
    pub y: i16,
    pub w: i16,
    pub h: i16,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOAccelBounds {
    const ENCODING: Encoding = Encoding::Struct(
        "?",
        &[
            <i16>::ENCODING,
            <i16>::ENCODING,
            <i16>::ENCODING,
            <i16>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelsize?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOAccelSize {
    pub w: i16,
    pub h: i16,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOAccelSize {
    const ENCODING: Encoding = Encoding::Struct("?", &[<i16>::ENCODING, <i16>::ENCODING]);
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioaccelvolatilesurface?language=objc)
pub const kIOAccelVolatileSurface: c_uint = 0x00000001;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelsurfaceinformation?language=objc)
#[cfg(feature = "libc")]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOAccelSurfaceInformation {
    pub address: [libc::mach_vm_address_t; 4],
    pub rowBytes: u32,
    pub width: u32,
    pub height: u32,
    pub pixelFormat: u32,
    pub flags: IOOptionBits,
    pub colorTemperature: [IOFixed; 4],
    pub typeDependent: [u32; 4],
}

#[cfg(all(feature = "libc", feature = "objc2"))]
unsafe impl Encode for IOAccelSurfaceInformation {
    const ENCODING: Encoding = Encoding::Struct(
        "?",
        &[
            <[libc::mach_vm_address_t; 4]>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <IOOptionBits>::ENCODING,
            <[IOFixed; 4]>::ENCODING,
            <[u32; 4]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelsurfacereaddata?language=objc)
#[cfg(feature = "libc")]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOAccelSurfaceReadData {
    pub x: i32,
    pub y: i32,
    pub w: i32,
    pub h: i32,
    pub client_addr: libc::mach_vm_address_t,
    pub client_row_bytes: u32,
}

#[cfg(all(feature = "libc", feature = "objc2"))]
unsafe impl Encode for IOAccelSurfaceReadData {
    const ENCODING: Encoding = Encoding::Struct(
        "?",
        &[
            <i32>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
            <libc::mach_vm_address_t>::ENCODING,
            <u32>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelsurfacescaling?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOAccelSurfaceScaling {
    pub buffer: IOAccelBounds,
    pub source: IOAccelSize,
    pub reserved: [u32; 8],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOAccelSurfaceScaling {
    const ENCODING: Encoding = Encoding::Struct(
        "?",
        &[
            <IOAccelBounds>::ENCODING,
            <IOAccelSize>::ENCODING,
            <[u32; 8]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioaccelid?language=objc)
pub type IOAccelID = i32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioaccelprivateid?language=objc)
pub const kIOAccelPrivateID: c_uint = 0x00000001;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioacceldeviceregion?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOAccelDeviceRegion {
    pub num_rects: u32,
    pub bounds: IOAccelBounds,
    pub rect: [IOAccelBounds; 0],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOAccelDeviceRegion {
    const ENCODING: Encoding = Encoding::Struct(
        "?",
        &[
            <u32>::ENCODING,
            <IOAccelBounds>::ENCODING,
            <[IOAccelBounds; 0]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacememorytypes?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct eIOAccelSurfaceMemoryTypes(pub c_uint);
impl eIOAccelSurfaceMemoryTypes {
    #[doc(alias = "kIOAccelNumSurfaceMemoryTypes")]
    pub const IOAccelNumSurfaceMemoryTypes: Self = Self(0);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacemethods?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct eIOAccelSurfaceMethods(pub c_uint);
impl eIOAccelSurfaceMethods {
    #[doc(alias = "kIOAccelSurfaceReadLockOptions")]
    pub const IOAccelSurfaceReadLockOptions: Self = Self(0);
    #[doc(alias = "kIOAccelSurfaceReadUnlockOptions")]
    pub const IOAccelSurfaceReadUnlockOptions: Self = Self(1);
    #[doc(alias = "kIOAccelSurfaceGetState")]
    pub const IOAccelSurfaceGetState: Self = Self(2);
    #[doc(alias = "kIOAccelSurfaceWriteLockOptions")]
    pub const IOAccelSurfaceWriteLockOptions: Self = Self(3);
    #[doc(alias = "kIOAccelSurfaceWriteUnlockOptions")]
    pub const IOAccelSurfaceWriteUnlockOptions: Self = Self(4);
    #[doc(alias = "kIOAccelSurfaceRead")]
    pub const IOAccelSurfaceRead: Self = Self(5);
    #[doc(alias = "kIOAccelSurfaceSetShapeBacking")]
    pub const IOAccelSurfaceSetShapeBacking: Self = Self(6);
    #[doc(alias = "kIOAccelSurfaceSetIDMode")]
    pub const IOAccelSurfaceSetIDMode: Self = Self(7);
    #[doc(alias = "kIOAccelSurfaceSetScale")]
    pub const IOAccelSurfaceSetScale: Self = Self(8);
    #[doc(alias = "kIOAccelSurfaceSetShape")]
    pub const IOAccelSurfaceSetShape: Self = Self(9);
    #[doc(alias = "kIOAccelSurfaceFlush")]
    pub const IOAccelSurfaceFlush: Self = Self(10);
    #[doc(alias = "kIOAccelSurfaceQueryLock")]
    pub const IOAccelSurfaceQueryLock: Self = Self(11);
    #[doc(alias = "kIOAccelSurfaceReadLock")]
    pub const IOAccelSurfaceReadLock: Self = Self(12);
    #[doc(alias = "kIOAccelSurfaceReadUnlock")]
    pub const IOAccelSurfaceReadUnlock: Self = Self(13);
    #[doc(alias = "kIOAccelSurfaceWriteLock")]
    pub const IOAccelSurfaceWriteLock: Self = Self(14);
    #[doc(alias = "kIOAccelSurfaceWriteUnlock")]
    pub const IOAccelSurfaceWriteUnlock: Self = Self(15);
    #[doc(alias = "kIOAccelSurfaceControl")]
    pub const IOAccelSurfaceControl: Self = Self(16);
    #[doc(alias = "kIOAccelSurfaceSetShapeBackingAndLength")]
    pub const IOAccelSurfaceSetShapeBackingAndLength: Self = Self(17);
    #[doc(alias = "kIOAccelNumSurfaceMethods")]
    pub const IOAccelNumSurfaceMethods: Self = Self(18);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacemodebits?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct eIOAccelSurfaceModeBits(pub c_uint);
impl eIOAccelSurfaceModeBits {
    #[doc(alias = "kIOAccelSurfaceModeColorDepth1555")]
    pub const IOAccelSurfaceModeColorDepth1555: Self = Self(0x00000003);
    #[doc(alias = "kIOAccelSurfaceModeColorDepth8888")]
    pub const IOAccelSurfaceModeColorDepth8888: Self = Self(0x00000004);
    #[doc(alias = "kIOAccelSurfaceModeColorDepthYUV")]
    pub const IOAccelSurfaceModeColorDepthYUV: Self = Self(0x00000006);
    #[doc(alias = "kIOAccelSurfaceModeColorDepthYUV9")]
    pub const IOAccelSurfaceModeColorDepthYUV9: Self = Self(0x00000007);
    #[doc(alias = "kIOAccelSurfaceModeColorDepthYUV12")]
    pub const IOAccelSurfaceModeColorDepthYUV12: Self = Self(0x00000008);
    #[doc(alias = "kIOAccelSurfaceModeColorDepthYUV2")]
    pub const IOAccelSurfaceModeColorDepthYUV2: Self = Self(0x00000009);
    #[doc(alias = "kIOAccelSurfaceModeColorDepthBGRA32")]
    pub const IOAccelSurfaceModeColorDepthBGRA32: Self = Self(0x0000000A);
    #[doc(alias = "kIOAccelSurfaceModeColorDepth2101010")]
    pub const IOAccelSurfaceModeColorDepth2101010: Self = Self(0x0000000F);
    #[doc(alias = "kIOAccelSurfaceModeColorDepthBits")]
    pub const IOAccelSurfaceModeColorDepthBits: Self = Self(0x0000000F);
    #[doc(alias = "kIOAccelSurfaceModeStereoBit")]
    pub const IOAccelSurfaceModeStereoBit: Self = Self(0x00000010);
    #[doc(alias = "kIOAccelSurfaceModeWindowedBit")]
    pub const IOAccelSurfaceModeWindowedBit: Self = Self(0x00000020);
    #[doc(alias = "kIOAccelSurfaceModeSurface2")]
    pub const IOAccelSurfaceModeSurface2: Self = Self(0x00004000);
    #[doc(alias = "kIOAccelSurfaceModeBeamSync")]
    pub const IOAccelSurfaceModeBeamSync: Self = Self(0x00008000);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfaceshapebits?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct eIOAccelSurfaceShapeBits(pub c_uint);
impl eIOAccelSurfaceShapeBits {
    #[doc(alias = "kIOAccelSurfaceShapeNone")]
    pub const IOAccelSurfaceShapeNone: Self = Self(0x00000000);
    #[doc(alias = "kIOAccelSurfaceShapeNonBlockingBit")]
    pub const IOAccelSurfaceShapeNonBlockingBit: Self = Self(0x00000001);
    #[doc(alias = "kIOAccelSurfaceShapeNonSimpleBit")]
    pub const IOAccelSurfaceShapeNonSimpleBit: Self = Self(0x00000002);
    #[doc(alias = "kIOAccelSurfaceShapeIdentityScaleBit")]
    pub const IOAccelSurfaceShapeIdentityScaleBit: Self = Self(0x00000004);
    #[doc(alias = "kIOAccelSurfaceShapeFrameSyncBit")]
    pub const IOAccelSurfaceShapeFrameSyncBit: Self = Self(0x00000008);
    #[doc(alias = "kIOAccelSurfaceShapeBeamSyncBit")]
    pub const IOAccelSurfaceShapeBeamSyncBit: Self = Self(0x00000010);
    #[doc(alias = "kIOAccelSurfaceShapeStaleBackingBit")]
    pub const IOAccelSurfaceShapeStaleBackingBit: Self = Self(0x00000020);
    #[doc(alias = "kIOAccelSurfaceShapeAssemblyBit")]
    pub const IOAccelSurfaceShapeAssemblyBit: Self = Self(0x00000040);
    #[doc(alias = "kIOAccelSurfaceShapeWaitEnabledBit")]
    pub const IOAccelSurfaceShapeWaitEnabledBit: Self = Self(0x00000080);
    #[doc(alias = "kIOAccelSurfaceShapeBlockingBit")]
    pub const IOAccelSurfaceShapeBlockingBit: Self =
        Self(eIOAccelSurfaceShapeBits::IOAccelSurfaceShapeNonBlockingBit.0);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacestatebits?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct eIOAccelSurfaceStateBits(pub c_uint);
impl eIOAccelSurfaceStateBits {
    #[doc(alias = "kIOAccelSurfaceStateNone")]
    pub const IOAccelSurfaceStateNone: Self = Self(0x00000000);
    #[doc(alias = "kIOAccelSurfaceStateIdleBit")]
    pub const IOAccelSurfaceStateIdleBit: Self = Self(0x00000001);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacescalebits?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct eIOAccelSurfaceScaleBits(pub c_uint);
impl eIOAccelSurfaceScaleBits {
    #[doc(alias = "kIOAccelSurfaceBeamSyncSwaps")]
    pub const IOAccelSurfaceBeamSyncSwaps: Self = Self(0x00000001);
    #[doc(alias = "kIOAccelSurfaceFixedSource")]
    pub const IOAccelSurfaceFixedSource: Self = Self(0x00000002);
    #[doc(alias = "kIOAccelSurfaceFiltering")]
    pub const IOAccelSurfaceFiltering: Self = Self(0x000000f0);
    #[doc(alias = "kIOAccelSurfaceFilterDefault")]
    pub const IOAccelSurfaceFilterDefault: Self = Self(0x00000000);
    #[doc(alias = "kIOAccelSurfaceFilterNone")]
    pub const IOAccelSurfaceFilterNone: Self = Self(0x00000010);
    #[doc(alias = "kIOAccelSurfaceFilterLinear")]
    pub const IOAccelSurfaceFilterLinear: Self = Self(0x00000020);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/eioaccelsurfacelockbits?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct eIOAccelSurfaceLockBits(pub c_uint);
impl eIOAccelSurfaceLockBits {
    #[doc(alias = "kIOAccelSurfaceLockInBacking")]
    pub const IOAccelSurfaceLockInBacking: Self = Self(0);
    #[doc(alias = "kIOAccelSurfaceLockInAccel")]
    pub const IOAccelSurfaceLockInAccel: Self = Self(1);
    #[doc(alias = "kIOAccelSurfaceLockInDontCare")]
    pub const IOAccelSurfaceLockInDontCare: Self = Self(2);
    #[doc(alias = "kIOAccelSurfaceLockInMask")]
    pub const IOAccelSurfaceLockInMask: Self = Self(0x00000003);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofourcharcode?language=objc)
pub type IOFourCharCode = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcompletiontoken?language=objc)
pub type IOBlitCompletionToken = i32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblittype?language=objc)
pub type IOBlitType = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeverbmask?language=objc)
pub const kIOBlitTypeVerbMask: c_uint = 0x000000ff;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittyperects?language=objc)
pub const kIOBlitTypeRects: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypecopyrects?language=objc)
pub const kIOBlitTypeCopyRects: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypelines?language=objc)
pub const kIOBlitTypeLines: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypescanlines?language=objc)
pub const kIOBlitTypeScanlines: c_uint = 3;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypecopyregion?language=objc)
pub const kIOBlitTypeCopyRegion: c_uint = 4;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypemovecursor?language=objc)
pub const kIOBlitTypeMoveCursor: c_uint = 5;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeshowcursor?language=objc)
pub const kIOBlitTypeShowCursor: c_uint = 6;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypehidecursor?language=objc)
pub const kIOBlitTypeHideCursor: c_uint = 7;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypemonoexpand?language=objc)
pub const kIOBlitTypeMonoExpand: c_uint = 0x00000100;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypecolorspaceconvert?language=objc)
pub const kIOBlitTypeColorSpaceConvert: c_uint = 0x00000200;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypescale?language=objc)
pub const kIOBlitTypeScale: c_uint = 0x00000400;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypesourcekeycolormodemask?language=objc)
pub const kIOBlitTypeSourceKeyColorModeMask: c_uint = 0x00003000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypedestkeycolormodemask?language=objc)
pub const kIOBlitTypeDestKeyColorModeMask: c_uint = 0x0000c000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypesourcekeycolorequal?language=objc)
pub const kIOBlitTypeSourceKeyColorEqual: c_uint = 0x00001000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypesourcekeycolornotequal?language=objc)
pub const kIOBlitTypeSourceKeyColorNotEqual: c_uint = 0x00002000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypedestkeycolorequal?language=objc)
pub const kIOBlitTypeDestKeyColorEqual: c_uint = 0x00004000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypedestkeycolornotequal?language=objc)
pub const kIOBlitTypeDestKeyColorNotEqual: c_uint = 0x00008000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeoperationmask?language=objc)
pub const kIOBlitTypeOperationMask: c_uint = 0x0fff0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeoperationshift?language=objc)
pub const kIOBlitTypeOperationShift: c_uint = 16;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeoperationtypemask?language=objc)
pub const kIOBlitTypeOperationTypeMask: c_uint = 0x0f000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblittypeoperationtype0?language=objc)
pub const kIOBlitTypeOperationType0: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitcopyoperation?language=objc)
pub const kIOBlitCopyOperation: c_uint = 0x00000000 | kIOBlitTypeOperationType0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitoroperation?language=objc)
pub const kIOBlitOrOperation: c_uint = 0x00010000 | kIOBlitTypeOperationType0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitxoroperation?language=objc)
pub const kIOBlitXorOperation: c_uint = 0x00020000 | kIOBlitTypeOperationType0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitblendoperation?language=objc)
pub const kIOBlitBlendOperation: c_uint = 0x00030000 | kIOBlitTypeOperationType0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblithighlightoperation?language=objc)
pub const kIOBlitHighlightOperation: c_uint = 0x00040000 | kIOBlitTypeOperationType0;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsourcetype?language=objc)
pub type IOBlitSourceType = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcedefault?language=objc)
pub const kIOBlitSourceDefault: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourceframebuffer?language=objc)
pub const kIOBlitSourceFramebuffer: c_uint = 0x00001000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcememory?language=objc)
pub const kIOBlitSourceMemory: c_uint = 0x00002000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourceoolmemory?language=objc)
pub const kIOBlitSourceOOLMemory: c_uint = 0x00003000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcepattern?language=objc)
pub const kIOBlitSourcePattern: c_uint = 0x00004000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourceoolpattern?language=objc)
pub const kIOBlitSourceOOLPattern: c_uint = 0x00005000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcesolid?language=objc)
pub const kIOBlitSourceSolid: c_uint = 0x00006000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourcecgssurface?language=objc)
pub const kIOBlitSourceCGSSurface: c_uint = 0x00007000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsourceissame?language=objc)
pub const kIOBlitSourceIsSame: c_uint = 0x80000000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsourcedesttype?language=objc)
pub type IOBlitSourceDestType = IOBlitSourceType;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitdestframebuffer?language=objc)
pub const kIOBlitDestFramebuffer: c_uint = 0x00000001;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitoperationstruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitOperationStruct {
    pub color0: u32,
    pub color1: u32,
    pub offsetX: i32,
    pub offsetY: i32,
    pub sourceKeyColor: u32,
    pub destKeyColor: u32,
    pub specific: [u32; 16],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitOperationStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitOperationStruct",
        &[
            <u32>::ENCODING,
            <u32>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <[u32; 16]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitoperation?language=objc)
pub type IOBlitOperation = IOBlitOperationStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitrectanglestruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitRectangleStruct {
    pub x: i32,
    pub y: i32,
    pub width: i32,
    pub height: i32,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitRectangleStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitRectangleStruct",
        &[
            <i32>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitrectangle?language=objc)
pub type IOBlitRectangle = IOBlitRectangleStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitrectanglesstruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitRectanglesStruct {
    pub operation: IOBlitOperation,
    pub count: IOItemCount,
    pub rects: [IOBlitRectangle; 1],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitRectanglesStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitRectanglesStruct",
        &[
            <IOBlitOperation>::ENCODING,
            <IOItemCount>::ENCODING,
            <[IOBlitRectangle; 1]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitrectangles?language=objc)
pub type IOBlitRectangles = IOBlitRectanglesStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyrectanglestruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitCopyRectangleStruct {
    pub sourceX: i32,
    pub sourceY: i32,
    pub x: i32,
    pub y: i32,
    pub width: i32,
    pub height: i32,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitCopyRectangleStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitCopyRectangleStruct",
        &[
            <i32>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyrectangle?language=objc)
pub type IOBlitCopyRectangle = IOBlitCopyRectangleStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyrectanglesstruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitCopyRectanglesStruct {
    pub operation: IOBlitOperation,
    pub count: IOItemCount,
    pub rects: [IOBlitCopyRectangle; 1],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitCopyRectanglesStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitCopyRectanglesStruct",
        &[
            <IOBlitOperation>::ENCODING,
            <IOItemCount>::ENCODING,
            <[IOBlitCopyRectangle; 1]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyrectangles?language=objc)
pub type IOBlitCopyRectangles = IOBlitCopyRectanglesStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyregionstruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitCopyRegionStruct {
    pub operation: IOBlitOperation,
    pub deltaX: i32,
    pub deltaY: i32,
    pub region: *mut IOAccelDeviceRegion,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitCopyRegionStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitCopyRegionStruct",
        &[
            <IOBlitOperation>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
            <*mut IOAccelDeviceRegion>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcopyregion?language=objc)
pub type IOBlitCopyRegion = IOBlitCopyRegionStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitvertexstruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitVertexStruct {
    pub x: i32,
    pub y: i32,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitVertexStruct {
    const ENCODING: Encoding =
        Encoding::Struct("IOBlitVertexStruct", &[<i32>::ENCODING, <i32>::ENCODING]);
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitvertex?language=objc)
pub type IOBlitVertex = IOBlitVertexStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitverticesstruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitVerticesStruct {
    pub operation: IOBlitOperation,
    pub count: IOItemCount,
    pub vertices: [IOBlitVertex; 2],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitVerticesStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitVerticesStruct",
        &[
            <IOBlitOperation>::ENCODING,
            <IOItemCount>::ENCODING,
            <[IOBlitVertex; 2]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitvertices?language=objc)
pub type IOBlitVertices = IOBlitVerticesStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitscanlinesstruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitScanlinesStruct {
    pub operation: IOBlitOperation,
    pub count: IOItemCount,
    pub y: i32,
    pub height: i32,
    pub x: [i32; 2],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitScanlinesStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitScanlinesStruct",
        &[
            <IOBlitOperation>::ENCODING,
            <IOItemCount>::ENCODING,
            <i32>::ENCODING,
            <i32>::ENCODING,
            <[i32; 2]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitscanlines?language=objc)
pub type IOBlitScanlines = IOBlitScanlinesStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcursorstruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOBlitCursorStruct {
    pub operation: IOBlitOperation,
    pub rect: IOBlitRectangle,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitCursorStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitCursorStruct",
        &[<IOBlitOperation>::ENCODING, <IOBlitRectangle>::ENCODING],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitcursor?language=objc)
pub type IOBlitCursor = IOBlitCursorStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/_ioblitmemory?language=objc)
#[repr(C)]
#[derive(Debug)]
pub struct _IOBlitMemory {
    inner: [u8; 0],
    _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for _IOBlitMemory {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Encoding::Struct("_IOBlitMemory", &[]));
}

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitmemoryref?language=objc)
pub type IOBlitMemoryRef = *mut _IOBlitMemory;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio1monochromepixelformat?language=objc)
pub const kIO1MonochromePixelFormat: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio2indexedpixelformat?language=objc)
pub const kIO2IndexedPixelFormat: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio4indexedpixelformat?language=objc)
pub const kIO4IndexedPixelFormat: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio8indexedpixelformat?language=objc)
pub const kIO8IndexedPixelFormat: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16be555pixelformat?language=objc)
pub const kIO16BE555PixelFormat: c_uint = 0x00000010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio24rgbpixelformat?language=objc)
pub const kIO24RGBPixelFormat: c_uint = 0x00000018;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32argbpixelformat?language=objc)
pub const kIO32ARGBPixelFormat: c_uint = 0x00000020;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio1indexedgraypixelformat?language=objc)
pub const kIO1IndexedGrayPixelFormat: c_uint = 0x00000021;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio2indexedgraypixelformat?language=objc)
pub const kIO2IndexedGrayPixelFormat: c_uint = 0x00000022;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio4indexedgraypixelformat?language=objc)
pub const kIO4IndexedGrayPixelFormat: c_uint = 0x00000024;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio8indexedgraypixelformat?language=objc)
pub const kIO8IndexedGrayPixelFormat: c_uint = 0x00000028;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16le555pixelformat?language=objc)
pub const kIO16LE555PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x4c353535);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16le5551pixelformat?language=objc)
pub const kIO16LE5551PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x35353531);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16be565pixelformat?language=objc)
pub const kIO16BE565PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42353635);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16le565pixelformat?language=objc)
pub const kIO16LE565PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x4c353635);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio24bgrpixelformat?language=objc)
pub const kIO24BGRPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x32344247);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32bgrapixelformat?language=objc)
pub const kIO32BGRAPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42475241);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32abgrpixelformat?language=objc)
pub const kIO32ABGRPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x41424752);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio32rgbapixelformat?language=objc)
pub const kIO32RGBAPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x52474241);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyuvspixelformat?language=objc)
pub const kIOYUVSPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x79757673);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyuvupixelformat?language=objc)
pub const kIOYUVUPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x79757675);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyvu9pixelformat?language=objc)
pub const kIOYVU9PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x59565539);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyuv411pixelformat?language=objc)
pub const kIOYUV411PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x59343131);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyvyu422pixelformat?language=objc)
pub const kIOYVYU422PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x59565955);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiouyvy422pixelformat?language=objc)
pub const kIOUYVY422PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x55595659);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioyuv211pixelformat?language=objc)
pub const kIOYUV211PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x59323131);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio2vuypixelformat?language=objc)
pub const kIO2vuyPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x32767579);

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16le4444pixelformat?language=objc)
pub const kIO16LE4444PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x4c343434);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio16be4444pixelformat?language=objc)
pub const kIO16BE4444PixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42343434);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio64bgrapixelformat?language=objc)
pub const kIO64BGRAPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42313649);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio64rgbafloatpixelformat?language=objc)
pub const kIO64RGBAFloatPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42313646);
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kio128rgbafloatpixelformat?language=objc)
pub const kIO128RGBAFloatPixelFormat: c_uint = IO_FOUR_CHAR_CODE!(0x42333246);

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitmemoryrequireshostflush?language=objc)
pub const kIOBlitMemoryRequiresHostFlush: c_uint = 0x00000001;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsurfacestruct_memory?language=objc)
#[repr(C)]
#[derive(Clone, Copy)]
pub union IOBlitSurfaceStruct_memory {
    pub bytes: *mut u8,
    pub r#ref: IOBlitMemoryRef,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitSurfaceStruct_memory {
    const ENCODING: Encoding =
        Encoding::Union("?", &[<*mut u8>::ENCODING, <IOBlitMemoryRef>::ENCODING]);
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsurfacestruct?language=objc)
#[repr(C)]
#[derive(Clone, Copy)]
pub struct IOBlitSurfaceStruct {
    pub memory: IOBlitSurfaceStruct_memory,
    pub pixelFormat: IOFourCharCode,
    pub size: IOBlitRectangle,
    pub rowBytes: u32,
    pub byteOffset: u32,
    pub palette: *mut u32,
    pub accessFlags: IOOptionBits,
    pub interfaceRef: IOBlitMemoryRef,
    pub more: [u32; 14],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOBlitSurfaceStruct {
    const ENCODING: Encoding = Encoding::Struct(
        "IOBlitSurfaceStruct",
        &[
            <IOBlitSurfaceStruct_memory>::ENCODING,
            <IOFourCharCode>::ENCODING,
            <IOBlitRectangle>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <*mut u32>::ENCODING,
            <IOOptionBits>::ENCODING,
            <IOBlitMemoryRef>::ENCODING,
            <[u32; 14]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitsurface?language=objc)
pub type IOBlitSurface = IOBlitSurfaceStruct;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitmemory?language=objc)
pub type IOBlitMemory = IOBlitSurface;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsynchronizewaitbeamexit?language=objc)
pub const kIOBlitSynchronizeWaitBeamExit: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsynchronizeflushhostwrites?language=objc)
pub const kIOBlitSynchronizeFlushHostWrites: c_uint = 0x00000002;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitcontext?language=objc)
pub const kIOBlitWaitContext: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitall2d?language=objc)
pub const kIOBlitWaitAll2D: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitglobal?language=objc)
pub const kIOBlitWaitGlobal: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitall?language=objc)
pub const kIOBlitWaitAll: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitwaitcheck?language=objc)
pub const kIOBlitWaitCheck: c_uint = 0x00000080;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitflushwithswap?language=objc)
pub const kIOBlitFlushWithSwap: c_uint = 0x00010000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblithascgssurface?language=objc)
pub const kIOBlitHasCGSSurface: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitfixedsource?language=objc)
pub const kIOBlitFixedSource: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitbeamsyncswaps?language=objc)
pub const kIOBlitBeamSyncSwaps: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitreferencesource?language=objc)
pub const kIOBlitReferenceSource: c_uint = 0x00000008;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitunlockwithswap?language=objc)
pub const kIOBlitUnlockWithSwap: c_uint = 0x80000000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitframebufferdestination?language=objc)
pub const kIOBlitFramebufferDestination: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitsurfacedestination?language=objc)
pub const kIOBlitSurfaceDestination: c_uint = 0x00000001;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitbeamsync?language=objc)
pub const kIOBlitBeamSync: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitbeamsyncalways?language=objc)
pub const kIOBlitBeamSyncAlways: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitbeamsyncspin?language=objc)
pub const kIOBlitBeamSyncSpin: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitalloptions?language=objc)
pub const kIOBlitAllOptions: c_uint = 0xffffffff;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioblitcolorspacetypes?language=objc)
pub const kIOBlitColorSpaceTypes: c_uint = IO_FOUR_CHAR_CODE!(0x63737063);

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitaccumulateptr?language=objc)
pub type IOBlitAccumulatePtr =
    Option<unsafe extern "C-unwind" fn(*mut c_void, i32, i32, i32, i32, i32, i32) -> IOReturn>;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitprocptr?language=objc)
pub type IOBlitProcPtr = Option<
    unsafe extern "C-unwind" fn(
        *mut c_void,
        IOOptionBits,
        IOBlitType,
        IOBlitSourceDestType,
        *mut IOBlitOperation,
        *mut c_void,
        *mut c_void,
        *mut IOBlitCompletionToken,
    ) -> IOReturn,
>;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioblitterptr?language=objc)
pub type IOBlitterPtr = Option<
    unsafe extern "C-unwind" fn(
        *mut c_void,
        IOOptionBits,
        IOBlitType,
        IOBlitSourceType,
        *mut IOBlitOperation,
        *mut c_void,
    ) -> IOReturn,
>;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iographicsacceleratorinterfacestruct?language=objc)
#[cfg(feature = "libc")]
#[repr(C)]
#[allow(unpredictable_function_pointer_comparisons)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOGraphicsAcceleratorInterfaceStruct {
    pub(crate) _reserved: *mut c_void,
    pub QueryInterface:
        Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
    pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
    pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
    pub version: u16,
    pub revision: u16,
    pub Probe: Option<
        unsafe extern "C-unwind" fn(
            *mut c_void,
            *const CFDictionary,
            io_service_t,
            *mut i32,
        ) -> IOReturn,
    >,
    pub Start: Option<
        unsafe extern "C-unwind" fn(*mut c_void, *const CFDictionary, io_service_t) -> IOReturn,
    >,
    pub Stop: Option<unsafe extern "C-unwind" fn(*mut c_void) -> IOReturn>,
    pub Reset: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>,
    pub CopyCapabilities: Option<
        unsafe extern "C-unwind" fn(*mut c_void, FourCharCode, *mut *const CFType) -> IOReturn,
    >,
    pub GetBlitProc: Option<
        unsafe extern "C-unwind" fn(
            *mut c_void,
            IOOptionBits,
            IOBlitType,
            IOBlitSourceDestType,
            *mut IOBlitProcPtr,
        ) -> IOReturn,
    >,
    pub Flush: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>,
    pub WaitForCompletion: Option<
        unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits, IOBlitCompletionToken) -> IOReturn,
    >,
    pub Synchronize:
        Option<unsafe extern "C-unwind" fn(*mut c_void, u32, u32, u32, u32, u32) -> IOReturn>,
    pub GetBeamPosition:
        Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits, *mut i32) -> IOReturn>,
    pub AllocateSurface: Option<
        unsafe extern "C-unwind" fn(
            *mut c_void,
            IOOptionBits,
            *mut IOBlitSurface,
            *mut c_void,
        ) -> IOReturn,
    >,
    pub FreeSurface: Option<
        unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits, *mut IOBlitSurface) -> IOReturn,
    >,
    pub LockSurface: Option<
        unsafe extern "C-unwind" fn(
            *mut c_void,
            IOOptionBits,
            *mut IOBlitSurface,
            *mut libc::vm_address_t,
        ) -> IOReturn,
    >,
    pub UnlockSurface: Option<
        unsafe extern "C-unwind" fn(
            *mut c_void,
            IOOptionBits,
            *mut IOBlitSurface,
            *mut IOOptionBits,
        ) -> IOReturn,
    >,
    pub SwapSurface: Option<
        unsafe extern "C-unwind" fn(
            *mut c_void,
            IOOptionBits,
            *mut IOBlitSurface,
            *mut IOOptionBits,
        ) -> IOReturn,
    >,
    pub SetDestination: Option<
        unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits, *mut IOBlitSurface) -> IOReturn,
    >,
    pub GetBlitter: Option<
        unsafe extern "C-unwind" fn(
            *mut c_void,
            IOOptionBits,
            IOBlitType,
            IOBlitSourceType,
            *mut IOBlitterPtr,
        ) -> IOReturn,
    >,
    pub WaitComplete: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>,
    pub(crate) __gaInterfaceReserved: [*mut c_void; 24],
}

#[cfg(all(feature = "libc", feature = "objc2"))]
unsafe impl Encode for IOGraphicsAcceleratorInterfaceStruct {
    const ENCODING: Encoding = Encoding::Struct("IOGraphicsAcceleratorInterfaceStruct", &[
        <*mut c_void>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,REFIID,*mut LPVOID,) -> HRESULT>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> ULONG>>::ENCODING,
        <u16>::ENCODING,
        <u16>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const CFDictionary,io_service_t,*mut i32,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,*const CFDictionary,io_service_t,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,FourCharCode,*mut *const CFType,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,IOBlitType,IOBlitSourceDestType,*mut IOBlitProcPtr,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,IOBlitCompletionToken,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,u32,u32,u32,u32,u32,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut i32,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,*mut c_void,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,*mut libc::vm_address_t,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,*mut IOOptionBits,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,*mut IOOptionBits,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,*mut IOBlitSurface,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,IOBlitType,IOBlitSourceType,*mut IOBlitterPtr,) -> IOReturn>>::ENCODING,
        <Option<unsafe extern "C-unwind" fn(*mut c_void,IOOptionBits,) -> IOReturn>>::ENCODING,
        <[*mut c_void; 24]>::ENCODING,
    ]);
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iographicsacceleratorinterface?language=objc)
#[cfg(feature = "libc")]
pub type IOGraphicsAcceleratorInterface = IOGraphicsAcceleratorInterfaceStruct;

extern "C-unwind" {
    /// # Safety
    ///
    /// - `p_accelerator` must be a valid pointer.
    /// - `p_framebuffer_index` must be a valid pointer.
    #[cfg(feature = "libc")]
    pub fn IOAccelFindAccelerator(
        framebuffer: io_service_t,
        p_accelerator: *mut io_service_t,
        p_framebuffer_index: *mut u32,
    ) -> IOReturn;
}

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioindex?language=objc)
pub type IOIndex = i32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioselect?language=objc)
pub type IOSelect = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofixed1616?language=objc)
pub type IOFixed1616 = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplayvendorid?language=objc)
pub type IODisplayVendorID = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplayproductid?language=objc)
pub type IODisplayProductID = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaymodeid?language=objc)
pub type IODisplayModeID = i32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomaxpixelbits?language=objc)
pub const kIOMaxPixelBits: c_uint = 64;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioclutpixels?language=objc)
pub const kIOCLUTPixels: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofixedclutpixels?language=objc)
pub const kIOFixedCLUTPixels: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorgbdirectpixels?language=objc)
pub const kIORGBDirectPixels: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomonodirectpixels?language=objc)
pub const kIOMonoDirectPixels: c_uint = 3;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomonoinversedirectpixels?language=objc)
pub const kIOMonoInverseDirectPixels: c_uint = 4;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorgbsigneddirectpixels?language=objc)
pub const kIORGBSignedDirectPixels: c_uint = 5;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorgbsignedfloatingpointpixels?language=objc)
pub const kIORGBSignedFloatingPointPixels: c_uint = 6;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioappletimingid?language=objc)
pub type IOAppleTimingID = u32;

/// A structure defining the format of a framebuffer.
///
/// This structure is used by IOFramebuffer to define the format of the pixels.
/// Field: nominalWidth Number of pixels visible per row.
/// Field: nominalHeight Number of visible pixel rows.
/// Field: refreshRate Refresh rate in fixed point 16.16.
/// Field: maxDepthIndex Highest depth index available in this display mode.
/// Field: flags Flags for the mode, including:
/// <br>
/// kDisplayModeInterlacedFlag mode is interlaced.
/// <br>
/// kDisplayModeSimulscanFlag mode is available on multiple display connections.
/// <br>
/// kDisplayModeNotPresetFlag mode is not a factory preset for the display (geometry may need correction).
/// <br>
/// kDisplayModeStretchedFlag mode is stretched/distorted to match the display aspect ratio.
/// <br>
/// Field: imageWidth Physical width of active image if known, in millimeters, otherwise zero.
/// <br>
/// Field: imageHeight Physical height of active image if known, in millimeters, otherwise zero.
/// <br>
/// Field: reserved Set to zero.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaymodeinformation?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IODisplayModeInformation {
    pub nominalWidth: u32,
    pub nominalHeight: u32,
    pub refreshRate: IOFixed1616,
    pub maxDepthIndex: IOIndex,
    pub flags: u32,
    pub imageWidth: u16,
    pub imageHeight: u16,
    pub reserved: [u32; 3],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IODisplayModeInformation {
    const ENCODING: Encoding = Encoding::Struct(
        "IODisplayModeInformation",
        &[
            <u32>::ENCODING,
            <u32>::ENCODING,
            <IOFixed1616>::ENCODING,
            <IOIndex>::ENCODING,
            <u32>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <[u32; 3]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodesafetyflags?language=objc)
pub const kDisplayModeSafetyFlags: c_uint = 0x00000007;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodealwaysshowflag?language=objc)
pub const kDisplayModeAlwaysShowFlag: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenevershowflag?language=objc)
pub const kDisplayModeNeverShowFlag: c_uint = 0x00000080;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenotresizeflag?language=objc)
pub const kDisplayModeNotResizeFlag: c_uint = 0x00000010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymoderequirespanflag?language=objc)
pub const kDisplayModeRequiresPanFlag: c_uint = 0x00000020;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodeinterlacedflag?language=objc)
pub const kDisplayModeInterlacedFlag: c_uint = 0x00000040;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodesimulscanflag?language=objc)
pub const kDisplayModeSimulscanFlag: c_uint = 0x00000100;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodebuiltinflag?language=objc)
pub const kDisplayModeBuiltInFlag: c_uint = 0x00000400;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenotpresetflag?language=objc)
pub const kDisplayModeNotPresetFlag: c_uint = 0x00000200;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodestretchedflag?language=objc)
pub const kDisplayModeStretchedFlag: c_uint = 0x00000800;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenotgraphicsqualityflag?language=objc)
pub const kDisplayModeNotGraphicsQualityFlag: c_uint = 0x00001000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidateagainstdisplay?language=objc)
pub const kDisplayModeValidateAgainstDisplay: c_uint = 0x00002000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodetelevisionflag?language=objc)
pub const kDisplayModeTelevisionFlag: c_uint = 0x00100000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidformirroringflag?language=objc)
pub const kDisplayModeValidForMirroringFlag: c_uint = 0x00200000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodeacceleratorbackedflag?language=objc)
pub const kDisplayModeAcceleratorBackedFlag: c_uint = 0x00400000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidforhiresflag?language=objc)
pub const kDisplayModeValidForHiResFlag: c_uint = 0x00800000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidforairplayflag?language=objc)
pub const kDisplayModeValidForAirPlayFlag: c_uint = 0x01000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodenativeflag?language=objc)
pub const kDisplayModeNativeFlag: c_uint = 0x02000000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodevalidflag?language=objc)
pub const kDisplayModeValidFlag: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodesafeflag?language=objc)
pub const kDisplayModeSafeFlag: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaymodedefaultflag?language=objc)
pub const kDisplayModeDefaultFlag: c_uint = 0x00000004;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioframebufferinformation?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOFramebufferInformation {
    pub baseAddress: IOPhysicalAddress,
    pub activeWidth: u32,
    pub activeHeight: u32,
    pub bytesPerRow: IOByteCount,
    pub bytesPerPlane: IOByteCount,
    pub bitsPerPixel: u32,
    pub pixelType: u32,
    pub flags: u32,
    pub reserved: [u32; 4],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOFramebufferInformation {
    const ENCODING: Encoding = Encoding::Struct(
        "IOFramebufferInformation",
        &[
            <IOPhysicalAddress>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <IOByteCount>::ENCODING,
            <IOByteCount>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <[u32; 4]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kframebuffersupportscopybackcache?language=objc)
pub const kFramebufferSupportsCopybackCache: c_uint = 0x00010000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kframebuffersupportswritethrucache?language=objc)
pub const kFramebufferSupportsWritethruCache: c_uint = 0x00020000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kframebuffersupportsgammacorrection?language=objc)
pub const kFramebufferSupportsGammaCorrection: c_uint = 0x00040000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kframebufferdisablealtivecaccess?language=objc)
pub const kFramebufferDisableAltivecAccess: c_uint = 0x00080000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iopixelaperture?language=objc)
pub type IOPixelAperture = IOIndex;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsystemaperture?language=objc)
pub const kIOFBSystemAperture: c_uint = 0;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iocolorcomponent?language=objc)
pub type IOColorComponent = u16;

/// A structure defining one entry of a color lookup table.
///
/// This structure is used by IOFramebuffer to define an entry of a color lookup table.
/// Field: index Number of pixels visible per row.
/// Field: red Value of red component 0-65535.
/// Field: green Value of green component 0-65535.
/// Field: blue Value of blue component 0-65535.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iocolorentry?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOColorEntry {
    pub index: u16,
    pub red: IOColorComponent,
    pub green: IOColorComponent,
    pub blue: IOColorComponent,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOColorEntry {
    const ENCODING: Encoding = Encoding::Struct(
        "IOColorEntry",
        &[
            <u16>::ENCODING,
            <IOColorComponent>::ENCODING,
            <IOColorComponent>::ENCODING,
            <IOColorComponent>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ksetclutbyvalue?language=objc)
pub const kSetCLUTByValue: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ksetclutimmediately?language=objc)
pub const kSetCLUTImmediately: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ksetclutwithluminance?language=objc)
pub const kSetCLUTWithLuminance: c_uint = 0x00000004;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopowerstateattribute?language=objc)
pub const kIOPowerStateAttribute: c_uint = 0x70777273;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopowerattribute?language=objc)
pub const kIOPowerAttribute: c_uint = 0x706f7772;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodriverpowerattribute?language=objc)
pub const kIODriverPowerAttribute: c_uint = 0x64706f77;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohardwarecursorattribute?language=objc)
pub const kIOHardwareCursorAttribute: c_uint = 0x63727372;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorattribute?language=objc)
pub const kIOMirrorAttribute: c_uint = 0x6d697272;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrordefaultattribute?language=objc)
pub const kIOMirrorDefaultAttribute: c_uint = 0x6d726466;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocapturedattribute?language=objc)
pub const kIOCapturedAttribute: c_uint = 0x63617064;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocursorcontrolattribute?language=objc)
pub const kIOCursorControlAttribute: c_uint = 0x63727363;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosystempowerattribute?language=objc)
pub const kIOSystemPowerAttribute: c_uint = 0x73707772;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowindowserveractiveattribute?language=objc)
pub const kIOWindowServerActiveAttribute: c_uint = 0x77737276;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiovramsaveattribute?language=objc)
pub const kIOVRAMSaveAttribute: c_uint = 0x76727376;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodeferclutsetattribute?language=objc)
pub const kIODeferCLUTSetAttribute: c_uint = 0x76636c74;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioclamshellstateattribute?language=objc)
pub const kIOClamshellStateAttribute: c_uint = 0x636c616d;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplayporttrainingattribute?language=objc)
pub const kIOFBDisplayPortTrainingAttribute: c_uint = 0x64707461;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate?language=objc)
pub const kIOFBDisplayState: c_uint = 0x64737474;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbvariablerefreshrate?language=objc)
pub const kIOFBVariableRefreshRate: c_uint = 0x7672723f;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblimithdcpattribute?language=objc)
pub const kIOFBLimitHDCPAttribute: c_uint = 0x68646370;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblimithdcpstateattribute?language=objc)
pub const kIOFBLimitHDCPStateAttribute: c_uint = 0x73484443;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbstop?language=objc)
pub const kIOFBStop: c_uint = 0x73746f70;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbredgammascaleattribute?language=objc)
pub const kIOFBRedGammaScaleAttribute: c_uint = 0x67736c72;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbgreengammascaleattribute?language=objc)
pub const kIOFBGreenGammaScaleAttribute: c_uint = 0x67736c67;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbluegammascaleattribute?language=objc)
pub const kIOFBBlueGammaScaleAttribute: c_uint = 0x67736c62;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdrmetadataattribute?language=objc)
pub const kIOFBHDRMetaDataAttribute: c_uint = 0x6864726d;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobuiltinpanelpowerattribute?language=objc)
pub const kIOBuiltinPanelPowerAttribute: c_uint = 0x706e6c70;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdcplimit_allowall?language=objc)
pub const kIOFBHDCPLimit_AllowAll: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdcplimit_nohdcp1x?language=objc)
pub const kIOFBHDCPLimit_NoHDCP1x: c_uint = 1 << 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdcplimit_nohdcp20type0?language=objc)
pub const kIOFBHDCPLimit_NoHDCP20Type0: c_uint = 1 << 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhdcplimit_nohdcp20type1?language=objc)
pub const kIOFBHDCPLimit_NoHDCP20Type1: c_uint = 1 << 2;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofbhdrmetadatav1?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOFBHDRMetaDataV1 {
    pub displayPrimary_X0: u16,
    pub displayPrimary_Y0: u16,
    pub displayPrimary_X1: u16,
    pub displayPrimary_Y1: u16,
    pub displayPrimary_X2: u16,
    pub displayPrimary_Y2: u16,
    pub displayPrimary_X: u16,
    pub displayPrimary_Y: u16,
    pub desiredLuminance_Max: u16,
    pub desiredLuminance_Min: u16,
    pub desiredLightLevel_Avg: u16,
    pub desiredLightLevel_Max: u16,
    pub(crate) __reservedA: [u64; 5],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOFBHDRMetaDataV1 {
    const ENCODING: Encoding = Encoding::Struct(
        "IOFBHDRMetaDataV1",
        &[
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <[u64; 5]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofbhdrmetadata?language=objc)
#[repr(C)]
#[derive(Clone, Copy)]
pub union IOFBHDRMetaData {
    pub v1: IOFBHDRMetaDataV1,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOFBHDRMetaData {
    const ENCODING: Encoding = Encoding::Union("?", &[<IOFBHDRMetaDataV1>::ENCODING]);
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate_alreadyactive?language=objc)
pub const kIOFBDisplayState_AlreadyActive: c_uint = 1 << 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate_restoredprofile?language=objc)
pub const kIOFBDisplayState_RestoredProfile: c_uint = 1 << 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate_pipelineblack?language=objc)
pub const kIOFBDisplayState_PipelineBlack: c_uint = 1 << 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplaystate_mask?language=objc)
pub const kIOFBDisplayState_Mask: c_uint = kIOFBDisplayState_AlreadyActive
    | kIOFBDisplayState_RestoredProfile
    | kIOFBDisplayState_PipelineBlack;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_unaccelerated?language=objc)
pub const kIOWSAA_Unaccelerated: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_accelerated?language=objc)
pub const kIOWSAA_Accelerated: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_from_accelerated?language=objc)
pub const kIOWSAA_From_Accelerated: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_to_accelerated?language=objc)
pub const kIOWSAA_To_Accelerated: c_uint = 3;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_sleep?language=objc)
pub const kIOWSAA_Sleep: c_uint = 4;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_hibernate?language=objc)
pub const kIOWSAA_Hibernate: c_uint = kIOWSAA_Sleep;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_driveropen?language=objc)
pub const kIOWSAA_DriverOpen: c_uint = 5;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_statemask?language=objc)
pub const kIOWSAA_StateMask: c_uint = 0xF;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_transactional?language=objc)
pub const kIOWSAA_Transactional: c_uint = 0x10;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_deferstart?language=objc)
pub const kIOWSAA_DeferStart: c_uint = 0x100;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_deferend?language=objc)
pub const kIOWSAA_DeferEnd: c_uint = 0x200;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_nonconsoledevice?language=objc)
pub const kIOWSAA_NonConsoleDevice: c_uint = 0x400;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiowsaa_reserved?language=objc)
pub const kIOWSAA_Reserved: c_uint = 0xF0000000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_rendezvous?language=objc)
pub const kIOFBNS_Rendezvous: c_uint = 0x87654321;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_messagemask?language=objc)
pub const kIOFBNS_MessageMask: c_uint = 0x0000000f;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_sleep?language=objc)
pub const kIOFBNS_Sleep: c_uint = 0x00;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_wake?language=objc)
pub const kIOFBNS_Wake: c_uint = 0x01;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_doze?language=objc)
pub const kIOFBNS_Doze: c_uint = 0x02;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_dim?language=objc)
pub const kIOFBNS_Dim: c_uint = 0x03;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_undim?language=objc)
pub const kIOFBNS_UnDim: c_uint = 0x04;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_displaystatemask?language=objc)
pub const kIOFBNS_DisplayStateMask: c_uint = 0x00000f00;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_displaystateshift?language=objc)
pub const kIOFBNS_DisplayStateShift: c_uint = 8;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_generationmask?language=objc)
pub const kIOFBNS_GenerationMask: c_uint = 0x7fff0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbns_generationshift?language=objc)
pub const kIOFBNS_GenerationShift: c_uint = 16;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorisprimary?language=objc)
pub const kIOMirrorIsPrimary: c_uint = 0x80000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorhwclipped?language=objc)
pub const kIOMirrorHWClipped: c_uint = 0x40000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorismirrored?language=objc)
pub const kIOMirrorIsMirrored: c_uint = 0x20000000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrordefault?language=objc)
pub const kIOMirrorDefault: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomirrorforced?language=objc)
pub const kIOMirrorForced: c_uint = 0x00000002;

/// / Display mode timing information
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodetailedtiminginformationv1?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IODetailedTimingInformationV1 {
    pub pixelClock: u32,
    pub horizontalActive: u32,
    pub horizontalBlanking: u32,
    pub horizontalBorder: u32,
    pub horizontalSyncOffset: u32,
    pub horizontalSyncWidth: u32,
    pub verticalActive: u32,
    pub verticalBlanking: u32,
    pub verticalBorder: u32,
    pub verticalSyncOffset: u32,
    pub verticalSyncWidth: u32,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IODetailedTimingInformationV1 {
    const ENCODING: Encoding = Encoding::Struct(
        "IODetailedTimingInformationV1",
        &[
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
        ],
    );
}

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

/// A structure defining the detailed timing information of a display mode.
///
/// This structure is used by IOFramebuffer to define detailed timing information for a display mode. The VESA EDID document has more information.
/// Field: __reservedA Set to zero.
/// Field: horizontalScaledInset If the mode is scaled, sets the number of active pixels to remove the left and right edges in order to display an underscanned image.
/// Field: verticalScaledInset If the mode is scaled, sets the number of active lines to remove the top and bottom edges in order to display an underscanned image.
/// Field: scalerFlags If the mode is scaled,
/// kIOScaleStretchToFit may be set to allow stretching.
/// kIOScaleRotateFlags is mask which may have the value given by kIOScaleRotate90, kIOScaleRotate180, kIOScaleRotate270 to display a rotated framebuffer.
/// Field: horizontalScaled If the mode is scaled, sets the size of the image before scaling or rotation.
/// Field: verticalScaled If the mode is scaled, sets the size of the image before scaling or rotation.
/// Field: signalConfig
/// kIOAnalogSetupExpected set if display expects a blank-to-black setup or pedestal.  See VESA signal standards.
/// <br>
/// kIOInterlacedCEATiming set for a CEA style interlaced timing:
/// <br>
/// Field 1 vertical blanking = half specified vertical blanking lines.
/// <br>
/// Field 2 vertical blanking = (half vertical blanking lines) + 1 line.
/// <br>
/// Field 1 vertical offset = half specified vertical sync offset.
/// <br>
/// Field 2 vertical offset = (half specified vertical sync offset) + 0.5 lines.
/// <br>
/// Field: signalLevels One of:
/// <br>
/// kIOAnalogSignalLevel_0700_0300 0.700 - 0.300 V p-p.
/// <br>
/// kIOAnalogSignalLevel_0714_0286 0.714 - 0.286 V p-p.
/// <br>
/// kIOAnalogSignalLevel_1000_0400 1.000 - 0.400 V p-p.
/// <br>
/// kIOAnalogSignalLevel_0700_0000 0.700 - 0.000 V p-p.
/// <br>
/// Field: pixelClock Pixel clock frequency in Hz.
/// Field: minPixelClock Minimum pixel clock frequency in Hz, with error.
/// Field: maxPixelClock Maximum pixel clock frequency in Hz, with error.
/// Field: horizontalActive Pixel clocks per line.
/// Field: horizontalBlanking Blanking clocks per line.
/// Field: horizontalSyncOffset First clock of horizontal sync.
/// Field: horizontalSyncPulseWidth Width of horizontal sync.
/// Field: verticalActive Number of lines per frame.
/// Field: verticalBlanking Blanking lines per frame.
/// Field: verticalSyncOffset First line of vertical sync.
/// Field: verticalSyncPulseWidth Height of vertical sync.
/// Field: horizontalBorderLeft Number of pixels in left horizontal border.
/// Field: horizontalBorderRight Number of pixels in right horizontal border.
/// Field: verticalBorderTop Number of lines in top vertical border.
/// Field: verticalBorderBottom Number of lines in bottom vertical border.
/// Field: horizontalSyncConfig kIOSyncPositivePolarity for positive polarity horizontal sync (0 for negative).
/// Field: horizontalSyncLevel Zero.
/// Field: verticalSyncConfig kIOSyncPositivePolarity for positive polarity vertical sync (0 for negative).
/// Field: verticalSyncLevel Zero.
/// Field: numLinks number of links to be used by a dual link timing, if zero, assume one link.
/// Field: verticalBlankingExtension maximum number of blanking extension lines that is available. (0 for none).
/// Field: pixelEncoding 2017 Timing Features - ERS 2-58 (6.3.1)
/// Field: bitsPerColorComponent 2017 Timing Features - ERS 2-58 (6.3.1)
/// Field: colorimetry 2017 Timing Features - ERS 2-58 (6.3.1)
/// Field: dynamicRange 2017 Timing Features - ERS 2-58 (6.3.1)
/// Field: dscCompressedBitsPerPixel 2018 Timing Features - ERS 2-63 (6.3.1)
/// Field: dscSliceHeight 2018 Timing Features - ERS 2-63 (6.3.1)
/// Field: dscSliceWidth 2018 Timing Features - ERS 2-63 (6.3.1)
/// Field: verticalBlankingMaxStretchPerFrame Max stretch time used for VRR refresh rate ramps
/// Field: verticalBlankingMaxShrinkPerFrame Max shrink time used for VRR refresh rate ramps
/// Field: __reservedB Reserved set to zero.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodetailedtiminginformationv2?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IODetailedTimingInformationV2 {
    pub(crate) __reservedA: [u32; 3],
    pub horizontalScaledInset: u32,
    pub verticalScaledInset: u32,
    pub scalerFlags: u32,
    pub horizontalScaled: u32,
    pub verticalScaled: u32,
    pub signalConfig: u32,
    pub signalLevels: u32,
    pub pixelClock: u64,
    pub minPixelClock: u64,
    pub maxPixelClock: u64,
    pub horizontalActive: u32,
    pub horizontalBlanking: u32,
    pub horizontalSyncOffset: u32,
    pub horizontalSyncPulseWidth: u32,
    pub verticalActive: u32,
    pub verticalBlanking: u32,
    pub verticalSyncOffset: u32,
    pub verticalSyncPulseWidth: u32,
    pub horizontalBorderLeft: u32,
    pub horizontalBorderRight: u32,
    pub verticalBorderTop: u32,
    pub verticalBorderBottom: u32,
    pub horizontalSyncConfig: u32,
    pub horizontalSyncLevel: u32,
    pub verticalSyncConfig: u32,
    pub verticalSyncLevel: u32,
    pub numLinks: u32,
    pub verticalBlankingExtension: u32,
    pub pixelEncoding: u16,
    pub bitsPerColorComponent: u16,
    pub colorimetry: u16,
    pub dynamicRange: u16,
    pub dscCompressedBitsPerPixel: u16,
    pub dscSliceHeight: u16,
    pub dscSliceWidth: u16,
    pub verticalBlankingMaxStretchPerFrame: u16,
    pub verticalBlankingMaxShrinkPerFrame: u16,
    pub(crate) __reservedB: [u16; 3],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IODetailedTimingInformationV2 {
    const ENCODING: Encoding = Encoding::Struct(
        "IODetailedTimingInformationV2",
        &[
            <[u32; 3]>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u64>::ENCODING,
            <u64>::ENCODING,
            <u64>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <[u16; 3]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodetailedtiminginformation?language=objc)
pub type IODetailedTimingInformation = IODetailedTimingInformationV2;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iotiminginformation_detailedinfo?language=objc)
#[repr(C)]
#[derive(Clone, Copy)]
pub union IOTimingInformation_detailedInfo {
    pub v1: IODetailedTimingInformationV1,
    pub v2: IODetailedTimingInformationV2,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOTimingInformation_detailedInfo {
    const ENCODING: Encoding = Encoding::Union(
        "?",
        &[
            <IODetailedTimingInformationV1>::ENCODING,
            <IODetailedTimingInformationV2>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iotiminginformation?language=objc)
#[repr(C)]
#[derive(Clone, Copy)]
pub struct IOTimingInformation {
    pub appleTimingID: IOAppleTimingID,
    pub flags: u32,
    pub detailedInfo: IOTimingInformation_detailedInfo,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOTimingInformation {
    const ENCODING: Encoding = Encoding::Struct(
        "IOTimingInformation",
        &[
            <IOAppleTimingID>::ENCODING,
            <u32>::ENCODING,
            <IOTimingInformation_detailedInfo>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodetailedtimingvalid?language=objc)
pub const kIODetailedTimingValid: c_uint = 0x80000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalinginfovalid?language=objc)
pub const kIOScalingInfoValid: c_uint = 0x40000000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalestretchtofit?language=objc)
pub const kIOScaleStretchToFit: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotateflags?language=objc)
pub const kIOScaleRotateFlags: c_uint = 0x000000f0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscaleswapaxes?language=objc)
pub const kIOScaleSwapAxes: c_uint = 0x00000010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscaleinvertx?language=objc)
pub const kIOScaleInvertX: c_uint = 0x00000020;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscaleinverty?language=objc)
pub const kIOScaleInvertY: c_uint = 0x00000040;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotate0?language=objc)
pub const kIOScaleRotate0: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotate90?language=objc)
pub const kIOScaleRotate90: c_uint = kIOScaleSwapAxes | kIOScaleInvertX;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotate180?language=objc)
pub const kIOScaleRotate180: c_uint = kIOScaleInvertX | kIOScaleInvertY;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalerotate270?language=objc)
pub const kIOScaleRotate270: c_uint = kIOScaleSwapAxes | kIOScaleInvertY;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingnotsupported?language=objc)
pub const kIOPixelEncodingNotSupported: c_uint = 0x0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingrgb444?language=objc)
pub const kIOPixelEncodingRGB444: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingycbcr444?language=objc)
pub const kIOPixelEncodingYCbCr444: c_uint = 0x0002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingycbcr422?language=objc)
pub const kIOPixelEncodingYCbCr422: c_uint = 0x0004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopixelencodingycbcr420?language=objc)
pub const kIOPixelEncodingYCbCr420: c_uint = 0x0008;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponentnotsupported?language=objc)
pub const kIOBitsPerColorComponentNotSupported: c_uint = 0x0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent6?language=objc)
pub const kIOBitsPerColorComponent6: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent8?language=objc)
pub const kIOBitsPerColorComponent8: c_uint = 0x0002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent10?language=objc)
pub const kIOBitsPerColorComponent10: c_uint = 0x0004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent12?language=objc)
pub const kIOBitsPerColorComponent12: c_uint = 0x0008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiobitspercolorcomponent16?language=objc)
pub const kIOBitsPerColorComponent16: c_uint = 0x0010;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrynotsupported?language=objc)
pub const kIOColorimetryNotSupported: c_uint = 0x0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrynativergb?language=objc)
pub const kIOColorimetryNativeRGB: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrysrgb?language=objc)
pub const kIOColorimetrysRGB: c_uint = 0x0002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrydcip3?language=objc)
pub const kIOColorimetryDCIP3: c_uint = 0x0004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetryadobergb?language=objc)
pub const kIOColorimetryAdobeRGB: c_uint = 0x0008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetryxvycc?language=objc)
pub const kIOColorimetryxvYCC: c_uint = 0x0010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrywgrgb?language=objc)
pub const kIOColorimetryWGRGB: c_uint = 0x0020;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrybt601?language=objc)
pub const kIOColorimetryBT601: c_uint = 0x0040;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrybt709?language=objc)
pub const kIOColorimetryBT709: c_uint = 0x0080;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrybt2020?language=objc)
pub const kIOColorimetryBT2020: c_uint = 0x0100;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocolorimetrybt2100?language=objc)
pub const kIOColorimetryBT2100: c_uint = 0x0200;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangenotsupported?language=objc)
pub const kIODynamicRangeNotSupported: c_uint = 0x0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangesdr?language=objc)
pub const kIODynamicRangeSDR: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangehdr10?language=objc)
pub const kIODynamicRangeHDR10: c_uint = 0x0002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangedolbynormalmode?language=objc)
pub const kIODynamicRangeDolbyNormalMode: c_uint = 0x0004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangedolbytunnelmode?language=objc)
pub const kIODynamicRangeDolbyTunnelMode: c_uint = 0x0008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangetraditionalgammahdr?language=objc)
pub const kIODynamicRangeTraditionalGammaHDR: c_uint = 0x0010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodynamicrangetraditionalgammasdr?language=objc)
pub const kIODynamicRangeTraditionalGammaSDR: c_uint = 0x0020;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofbdisplaymodedescription?language=objc)
#[repr(C, packed(4))]
#[derive(Clone, Copy)]
pub struct IOFBDisplayModeDescription {
    pub info: IODisplayModeInformation,
    pub timingInfo: IOTimingInformation,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOFBDisplayModeDescription {
    const ENCODING: Encoding = Encoding::Struct(
        "IOFBDisplayModeDescription",
        &[
            <IODisplayModeInformation>::ENCODING,
            <IOTimingInformation>::ENCODING,
        ],
    );
}

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

/// A structure defining the limits and attributes of a display or framebuffer.
///
/// This structure is used to define the limits for modes programmed as detailed timings by the OS. The VESA EDID is useful background information for many of these fields. A data property with this structure under the key kIOFBTimingRangeKey in a framebuffer will allow the OS to program detailed timings that fall within its range.
/// Field: __reservedA Set to zero.
/// Field: version Set to zero.
/// Field: __reservedB Set to zero.
/// Field: minPixelClock minimum pixel clock frequency in range, in Hz.
/// Field: minPixelClock maximum pixel clock frequency in range, in Hz.
/// Field: maxPixelError largest variation between specified and actual pixel clock frequency, in Hz.
/// Field: supportedSyncFlags mask of supported sync attributes. The following are defined:
/// <br>
/// kIORangeSupportsSeparateSyncs - digital separate syncs.
/// <br>
/// kIORangeSupportsSyncOnGreen - sync on green.
/// <br>
/// kIORangeSupportsCompositeSync - composite sync.
/// <br>
/// kIORangeSupportsVSyncSerration - vertical sync has serration and equalization pulses.
/// <br>
/// kIORangeSupportsVRR - variable refresh rate.
/// <br>
/// Field: supportedSignalLevels mask of possible signal levels. The following are defined:
/// <br>
/// kIORangeSupportsSignal_0700_0300 0.700 - 0.300 V p-p.
/// <br>
/// kIORangeSupportsSignal_0714_0286 0.714 - 0.286 V p-p.
/// <br>
/// kIORangeSupportsSignal_1000_0400 1.000 - 0.400 V p-p.
/// <br>
/// kIORangeSupportsSignal_0700_0000 0.700 - 0.000 V p-p.
/// <br>
/// Field: supportedSignalConfigs mask of possible signal configurations. The following are defined:
/// <br>
/// kIORangeSupportsInterlacedCEATiming Supports CEA style interlaced timing:
/// <br>
/// Field 1 vertical blanking = specified vertical blanking lines.
/// <br>
/// Field 2 vertical blanking = vertical blanking lines + 1 line.
/// <br>
/// Field 1 vertical offset = specified vertical sync offset.
/// <br>
/// Field 2 vertical offset = specified vertical sync offset + 0.5 lines.
/// <br>
/// kIORangeSupportsInterlacedCEATimingWithConfirm Supports CEA style interlaced timing, but require a confirm.
/// Field: minFrameRate minimum frame rate (vertical refresh frequency) in range, in Hz.
/// Field: maxFrameRate maximum frame rate (vertical refresh frequency) in range, in Hz.
/// Field: minLineRate minimum line rate (horizontal refresh frequency) in range, in Hz.
/// Field: maxLineRate maximum line rate (horizontal refresh frequency) in range, in Hz.
/// Field: maxHorizontalTotal maximum clocks in horizontal line (active + blanking).
/// Field: maxVerticalTotal maximum lines in vertical frame (active + blanking).
/// Field: __reservedD Set to zero.
/// Field: charSizeHorizontalActive horizontalActive must be a multiple of charSizeHorizontalActive.
/// Field: charSizeHorizontalBlanking horizontalBlanking must be a multiple of charSizeHorizontalBlanking.
/// Field: charSizeHorizontalSyncOffset horizontalSyncOffset must be a multiple of charSizeHorizontalSyncOffset.
/// Field: charSizeHorizontalSyncPulse horizontalSyncPulse must be a multiple of charSizeHorizontalSyncPulse.
/// Field: charSizeVerticalActive verticalActive must be a multiple of charSizeVerticalActive.
/// Field: charSizeVerticalBlanking verticalBlanking must be a multiple of charSizeVerticalBlanking.
/// Field: charSizeVerticalSyncOffset verticalSyncOffset must be a multiple of charSizeVerticalSyncOffset.
/// Field: charSizeVerticalSyncPulse verticalSyncPulse must be a multiple of charSizeVerticalSyncPulse.
/// Field: charSizeHorizontalBorderLeft horizontalBorderLeft must be a multiple of charSizeHorizontalBorderLeft.
/// Field: charSizeHorizontalBorderRight horizontalBorderRight must be a multiple of charSizeHorizontalBorderRight.
/// Field: charSizeVerticalBorderTop verticalBorderTop must be a multiple of charSizeVerticalBorderTop.
/// Field: charSizeVerticalBorderBottom verticalBorderBottom must be a multiple of charSizeVerticalBorderBottom.
/// Field: charSizeHorizontalTotal (horizontalActive + horizontalBlanking) must be a multiple of charSizeHorizontalTotal.
/// Field: charSizeVerticalTotal (verticalActive + verticalBlanking) must be a multiple of charSizeVerticalTotal.
/// Field: __reservedE Set to zero.
/// Field: minHorizontalActiveClocks minimum value of horizontalActive.
/// Field: maxHorizontalActiveClocks maximum value of horizontalActive.
/// Field: minHorizontalBlankingClocks minimum value of horizontalBlanking.
/// Field: maxHorizontalBlankingClocks maximum value of horizontalBlanking.
/// Field: minHorizontalSyncOffsetClocks minimum value of horizontalSyncOffset.
/// Field: maxHorizontalSyncOffsetClocks maximum value of horizontalSyncOffset.
/// Field: minHorizontalPulseWidthClocks minimum value of horizontalPulseWidth.
/// Field: maxHorizontalPulseWidthClocks maximum value of horizontalPulseWidth.
/// Field: minVerticalActiveClocks minimum value of verticalActive.
/// Field: maxVerticalActiveClocks maximum value of verticalActive.
/// Field: minVerticalBlankingClocks minimum value of verticalBlanking.
/// Field: maxVerticalBlankingClocks maximum value of verticalBlanking.
/// Field: minVerticalSyncOffsetClocks minimum value of verticalSyncOffset.
/// Field: maxVerticalSyncOffsetClocks maximum value of verticalSyncOffset.
/// Field: minVerticalPulseWidthClocks minimum value of verticalPulseWidth.
/// Field: maxVerticalPulseWidthClocks maximum value of verticalPulseWidth.
/// Field: minHorizontalBorderLeft minimum value of horizontalBorderLeft.
/// Field: maxHorizontalBorderLeft maximum value of horizontalBorderLeft.
/// Field: minHorizontalBorderRight minimum value of horizontalBorderRight.
/// Field: maxHorizontalBorderRight maximum value of horizontalBorderRight.
/// Field: minVerticalBorderTop minimum value of verticalBorderTop.
/// Field: maxVerticalBorderTop maximum value of verticalBorderTop.
/// Field: minVerticalBorderBottom minimum value of verticalBorderBottom.
/// Field: maxVerticalBorderBottom maximum value of verticalBorderBottom.
/// Field: maxNumLinks number of links supported, if zero, 1 link is assumed.
/// Field: minLink0PixelClock minimum pixel clock for link 0 (kHz).
/// Field: maxLink0PixelClock maximum pixel clock for link 0 (kHz).
/// Field: minLink1PixelClock minimum pixel clock for link 1 (kHz).
/// Field: maxLink1PixelClock maximum pixel clock for link 1 (kHz).
/// Field: supportedPixelEncoding 2017 Timing Features - ERS 2-58 (6.3.1)
/// Field: supportedBitsPerColorComponent 2017 Timing Features - ERS 2-58 (6.3.1)
/// Field: supportedColorimetry 2017 Timing Features - ERS 2-58 (6.3.1)
/// Field: supportedDynamicRange 2017 Timing Features - ERS 2-58 (6.3.1)
/// Field: __reservedF Set to zero.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaytimingrangev1?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IODisplayTimingRangeV1 {
    pub(crate) __reservedA: [u32; 2],
    pub version: u32,
    pub(crate) __reservedB: [u32; 5],
    pub minPixelClock: u64,
    pub maxPixelClock: u64,
    pub maxPixelError: u32,
    pub supportedSyncFlags: u32,
    pub supportedSignalLevels: u32,
    pub supportedSignalConfigs: u32,
    pub minFrameRate: u32,
    pub maxFrameRate: u32,
    pub minLineRate: u32,
    pub maxLineRate: u32,
    pub maxHorizontalTotal: u32,
    pub maxVerticalTotal: u32,
    pub(crate) __reservedD: [u32; 2],
    pub charSizeHorizontalActive: u8,
    pub charSizeHorizontalBlanking: u8,
    pub charSizeHorizontalSyncOffset: u8,
    pub charSizeHorizontalSyncPulse: u8,
    pub charSizeVerticalActive: u8,
    pub charSizeVerticalBlanking: u8,
    pub charSizeVerticalSyncOffset: u8,
    pub charSizeVerticalSyncPulse: u8,
    pub charSizeHorizontalBorderLeft: u8,
    pub charSizeHorizontalBorderRight: u8,
    pub charSizeVerticalBorderTop: u8,
    pub charSizeVerticalBorderBottom: u8,
    pub charSizeHorizontalTotal: u8,
    pub charSizeVerticalTotal: u8,
    pub(crate) __reservedE: u16,
    pub minHorizontalActiveClocks: u32,
    pub maxHorizontalActiveClocks: u32,
    pub minHorizontalBlankingClocks: u32,
    pub maxHorizontalBlankingClocks: u32,
    pub minHorizontalSyncOffsetClocks: u32,
    pub maxHorizontalSyncOffsetClocks: u32,
    pub minHorizontalPulseWidthClocks: u32,
    pub maxHorizontalPulseWidthClocks: u32,
    pub minVerticalActiveClocks: u32,
    pub maxVerticalActiveClocks: u32,
    pub minVerticalBlankingClocks: u32,
    pub maxVerticalBlankingClocks: u32,
    pub minVerticalSyncOffsetClocks: u32,
    pub maxVerticalSyncOffsetClocks: u32,
    pub minVerticalPulseWidthClocks: u32,
    pub maxVerticalPulseWidthClocks: u32,
    pub minHorizontalBorderLeft: u32,
    pub maxHorizontalBorderLeft: u32,
    pub minHorizontalBorderRight: u32,
    pub maxHorizontalBorderRight: u32,
    pub minVerticalBorderTop: u32,
    pub maxVerticalBorderTop: u32,
    pub minVerticalBorderBottom: u32,
    pub maxVerticalBorderBottom: u32,
    pub maxNumLinks: u32,
    pub minLink0PixelClock: u32,
    pub maxLink0PixelClock: u32,
    pub minLink1PixelClock: u32,
    pub maxLink1PixelClock: u32,
    pub supportedPixelEncoding: u16,
    pub supportedBitsPerColorComponent: u16,
    pub supportedColorimetryModes: u16,
    pub supportedDynamicRangeModes: u16,
    pub(crate) __reservedF: [u32; 1],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IODisplayTimingRangeV1 {
    const ENCODING: Encoding = Encoding::Struct(
        "IODisplayTimingRangeV1",
        &[
            <[u32; 2]>::ENCODING,
            <u32>::ENCODING,
            <[u32; 5]>::ENCODING,
            <u64>::ENCODING,
            <u64>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <[u32; 2]>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u16>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <[u32; 1]>::ENCODING,
        ],
    );
}

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

/// A structure defining the limits and attributes of DSC capabilities in a  framebuffer.
///
/// This structure is used to define the limits for DSC enabled modes programmed as detailed timings by the OS. The VESA DSC spec is useful background information for many of these fields.
/// Field: maxBandwidth Maximum permitted bandwidth of the given topology in bits per second.
/// Field: dscMinSliceHeight Minimum slice Height, in units of line.
/// Field: dscMaxSliceHeight Maximum slice Height, in units of line.
/// Field: dscMinSliceWidth  Minimum slice width, in units of line.
/// Field: dscMaxSliceWidth  Maximum slice width, in units of line.
/// Field: dscMinSlicePerLine Minimum slice per Line.
/// Field: dscMaxSlicePerLine Maximum slice per Line.
/// Field: dscMinBPC  Minimum Bits per component, in units of bits.
/// Field: dscMaxBPC  Maximum Bits per component, in units of bits.
/// Field: dscMinBPP  Minimum target bits/pixel, in bpp.
/// Field: dscMaxBPP  Maximum target bits/pixel, in bpp.
/// Field: dscVBR     VBR mode, 0:disabled 1:enabled.
/// Field: dscBlockPredEnable  DSC BP is user or not, 0: not used, 1: used.
/// Field: __reservedF  Set to zero.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaytimingrangev2?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IODisplayTimingRangeV2 {
    pub(crate) __reservedA: [u32; 2],
    pub version: u32,
    pub(crate) __reservedB: [u32; 5],
    pub minPixelClock: u64,
    pub maxPixelClock: u64,
    pub maxPixelError: u32,
    pub supportedSyncFlags: u32,
    pub supportedSignalLevels: u32,
    pub supportedSignalConfigs: u32,
    pub minFrameRate: u32,
    pub maxFrameRate: u32,
    pub minLineRate: u32,
    pub maxLineRate: u32,
    pub maxHorizontalTotal: u32,
    pub maxVerticalTotal: u32,
    pub(crate) __reservedD: [u32; 2],
    pub charSizeHorizontalActive: u8,
    pub charSizeHorizontalBlanking: u8,
    pub charSizeHorizontalSyncOffset: u8,
    pub charSizeHorizontalSyncPulse: u8,
    pub charSizeVerticalActive: u8,
    pub charSizeVerticalBlanking: u8,
    pub charSizeVerticalSyncOffset: u8,
    pub charSizeVerticalSyncPulse: u8,
    pub charSizeHorizontalBorderLeft: u8,
    pub charSizeHorizontalBorderRight: u8,
    pub charSizeVerticalBorderTop: u8,
    pub charSizeVerticalBorderBottom: u8,
    pub charSizeHorizontalTotal: u8,
    pub charSizeVerticalTotal: u8,
    pub(crate) __reservedE: u16,
    pub minHorizontalActiveClocks: u32,
    pub maxHorizontalActiveClocks: u32,
    pub minHorizontalBlankingClocks: u32,
    pub maxHorizontalBlankingClocks: u32,
    pub minHorizontalSyncOffsetClocks: u32,
    pub maxHorizontalSyncOffsetClocks: u32,
    pub minHorizontalPulseWidthClocks: u32,
    pub maxHorizontalPulseWidthClocks: u32,
    pub minVerticalActiveClocks: u32,
    pub maxVerticalActiveClocks: u32,
    pub minVerticalBlankingClocks: u32,
    pub maxVerticalBlankingClocks: u32,
    pub minVerticalSyncOffsetClocks: u32,
    pub maxVerticalSyncOffsetClocks: u32,
    pub minVerticalPulseWidthClocks: u32,
    pub maxVerticalPulseWidthClocks: u32,
    pub minHorizontalBorderLeft: u32,
    pub maxHorizontalBorderLeft: u32,
    pub minHorizontalBorderRight: u32,
    pub maxHorizontalBorderRight: u32,
    pub minVerticalBorderTop: u32,
    pub maxVerticalBorderTop: u32,
    pub minVerticalBorderBottom: u32,
    pub maxVerticalBorderBottom: u32,
    pub maxNumLinks: u32,
    pub minLink0PixelClock: u32,
    pub maxLink0PixelClock: u32,
    pub minLink1PixelClock: u32,
    pub maxLink1PixelClock: u32,
    pub supportedPixelEncoding: u16,
    pub supportedBitsPerColorComponent: u16,
    pub supportedColorimetryModes: u16,
    pub supportedDynamicRangeModes: u16,
    pub(crate) __reservedF: [u32; 1],
    pub maxBandwidth: u64,
    pub dscMinSliceHeight: u32,
    pub dscMaxSliceHeight: u32,
    pub dscMinSliceWidth: u32,
    pub dscMaxSliceWidth: u32,
    pub dscMinSlicePerLine: u32,
    pub dscMaxSlicePerLine: u32,
    pub dscMinBPC: u16,
    pub dscMaxBPC: u16,
    pub dscMinBPP: u16,
    pub dscMaxBPP: u16,
    pub dscVBR: u8,
    pub dscBlockPredEnable: u8,
    pub(crate) __reservedC: [u32; 6],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IODisplayTimingRangeV2 {
    const ENCODING: Encoding = Encoding::Struct(
        "IODisplayTimingRangeV2",
        &[
            <[u32; 2]>::ENCODING,
            <u32>::ENCODING,
            <[u32; 5]>::ENCODING,
            <u64>::ENCODING,
            <u64>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <[u32; 2]>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u16>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <[u32; 1]>::ENCODING,
            <u64>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <[u32; 6]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplaytimingrange?language=objc)
pub type IODisplayTimingRange = IODisplayTimingRangeV2;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingrangev2?language=objc)
pub const kIOTimingRangeV2: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingrangev1?language=objc)
pub const kIOTimingRangeV1: c_uint = 0x00000000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingnotsupported?language=objc)
pub const kIORangePixelEncodingNotSupported: c_uint = 0x0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingrgb444?language=objc)
pub const kIORangePixelEncodingRGB444: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingycbcr444?language=objc)
pub const kIORangePixelEncodingYCbCr444: c_uint = 0x0002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingycbcr422?language=objc)
pub const kIORangePixelEncodingYCbCr422: c_uint = 0x0004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangepixelencodingycbcr420?language=objc)
pub const kIORangePixelEncodingYCbCr420: c_uint = 0x0008;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponentnotsupported?language=objc)
pub const kIORangeBitsPerColorComponentNotSupported: c_uint = 0x0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent6?language=objc)
pub const kIORangeBitsPerColorComponent6: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent8?language=objc)
pub const kIORangeBitsPerColorComponent8: c_uint = 0x0002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent10?language=objc)
pub const kIORangeBitsPerColorComponent10: c_uint = 0x0004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent12?language=objc)
pub const kIORangeBitsPerColorComponent12: c_uint = 0x0008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangebitspercolorcomponent16?language=objc)
pub const kIORangeBitsPerColorComponent16: c_uint = 0x0010;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrynotsupported?language=objc)
pub const kIORangeColorimetryNotSupported: c_uint = 0x0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrynativergb?language=objc)
pub const kIORangeColorimetryNativeRGB: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrysrgb?language=objc)
pub const kIORangeColorimetrysRGB: c_uint = 0x0002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrydcip3?language=objc)
pub const kIORangeColorimetryDCIP3: c_uint = 0x0004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetryadobergb?language=objc)
pub const kIORangeColorimetryAdobeRGB: c_uint = 0x0008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetryxvycc?language=objc)
pub const kIORangeColorimetryxvYCC: c_uint = 0x0010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrywgrgb?language=objc)
pub const kIORangeColorimetryWGRGB: c_uint = 0x0020;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrybt601?language=objc)
pub const kIORangeColorimetryBT601: c_uint = 0x0040;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrybt709?language=objc)
pub const kIORangeColorimetryBT709: c_uint = 0x0080;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrybt2020?language=objc)
pub const kIORangeColorimetryBT2020: c_uint = 0x0100;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangecolorimetrybt2100?language=objc)
pub const kIORangeColorimetryBT2100: c_uint = 0x0200;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangenotsupported?language=objc)
pub const kIORangeDynamicRangeNotSupported: c_uint = 0x0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangesdr?language=objc)
pub const kIORangeDynamicRangeSDR: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangehdr10?language=objc)
pub const kIORangeDynamicRangeHDR10: c_uint = 0x0002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangedolbynormalmode?language=objc)
pub const kIORangeDynamicRangeDolbyNormalMode: c_uint = 0x0004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangedolbytunnelmode?language=objc)
pub const kIORangeDynamicRangeDolbyTunnelMode: c_uint = 0x0008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangetraditionalgammahdr?language=objc)
pub const kIORangeDynamicRangeTraditionalGammaHDR: c_uint = 0x0010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangedynamicrangetraditionalgammasdr?language=objc)
pub const kIORangeDynamicRangeTraditionalGammaSDR: c_uint = 0x0020;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssignal_0700_0300?language=objc)
pub const kIORangeSupportsSignal_0700_0300: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssignal_0714_0286?language=objc)
pub const kIORangeSupportsSignal_0714_0286: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssignal_1000_0400?language=objc)
pub const kIORangeSupportsSignal_1000_0400: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssignal_0700_0000?language=objc)
pub const kIORangeSupportsSignal_0700_0000: c_uint = 0x00000008;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsseparatesyncs?language=objc)
pub const kIORangeSupportsSeparateSyncs: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportssyncongreen?language=objc)
pub const kIORangeSupportsSyncOnGreen: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportscompositesync?language=objc)
pub const kIORangeSupportsCompositeSync: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsvsyncserration?language=objc)
pub const kIORangeSupportsVSyncSerration: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsvrr?language=objc)
pub const kIORangeSupportsVRR: c_uint = 0x00000010;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsinterlacedceatiming?language=objc)
pub const kIORangeSupportsInterlacedCEATiming: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsinterlacedceatimingwithconfirm?language=objc)
pub const kIORangeSupportsInterlacedCEATimingWithConfirm: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiorangesupportsmultialignedtiming?language=objc)
pub const kIORangeSupportsMultiAlignedTiming: c_uint = 0x00000040;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodigitalsignal?language=objc)
pub const kIODigitalSignal: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsetupexpected?language=objc)
pub const kIOAnalogSetupExpected: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiointerlacedceatiming?language=objc)
pub const kIOInterlacedCEATiming: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiontsctiming?language=objc)
pub const kIONTSCTiming: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopaltiming?language=objc)
pub const kIOPALTiming: c_uint = 0x00000010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodscblockpredenable?language=objc)
pub const kIODSCBlockPredEnable: c_uint = 0x00000020;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiomultialignedtiming?language=objc)
pub const kIOMultiAlignedTiming: c_uint = 0x00000040;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsignallevel_0700_0300?language=objc)
pub const kIOAnalogSignalLevel_0700_0300: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsignallevel_0714_0286?language=objc)
pub const kIOAnalogSignalLevel_0714_0286: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsignallevel_1000_0400?language=objc)
pub const kIOAnalogSignalLevel_1000_0400: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioanalogsignallevel_0700_0000?language=objc)
pub const kIOAnalogSignalLevel_0700_0000: c_uint = 3;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosyncpositivepolarity?language=objc)
pub const kIOSyncPositivePolarity: c_uint = 0x00000001;

/// A structure defining the scaling capabilities of a framebuffer.
///
/// This structure is used to define the limits for modes programmed as detailed timings by the OS. A data property with this structure under the key kIOFBScalerInfoKey in a framebuffer will allow the OS to program detailed timings that are scaled to a displays native resolution.
/// Field: __reservedA Set to zero.
/// Field: version Set to zero.
/// Field: __reservedB Set to zero.
/// Field: scalerFeatures Mask of scaling features. The following are defined:
/// <br>
/// kIOScaleStretchOnly If set the framebuffer can only provide stretched scaling with non-square pixels, without borders.
/// <br>
/// kIOScaleCanUpSamplePixels If set framebuffer can scale up from a smaller number of source pixels to a larger native timing (eg. 640x480 pixels on a 1600x1200 timing).
/// <br>
/// kIOScaleCanDownSamplePixels If set framebuffer can scale down from a larger number of source pixels to a smaller native timing (eg. 1600x1200 pixels on a 640x480 timing).
/// <br>
/// kIOScaleCanScaleInterlaced If set framebuffer can scale an interlaced detailed timing.
/// <br>
/// kIOScaleCanSupportInset If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields.
/// <br>
/// kIOScaleCanRotate If set framebuffer can support some of the flags in the kIOScaleRotateFlags mask.
/// <br>
/// kIOScaleCanBorderInsetOnly If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields, but requires the active pixels to be equal in size to the inset area, ie. can do insets with a border versus scaling an image.
/// <br>
/// Field: maxHorizontalPixels Maximum number of horizontal source pixels (horizontalScaled).
/// <br>
/// Field: maxVerticalPixels Maximum number of vertical source pixels (verticalScaled).
/// <br>
/// Field: __reservedC Set to zero.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iodisplayscalerinformation?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IODisplayScalerInformation {
    pub(crate) __reservedA: [u32; 1],
    pub version: u32,
    pub(crate) __reservedB: [u32; 2],
    pub scalerFeatures: IOOptionBits,
    pub maxHorizontalPixels: u32,
    pub maxVerticalPixels: u32,
    pub(crate) __reservedC: [u32; 5],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IODisplayScalerInformation {
    const ENCODING: Encoding = Encoding::Struct(
        "IODisplayScalerInformation",
        &[
            <[u32; 1]>::ENCODING,
            <u32>::ENCODING,
            <[u32; 2]>::ENCODING,
            <IOOptionBits>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <[u32; 5]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalestretchonly?language=objc)
pub const kIOScaleStretchOnly: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecanupsamplepixels?language=objc)
pub const kIOScaleCanUpSamplePixels: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecandownsamplepixels?language=objc)
pub const kIOScaleCanDownSamplePixels: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecanscaleinterlaced?language=objc)
pub const kIOScaleCanScaleInterlaced: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecansupportinset?language=objc)
pub const kIOScaleCanSupportInset: c_uint = 0x00000010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecanrotate?language=objc)
pub const kIOScaleCanRotate: c_uint = 0x00000020;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioscalecanborderinsetonly?language=objc)
pub const kIOScaleCanBorderInsetOnly: c_uint = 0x00000040;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/korconnections?language=objc)
pub const kOrConnections: c_uint = 0xffffffe;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kandconnections?language=objc)
pub const kAndConnections: c_uint = 0xffffffd;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionflags?language=objc)
pub const kConnectionFlags: c_uint = 0x666c6773;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsyncenable?language=objc)
pub const kConnectionSyncEnable: c_uint = 0x73796e63;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsyncflags?language=objc)
pub const kConnectionSyncFlags: c_uint = 0x73796366;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsupportsapplesense?language=objc)
pub const kConnectionSupportsAppleSense: c_uint = 0x61736e73;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsupportsllddcsense?language=objc)
pub const kConnectionSupportsLLDDCSense: c_uint = 0x6c646463;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionsupportshlddcsense?language=objc)
pub const kConnectionSupportsHLDDCSense: c_uint = 0x68646463;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionenable?language=objc)
pub const kConnectionEnable: c_uint = 0x656e6162;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncheckenable?language=objc)
pub const kConnectionCheckEnable: c_uint = 0x63656e61;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionprobe?language=objc)
pub const kConnectionProbe: c_uint = 0x70726f62;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionignore?language=objc)
pub const kConnectionIgnore: c_uint = 0x00696772;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionchanged?language=objc)
pub const kConnectionChanged: c_uint = 0x63686e67;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionpower?language=objc)
pub const kConnectionPower: c_uint = 0x706f7772;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionpostwake?language=objc)
pub const kConnectionPostWake: c_uint = 0x7077616b;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiondisplayparametercount?language=objc)
pub const kConnectionDisplayParameterCount: c_uint = 0x70636e74;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiondisplayparameters?language=objc)
pub const kConnectionDisplayParameters: c_uint = 0x7061726d;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionoverscan?language=objc)
pub const kConnectionOverscan: c_uint = 0x6f73636e;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionvideobest?language=objc)
pub const kConnectionVideoBest: c_uint = 0x76627374;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionredgammascale?language=objc)
pub const kConnectionRedGammaScale: c_uint = 0x72677363;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiongreengammascale?language=objc)
pub const kConnectionGreenGammaScale: c_uint = 0x67677363;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionbluegammascale?language=objc)
pub const kConnectionBlueGammaScale: c_uint = 0x62677363;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiongammascale?language=objc)
pub const kConnectionGammaScale: c_uint = 0x67736320;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionflushparameters?language=objc)
pub const kConnectionFlushParameters: c_uint = 0x666c7573;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionvblmultiplier?language=objc)
pub const kConnectionVBLMultiplier: c_uint = 0x76626c6d;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionhandledisplayportevent?language=objc)
pub const kConnectionHandleDisplayPortEvent: c_uint = 0x64706972;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionpaneltimingdisable?language=objc)
pub const kConnectionPanelTimingDisable: c_uint = 0x706e6c74;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncolormode?language=objc)
pub const kConnectionColorMode: c_uint = 0x63797576;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncolormodessupported?language=objc)
pub const kConnectionColorModesSupported: c_uint = 0x636f6c72;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncolordepthssupported?language=objc)
pub const kConnectionColorDepthsSupported: c_uint = 0x20627063;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncontrollerdepthssupported?language=objc)
pub const kConnectionControllerDepthsSupported: c_uint = 0x00677264;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncontrollercolordepth?language=objc)
pub const kConnectionControllerColorDepth: c_uint = 0x00647064;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectioncontrollerdithercontrol?language=objc)
pub const kConnectionControllerDitherControl: c_uint = 0x00676463;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectiondisplayflags?language=objc)
pub const kConnectionDisplayFlags: c_uint = 0x64666c67;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionenableaudio?language=objc)
pub const kConnectionEnableAudio: c_uint = 0x61756420;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionaudiostreaming?language=objc)
pub const kConnectionAudioStreaming: c_uint = 0x61756473;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kconnectionstartofframetime?language=objc)
pub const kConnectionStartOfFrameTime: c_uint = 0x736f6674;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioconnectionbuiltin?language=objc)
pub const kIOConnectionBuiltIn: c_uint = 0x00000800;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kioconnectionstereosync?language=objc)
pub const kIOConnectionStereoSync: c_uint = 0x00008000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohsyncdisable?language=objc)
pub const kIOHSyncDisable: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiovsyncdisable?language=objc)
pub const kIOVSyncDisable: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiocsyncdisable?language=objc)
pub const kIOCSyncDisable: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kionoseparatesynccontrol?language=objc)
pub const kIONoSeparateSyncControl: c_uint = 0x00000040;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotristatesyncs?language=objc)
pub const kIOTriStateSyncs: c_uint = 0x00000080;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosynconblue?language=objc)
pub const kIOSyncOnBlue: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosyncongreen?language=objc)
pub const kIOSyncOnGreen: c_uint = 0x00000010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiosynconred?language=objc)
pub const kIOSyncOnRed: c_uint = 0x00000020;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventstart?language=objc)
pub const kIODPEventStart: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventidle?language=objc)
pub const kIODPEventIdle: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventforceretrain?language=objc)
pub const kIODPEventForceRetrain: c_uint = 3;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventremotecontrolcommandpending?language=objc)
pub const kIODPEventRemoteControlCommandPending: c_uint = 256;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventautomatedtestrequest?language=objc)
pub const kIODPEventAutomatedTestRequest: c_uint = 257;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventcontentprotection?language=objc)
pub const kIODPEventContentProtection: c_uint = 258;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventmccs?language=objc)
pub const kIODPEventMCCS: c_uint = 259;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodpeventsinkspecific?language=objc)
pub const kIODPEventSinkSpecific: c_uint = 260;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaycolormode?language=objc)
pub const kIODisplayColorMode: c_uint = kConnectionColorMode;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbitsunknown?language=objc)
pub const kIODisplayRGBColorComponentBitsUnknown: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits6?language=objc)
pub const kIODisplayRGBColorComponentBits6: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits8?language=objc)
pub const kIODisplayRGBColorComponentBits8: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits10?language=objc)
pub const kIODisplayRGBColorComponentBits10: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits12?language=objc)
pub const kIODisplayRGBColorComponentBits12: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits14?language=objc)
pub const kIODisplayRGBColorComponentBits14: c_uint = 0x00000010;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayrgbcolorcomponentbits16?language=objc)
pub const kIODisplayRGBColorComponentBits16: c_uint = 0x00000020;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbitsunknown?language=objc)
pub const kIODisplayYCbCr444ColorComponentBitsUnknown: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits6?language=objc)
pub const kIODisplayYCbCr444ColorComponentBits6: c_uint = 0x00000100;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits8?language=objc)
pub const kIODisplayYCbCr444ColorComponentBits8: c_uint = 0x00000200;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits10?language=objc)
pub const kIODisplayYCbCr444ColorComponentBits10: c_uint = 0x00000400;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits12?language=objc)
pub const kIODisplayYCbCr444ColorComponentBits12: c_uint = 0x00000800;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits14?language=objc)
pub const kIODisplayYCbCr444ColorComponentBits14: c_uint = 0x00001000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr444colorcomponentbits16?language=objc)
pub const kIODisplayYCbCr444ColorComponentBits16: c_uint = 0x00002000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbitsunknown?language=objc)
pub const kIODisplayYCbCr422ColorComponentBitsUnknown: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits6?language=objc)
pub const kIODisplayYCbCr422ColorComponentBits6: c_uint = 0x00010000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits8?language=objc)
pub const kIODisplayYCbCr422ColorComponentBits8: c_uint = 0x00020000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits10?language=objc)
pub const kIODisplayYCbCr422ColorComponentBits10: c_uint = 0x00040000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits12?language=objc)
pub const kIODisplayYCbCr422ColorComponentBits12: c_uint = 0x00080000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits14?language=objc)
pub const kIODisplayYCbCr422ColorComponentBits14: c_uint = 0x00100000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayycbcr422colorcomponentbits16?language=objc)
pub const kIODisplayYCbCr422ColorComponentBits16: c_uint = 0x00200000;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherdisable?language=objc)
pub const kIODisplayDitherDisable: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherspatial?language=objc)
pub const kIODisplayDitherSpatial: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaydithertemporal?language=objc)
pub const kIODisplayDitherTemporal: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherframeratecontrol?language=objc)
pub const kIODisplayDitherFrameRateControl: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherdefault?language=objc)
pub const kIODisplayDitherDefault: c_uint = 0x00000080;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherall?language=objc)
pub const kIODisplayDitherAll: c_uint = 0x000000FF;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherrgbshift?language=objc)
pub const kIODisplayDitherRGBShift: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherycbcr444shift?language=objc)
pub const kIODisplayDitherYCbCr444Shift: c_uint = 8;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayditherycbcr422shift?language=objc)
pub const kIODisplayDitherYCbCr422Shift: c_uint = 16;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayneedsceaunderscan?language=objc)
pub const kIODisplayNeedsCEAUnderscan: c_uint = 0x00000001;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowerstateoff?language=objc)
pub const kIODisplayPowerStateOff: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowerstateminusable?language=objc)
pub const kIODisplayPowerStateMinUsable: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaypowerstateon?language=objc)
pub const kIODisplayPowerStateOn: c_uint = 2;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbserverconnecttype?language=objc)
pub const kIOFBServerConnectType: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbsharedconnecttype?language=objc)
pub const kIOFBSharedConnectType: c_uint = 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiogdiagnosegtracetype?language=objc)
pub const kIOGDiagnoseGTraceType: c_uint = 11452;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiogdiagnoseconnecttype?language=objc)
pub const kIOGDiagnoseConnectType: c_uint = 38744;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayassertionconnecttype?language=objc)
pub const kIODisplayAssertionConnectType: c_uint = 61074;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbuserrequestprobe?language=objc)
pub const kIOFBUserRequestProbe: c_uint = 0x00000001;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iogpoint?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOGPoint {
    pub x: i16,
    pub y: i16,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOGPoint {
    const ENCODING: Encoding = Encoding::Struct("IOGPoint", &[<i16>::ENCODING, <i16>::ENCODING]);
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iogsize?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOGSize {
    pub width: i16,
    pub height: i16,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOGSize {
    const ENCODING: Encoding = Encoding::Struct("IOGSize", &[<i16>::ENCODING, <i16>::ENCODING]);
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iogbounds?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOGBounds {
    pub minx: i16,
    pub maxx: i16,
    pub miny: i16,
    pub maxy: i16,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOGBounds {
    const ENCODING: Encoding = Encoding::Struct(
        "IOGBounds",
        &[
            <i16>::ENCODING,
            <i16>::ENCODING,
            <i16>::ENCODING,
            <i16>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ktransparentencoding?language=objc)
pub const kTransparentEncoding: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kinvertingencoding?language=objc)
pub const kInvertingEncoding: c_uint = 1;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ktransparentencodingshift?language=objc)
pub const kTransparentEncodingShift: c_uint = kTransparentEncoding << 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ktransparentencodedpixel?language=objc)
pub const kTransparentEncodedPixel: c_uint = 0x01 << kTransparentEncodingShift;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kinvertingencodingshift?language=objc)
pub const kInvertingEncodingShift: c_uint = kInvertingEncoding << 1;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kinvertingencodedpixel?language=objc)
pub const kInvertingEncodedPixel: c_uint = 0x01 << kInvertingEncodingShift;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/khardwarecursordescriptormajorversion?language=objc)
pub const kHardwareCursorDescriptorMajorVersion: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/khardwarecursordescriptorminorversion?language=objc)
pub const kHardwareCursorDescriptorMinorVersion: c_uint = 0x0000;

/// A structure defining the format of a hardware cursor.
///
/// This structure is used by IOFramebuffer to define the format of a hardware cursor.
/// Field: majorVersion Set to kHardwareCursorDescriptorMajorVersion.
/// Field: minorVersion Set to kHardwareCursorDescriptorMinorVersion.
/// Field: height Maximum size of the cursor.
/// Field: width Maximum size of the cursor.
/// Field: bitDepth Number bits per pixel, or a QD/QT pixel type, for example kIO8IndexedPixelFormat, kIO32ARGBPixelFormat.
/// Field: maskBitDepth Unused.
/// Field: numColors Number of colors for indexed pixel types.
/// Field: colorEncodings An array pointer specifying the pixel values corresponding to the indices into the color table, for indexed pixel types.
/// Field: flags None defined, set to zero.
/// Field: supportedSpecialEncodings Mask of supported special pixel values, eg. kTransparentEncodedPixel, kInvertingEncodedPixel.
/// Field: specialEncodings Array of pixel values for each supported special encoding.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iohardwarecursordescriptor?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOHardwareCursorDescriptor {
    pub majorVersion: u16,
    pub minorVersion: u16,
    pub height: u32,
    pub width: u32,
    pub bitDepth: u32,
    pub maskBitDepth: u32,
    pub numColors: u32,
    pub colorEncodings: *mut u32,
    pub flags: u32,
    pub supportedSpecialEncodings: u32,
    pub specialEncodings: [u32; 16],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOHardwareCursorDescriptor {
    const ENCODING: Encoding = Encoding::Struct(
        "IOHardwareCursorDescriptor",
        &[
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <*mut u32>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <[u32; 16]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/khardwarecursorinfomajorversion?language=objc)
pub const kHardwareCursorInfoMajorVersion: c_uint = 0x0001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/khardwarecursorinfominorversion?language=objc)
pub const kHardwareCursorInfoMinorVersion: c_uint = 0x0000;

/// A structure defining the converted data of a hardware cursor.
///
/// This structure is used by IOFramebuffer to return the data of a hardware cursor by convertCursorImage() after conversion based on the IOHardwareCursorDescriptor passed to that routine.
/// Field: majorVersion Set to kHardwareCursorInfoMajorVersion.
/// Field: minorVersion Set to kHardwareCursorInfoMinorVersion.
/// Field: cursorHeight The actual size of the cursor is returned.
/// Field: cursorWidth The actual size of the cursor is returned.
/// Field: colorMap Pointer to array of IOColorEntry structures, with the number of elements set by the numColors field of the IOHardwareCursorDescriptor. Zero should be passed for direct pixel formats.
/// Field: hardwareCursorData Buffer to receive the converted cursor data.
/// Field: cursorHotSpotX Cursor's hotspot.
/// Field: cursorHotSpotY Cursor's hotspot.
/// Field: reserved Reserved, set to zero.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iohardwarecursorinfo?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOHardwareCursorInfo {
    pub majorVersion: u16,
    pub minorVersion: u16,
    pub cursorHeight: u32,
    pub cursorWidth: u32,
    pub colorMap: *mut IOColorEntry,
    pub hardwareCursorData: *mut u8,
    pub cursorHotSpotX: u16,
    pub cursorHotSpotY: u16,
    pub reserved: [u32; 5],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOHardwareCursorInfo {
    const ENCODING: Encoding = Encoding::Struct(
        "IOHardwareCursorInfo",
        &[
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u32>::ENCODING,
            <u32>::ENCODING,
            <*mut IOColorEntry>::ENCODING,
            <*mut u8>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <[u32; 5]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbvblinterrupttype?language=objc)
pub const kIOFBVBLInterruptType: c_uint = 0x76626c20;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhblinterrupttype?language=objc)
pub const kIOFBHBLInterruptType: c_uint = 0x68626c20;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbframeinterrupttype?language=objc)
pub const kIOFBFrameInterruptType: c_uint = 0x6672616d;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbconnectinterrupttype?language=objc)
pub const kIOFBConnectInterruptType: c_uint = 0x64636920;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbchangedinterrupttype?language=objc)
pub const kIOFBChangedInterruptType: c_uint = 0x63686e67;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbofflineinterrupttype?language=objc)
pub const kIOFBOfflineInterruptType: c_uint = 0x72656d76;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbonlineinterrupttype?language=objc)
pub const kIOFBOnlineInterruptType: c_uint = 0x61646420;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplayportinterrupttype?language=objc)
pub const kIOFBDisplayPortInterruptType: c_uint = 0x64706972;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbdisplayportlinkchangeinterrupttype?language=objc)
pub const kIOFBDisplayPortLinkChangeInterruptType: c_uint = 0x64706c6b;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmccsinterrupttype?language=objc)
pub const kIOFBMCCSInterruptType: c_uint = 0x6d636373;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbwakeinterrupttype?language=objc)
pub const kIOFBWakeInterruptType: c_uint = 0x7677616b;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidinvalid?language=objc)
pub const kIOTimingIDInvalid: c_uint = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_fixedratelcd?language=objc)
pub const kIOTimingIDApple_FixedRateLCD: c_uint = 42;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_512x384_60hz?language=objc)
pub const kIOTimingIDApple_512x384_60hz: c_uint = 130;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_560x384_60hz?language=objc)
pub const kIOTimingIDApple_560x384_60hz: c_uint = 135;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_640x480_67hz?language=objc)
pub const kIOTimingIDApple_640x480_67hz: c_uint = 140;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_640x400_67hz?language=objc)
pub const kIOTimingIDApple_640x400_67hz: c_uint = 145;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_640x480_60hz?language=objc)
pub const kIOTimingIDVESA_640x480_60hz: c_uint = 150;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_640x480_72hz?language=objc)
pub const kIOTimingIDVESA_640x480_72hz: c_uint = 152;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_640x480_75hz?language=objc)
pub const kIOTimingIDVESA_640x480_75hz: c_uint = 154;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_640x480_85hz?language=objc)
pub const kIOTimingIDVESA_640x480_85hz: c_uint = 158;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidgtf_640x480_120hz?language=objc)
pub const kIOTimingIDGTF_640x480_120hz: c_uint = 159;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_640x870_75hz?language=objc)
pub const kIOTimingIDApple_640x870_75hz: c_uint = 160;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_640x818_75hz?language=objc)
pub const kIOTimingIDApple_640x818_75hz: c_uint = 165;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_832x624_75hz?language=objc)
pub const kIOTimingIDApple_832x624_75hz: c_uint = 170;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_56hz?language=objc)
pub const kIOTimingIDVESA_800x600_56hz: c_uint = 180;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_60hz?language=objc)
pub const kIOTimingIDVESA_800x600_60hz: c_uint = 182;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_72hz?language=objc)
pub const kIOTimingIDVESA_800x600_72hz: c_uint = 184;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_75hz?language=objc)
pub const kIOTimingIDVESA_800x600_75hz: c_uint = 186;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_800x600_85hz?language=objc)
pub const kIOTimingIDVESA_800x600_85hz: c_uint = 188;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1024x768_60hz?language=objc)
pub const kIOTimingIDVESA_1024x768_60hz: c_uint = 190;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1024x768_70hz?language=objc)
pub const kIOTimingIDVESA_1024x768_70hz: c_uint = 200;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1024x768_75hz?language=objc)
pub const kIOTimingIDVESA_1024x768_75hz: c_uint = 204;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1024x768_85hz?language=objc)
pub const kIOTimingIDVESA_1024x768_85hz: c_uint = 208;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_1024x768_75hz?language=objc)
pub const kIOTimingIDApple_1024x768_75hz: c_uint = 210;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1152x864_75hz?language=objc)
pub const kIOTimingIDVESA_1152x864_75hz: c_uint = 215;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_1152x870_75hz?language=objc)
pub const kIOTimingIDApple_1152x870_75hz: c_uint = 220;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplentsc_st?language=objc)
pub const kIOTimingIDAppleNTSC_ST: c_uint = 230;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplentsc_ff?language=objc)
pub const kIOTimingIDAppleNTSC_FF: c_uint = 232;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplentsc_stconv?language=objc)
pub const kIOTimingIDAppleNTSC_STconv: c_uint = 234;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplentsc_ffconv?language=objc)
pub const kIOTimingIDAppleNTSC_FFconv: c_uint = 236;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplepal_st?language=objc)
pub const kIOTimingIDApplePAL_ST: c_uint = 238;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplepal_ff?language=objc)
pub const kIOTimingIDApplePAL_FF: c_uint = 240;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplepal_stconv?language=objc)
pub const kIOTimingIDApplePAL_STconv: c_uint = 242;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapplepal_ffconv?language=objc)
pub const kIOTimingIDApplePAL_FFconv: c_uint = 244;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x960_75hz?language=objc)
pub const kIOTimingIDVESA_1280x960_75hz: c_uint = 250;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x960_60hz?language=objc)
pub const kIOTimingIDVESA_1280x960_60hz: c_uint = 252;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x960_85hz?language=objc)
pub const kIOTimingIDVESA_1280x960_85hz: c_uint = 254;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x1024_60hz?language=objc)
pub const kIOTimingIDVESA_1280x1024_60hz: c_uint = 260;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x1024_75hz?language=objc)
pub const kIOTimingIDVESA_1280x1024_75hz: c_uint = 262;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1280x1024_85hz?language=objc)
pub const kIOTimingIDVESA_1280x1024_85hz: c_uint = 268;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_60hz?language=objc)
pub const kIOTimingIDVESA_1600x1200_60hz: c_uint = 280;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_65hz?language=objc)
pub const kIOTimingIDVESA_1600x1200_65hz: c_uint = 282;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_70hz?language=objc)
pub const kIOTimingIDVESA_1600x1200_70hz: c_uint = 284;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_75hz?language=objc)
pub const kIOTimingIDVESA_1600x1200_75hz: c_uint = 286;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_80hz?language=objc)
pub const kIOTimingIDVESA_1600x1200_80hz: c_uint = 288;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1600x1200_85hz?language=objc)
pub const kIOTimingIDVESA_1600x1200_85hz: c_uint = 289;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1792x1344_60hz?language=objc)
pub const kIOTimingIDVESA_1792x1344_60hz: c_uint = 296;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1792x1344_75hz?language=objc)
pub const kIOTimingIDVESA_1792x1344_75hz: c_uint = 298;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1856x1392_60hz?language=objc)
pub const kIOTimingIDVESA_1856x1392_60hz: c_uint = 300;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1856x1392_75hz?language=objc)
pub const kIOTimingIDVESA_1856x1392_75hz: c_uint = 302;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1920x1440_60hz?language=objc)
pub const kIOTimingIDVESA_1920x1440_60hz: c_uint = 304;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1920x1440_75hz?language=objc)
pub const kIOTimingIDVESA_1920x1440_75hz: c_uint = 306;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsmpte240m_60hz?language=objc)
pub const kIOTimingIDSMPTE240M_60hz: c_uint = 400;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidfilmrate_48hz?language=objc)
pub const kIOTimingIDFilmRate_48hz: c_uint = 410;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsony_1600x1024_76hz?language=objc)
pub const kIOTimingIDSony_1600x1024_76hz: c_uint = 500;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsony_1920x1080_60hz?language=objc)
pub const kIOTimingIDSony_1920x1080_60hz: c_uint = 510;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsony_1920x1080_72hz?language=objc)
pub const kIOTimingIDSony_1920x1080_72hz: c_uint = 520;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidsony_1920x1200_76hz?language=objc)
pub const kIOTimingIDSony_1920x1200_76hz: c_uint = 540;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidapple_0x0_0hz_offline?language=objc)
pub const kIOTimingIDApple_0x0_0hz_Offline: c_uint = 550;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_848x480_60hz?language=objc)
pub const kIOTimingIDVESA_848x480_60hz: c_uint = 570;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiotimingidvesa_1360x768_60hz?language=objc)
pub const kIOTimingIDVESA_1360x768_60hz: c_uint = 590;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohibernatepreviewactive?language=objc)
pub const kIOHibernatePreviewActive: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiohibernatepreviewupdates?language=objc)
pub const kIOHibernatePreviewUpdates: c_uint = 0x00000002;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypeunknown?language=objc)
pub const kIOFBAVSignalTypeUnknown: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypevga?language=objc)
pub const kIOFBAVSignalTypeVGA: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypedvi?language=objc)
pub const kIOFBAVSignalTypeDVI: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypehdmi?language=objc)
pub const kIOFBAVSignalTypeHDMI: c_uint = 0x00000008;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbavsignaltypedp?language=objc)
pub const kIOFBAVSignalTypeDP: c_uint = 0x00000010;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iofbdplinkconfig?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct IOFBDPLinkConfig {
    pub version: u16,
    pub bitRate: u8,
    pub(crate) __reservedA: [u8; 1],
    pub t1Time: u16,
    pub t2Time: u16,
    pub t3Time: u16,
    pub idlePatterns: u8,
    pub laneCount: u8,
    pub voltage: u8,
    pub preEmphasis: u8,
    pub downspread: u8,
    pub scrambler: u8,
    pub maxBitRate: u8,
    pub maxLaneCount: u8,
    pub maxDownspread: u8,
    pub(crate) __reservedB: [u8; 9],
}

#[cfg(feature = "objc2")]
unsafe impl Encode for IOFBDPLinkConfig {
    const ENCODING: Encoding = Encoding::Struct(
        "IOFBDPLinkConfig",
        &[
            <u16>::ENCODING,
            <u8>::ENCODING,
            <[u8; 1]>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u16>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <u8>::ENCODING,
            <[u8; 9]>::ENCODING,
        ],
    );
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitraterbr?language=objc)
pub const kIOFBBitRateRBR: c_uint = 0x06;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitratehbr?language=objc)
pub const kIOFBBitRateHBR: c_uint = 0x0A;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbbitratehbr2?language=objc)
pub const kIOFBBitRateHBR2: c_uint = 0x14;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkvoltagelevel0?language=objc)
pub const kIOFBLinkVoltageLevel0: c_uint = 0x00;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkvoltagelevel1?language=objc)
pub const kIOFBLinkVoltageLevel1: c_uint = 0x01;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkvoltagelevel2?language=objc)
pub const kIOFBLinkVoltageLevel2: c_uint = 0x02;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkvoltagelevel3?language=objc)
pub const kIOFBLinkVoltageLevel3: c_uint = 0x03;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkpreemphasislevel0?language=objc)
pub const kIOFBLinkPreEmphasisLevel0: c_uint = 0x00;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkpreemphasislevel1?language=objc)
pub const kIOFBLinkPreEmphasisLevel1: c_uint = 0x01;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkpreemphasislevel2?language=objc)
pub const kIOFBLinkPreEmphasisLevel2: c_uint = 0x02;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkpreemphasislevel3?language=objc)
pub const kIOFBLinkPreEmphasisLevel3: c_uint = 0x03;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkdownspreadnone?language=objc)
pub const kIOFBLinkDownspreadNone: c_uint = 0x0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkdownspreadmax?language=objc)
pub const kIOFBLinkDownspreadMax: c_uint = 0x1;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkscramblernormal?language=objc)
pub const kIOFBLinkScramblerNormal: c_uint = 0x0;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofblinkscrambleralternate?language=objc)
pub const kIOFBLinkScramblerAlternate: c_uint = 0x1;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayvendoridunknown?language=objc)
pub const kDisplayVendorIDUnknown: c_uint = 0x756e6b6e;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplayproductidgeneric?language=objc)
pub const kDisplayProductIDGeneric: c_uint = 0x717;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutundefined?language=objc)
pub const kDisplaySubPixelLayoutUndefined: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutrgb?language=objc)
pub const kDisplaySubPixelLayoutRGB: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutbgr?language=objc)
pub const kDisplaySubPixelLayoutBGR: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutquadgbl?language=objc)
pub const kDisplaySubPixelLayoutQuadGBL: c_uint = 0x00000003;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixellayoutquadgbr?language=objc)
pub const kDisplaySubPixelLayoutQuadGBR: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationundefined?language=objc)
pub const kDisplaySubPixelConfigurationUndefined: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationdelta?language=objc)
pub const kDisplaySubPixelConfigurationDelta: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationstripe?language=objc)
pub const kDisplaySubPixelConfigurationStripe: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationstripeoffset?language=objc)
pub const kDisplaySubPixelConfigurationStripeOffset: c_uint = 0x00000003;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelconfigurationquad?language=objc)
pub const kDisplaySubPixelConfigurationQuad: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshapeundefined?language=objc)
pub const kDisplaySubPixelShapeUndefined: c_uint = 0x00000000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshaperound?language=objc)
pub const kDisplaySubPixelShapeRound: c_uint = 0x00000001;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshapesquare?language=objc)
pub const kDisplaySubPixelShapeSquare: c_uint = 0x00000002;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshaperectangular?language=objc)
pub const kDisplaySubPixelShapeRectangular: c_uint = 0x00000003;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshapeoval?language=objc)
pub const kDisplaySubPixelShapeOval: c_uint = 0x00000004;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kdisplaysubpixelshapeelliptical?language=objc)
pub const kDisplaySubPixelShapeElliptical: c_uint = 0x00000005;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbnumcursorframes?language=objc)
pub const kIOFBNumCursorFrames: c_uint = 4;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbnumcursorframesshift?language=objc)
pub const kIOFBNumCursorFramesShift: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmaxcursordepth?language=objc)
pub const kIOFBMaxCursorDepth: c_uint = 32;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmaxcursorwidth?language=objc)
pub const kIOFBMaxCursorWidth: c_uint = 256;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbmaxcursorframes?language=objc)
pub const kIOFBMaxCursorFrames: c_uint = 32;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcursorimagenew?language=objc)
pub const kIOFBCursorImageNew: c_uint = 0x01;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcursorhwcapable?language=objc)
pub const kIOFBCursorHWCapable: c_uint = 0x02;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhardwarecursoractive?language=objc)
pub const kIOFBHardwareCursorActive: c_uint = 0x01;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbhardwarecursorinvram?language=objc)
pub const kIOFBHardwareCursorInVRAM: c_uint = 0x02;

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbshmemversionmask?language=objc)
pub const kIOFBShmemVersionMask: c_uint = 0x000000ff;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbtenptoneshmemversion?language=objc)
pub const kIOFBTenPtOneShmemVersion: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbtenpttwoshmemversion?language=objc)
pub const kIOFBTenPtTwoShmemVersion: c_uint = 3;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcurrentshmemversion?language=objc)
pub const kIOFBCurrentShmemVersion: c_uint = 2;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbshmemcursornumframesmask?language=objc)
pub const kIOFBShmemCursorNumFramesMask: c_uint = 0x00ff0000;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbshmemcursornumframesshift?language=objc)
pub const kIOFBShmemCursorNumFramesShift: c_uint = 16;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiofbcursormemory?language=objc)
pub const kIOFBCursorMemory: c_uint = 100;

extern "C-unwind" {
    /// IOGraphicsLib
    /// IOGraphicsLib implements non-kernel task access to IOGraphics family object types - IOFramebuffer and IOAccelerator. These functions implement a graphics family specific API.
    /// <br>
    /// A connection to a graphics IOService must be made before these functions are called. A connection is made with the IOServiceOpen() function described in IOKitLib.h. An io_connect_t handle is returned by IOServiceOpen(), which must be passed to the IOGraphicsLib functions. The appropriate connection type from IOGraphicsTypes.h must be specified in the call to IOServiceOpen(). All of the IOFramebuffer functions can only be called from a kIOFBServerConnectType connection. Except as specified below, functions whose names begin with IOFB are IOFramebuffer functions. Functions whose names begin with IOPS are IOAccelerator functions and must be called from connections of type kIOFBEngineControllerConnectType or kIOFBEngineConnectType.
    /// <br>
    /// The functions in IOGraphicsLib use a number of special types. The display mode is the screen's resolution and refresh rate. The known display modes are referred to by an index of type IODisplayModeID. The display depth is the number of significant color bits used in representing each pixel. Depths are also referred to by an index value that is 0 for 8 bits, 1 for 15 bits, and 2 for 24 bits. A combination of display mode and depth may have a number of supported pixel formats. The pixel aperture is an index of supported pixel formats for a display mode and depth. This index is of type IOPixelAperture. All of these graphics specific types are defined in IOGraphicsTypes.h.
    ///
    /// # Safety
    ///
    /// `connect` must be a valid pointer.
    #[cfg(feature = "libc")]
    pub fn IOFramebufferOpen(
        service: io_service_t,
        owning_task: task_port_t,
        r#type: c_uint,
        connect: *mut io_connect_t,
    ) -> libc::kern_return_t;
}

/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaymatchinginfo?language=objc)
pub const kIODisplayMatchingInfo: c_uint = 0x00000100;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplayonlypreferredname?language=objc)
pub const kIODisplayOnlyPreferredName: c_uint = 0x00000200;
/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiodisplaynoproductname?language=objc)
pub const kIODisplayNoProductName: c_uint = 0x00000400;

/// Create a CFDictionary with information about display hardware.
///
/// The CFDictionary created by this function contains information about the display hardware associated with a framebuffer. The keys for the dictionary are listed in IOGraphicsTypes.h.
///
/// Parameter `framebuffer`: The IOService handle for an IOFramebuffer service.
///
/// Parameter `options`: Use IODisplayDictionaryOptions to specify which keys to include.
///
/// Returns: The returned CFDictionary that should be released by the caller with CFRelease().
#[cfg(feature = "libc")]
#[inline]
pub extern "C-unwind" fn IODisplayCreateInfoDictionary(
    framebuffer: io_service_t,
    options: IOOptionBits,
) -> Option<CFRetained<CFDictionary>> {
    extern "C-unwind" {
        fn IODisplayCreateInfoDictionary(
            framebuffer: io_service_t,
            options: IOOptionBits,
        ) -> Option<NonNull<CFDictionary>>;
    }
    let ret = unsafe { IODisplayCreateInfoDictionary(framebuffer, options) };
    ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
}

extern "C-unwind" {
    /// Match two display information dictionaries to see if they are for the same display.
    ///
    /// By comparing two CFDictionaries returned from IODisplayCreateInfoDictionary(), this function determines if the displays are the same. The information compared is what is returned by calling IODisplayCreateInfoDictionary() with an option of kIODisplayMatchingInfo. This includes information such as the vendor, product, and serial number.
    ///
    /// Parameter `matching1`: A CFDictionary returned from IODisplayCreateInfoDictionary().
    ///
    /// Parameter `matching2`: Another CFDictionary returned from IODisplayCreateInfoDictionary().
    ///
    /// Parameter `options`: No options are currently defined.
    ///
    /// Returns: Returns FALSE if the two displays are not equivalent or TRUE if they are.
    ///
    /// # Safety
    ///
    /// - `matching1` generics must be of the correct type.
    /// - `matching1` might not allow `None`.
    /// - `matching2` generics must be of the correct type.
    /// - `matching2` might not allow `None`.
    pub fn IODisplayMatchDictionaries(
        matching1: Option<&CFDictionary>,
        matching2: Option<&CFDictionary>,
        options: IOOptionBits,
    ) -> i32;
}

#[cfg(feature = "libc")]
#[inline]
pub extern "C-unwind" fn IODisplayForFramebuffer(
    framebuffer: io_service_t,
    options: IOOptionBits,
) -> io_service_t {
    extern "C-unwind" {
        fn IODisplayForFramebuffer(
            framebuffer: io_service_t,
            options: IOOptionBits,
        ) -> io_service_t;
    }
    unsafe { IODisplayForFramebuffer(framebuffer, options) }
}

extern "C-unwind" {
    /// # Safety
    ///
    /// - `params` generics must be of the correct type.
    /// - `params` might not allow `None`.
    #[cfg(feature = "libc")]
    pub fn IODisplaySetParameters(
        service: io_service_t,
        options: IOOptionBits,
        params: Option<&CFDictionary>,
    ) -> IOReturn;
}

extern "C-unwind" {
    /// # Safety
    ///
    /// `parameter_name` might not allow `None`.
    #[cfg(feature = "libc")]
    pub fn IODisplaySetFloatParameter(
        service: io_service_t,
        options: IOOptionBits,
        parameter_name: Option<&CFString>,
        value: c_float,
    ) -> IOReturn;
}

extern "C-unwind" {
    /// # Safety
    ///
    /// `parameter_name` might not allow `None`.
    #[cfg(feature = "libc")]
    pub fn IODisplaySetIntegerParameter(
        service: io_service_t,
        options: IOOptionBits,
        parameter_name: Option<&CFString>,
        value: i32,
    ) -> IOReturn;
}

extern "C-unwind" {
    /// # Safety
    ///
    /// `params` must be a valid pointer.
    #[cfg(feature = "libc")]
    pub fn IODisplayCopyParameters(
        service: io_service_t,
        options: IOOptionBits,
        params: *mut *const CFDictionary,
    ) -> IOReturn;
}

extern "C-unwind" {
    /// # Safety
    ///
    /// `params` must be a valid pointer.
    #[cfg(feature = "libc")]
    pub fn IODisplayCopyFloatParameters(
        service: io_service_t,
        options: IOOptionBits,
        params: *mut *const CFDictionary,
    ) -> IOReturn;
}

extern "C-unwind" {
    /// # Safety
    ///
    /// - `parameter_name` might not allow `None`.
    /// - `value` must be a valid pointer.
    #[cfg(feature = "libc")]
    pub fn IODisplayGetFloatParameter(
        service: io_service_t,
        options: IOOptionBits,
        parameter_name: Option<&CFString>,
        value: *mut c_float,
    ) -> IOReturn;
}

extern "C-unwind" {
    /// # Safety
    ///
    /// - `parameter_name` might not allow `None`.
    /// - `value` must be a valid pointer.
    /// - `min` must be a valid pointer.
    /// - `max` must be a valid pointer.
    #[cfg(feature = "libc")]
    pub fn IODisplayGetIntegerRangeParameter(
        service: io_service_t,
        options: IOOptionBits,
        parameter_name: Option<&CFString>,
        value: *mut i32,
        min: *mut i32,
        max: *mut i32,
    ) -> IOReturn;
}

#[cfg(feature = "libc")]
#[inline]
pub extern "C-unwind" fn IODisplayCommitParameters(
    service: io_service_t,
    options: IOOptionBits,
) -> IOReturn {
    extern "C-unwind" {
        fn IODisplayCommitParameters(service: io_service_t, options: IOOptionBits) -> IOReturn;
    }
    unsafe { IODisplayCommitParameters(service, options) }
}
