objc2_scene_kit/generated/
SceneKitDeprecated.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::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern "C" {
13    /// Light Attributes
14    ///
15    /// Attributes affecting the lighting computations.
16    ///
17    /// These keys are deprecated in 10.10. Please use the properties of SCNLight instead.
18    ///
19    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightattenuationstartkey?language=objc)
20    pub static SCNLightAttenuationStartKey: &'static NSString;
21}
22
23extern "C" {
24    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightattenuationendkey?language=objc)
25    pub static SCNLightAttenuationEndKey: &'static NSString;
26}
27
28extern "C" {
29    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightattenuationfalloffexponentkey?language=objc)
30    pub static SCNLightAttenuationFalloffExponentKey: &'static NSString;
31}
32
33extern "C" {
34    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightspotinneranglekey?language=objc)
35    pub static SCNLightSpotInnerAngleKey: &'static NSString;
36}
37
38extern "C" {
39    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightspotouteranglekey?language=objc)
40    pub static SCNLightSpotOuterAngleKey: &'static NSString;
41}
42
43extern "C" {
44    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightshadownearclippingkey?language=objc)
45    pub static SCNLightShadowNearClippingKey: &'static NSString;
46}
47
48extern "C" {
49    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightshadowfarclippingkey?language=objc)
50    pub static SCNLightShadowFarClippingKey: &'static NSString;
51}
52
53/// SCNDeprecated.
54#[cfg(feature = "SCNLight")]
55impl SCNLight {
56    extern_methods!(
57        /// Parameter `key`: The key for which to return the corresponding attribute.
58        ///
59        /// Returns the attribute for the specified key. The valid keys are described in the "Light Attributes" constants.
60        #[deprecated = "Use SCNLight properties instead"]
61        #[unsafe(method(attributeForKey:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn attributeForKey(&self, key: &NSString) -> Option<Retained<AnyObject>>;
64
65        /// Parameter `attribute`: The attribute for the property identified by key.
66        ///
67        /// Parameter `key`: The name of a property.
68        ///
69        /// Set the specified attribute for the specified key. The valid keys are described in the "Light Attributes" constants.
70        #[deprecated = "Use SCNLight properties instead"]
71        #[unsafe(method(setAttribute:forKey:))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn setAttribute_forKey(&self, attribute: Option<&AnyObject>, key: &NSString);
74    );
75}
76
77#[cfg(all(feature = "SCNLight", feature = "SCNTechnique"))]
78extern_conformance!(
79    unsafe impl SCNTechniqueSupport for SCNLight {}
80);
81
82/// SCNDeprecated.
83#[cfg(feature = "SCNCamera")]
84impl SCNCamera {
85    extern_methods!(
86        #[cfg(feature = "objc2-core-foundation")]
87        /// Determines the receiver's focal radius. Animatable.
88        ///
89        /// Determines the maximum amount of blur for objects out of focus. Defaults to 0.
90        #[deprecated = "Use fStop instead"]
91        #[unsafe(method(focalBlurRadius))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn focalBlurRadius(&self) -> CGFloat;
94
95        #[cfg(feature = "objc2-core-foundation")]
96        /// Setter for [`focalBlurRadius`][Self::focalBlurRadius].
97        #[deprecated = "Use fStop instead"]
98        #[unsafe(method(setFocalBlurRadius:))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn setFocalBlurRadius(&self, focal_blur_radius: CGFloat);
101
102        /// Determines the receiver's field of view on the X axis (in degree). Animatable.
103        ///
104        /// When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
105        #[deprecated = "Use -[SCNCamera fieldOfView] or -[SCNCamera focalLength] instead"]
106        #[unsafe(method(xFov))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn xFov(&self) -> c_double;
109
110        /// Setter for [`xFov`][Self::xFov].
111        #[deprecated = "Use -[SCNCamera fieldOfView] or -[SCNCamera focalLength] instead"]
112        #[unsafe(method(setXFov:))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn setXFov(&self, x_fov: c_double);
115
116        /// Determines the receiver's field of view on the Y axis (in degree). Animatable.
117        ///
118        /// When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
119        #[deprecated = "Use -[SCNCamera fieldOfView] or -[SCNCamera focalLength] instead"]
120        #[unsafe(method(yFov))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn yFov(&self) -> c_double;
123
124        /// Setter for [`yFov`][Self::yFov].
125        #[deprecated = "Use -[SCNCamera fieldOfView] or -[SCNCamera focalLength] instead"]
126        #[unsafe(method(setYFov:))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn setYFov(&self, y_fov: c_double);
129
130        #[cfg(feature = "objc2-core-foundation")]
131        /// Determines the receiver's aperture. Animatable.
132        ///
133        /// Defaults to 1/8.0.
134        #[deprecated = "Use -[SCNCamera fStop] instead with fStop = sensorHeight / aperture."]
135        #[unsafe(method(aperture))]
136        #[unsafe(method_family = none)]
137        pub unsafe fn aperture(&self) -> CGFloat;
138
139        #[cfg(feature = "objc2-core-foundation")]
140        /// Setter for [`aperture`][Self::aperture].
141        #[deprecated = "Use -[SCNCamera fStop] instead with fStop = sensorHeight / aperture."]
142        #[unsafe(method(setAperture:))]
143        #[unsafe(method_family = none)]
144        pub unsafe fn setAperture(&self, aperture: CGFloat);
145
146        #[cfg(feature = "objc2-core-foundation")]
147        /// Determines the receiver's focal size. Animatable.
148        ///
149        /// Determines the size of the area around focalDistance where the objects are in focus. Defaults to 0.
150        #[deprecated]
151        #[unsafe(method(focalSize))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn focalSize(&self) -> CGFloat;
154
155        #[cfg(feature = "objc2-core-foundation")]
156        /// Setter for [`focalSize`][Self::focalSize].
157        #[deprecated]
158        #[unsafe(method(setFocalSize:))]
159        #[unsafe(method_family = none)]
160        pub unsafe fn setFocalSize(&self, focal_size: CGFloat);
161
162        #[cfg(feature = "objc2-core-foundation")]
163        /// Determines the receiver's focal distance. Animatable.
164        ///
165        /// When non zero, the focal distance determines how the camera focuses the objects in the 3d scene. Defaults to 10.0 prior to macOS 10.13, iOS 11, tvOS 11 and watchOS 4. Defaults to 2.5 otherwise.
166        #[deprecated]
167        #[unsafe(method(focalDistance))]
168        #[unsafe(method_family = none)]
169        pub unsafe fn focalDistance(&self) -> CGFloat;
170
171        #[cfg(feature = "objc2-core-foundation")]
172        /// Setter for [`focalDistance`][Self::focalDistance].
173        #[deprecated]
174        #[unsafe(method(setFocalDistance:))]
175        #[unsafe(method_family = none)]
176        pub unsafe fn setFocalDistance(&self, focal_distance: CGFloat);
177    );
178}
179
180/// SCNDeprecated.
181#[cfg(feature = "SCNRenderer")]
182impl SCNRenderer {
183    extern_methods!(
184        /// renders the receiver's scene at the current system time.
185        ///
186        /// This method only work if the receiver was allocated with an OpenGL context and it is deprecated (use renderAtTime: instead). Use renderAtTime:withEncoder:pass:commandQueue: to render with Metal.
187        #[deprecated]
188        #[unsafe(method(render))]
189        #[unsafe(method_family = none)]
190        pub unsafe fn render(&self);
191    );
192}
193
194/// SCNDeprecated.
195#[cfg(feature = "SCNMaterialProperty")]
196impl SCNMaterialProperty {
197    extern_methods!(
198        /// Determines the receiver's border color (CGColorRef or NSColor). Animatable.
199        ///
200        /// The border color is ignored on iOS and is always considered as clear color (0,0,0,0) when the texture has an alpha channel and opaque back (0,0,0,1) otherwise.
201        #[deprecated = "Deprecated"]
202        #[unsafe(method(borderColor))]
203        #[unsafe(method_family = none)]
204        pub unsafe fn borderColor(&self) -> Option<Retained<AnyObject>>;
205
206        /// Setter for [`borderColor`][Self::borderColor].
207        #[deprecated = "Deprecated"]
208        #[unsafe(method(setBorderColor:))]
209        #[unsafe(method_family = none)]
210        pub unsafe fn setBorderColor(&self, border_color: Option<&AnyObject>);
211    );
212}