objc2-core-graphics 0.3.2

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

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdesktopwindowlevel?language=objc)
pub const kCGDesktopWindowLevel: CGWindowLevel = kCGMinimumWindowLevel + 20;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdesktopiconwindowlevel?language=objc)
pub const kCGDesktopIconWindowLevel: CGWindowLevel = kCGDesktopWindowLevel + 20;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgbackstopmenulevel?language=objc)
pub const kCGBackstopMenuLevel: CGWindowLevel = -20;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgnormalwindowlevel?language=objc)
pub const kCGNormalWindowLevel: CGWindowLevel = 0;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgfloatingwindowlevel?language=objc)
pub const kCGFloatingWindowLevel: CGWindowLevel = 3;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgtornoffmenuwindowlevel?language=objc)
pub const kCGTornOffMenuWindowLevel: CGWindowLevel = 3;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgmodalpanelwindowlevel?language=objc)
pub const kCGModalPanelWindowLevel: CGWindowLevel = 8;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgutilitywindowlevel?language=objc)
pub const kCGUtilityWindowLevel: CGWindowLevel = 19;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdockwindowlevel?language=objc)
pub const kCGDockWindowLevel: CGWindowLevel = 20;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgmainmenuwindowlevel?language=objc)
pub const kCGMainMenuWindowLevel: CGWindowLevel = 24;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgstatuswindowlevel?language=objc)
pub const kCGStatusWindowLevel: CGWindowLevel = 25;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgpopupmenuwindowlevel?language=objc)
pub const kCGPopUpMenuWindowLevel: CGWindowLevel = 101;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgoverlaywindowlevel?language=objc)
pub const kCGOverlayWindowLevel: CGWindowLevel = 102;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcghelpwindowlevel?language=objc)
pub const kCGHelpWindowLevel: CGWindowLevel = 200;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdraggingwindowlevel?language=objc)
pub const kCGDraggingWindowLevel: CGWindowLevel = 500;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgscreensaverwindowlevel?language=objc)
pub const kCGScreenSaverWindowLevel: CGWindowLevel = 1000;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgassistivetechhighwindowlevel?language=objc)
pub const kCGAssistiveTechHighWindowLevel: CGWindowLevel = 1500;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgcursorwindowlevel?language=objc)
pub const kCGCursorWindowLevel: CGWindowLevel = kCGMaximumWindowLevel - 1;
/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/cgwindowlevelkey?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CGWindowLevelKey(pub i32);
impl CGWindowLevelKey {
    #[doc(alias = "kCGBaseWindowLevelKey")]
    pub const BaseWindowLevelKey: Self = Self(0);
    #[doc(alias = "kCGMinimumWindowLevelKey")]
    pub const MinimumWindowLevelKey: Self = Self(1);
    #[doc(alias = "kCGDesktopWindowLevelKey")]
    pub const DesktopWindowLevelKey: Self = Self(2);
    #[doc(alias = "kCGBackstopMenuLevelKey")]
    pub const BackstopMenuLevelKey: Self = Self(3);
    #[doc(alias = "kCGNormalWindowLevelKey")]
    pub const NormalWindowLevelKey: Self = Self(4);
    #[doc(alias = "kCGFloatingWindowLevelKey")]
    pub const FloatingWindowLevelKey: Self = Self(5);
    #[doc(alias = "kCGTornOffMenuWindowLevelKey")]
    pub const TornOffMenuWindowLevelKey: Self = Self(6);
    #[doc(alias = "kCGDockWindowLevelKey")]
    pub const DockWindowLevelKey: Self = Self(7);
    #[doc(alias = "kCGMainMenuWindowLevelKey")]
    pub const MainMenuWindowLevelKey: Self = Self(8);
    #[doc(alias = "kCGStatusWindowLevelKey")]
    pub const StatusWindowLevelKey: Self = Self(9);
    #[doc(alias = "kCGModalPanelWindowLevelKey")]
    pub const ModalPanelWindowLevelKey: Self = Self(10);
    #[doc(alias = "kCGPopUpMenuWindowLevelKey")]
    pub const PopUpMenuWindowLevelKey: Self = Self(11);
    #[doc(alias = "kCGDraggingWindowLevelKey")]
    pub const DraggingWindowLevelKey: Self = Self(12);
    #[doc(alias = "kCGScreenSaverWindowLevelKey")]
    pub const ScreenSaverWindowLevelKey: Self = Self(13);
    #[doc(alias = "kCGMaximumWindowLevelKey")]
    pub const MaximumWindowLevelKey: Self = Self(14);
    #[doc(alias = "kCGOverlayWindowLevelKey")]
    pub const OverlayWindowLevelKey: Self = Self(15);
    #[doc(alias = "kCGHelpWindowLevelKey")]
    pub const HelpWindowLevelKey: Self = Self(16);
    #[doc(alias = "kCGUtilityWindowLevelKey")]
    pub const UtilityWindowLevelKey: Self = Self(17);
    #[doc(alias = "kCGDesktopIconWindowLevelKey")]
    pub const DesktopIconWindowLevelKey: Self = Self(18);
    #[doc(alias = "kCGCursorWindowLevelKey")]
    pub const CursorWindowLevelKey: Self = Self(19);
    #[doc(alias = "kCGAssistiveTechHighWindowLevelKey")]
    pub const AssistiveTechHighWindowLevelKey: Self = Self(20);
    #[doc(alias = "kCGNumberOfWindowLevelKeys")]
    pub const NumberOfWindowLevelKeys: Self = Self(21);
}

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/cgwindowlevel?language=objc)
pub type CGWindowLevel = i32;

#[inline]
pub extern "C-unwind" fn CGWindowLevelForKey(key: CGWindowLevelKey) -> CGWindowLevel {
    extern "C-unwind" {
        fn CGWindowLevelForKey(key: CGWindowLevelKey) -> CGWindowLevel;
    }
    unsafe { CGWindowLevelForKey(key) }
}