objc2_core_graphics/
lib.rs

1//! # Bindings to the `CoreGraphics` framework
2//!
3//! See [Apple's docs][apple-doc] and [the general docs on framework crates][framework-crates] for more information.
4//!
5//! [apple-doc]: https://developer.apple.com/documentation/coregraphics/
6//! [framework-crates]: https://docs.rs/objc2/latest/objc2/topics/about_generated/index.html
7#![no_std]
8#![cfg_attr(feature = "unstable-darwin-objc", feature(darwin_objc))]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10// Update in Cargo.toml as well.
11#![doc(html_root_url = "https://docs.rs/objc2-core-graphics/0.3.2")]
12
13#[cfg(feature = "alloc")]
14extern crate alloc;
15
16#[cfg(feature = "std")]
17extern crate std;
18
19#[cfg(feature = "CGBitmapContext")]
20mod bitmap_context;
21mod generated;
22#[cfg(feature = "CGImage")]
23mod image;
24mod thread_safety;
25#[cfg(feature = "CGBitmapContext")]
26#[allow(unused_imports, unreachable_pub)]
27pub use self::bitmap_context::*;
28#[allow(unused_imports, unreachable_pub)]
29pub use self::generated::*;
30
31#[allow(dead_code)]
32pub(crate) type UniCharCount = core::ffi::c_ulong;
33#[allow(dead_code)]
34pub(crate) type UniChar = u16;
35
36#[allow(non_upper_case_globals)]
37#[cfg(feature = "CGWindowLevel")]
38/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgnumreservedwindowlevels?language=objc)
39pub const kCGNumReservedWindowLevels: i32 = 16;
40
41#[allow(non_upper_case_globals)]
42#[cfg(feature = "CGWindowLevel")]
43/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgnumreservedbasewindowlevels?language=objc)
44pub const kCGNumReservedBaseWindowLevels: i32 = 5;
45
46#[allow(non_upper_case_globals)]
47#[cfg(feature = "CGWindowLevel")]
48/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgbasewindowlevel?language=objc)
49pub const kCGBaseWindowLevel: CGWindowLevel = i32::MIN;
50
51#[allow(non_upper_case_globals)]
52#[cfg(feature = "CGWindowLevel")]
53/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgminimumwindowlevel?language=objc)
54pub const kCGMinimumWindowLevel: CGWindowLevel =
55    kCGBaseWindowLevel + kCGNumReservedBaseWindowLevels;
56
57#[allow(non_upper_case_globals)]
58#[cfg(feature = "CGWindowLevel")]
59/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgmaximumwindowlevel?language=objc)
60pub const kCGMaximumWindowLevel: CGWindowLevel = i32::MAX - kCGNumReservedWindowLevels;