@@ -18,36 +18,18 @@ pub use crate::base::{boolean_t, CGError};
18
18
pub use crate :: geometry:: { CGPoint , CGRect , CGSize } ;
19
19
20
20
use crate :: image:: CGImage ;
21
+ use crate :: window:: {
22
+ kCGNullWindowID, CGWindowID , CGWindowImageOption , CGWindowLevel , CGWindowListOption ,
23
+ } ;
21
24
use core_foundation:: base:: { CFRetain , TCFType } ;
22
25
use core_foundation:: string:: { CFString , CFStringRef } ;
23
26
use core_graphics_types:: base:: kCGErrorSuccess;
24
27
use foreign_types:: { foreign_type, ForeignType } ;
25
28
26
29
pub type CGDirectDisplayID = u32 ;
27
- pub type CGWindowID = u32 ;
28
- pub type CGWindowLevel = i32 ;
29
30
30
- pub const kCGNullWindowID: CGWindowID = 0 as CGWindowID ;
31
31
pub const kCGNullDirectDisplayID: CGDirectDisplayID = 0 as CGDirectDisplayID ;
32
32
33
- pub type CGWindowListOption = u32 ;
34
-
35
- pub const kCGWindowListOptionAll: CGWindowListOption = 0 ;
36
- pub const kCGWindowListOptionOnScreenOnly: CGWindowListOption = 1 << 0 ;
37
- pub const kCGWindowListOptionOnScreenAboveWindow: CGWindowListOption = 1 << 1 ;
38
- pub const kCGWindowListOptionOnScreenBelowWindow: CGWindowListOption = 1 << 2 ;
39
- pub const kCGWindowListOptionIncludingWindow: CGWindowListOption = 1 << 3 ;
40
- pub const kCGWindowListExcludeDesktopElements: CGWindowListOption = 1 << 4 ;
41
-
42
- pub type CGWindowImageOption = u32 ;
43
-
44
- pub const kCGWindowImageDefault: CGWindowImageOption = 0 ;
45
- pub const kCGWindowImageBoundsIgnoreFraming: CGWindowImageOption = 1 << 0 ;
46
- pub const kCGWindowImageShouldBeOpaque: CGWindowImageOption = 1 << 1 ;
47
- pub const kCGWindowImageOnlyShadows: CGWindowImageOption = 1 << 2 ;
48
- pub const kCGWindowImageBestResolution: CGWindowImageOption = 1 << 3 ;
49
- pub const kCGWindowImageNominalResolution: CGWindowImageOption = 1 << 4 ;
50
-
51
33
pub const kDisplayModeValidFlag: u32 = 0x00000001 ;
52
34
pub const kDisplayModeSafeFlag: u32 = 0x00000002 ;
53
35
pub const kDisplayModeDefaultFlag: u32 = 0x00000004 ;
0 commit comments