objc2_core_graphics/generated/
CGToneMapping.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6use objc2_core_foundation::*;
7
8use crate::*;
9
10/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/cgtonemapping?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct CGToneMapping(pub u32);
15impl CGToneMapping {
16    #[doc(alias = "kCGToneMappingDefault")]
17    pub const Default: Self = Self(0);
18    #[doc(alias = "kCGToneMappingImageSpecificLumaScaling")]
19    pub const ImageSpecificLumaScaling: Self = Self(1);
20    #[doc(alias = "kCGToneMappingReferenceWhiteBased")]
21    pub const ReferenceWhiteBased: Self = Self(2);
22    #[doc(alias = "kCGToneMappingITURecommended")]
23    pub const ITURecommended: Self = Self(3);
24    #[doc(alias = "kCGToneMappingEXRGamma")]
25    pub const EXRGamma: Self = Self(4);
26    #[doc(alias = "kCGToneMappingNone")]
27    pub const None: Self = Self(5);
28}
29
30#[cfg(feature = "objc2")]
31unsafe impl Encode for CGToneMapping {
32    const ENCODING: Encoding = u32::ENCODING;
33}
34
35#[cfg(feature = "objc2")]
36unsafe impl RefEncode for CGToneMapping {
37    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40/// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/cgcontenttonemappinginfo?language=objc)
41#[repr(C)]
42#[derive(Clone, Copy, Debug, PartialEq)]
43pub struct CGContentToneMappingInfo {
44    pub method: CGToneMapping,
45    pub options: *const CFDictionary,
46}
47
48#[cfg(feature = "objc2")]
49unsafe impl Encode for CGContentToneMappingInfo {
50    const ENCODING: Encoding = Encoding::Struct(
51        "?",
52        &[<CGToneMapping>::ENCODING, <*const CFDictionary>::ENCODING],
53    );
54}
55
56#[cfg(feature = "objc2")]
57unsafe impl RefEncode for CGContentToneMappingInfo {
58    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
59}
60
61extern "C" {
62    /// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgpreferreddynamicrange?language=objc)
63    pub static kCGPreferredDynamicRange: &'static CFString;
64}
65
66extern "C" {
67    /// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdynamicrangehigh?language=objc)
68    pub static kCGDynamicRangeHigh: &'static CFString;
69}
70
71extern "C" {
72    /// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdynamicrangeconstrained?language=objc)
73    pub static kCGDynamicRangeConstrained: &'static CFString;
74}
75
76extern "C" {
77    /// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgdynamicrangestandard?language=objc)
78    pub static kCGDynamicRangeStandard: &'static CFString;
79}
80
81extern "C" {
82    /// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgcontentaveragelightlevel?language=objc)
83    pub static kCGContentAverageLightLevel: &'static CFString;
84}
85
86extern "C" {
87    /// [Apple's documentation](https://developer.apple.com/documentation/coregraphics/kcgcontentaveragelightlevelnits?language=objc)
88    pub static kCGContentAverageLightLevelNits: &'static CFString;
89}