objc2_core_graphics/generated/
CGWindowLevel.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3#[cfg(feature = "objc2")]
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdesktopwindowlevel?language=objc)
9pub const kCGDesktopWindowLevel: CGWindowLevel = kCGMinimumWindowLevel + 20;
10/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdesktopiconwindowlevel?language=objc)
11pub const kCGDesktopIconWindowLevel: CGWindowLevel = kCGDesktopWindowLevel + 20;
12/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgbackstopmenulevel?language=objc)
13pub const kCGBackstopMenuLevel: CGWindowLevel = -20;
14/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgnormalwindowlevel?language=objc)
15pub const kCGNormalWindowLevel: CGWindowLevel = 0;
16/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgfloatingwindowlevel?language=objc)
17pub const kCGFloatingWindowLevel: CGWindowLevel = 3;
18/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgtornoffmenuwindowlevel?language=objc)
19pub const kCGTornOffMenuWindowLevel: CGWindowLevel = 3;
20/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgmodalpanelwindowlevel?language=objc)
21pub const kCGModalPanelWindowLevel: CGWindowLevel = 8;
22/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgutilitywindowlevel?language=objc)
23pub const kCGUtilityWindowLevel: CGWindowLevel = 19;
24/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdockwindowlevel?language=objc)
25pub const kCGDockWindowLevel: CGWindowLevel = 20;
26/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgmainmenuwindowlevel?language=objc)
27pub const kCGMainMenuWindowLevel: CGWindowLevel = 24;
28/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgstatuswindowlevel?language=objc)
29pub const kCGStatusWindowLevel: CGWindowLevel = 25;
30/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgpopupmenuwindowlevel?language=objc)
31pub const kCGPopUpMenuWindowLevel: CGWindowLevel = 101;
32/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgoverlaywindowlevel?language=objc)
33pub const kCGOverlayWindowLevel: CGWindowLevel = 102;
34/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcghelpwindowlevel?language=objc)
35pub const kCGHelpWindowLevel: CGWindowLevel = 200;
36/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdraggingwindowlevel?language=objc)
37pub const kCGDraggingWindowLevel: CGWindowLevel = 500;
38/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgscreensaverwindowlevel?language=objc)
39pub const kCGScreenSaverWindowLevel: CGWindowLevel = 1000;
40/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgassistivetechhighwindowlevel?language=objc)
41pub const kCGAssistiveTechHighWindowLevel: CGWindowLevel = 1500;
42/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgcursorwindowlevel?language=objc)
43pub const kCGCursorWindowLevel: CGWindowLevel = kCGMaximumWindowLevel - 1;
44/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/cgwindowlevelkey?language=objc)
45// NS_ENUM
46#[repr(transparent)]
47#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
48pub struct CGWindowLevelKey(pub i32);
49impl CGWindowLevelKey {
50    #[doc(alias = "kCGBaseWindowLevelKey")]
51    pub const BaseWindowLevelKey: Self = Self(0);
52    #[doc(alias = "kCGMinimumWindowLevelKey")]
53    pub const MinimumWindowLevelKey: Self = Self(1);
54    #[doc(alias = "kCGDesktopWindowLevelKey")]
55    pub const DesktopWindowLevelKey: Self = Self(2);
56    #[doc(alias = "kCGBackstopMenuLevelKey")]
57    pub const BackstopMenuLevelKey: Self = Self(3);
58    #[doc(alias = "kCGNormalWindowLevelKey")]
59    pub const NormalWindowLevelKey: Self = Self(4);
60    #[doc(alias = "kCGFloatingWindowLevelKey")]
61    pub const FloatingWindowLevelKey: Self = Self(5);
62    #[doc(alias = "kCGTornOffMenuWindowLevelKey")]
63    pub const TornOffMenuWindowLevelKey: Self = Self(6);
64    #[doc(alias = "kCGDockWindowLevelKey")]
65    pub const DockWindowLevelKey: Self = Self(7);
66    #[doc(alias = "kCGMainMenuWindowLevelKey")]
67    pub const MainMenuWindowLevelKey: Self = Self(8);
68    #[doc(alias = "kCGStatusWindowLevelKey")]
69    pub const StatusWindowLevelKey: Self = Self(9);
70    #[doc(alias = "kCGModalPanelWindowLevelKey")]
71    pub const ModalPanelWindowLevelKey: Self = Self(10);
72    #[doc(alias = "kCGPopUpMenuWindowLevelKey")]
73    pub const PopUpMenuWindowLevelKey: Self = Self(11);
74    #[doc(alias = "kCGDraggingWindowLevelKey")]
75    pub const DraggingWindowLevelKey: Self = Self(12);
76    #[doc(alias = "kCGScreenSaverWindowLevelKey")]
77    pub const ScreenSaverWindowLevelKey: Self = Self(13);
78    #[doc(alias = "kCGMaximumWindowLevelKey")]
79    pub const MaximumWindowLevelKey: Self = Self(14);
80    #[doc(alias = "kCGOverlayWindowLevelKey")]
81    pub const OverlayWindowLevelKey: Self = Self(15);
82    #[doc(alias = "kCGHelpWindowLevelKey")]
83    pub const HelpWindowLevelKey: Self = Self(16);
84    #[doc(alias = "kCGUtilityWindowLevelKey")]
85    pub const UtilityWindowLevelKey: Self = Self(17);
86    #[doc(alias = "kCGDesktopIconWindowLevelKey")]
87    pub const DesktopIconWindowLevelKey: Self = Self(18);
88    #[doc(alias = "kCGCursorWindowLevelKey")]
89    pub const CursorWindowLevelKey: Self = Self(19);
90    #[doc(alias = "kCGAssistiveTechHighWindowLevelKey")]
91    pub const AssistiveTechHighWindowLevelKey: Self = Self(20);
92    #[doc(alias = "kCGNumberOfWindowLevelKeys")]
93    pub const NumberOfWindowLevelKeys: Self = Self(21);
94}
95
96#[cfg(feature = "objc2")]
97unsafe impl Encode for CGWindowLevelKey {
98    const ENCODING: Encoding = i32::ENCODING;
99}
100
101#[cfg(feature = "objc2")]
102unsafe impl RefEncode for CGWindowLevelKey {
103    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
104}
105
106/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/cgwindowlevel?language=objc)
107pub type CGWindowLevel = i32;
108
109#[inline]
110pub extern "C-unwind" fn CGWindowLevelForKey(key: CGWindowLevelKey) -> CGWindowLevel {
111    extern "C-unwind" {
112        fn CGWindowLevelForKey(key: CGWindowLevelKey) -> CGWindowLevel;
113    }
114    unsafe { CGWindowLevelForKey(key) }
115}