objc2_scene_kit/generated/
SCNSceneSource.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
8use crate::*;
9
10extern "C" {
11    /// Scene source properties
12    ///
13    /// File contributors. The values are dictionaries populated with keys documented in the "Contributor dictionary keys" group.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetcontributorskey?language=objc)
16    pub static SCNSceneSourceAssetContributorsKey: &'static NSString;
17}
18
19extern "C" {
20    /// When the file was created. The value is a NSDate instance.
21    ///
22    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetcreateddatekey?language=objc)
23    pub static SCNSceneSourceAssetCreatedDateKey: &'static NSString;
24}
25
26extern "C" {
27    /// When the file was last modified. The value is a NSDate instance.
28    ///
29    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetmodifieddatekey?language=objc)
30    pub static SCNSceneSourceAssetModifiedDateKey: &'static NSString;
31}
32
33extern "C" {
34    /// The up axis of the file. If the file is oriented Y-up, for example, then this is the string
35    /// @
36    /// "0.0 1.0 0.0"
37    ///
38    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetupaxiskey?language=objc)
39    pub static SCNSceneSourceAssetUpAxisKey: &'static NSString;
40}
41
42extern "C" {
43    /// The unit used in the file. The value is a dictionary populated with keys documented in the "Unit dictionary keys" group.
44    ///
45    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetunitkey?language=objc)
46    pub static SCNSceneSourceAssetUnitKey: &'static NSString;
47}
48
49extern "C" {
50    /// Contributor dictionary keys
51    ///
52    /// Authoring tool used to create the file. The corresponding value is an NSString.
53    ///
54    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetauthoringtoolkey?language=objc)
55    pub static SCNSceneSourceAssetAuthoringToolKey: &'static NSString;
56}
57
58extern "C" {
59    /// The file's author. The corresponding value is an NSString.
60    ///
61    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetauthorkey?language=objc)
62    pub static SCNSceneSourceAssetAuthorKey: &'static NSString;
63}
64
65extern "C" {
66    /// Unit dictionary keys
67    ///
68    /// The name (NSString) of the unit
69    ///
70    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetunitnamekey?language=objc)
71    pub static SCNSceneSourceAssetUnitNameKey: &'static NSString;
72}
73
74extern "C" {
75    /// A NSNumber encapsulating a floating-point value indicating how many meters the unit is. For example, if the name is
76    /// @
77    /// "centimeter", then this will be 0.01.
78    ///
79    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetunitmeterkey?language=objc)
80    pub static SCNSceneSourceAssetUnitMeterKey: &'static NSString;
81}
82
83/// Scene loading options
84///
85/// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceloadingoption?language=objc)
86// NS_TYPED_ENUM
87pub type SCNSceneSourceLoadingOption = NSString;
88
89extern "C" {
90    /// Enable to try to guess acceptable normals for the vertices if none are given in the file
91    ///
92    /// Use this with a boolean value encapsulated in a NSNumber. The default value is NO.
93    ///
94    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcecreatenormalsifabsentkey?language=objc)
95    pub static SCNSceneSourceCreateNormalsIfAbsentKey: &'static SCNSceneSourceLoadingOption;
96}
97
98extern "C" {
99    /// Pass YES in order to perform the document validation.
100    ///
101    /// This option can be set in the options dictionary of the SCNScene and SCNSceneSource loading methods.
102    /// The value for this option should be a boolean NSNumber. If its boolean value is YES (the default is NO),
103    /// SceneKit will attempt to check the document for consistency.
104    /// If the document doesn't pass the consistency check it is then not loaded and an error is returned.
105    /// This is slower, but for security reasons it should be set to YES if you are not sure the files you load are valid and have not been tampered with.
106    ///
107    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcecheckconsistencykey?language=objc)
108    pub static SCNSceneSourceCheckConsistencyKey: &'static SCNSceneSourceLoadingOption;
109}
110
111extern "C" {
112    /// Pass YES to flatten the scene graph when possible.
113    ///
114    /// This option can be set in the options dictionary of the SCNScene and SCNSceneSource loading methods.
115    /// The value for this option should be a boolean NSNumber. If its boolean value is YES (the default is NO),
116    /// SceneKit will attempt to reduce the scene graph by merging the geometries.
117    /// This option is suitable to preview a 3D scene efficiently and when manipulating the scene graph is not needed.
118    ///
119    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceflattenscenekey?language=objc)
120    pub static SCNSceneSourceFlattenSceneKey: &'static SCNSceneSourceLoadingOption;
121}
122
123extern "C" {
124    /// Pass YES in order to enable the safe mode.
125    ///
126    /// This option can be set in the options dictionary of the SCNScene and SCNSceneSource loading methods.
127    /// The value for this option should be a boolean NSNumber. If its boolean value is YES (the default is NO),
128    /// SceneKit will forbid network accesses, prevent the loading of resources from arbitrary directories, and will not execute
129    /// any code present in the loaded files.
130    ///
131    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceusesafemodekey?language=objc)
132    #[deprecated = "No longer supported"]
133    pub static SCNSceneSourceUseSafeModeKey: &'static SCNSceneSourceLoadingOption;
134}
135
136extern "C" {
137    /// Pass an array of directory URLs where SceneKit should look for resources
138    ///
139    /// By default, SceneKit will look for the external resources it cannot find in the parent directory of the imported file.
140    /// You can add additional directories by setting an array of URLs for this key when calling sceneWithOptions:error:.
141    /// This is recommended if you want to construct your scene source from a data object, not from an URL,
142    /// and need to load resources whose paths are not absolute.
143    ///
144    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetdirectoryurlskey?language=objc)
145    pub static SCNSceneSourceAssetDirectoryURLsKey: &'static SCNSceneSourceLoadingOption;
146}
147
148extern "C" {
149    /// Pass YES in order to override assets URLs with the directory URLs passed via SCNSceneSourceAssetDirectoryURLsKey.
150    ///
151    /// By default, SceneKit will look for the external resources using the paths/urls as described in the imported file.
152    /// You can force SceneKit to only search for extern resources within the directories specified by the SCNSceneSourceAssetDirectoryURLsKey key.
153    /// This can be useful to load a file and its resources from a specific bundle for instance.
154    ///
155    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceoverrideasseturlskey?language=objc)
156    pub static SCNSceneSourceOverrideAssetURLsKey: &'static SCNSceneSourceLoadingOption;
157}
158
159extern "C" {
160    /// Pass YES to interpret the 3D format of the file in a strict way.
161    ///
162    /// This option defaults to NO. In this case SceneKit will try to read any additional metadata present in the file to
163    /// enable additional features and make the rendering as close as possible to the original intent. If you pass YES,
164    /// SceneKit will instead only consider features which are part of the file format specification.
165    ///
166    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcestrictconformancekey?language=objc)
167    pub static SCNSceneSourceStrictConformanceKey: &'static SCNSceneSourceLoadingOption;
168}
169
170extern "C" {
171    /// Pass the units you want the scene to be converted to (in meter).
172    ///
173    /// Use this with a floating value encapsulated in a NSNumber. The default value is nil which means no conversion done. Passing a non-zero value will convert the scene coordinates so that 1 unit corresponds to N meters. For example pass 0.01 for 1 unit == 1 centimeter, pass 0.3048 for 1 unit == 1 foot...
174    /// For better physics simulation it is recommended to use 1 unit equals to 1 meter.
175    /// This option has no effect for SCN files or if the asset is already compressed by Xcode (use the compression options instead).
176    ///
177    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceconvertunitstometerskey?language=objc)
178    pub static SCNSceneSourceConvertUnitsToMetersKey: &'static SCNSceneSourceLoadingOption;
179}
180
181extern "C" {
182    /// Pass YES if a scene should be converted to Y up if it currently has a different up axis.
183    ///
184    /// Use this with a boolean value encapsulated in a NSNumber. The default value is NO.
185    /// This option has no effect for SCN files or if the asset is already compressed by Xcode (use the compression options instead).
186    ///
187    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceconverttoyupkey?language=objc)
188    pub static SCNSceneSourceConvertToYUpKey: &'static SCNSceneSourceLoadingOption;
189}
190
191extern "C" {
192    /// Pass one of the value below to specify what to do with loaded animations.
193    ///
194    /// See below for the description of each individual key. Defaults to SCNSceneSourceAnimationImportPolicyPlayRepeatedly. On 10.9 and before the behavior is SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase. For compatibility reason if the application was built on 10.9 or before the default behavior is SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase.
195    ///
196    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicykey?language=objc)
197    pub static SCNSceneSourceAnimationImportPolicyKey: &'static SCNSceneSourceLoadingOption;
198}
199
200extern "C" {
201    /// Pass YES to make SceneKit preserve the original topology instead of triangulating at load time. This can be useful to get better results when subdividing a geometry.
202    ///
203    /// Defaults to YES starting macOS 10.15, iOS 13, tvOS 13 and watchOS 6. Defaults to NO in previous versions.
204    ///
205    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceloadingoptionpreserveoriginaltopology?language=objc)
206    pub static SCNSceneSourceLoadingOptionPreserveOriginalTopology:
207        &'static SCNSceneSourceLoadingOption;
208}
209
210/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicy?language=objc)
211// NS_TYPED_ENUM
212pub type SCNSceneSourceAnimationImportPolicy = NSString;
213
214extern "C" {
215    /// Add animations to the scene and play them once (repeatCount set to 1).
216    ///
217    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicyplay?language=objc)
218    pub static SCNSceneSourceAnimationImportPolicyPlay:
219        &'static SCNSceneSourceAnimationImportPolicy;
220}
221
222extern "C" {
223    /// Add animations to the scene and play them repeatedly (repeatCount set to infinity).
224    ///
225    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicyplayrepeatedly?language=objc)
226    pub static SCNSceneSourceAnimationImportPolicyPlayRepeatedly:
227        &'static SCNSceneSourceAnimationImportPolicy;
228}
229
230extern "C" {
231    /// Only keep animations in the SCNSceneSource and don't add to the animatable elements of the scene.
232    ///
233    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicydonotplay?language=objc)
234    pub static SCNSceneSourceAnimationImportPolicyDoNotPlay:
235        &'static SCNSceneSourceAnimationImportPolicy;
236}
237
238extern "C" {
239    /// Add animations to the scene and play them using the SCNView/SCNRenderer's scene time (usesSceneTimeBase set to YES)
240    ///
241    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicyplayusingscenetimebase?language=objc)
242    pub static SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase:
243        &'static SCNSceneSourceAnimationImportPolicy;
244}
245
246extern "C" {
247    /// Key to access the detailed validation errors.
248    ///
249    /// This key will be present in the user info dictionary of errors created by the various sceneWithOptions: methods.
250    /// When present, the value associated with it is an array of detailed errors found by the consistency checker
251    /// which represent consistency errors in the 3D file. Some metadata about these detailed errors is available
252    /// in their user info dictionary using the other keys (SCNConsistency*) defined in this file.
253    ///
254    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scndetailederrorskey?language=objc)
255    pub static SCNDetailedErrorsKey: &'static NSString;
256}
257
258extern "C" {
259    /// For XML-based formats, the ID of the element where the error occurred.
260    ///
261    /// When the element does not have an ID, the ID of the closest parent element which has one is returned.
262    ///
263    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyelementiderrorkey?language=objc)
264    pub static SCNConsistencyElementIDErrorKey: &'static NSString;
265}
266
267extern "C" {
268    /// For XML-based formats, the tag name of the element where the error occurred.
269    ///
270    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyelementtypeerrorkey?language=objc)
271    pub static SCNConsistencyElementTypeErrorKey: &'static NSString;
272}
273
274extern "C" {
275    /// For text-based formats, the line number where an error occurred.
276    ///
277    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencylinenumbererrorkey?language=objc)
278    pub static SCNConsistencyLineNumberErrorKey: &'static NSString;
279}
280
281/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyinvalidurierror?language=objc)
282pub const SCNConsistencyInvalidURIError: c_uint = 1000;
283/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyinvalidcounterror?language=objc)
284pub const SCNConsistencyInvalidCountError: c_uint = 1001;
285/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyinvalidargumenterror?language=objc)
286pub const SCNConsistencyInvalidArgumentError: c_uint = 1002;
287/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencymissingelementerror?language=objc)
288pub const SCNConsistencyMissingElementError: c_uint = 1003;
289/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencymissingattributeerror?language=objc)
290pub const SCNConsistencyMissingAttributeError: c_uint = 1004;
291/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyxmlschemavalidationerror?language=objc)
292pub const SCNConsistencyXMLSchemaValidationError: c_uint = 1005;
293
294/// Represents a phase of the loading process.
295///
296/// Each of these constants (except SCNSceneSourceStatusError) represents a phase of the loading process. "Parsing" means that the document is being deserialized, "validating" that it's being checked for consistency, "processing" that the resulting object is being loaded. New values might be added to this enumeration to make it more detailed; however the values will always be ordered in the same order as the corresponding phases are executed.
297///
298/// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcestatus?language=objc)
299// NS_ENUM
300#[repr(transparent)]
301#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
302pub struct SCNSceneSourceStatus(pub NSInteger);
303impl SCNSceneSourceStatus {
304    #[doc(alias = "SCNSceneSourceStatusError")]
305    pub const Error: Self = Self(-1);
306    #[doc(alias = "SCNSceneSourceStatusParsing")]
307    pub const Parsing: Self = Self(4);
308    #[doc(alias = "SCNSceneSourceStatusValidating")]
309    pub const Validating: Self = Self(8);
310    #[doc(alias = "SCNSceneSourceStatusProcessing")]
311    pub const Processing: Self = Self(12);
312    #[doc(alias = "SCNSceneSourceStatusComplete")]
313    pub const Complete: Self = Self(16);
314}
315
316unsafe impl Encode for SCNSceneSourceStatus {
317    const ENCODING: Encoding = NSInteger::ENCODING;
318}
319
320unsafe impl RefEncode for SCNSceneSourceStatus {
321    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
322}
323
324/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcestatushandler?language=objc)
325#[cfg(feature = "block2")]
326pub type SCNSceneSourceStatusHandler =
327    *mut block2::DynBlock<dyn Fn(c_float, SCNSceneSourceStatus, *mut NSError, NonNull<Bool>)>;
328
329extern_class!(
330    /// SCNSceneSource objects, abstract the data-reading task. A scene source can read scene data from a URL or a NSData object.
331    /// After creating a SCNSceneSource object for the appropriate source, you can obtain scenes using SCNSceneSource methods.
332    ///
333    /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesource?language=objc)
334    #[unsafe(super(NSObject))]
335    #[derive(Debug, PartialEq, Eq, Hash)]
336    pub struct SCNSceneSource;
337);
338
339extern_conformance!(
340    unsafe impl NSObjectProtocol for SCNSceneSource {}
341);
342
343impl SCNSceneSource {
344    extern_methods!(
345        /// Creates and initialize a SCNSceneSource instance.
346        ///
347        /// Parameter `url`: The URL to read scenes from.
348        ///
349        /// Parameter `options`: An optional dictionary for future extensions.
350        ///
351        /// # Safety
352        ///
353        /// `options` generic should be of the correct type.
354        #[unsafe(method(sceneSourceWithURL:options:))]
355        #[unsafe(method_family = none)]
356        pub unsafe fn sceneSourceWithURL_options(
357            url: &NSURL,
358            options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
359        ) -> Option<Retained<Self>>;
360
361        /// Creates and initialize a SCNSceneSource instance.
362        ///
363        /// Parameter `data`: The scene data.
364        ///
365        /// Parameter `options`: An optional dictionary for future extensions.
366        ///
367        /// # Safety
368        ///
369        /// `options` generic should be of the correct type.
370        #[unsafe(method(sceneSourceWithData:options:))]
371        #[unsafe(method_family = none)]
372        pub unsafe fn sceneSourceWithData_options(
373            data: &NSData,
374            options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
375        ) -> Option<Retained<Self>>;
376
377        /// Initialize a SCNSceneSource instance from a URL.
378        ///
379        /// Parameter `url`: The URL to read scenes from.
380        ///
381        /// Parameter `options`: An optional dictionary for future extensions.
382        ///
383        /// # Safety
384        ///
385        /// `options` generic should be of the correct type.
386        #[unsafe(method(initWithURL:options:))]
387        #[unsafe(method_family = init)]
388        pub unsafe fn initWithURL_options(
389            this: Allocated<Self>,
390            url: &NSURL,
391            options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
392        ) -> Option<Retained<Self>>;
393
394        /// Initialize a SCNSceneSource instance from a NSData object.
395        ///
396        /// Parameter `data`: The data to read scenes from.
397        ///
398        /// Parameter `options`: An optional dictionary for future extensions.
399        ///
400        /// # Safety
401        ///
402        /// `options` generic should be of the correct type.
403        #[unsafe(method(initWithData:options:))]
404        #[unsafe(method_family = init)]
405        pub unsafe fn initWithData_options(
406            this: Allocated<Self>,
407            data: &NSData,
408            options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
409        ) -> Option<Retained<Self>>;
410
411        /// The receiver's URL (if any).
412        #[unsafe(method(url))]
413        #[unsafe(method_family = none)]
414        pub unsafe fn url(&self) -> Option<Retained<NSURL>>;
415
416        /// The receiver's data (if any).
417        #[unsafe(method(data))]
418        #[unsafe(method_family = none)]
419        pub unsafe fn data(&self) -> Option<Retained<NSData>>;
420
421        #[cfg(all(feature = "SCNScene", feature = "block2"))]
422        /// Creates and initializes the scene described in the 3D file with the specified options and lets you monitor the progress.
423        ///
424        /// Parameter `options`: A dictionary of options. The valid keys are described in the "Scene loading options" section.
425        ///
426        /// Parameter `statusHandler`: This block will be called repeatedly while the scene is being loaded.
427        /// - The first argument, overallProgress, is a floating-point number between 0 and 1. 0 means the loading process has just started and 1 that it is complete.
428        /// - The second argument, status, tells you what the source is currently doing. It takes one of the values in the SCNSceneSourceStatus enum. New values might be added to this enum in the future.
429        /// - If status == SCNSceneStatusError, then error will contain more information about the failure, and the method will return nil after having called the block. Otherwise error will be nil.
430        /// - Set *stop to YES if you want the source to abort the loading operation.
431        ///
432        /// # Safety
433        ///
434        /// - `options` generic should be of the correct type.
435        /// - `status_handler` must be a valid pointer or null.
436        #[unsafe(method(sceneWithOptions:statusHandler:))]
437        #[unsafe(method_family = none)]
438        pub unsafe fn sceneWithOptions_statusHandler(
439            &self,
440            options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
441            status_handler: SCNSceneSourceStatusHandler,
442        ) -> Option<Retained<SCNScene>>;
443
444        #[cfg(feature = "SCNScene")]
445        /// Creates and initializes the scene described in the 3D file with the specified options.
446        ///
447        /// Parameter `options`: A dictionary of options. The valid keys are described in the "Scene loading options" section.
448        ///
449        /// Parameter `error`: If this method returns nil, an error providing more information is returned by reference.
450        ///
451        /// This simpler version is equivalent to providing a block to sceneWithOptions:statusHandler: and checking the "error"
452        /// parameter of the block if the status is SCNSceneStatusError.
453        ///
454        /// # Safety
455        ///
456        /// `options` generic should be of the correct type.
457        #[unsafe(method(sceneWithOptions:error:_))]
458        #[unsafe(method_family = none)]
459        pub unsafe fn sceneWithOptions_error(
460            &self,
461            options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
462        ) -> Result<Retained<SCNScene>, Retained<NSError>>;
463
464        /// Parameter `key`: The key for which to return the corresponding property.
465        ///
466        /// Returns the property as defined in the 3D file for the given key. See keys above.
467        #[unsafe(method(propertyForKey:))]
468        #[unsafe(method_family = none)]
469        pub unsafe fn propertyForKey(&self, key: &NSString) -> Option<Retained<AnyObject>>;
470
471        /// Returns the instance of "entryClass" found in the receiver's library with the id "uid".
472        ///
473        /// Parameter `uid`: The id of the entry to find as specified in the source file
474        ///
475        /// Parameter `entryClass`: Specifies the type of the object to be returned. It can be one of the following classes: SCNMaterial, SCNGeometry, SCNScene, SCNNode, CAAnimation, SCNLight, SCNCamera, SCNSkinner, SCNMorpher, NSImage
476        ///
477        /// Returns NULL if the receiver's library doesn't contains such an uid for the specified type.
478        ///
479        /// # Safety
480        ///
481        /// `entry_class` probably has further requirements.
482        #[unsafe(method(entryWithIdentifier:withClass:))]
483        #[unsafe(method_family = none)]
484        pub unsafe fn entryWithIdentifier_withClass(
485            &self,
486            uid: &NSString,
487            entry_class: &AnyClass,
488        ) -> Option<Retained<AnyObject>>;
489
490        /// Returns the IDs found in the receiver's library for the class "entryClass".
491        ///
492        /// Parameter `entryClass`: Specifies the type of the object referenced by the returned IDs. It can be one of the following classes: SCNMaterial, SCNScene, SCNGeometry, SCNNode, CAAnimation, SCNLight, SCNCamera, SCNSkinner, SCNMorpher, NSImage
493        ///
494        /// # Safety
495        ///
496        /// `entry_class` probably has further requirements.
497        #[unsafe(method(identifiersOfEntriesWithClass:))]
498        #[unsafe(method_family = none)]
499        pub unsafe fn identifiersOfEntriesWithClass(
500            &self,
501            entry_class: &AnyClass,
502        ) -> Retained<NSArray<NSString>>;
503
504        #[cfg(feature = "block2")]
505        /// Returns the entries in the receiver's library that pass a test in a given Block.
506        ///
507        /// Parameter `predicate`: The block to apply to entries in the library. The block takes three arguments: "entry" is an entry in the library, "identifier" is the ID of this entry and "stop" is a reference to a Boolean value. The block can set the value to YES to stop further processing of the library. The stop argument is an out-only argument. You should only ever set this Boolean to YES within the Block. The Block returns a Boolean value that indicates whether "entry" passed the test.
508        ///
509        /// The entry is an instance of one of following classes: SCNMaterial, SCNScene, SCNGeometry, SCNNode, CAAnimation, SCNLight, SCNCamera, SCNSkinner, SCNMorpher, NSImage.
510        #[unsafe(method(entriesPassingTest:))]
511        #[unsafe(method_family = none)]
512        pub unsafe fn entriesPassingTest(
513            &self,
514            predicate: &block2::DynBlock<
515                dyn Fn(NonNull<AnyObject>, NonNull<NSString>, NonNull<Bool>) -> Bool + '_,
516            >,
517        ) -> Retained<NSArray<AnyObject>>;
518    );
519}
520
521/// Methods declared on superclass `NSObject`.
522impl SCNSceneSource {
523    extern_methods!(
524        #[unsafe(method(init))]
525        #[unsafe(method_family = init)]
526        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
527
528        #[unsafe(method(new))]
529        #[unsafe(method_family = new)]
530        pub unsafe fn new() -> Retained<Self>;
531    );
532}