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    #[deprecated = "Use SCNLight.attenuationStartDistance instead"]
21    pub static SCNLightAttenuationStartKey: &'static NSString;
22}
23
24extern "C" {
25    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightattenuationendkey?language=objc)
26    #[deprecated = "Use SCNLight.attenuationEndDistance instead"]
27    pub static SCNLightAttenuationEndKey: &'static NSString;
28}
29
30extern "C" {
31    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightattenuationfalloffexponentkey?language=objc)
32    #[deprecated = "Use SCNLight.attenuationFalloffExponent instead"]
33    pub static SCNLightAttenuationFalloffExponentKey: &'static NSString;
34}
35
36extern "C" {
37    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightspotinneranglekey?language=objc)
38    #[deprecated = "Use SCNLight.spotInnerAngle instead"]
39    pub static SCNLightSpotInnerAngleKey: &'static NSString;
40}
41
42extern "C" {
43    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightspotouteranglekey?language=objc)
44    #[deprecated = "Use SCNLight.spotOuterAngle instead"]
45    pub static SCNLightSpotOuterAngleKey: &'static NSString;
46}
47
48extern "C" {
49    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightshadownearclippingkey?language=objc)
50    #[deprecated = "Use SCNLight.zNear instead"]
51    pub static SCNLightShadowNearClippingKey: &'static NSString;
52}
53
54extern "C" {
55    /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnlightshadowfarclippingkey?language=objc)
56    #[deprecated = "Use SCNLight.zFar instead"]
57    pub static SCNLightShadowFarClippingKey: &'static NSString;
58}
59
60/// SCNDeprecated.
61#[cfg(feature = "SCNLight")]
62impl SCNLight {
63    extern_methods!(
64        /// Parameter `key`: The key for which to return the corresponding attribute.
65        ///
66        /// Returns the attribute for the specified key. The valid keys are described in the "Light Attributes" constants.
67        #[deprecated = "Use SCNLight properties instead"]
68        #[unsafe(method(attributeForKey:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn attributeForKey(&self, key: &NSString) -> Option<Retained<AnyObject>>;
71
72        /// Parameter `attribute`: The attribute for the property identified by key.
73        ///
74        /// Parameter `key`: The name of a property.
75        ///
76        /// Set the specified attribute for the specified key. The valid keys are described in the "Light Attributes" constants.
77        ///
78        /// # Safety
79        ///
80        /// `attribute` should be of the correct type.
81        #[deprecated = "Use SCNLight properties instead"]
82        #[unsafe(method(setAttribute:forKey:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn setAttribute_forKey(&self, attribute: Option<&AnyObject>, key: &NSString);
85    );
86}
87
88#[cfg(all(feature = "SCNLight", feature = "SCNTechnique"))]
89extern_conformance!(
90    unsafe impl SCNTechniqueSupport for SCNLight {}
91);
92
93/// SCNDeprecated.
94#[cfg(feature = "SCNCamera")]
95impl SCNCamera {
96    extern_methods!(
97        #[cfg(feature = "objc2-core-foundation")]
98        /// Determines the receiver's focal radius. Animatable.
99        ///
100        /// Determines the maximum amount of blur for objects out of focus. Defaults to 0.
101        #[deprecated = "Use fStop instead"]
102        #[unsafe(method(focalBlurRadius))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn focalBlurRadius(&self) -> CGFloat;
105
106        #[cfg(feature = "objc2-core-foundation")]
107        /// Setter for [`focalBlurRadius`][Self::focalBlurRadius].
108        #[deprecated = "Use fStop instead"]
109        #[unsafe(method(setFocalBlurRadius:))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn setFocalBlurRadius(&self, focal_blur_radius: CGFloat);
112
113        /// Determines the receiver's field of view on the X axis (in degree). Animatable.
114        ///
115        /// 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.
116        #[deprecated = "Use -[SCNCamera fieldOfView] or -[SCNCamera focalLength] instead"]
117        #[unsafe(method(xFov))]
118        #[unsafe(method_family = none)]
119        pub unsafe fn xFov(&self) -> c_double;
120
121        /// Setter for [`xFov`][Self::xFov].
122        #[deprecated = "Use -[SCNCamera fieldOfView] or -[SCNCamera focalLength] instead"]
123        #[unsafe(method(setXFov:))]
124        #[unsafe(method_family = none)]
125        pub unsafe fn setXFov(&self, x_fov: c_double);
126
127        /// Determines the receiver's field of view on the Y axis (in degree). Animatable.
128        ///
129        /// 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.
130        #[deprecated = "Use -[SCNCamera fieldOfView] or -[SCNCamera focalLength] instead"]
131        #[unsafe(method(yFov))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn yFov(&self) -> c_double;
134
135        /// Setter for [`yFov`][Self::yFov].
136        #[deprecated = "Use -[SCNCamera fieldOfView] or -[SCNCamera focalLength] instead"]
137        #[unsafe(method(setYFov:))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn setYFov(&self, y_fov: c_double);
140
141        #[cfg(feature = "objc2-core-foundation")]
142        /// Determines the receiver's aperture. Animatable.
143        ///
144        /// Defaults to 1/8.0.
145        #[deprecated = "Use -[SCNCamera fStop] instead with fStop = sensorHeight / aperture."]
146        #[unsafe(method(aperture))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn aperture(&self) -> CGFloat;
149
150        #[cfg(feature = "objc2-core-foundation")]
151        /// Setter for [`aperture`][Self::aperture].
152        #[deprecated = "Use -[SCNCamera fStop] instead with fStop = sensorHeight / aperture."]
153        #[unsafe(method(setAperture:))]
154        #[unsafe(method_family = none)]
155        pub unsafe fn setAperture(&self, aperture: CGFloat);
156
157        #[cfg(feature = "objc2-core-foundation")]
158        /// Determines the receiver's focal size. Animatable.
159        ///
160        /// Determines the size of the area around focalDistance where the objects are in focus. Defaults to 0.
161        #[deprecated]
162        #[unsafe(method(focalSize))]
163        #[unsafe(method_family = none)]
164        pub unsafe fn focalSize(&self) -> CGFloat;
165
166        #[cfg(feature = "objc2-core-foundation")]
167        /// Setter for [`focalSize`][Self::focalSize].
168        #[deprecated]
169        #[unsafe(method(setFocalSize:))]
170        #[unsafe(method_family = none)]
171        pub unsafe fn setFocalSize(&self, focal_size: CGFloat);
172
173        #[cfg(feature = "objc2-core-foundation")]
174        /// Determines the receiver's focal distance. Animatable.
175        ///
176        /// 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.
177        #[deprecated]
178        #[unsafe(method(focalDistance))]
179        #[unsafe(method_family = none)]
180        pub unsafe fn focalDistance(&self) -> CGFloat;
181
182        #[cfg(feature = "objc2-core-foundation")]
183        /// Setter for [`focalDistance`][Self::focalDistance].
184        #[deprecated]
185        #[unsafe(method(setFocalDistance:))]
186        #[unsafe(method_family = none)]
187        pub unsafe fn setFocalDistance(&self, focal_distance: CGFloat);
188    );
189}
190
191/// SCNDeprecated.
192#[cfg(feature = "SCNRenderer")]
193impl SCNRenderer {
194    extern_methods!(
195        /// renders the receiver's scene at the current system time.
196        ///
197        /// 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.
198        #[deprecated]
199        #[unsafe(method(render))]
200        #[unsafe(method_family = none)]
201        pub unsafe fn render(&self);
202    );
203}
204
205/// SCNDeprecated.
206#[cfg(feature = "SCNMaterialProperty")]
207impl SCNMaterialProperty {
208    extern_methods!(
209        /// Determines the receiver's border color (CGColorRef or NSColor). Animatable.
210        ///
211        /// 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.
212        #[deprecated = "Deprecated"]
213        #[unsafe(method(borderColor))]
214        #[unsafe(method_family = none)]
215        pub unsafe fn borderColor(&self) -> Option<Retained<AnyObject>>;
216
217        /// Setter for [`borderColor`][Self::borderColor].
218        ///
219        /// # Safety
220        ///
221        /// `border_color` should be of the correct type.
222        #[deprecated = "Deprecated"]
223        #[unsafe(method(setBorderColor:))]
224        #[unsafe(method_family = none)]
225        pub unsafe fn setBorderColor(&self, border_color: Option<&AnyObject>);
226    );
227}