objc2_compositor_services/generated/layer_renderer_layout.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// Constants that specify the organization of the textures you use for
8/// drawing.
9///
10/// See also [Apple's documentation](https://developer.apple.com/documentation/compositorservices/cp_layer_renderer_layout?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct cp_layer_renderer_layout(pub u32);
15impl cp_layer_renderer_layout {
16 /// A layout that assigns a separate texture to each rendered view.
17 ///
18 /// When the layout contains multiple views, each view receives its
19 /// own dedicated texture. The type of each texture is MTLTextureType2D.
20 #[doc(alias = "cp_layer_renderer_layout_dedicated")]
21 pub const dedicated: Self = Self(0);
22 /// A layout that uses a single texture to store the content for all
23 /// rendered views.
24 ///
25 /// When a layer contains multiple views, the texture stores the images
26 /// for those views side-by-side. The texture map for each view contains
27 /// a viewport that defines the boundaries of the view’s content. The
28 /// type of each texture is MTLTextureType2D.
29 #[doc(alias = "cp_layer_renderer_layout_shared")]
30 pub const shared: Self = Self(1);
31 /// A layout that specifies each view’s content as a slice of a single
32 /// texture.
33 ///
34 /// The layout uses a single texture to store the content for all rendered
35 /// views. The type of the texture is MTLTextureType2DArray. The texture
36 /// map’s slice index indicates which array slot contains the view’s
37 /// content.
38 #[doc(alias = "cp_layer_renderer_layout_layered")]
39 pub const layered: Self = Self(2);
40}
41
42unsafe impl Encode for cp_layer_renderer_layout {
43 const ENCODING: Encoding = u32::ENCODING;
44}
45
46unsafe impl RefEncode for cp_layer_renderer_layout {
47 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
48}