objc2_phase/generated/
PHASEOccluder.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// *************************************************************************************************
11    ///
12    ///
13    ///
14    /// A PHASEOccluder represents a shape (with associated materials) that can affect sound transmission within the simulated acoustic scene.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phaseoccluder?language=objc)
17    #[unsafe(super(PHASEObject, NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    #[cfg(feature = "PHASEObject")]
20    pub struct PHASEOccluder;
21);
22
23#[cfg(feature = "PHASEObject")]
24extern_conformance!(
25    unsafe impl NSCopying for PHASEOccluder {}
26);
27
28#[cfg(feature = "PHASEObject")]
29unsafe impl CopyingHelper for PHASEOccluder {
30    type Result = Self;
31}
32
33#[cfg(feature = "PHASEObject")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for PHASEOccluder {}
36);
37
38#[cfg(feature = "PHASEObject")]
39impl PHASEOccluder {
40    extern_methods!(
41        #[unsafe(method(init))]
42        #[unsafe(method_family = init)]
43        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45        #[unsafe(method(new))]
46        #[unsafe(method_family = new)]
47        pub unsafe fn new() -> Retained<Self>;
48
49        #[cfg(feature = "PHASEEngine")]
50        #[unsafe(method(initWithEngine:))]
51        #[unsafe(method_family = init)]
52        pub unsafe fn initWithEngine(this: Allocated<Self>, engine: &PHASEEngine)
53            -> Retained<Self>;
54
55        #[cfg(all(feature = "PHASEEngine", feature = "PHASEShape"))]
56        /// Initialize a new occluder with shapes.
57        ///
58        /// The shapes array cannot be empty, otherwise an exception is thrown.
59        ///
60        /// Note: This function is thread-safe.
61        /// Clients can safely run this function to create multiple occluders from multiple threads, if required.
62        #[unsafe(method(initWithEngine:shapes:))]
63        #[unsafe(method_family = init)]
64        pub unsafe fn initWithEngine_shapes(
65            this: Allocated<Self>,
66            engine: &PHASEEngine,
67            shapes: &NSArray<PHASEShape>,
68        ) -> Retained<Self>;
69
70        #[cfg(feature = "PHASEShape")]
71        /// Array of shapes associated with this occluder.
72        #[unsafe(method(shapes))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn shapes(&self) -> Retained<NSArray<PHASEShape>>;
75    );
76}