objc2_compositor_services/generated/
cp_error.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7
8use crate::*;
9
10extern "C" {
11    /// The domain for errors that occur during layer renderer configuration.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/compositorservices/cp_layer_renderer_configuration_error_domain?language=objc)
14    #[cfg(feature = "objc2-core-foundation")]
15    pub static cp_layer_renderer_configuration_error_domain: &'static CFErrorDomain;
16}
17
18/// Errors that can occur during layer configuration.
19///
20/// See also [Apple's documentation](https://developer.apple.com/documentation/compositorservices/cp_layer_renderer_configuration_error_code?language=objc)
21// NS_ERROR_ENUM
22#[cfg(feature = "objc2-core-foundation")]
23#[repr(transparent)]
24#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
25pub struct cp_layer_renderer_configuration_error_code(pub CFIndex);
26#[cfg(feature = "objc2-core-foundation")]
27impl cp_layer_renderer_configuration_error_code {
28    /// An error that indicates the system didn't find a default
29    /// layer renderer configuration.
30    #[doc(alias = "cp_layer_renderer_configuration_error_code_missing_configuration")]
31    pub const missing_configuration: Self = Self(-20);
32    /// An error that indicates the layer doesn’t support the current
33    /// pixel format for color textures.
34    ///
35    /// Compare the value the ``cp_layer_renderer_configuration_get_color_format``
36    /// function returns and make sure it matches one of the values the
37    /// ``cp_layer_renderer_capabilities_supported_color_format`` function returns.
38    #[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_color_format")]
39    pub const unsupported_color_format: Self = Self(-4);
40    /// An error that indicates the layer doesn’t support the current
41    /// texture usage for color textures.
42    ///
43    /// Compare the value the ``cp_layer_renderer_configuration_get_color_usage``
44    /// function returns and make sure it has at least `MTLTextureUsageShaderRead`
45    /// and does not contain `MTLTextureUsageShaderAtomic` or `MTLTextureUsageShaderWrite`
46    #[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_color_usage")]
47    pub const unsupported_color_usage: Self = Self(-5);
48    /// An error that indicates the layer doesn’t support the current
49    /// pixel format for depth textures.
50    ///
51    /// Compare the value the ``cp_layer_renderer_configuration_get_depth_format``
52    /// function returns and make sure it matches one of the values the
53    /// ``cp_layer_renderer_capabilities_supported_depth_format`` function returns.
54    #[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_depth_format")]
55    pub const unsupported_depth_format: Self = Self(-7);
56    /// An error that indicates the layer doesn’t support the current
57    /// texture usage for depth textures.
58    ///
59    /// Compare the value the ``cp_layer_renderer_configuration_get_depth_usage``
60    /// function returns and make sure it has at least `MTLTextureUsageShaderRead`
61    /// and does not contain `MTLTextureUsageShaderAtomic`
62    #[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_depth_usage")]
63    pub const unsupported_depth_usage: Self = Self(-8);
64    /// An error that indicates foveation is enabled but not supported.
65    ///
66    /// Disable foveation in your layer's configuration.
67    #[doc(
68        alias = "cp_layer_renderer_configuration_error_code_variable_rasterization_rate_is_not_supported"
69    )]
70    pub const variable_rasterization_rate_is_not_supported: Self = Self(-16);
71    /// An error that occurs when you try to enable temporal anti-aliasing
72    /// but the current configuration parameters don't support it.
73    #[doc(
74        alias = "cp_layer_renderer_configuration_error_code_temporal_anti_aliasing_not_supported"
75    )]
76    pub const temporal_anti_aliasing_not_supported: Self = Self(-17);
77    /// An error that indicates not enough frames are available for rendering.
78    #[doc(alias = "cp_layer_renderer_configuration_error_code_not_enough_frames_requested")]
79    pub const not_enough_frames_requested: Self = Self(-10);
80    /// An error that indicates the system requested too many frames
81    /// for rendering.
82    #[doc(alias = "cp_layer_renderer_configuration_error_code_too_many_frames_requested")]
83    pub const too_many_frames_requested: Self = Self(-11);
84    /// An error that indicates the depth range values aren't in
85    /// reverse-z order.
86    ///
87    /// When you call the ``cp_drawable_set_depth_range`` function,
88    /// make sure the first value in your `depth_range` vector contains
89    /// the value for the far plane. In addition, make sure the distance
90    /// to the far plane is greater than the distance to the near plane.
91    #[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_forward_depth_range")]
92    pub const unsupported_forward_depth_range: Self = Self(-101);
93    /// An error that indicates the configuration's current layout value
94    /// is invalid.
95    ///
96    /// Specify a supported layout value using the ``cp_layer_renderer_configuration_set_layout``
97    /// function. Get a list of supported layouts from the
98    /// ``cp_layer_renderer_capabilities_supported_layout`` function.
99    #[doc(alias = "cp_layer_renderer_configuration_error_code_layout_not_supported")]
100    pub const layout_not_supported: Self = Self(-6);
101    /// An error that indicates the near plane of the client is smaller
102    /// than the supported value.
103    #[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_near_plane_distance")]
104    pub const unsupported_near_plane_distance: Self = Self(-104);
105    /// An error that indicates the layer doesn’t support the current
106    /// pixel format for tracking areas textures.
107    ///
108    /// Compare the value the ``cp_layer_renderer_configuration_get_tracking_areas_format``
109    /// function returns and make sure it matches one of the values the
110    /// ``cp_layer_renderer_capabilities_supported_tracking_areas_format`` function returns.
111    #[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_tracking_areas_format")]
112    pub const unsupported_tracking_areas_format: Self = Self(-21);
113    /// An error that indicates the layer doesn’t support the current
114    /// texture usage for tracking areas textures.
115    ///
116    /// Compare the value the ``cp_layer_renderer_configuration_get_tracking_areas_usage``
117    /// function returns and make sure it has at least `MTLTextureUsageShaderRead`
118    /// and does not contain `MTLTextureUsageShaderAtomic`
119    #[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_tracking_areas_usage")]
120    pub const unsupported_tracking_areas_usage: Self = Self(-22);
121    /// An error that indicates the layer doesn't support the current
122    /// pixel format for stencil texture.
123    ///
124    /// Compare the value the ``cp_layer_renderer_configuration_get_drawable_render_context_stencil_format``
125    /// function returns and make sure it matches one of the values the
126    /// ``cp_layer_renderer_capabilities_drawable_render_context_supported_stencil_format`` function returns.
127    #[doc(
128        alias = "cp_layer_renderer_configuration_error_code_unsupported_drawable_render_context_stencil_format"
129    )]
130    pub const unsupported_drawable_render_context_stencil_format: Self = Self(-23);
131    /// An error that indicates the configuration's render quality is unsupported.
132    /// This could be because foveation is disabled or the quality is outside of the valid range of [0, 1],
133    /// the error `userInfo` will contain additional information.
134    #[doc(alias = "cp_layer_renderer_configuration_error_code_unsupported_render_quality")]
135    pub const unsupported_render_quality: Self = Self(-18);
136}
137
138#[cfg(feature = "objc2-core-foundation")]
139unsafe impl Encode for cp_layer_renderer_configuration_error_code {
140    const ENCODING: Encoding = CFIndex::ENCODING;
141}
142
143#[cfg(feature = "objc2-core-foundation")]
144unsafe impl RefEncode for cp_layer_renderer_configuration_error_code {
145    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
146}