objc2_scene_kit/generated/
SCNLayer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-quartz-core")]
8#[cfg(not(target_os = "watchos"))]
9use objc2_quartz_core::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(CAOpenGLLayer, CALayer, NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(feature = "objc2-quartz-core")]
20 #[cfg(not(target_os = "watchos"))]
21 #[deprecated = "OpenGL API deprecated, please use Metal instead. (Define SCN_SILENCE_GL_DEPRECATION to silence these warnings)"]
22 pub struct SCNLayer;
23);
24
25#[cfg(feature = "objc2-quartz-core")]
26#[cfg(not(target_os = "watchos"))]
27unsafe impl CAMediaTiming for SCNLayer {}
28
29#[cfg(feature = "objc2-quartz-core")]
30#[cfg(not(target_os = "watchos"))]
31unsafe impl NSCoding for SCNLayer {}
32
33#[cfg(feature = "objc2-quartz-core")]
34#[cfg(not(target_os = "watchos"))]
35unsafe impl NSObjectProtocol for SCNLayer {}
36
37#[cfg(feature = "objc2-quartz-core")]
38#[cfg(not(target_os = "watchos"))]
39unsafe impl NSSecureCoding for SCNLayer {}
40
41#[cfg(all(feature = "SCNSceneRenderer", feature = "objc2-quartz-core"))]
42#[cfg(not(target_os = "watchos"))]
43unsafe impl SCNSceneRenderer for SCNLayer {}
44
45#[cfg(all(feature = "SCNTechnique", feature = "objc2-quartz-core"))]
46#[cfg(not(target_os = "watchos"))]
47unsafe impl SCNTechniqueSupport for SCNLayer {}
48
49#[cfg(feature = "objc2-quartz-core")]
50#[cfg(not(target_os = "watchos"))]
51impl SCNLayer {
52 extern_methods!(
53 #[cfg(feature = "SCNScene")]
54 #[deprecated = "OpenGL API deprecated, please use Metal instead. (Define SCN_SILENCE_GL_DEPRECATION to silence these warnings)"]
56 #[unsafe(method(scene))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn scene(&self) -> Option<Retained<SCNScene>>;
59
60 #[cfg(feature = "SCNScene")]
61 #[deprecated = "OpenGL API deprecated, please use Metal instead. (Define SCN_SILENCE_GL_DEPRECATION to silence these warnings)"]
63 #[unsafe(method(setScene:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setScene(&self, scene: Option<&SCNScene>);
66 );
67}
68
69#[cfg(feature = "objc2-quartz-core")]
71#[cfg(not(target_os = "watchos"))]
72impl SCNLayer {
73 extern_methods!(
74 #[unsafe(method(layer))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn layer() -> Retained<Self>;
78
79 #[unsafe(method(init))]
80 #[unsafe(method_family = init)]
81 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
82
83 #[unsafe(method(initWithLayer:))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
86 );
87}
88
89#[cfg(feature = "objc2-quartz-core")]
91#[cfg(not(target_os = "watchos"))]
92impl SCNLayer {
93 extern_methods!(
94 #[unsafe(method(new))]
95 #[unsafe(method_family = new)]
96 pub unsafe fn new() -> Retained<Self>;
97 );
98}