objc2_scene_kit/generated/
SCNLayer.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// A SCNLayer is a layer that can display a SCNScene.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlayer?language=objc)
17    #[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"))]
27extern_conformance!(
28    unsafe impl CAMediaTiming for SCNLayer {}
29);
30
31#[cfg(feature = "objc2-quartz-core")]
32#[cfg(not(target_os = "watchos"))]
33extern_conformance!(
34    unsafe impl NSCoding for SCNLayer {}
35);
36
37#[cfg(feature = "objc2-quartz-core")]
38#[cfg(not(target_os = "watchos"))]
39extern_conformance!(
40    unsafe impl NSObjectProtocol for SCNLayer {}
41);
42
43#[cfg(feature = "objc2-quartz-core")]
44#[cfg(not(target_os = "watchos"))]
45extern_conformance!(
46    unsafe impl NSSecureCoding for SCNLayer {}
47);
48
49#[cfg(all(feature = "SCNSceneRenderer", feature = "objc2-quartz-core"))]
50#[cfg(not(target_os = "watchos"))]
51extern_conformance!(
52    unsafe impl SCNSceneRenderer for SCNLayer {}
53);
54
55#[cfg(all(feature = "SCNTechnique", feature = "objc2-quartz-core"))]
56#[cfg(not(target_os = "watchos"))]
57extern_conformance!(
58    unsafe impl SCNTechniqueSupport for SCNLayer {}
59);
60
61#[cfg(feature = "objc2-quartz-core")]
62#[cfg(not(target_os = "watchos"))]
63impl SCNLayer {
64    extern_methods!(
65        #[cfg(feature = "SCNScene")]
66        /// Specifies the scene of the receiver
67        #[deprecated = "OpenGL API deprecated, please use Metal instead. (Define SCN_SILENCE_GL_DEPRECATION to silence these warnings)"]
68        #[unsafe(method(scene))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn scene(&self) -> Option<Retained<SCNScene>>;
71
72        #[cfg(feature = "SCNScene")]
73        /// Setter for [`scene`][Self::scene].
74        #[deprecated = "OpenGL API deprecated, please use Metal instead. (Define SCN_SILENCE_GL_DEPRECATION to silence these warnings)"]
75        #[unsafe(method(setScene:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn setScene(&self, scene: Option<&SCNScene>);
78    );
79}
80
81/// Methods declared on superclass `CALayer`.
82#[cfg(feature = "objc2-quartz-core")]
83#[cfg(not(target_os = "watchos"))]
84impl SCNLayer {
85    extern_methods!(
86        /// Layer creation and initialization. *
87        #[unsafe(method(layer))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn layer() -> Retained<Self>;
90
91        #[unsafe(method(init))]
92        #[unsafe(method_family = init)]
93        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
94
95        /// # Safety
96        ///
97        /// `layer` should be of the correct type.
98        #[unsafe(method(initWithLayer:))]
99        #[unsafe(method_family = init)]
100        pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
101    );
102}
103
104/// Methods declared on superclass `NSObject`.
105#[cfg(feature = "objc2-quartz-core")]
106#[cfg(not(target_os = "watchos"))]
107impl SCNLayer {
108    extern_methods!(
109        #[unsafe(method(new))]
110        #[unsafe(method_family = new)]
111        pub unsafe fn new() -> Retained<Self>;
112    );
113}