objc2_sprite_kit/generated/
SKAudioNode.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9#[cfg(feature = "objc2-avf-audio")]
10use objc2_avf_audio::*;
11use objc2_foundation::*;
12
13use crate::*;
14
15extern_class!(
16 #[unsafe(super(SKNode, NSResponder, NSObject))]
29 #[derive(Debug, PartialEq, Eq, Hash)]
30 #[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
31 #[cfg(target_os = "macos")]
32 pub struct SKAudioNode;
33);
34
35#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
36#[cfg(target_os = "macos")]
37extern_conformance!(
38 unsafe impl NSCoding for SKAudioNode {}
39);
40
41#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
42#[cfg(target_os = "macos")]
43extern_conformance!(
44 unsafe impl NSCopying for SKAudioNode {}
45);
46
47#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
48#[cfg(target_os = "macos")]
49unsafe impl CopyingHelper for SKAudioNode {
50 type Result = Self;
51}
52
53#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
54#[cfg(target_os = "macos")]
55extern_conformance!(
56 unsafe impl NSObjectProtocol for SKAudioNode {}
57);
58
59#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
60#[cfg(target_os = "macos")]
61extern_conformance!(
62 unsafe impl NSSecureCoding for SKAudioNode {}
63);
64
65#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
66#[cfg(target_os = "macos")]
67impl SKAudioNode {
68 extern_methods!(
69 #[cfg(feature = "objc2-avf-audio")]
70 #[unsafe(method(initWithAVAudioNode:))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn initWithAVAudioNode(
76 this: Allocated<Self>,
77 node: Option<&AVAudioNode>,
78 ) -> Retained<Self>;
79
80 #[unsafe(method(initWithCoder:))]
81 #[unsafe(method_family = init)]
82 pub unsafe fn initWithCoder(
83 this: Allocated<Self>,
84 a_decoder: &NSCoder,
85 ) -> Option<Retained<Self>>;
86
87 #[unsafe(method(initWithFileNamed:))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn initWithFileNamed(this: Allocated<Self>, name: &NSString) -> Retained<Self>;
93
94 #[unsafe(method(initWithURL:))]
98 #[unsafe(method_family = init)]
99 pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
100
101 #[cfg(feature = "objc2-avf-audio")]
102 #[unsafe(method(avAudioNode))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn avAudioNode(&self) -> Option<Retained<AVAudioNode>>;
106
107 #[cfg(feature = "objc2-avf-audio")]
108 #[unsafe(method(setAvAudioNode:))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn setAvAudioNode(&self, av_audio_node: Option<&AVAudioNode>);
112
113 #[unsafe(method(autoplayLooped))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn autoplayLooped(&self) -> bool;
125
126 #[unsafe(method(setAutoplayLooped:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn setAutoplayLooped(&self, autoplay_looped: bool);
130
131 #[unsafe(method(isPositional))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn isPositional(&self) -> bool;
141
142 #[unsafe(method(setPositional:))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn setPositional(&self, positional: bool);
146 );
147}
148
149#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
151#[cfg(target_os = "macos")]
152impl SKAudioNode {
153 extern_methods!(
154 #[unsafe(method(init))]
155 #[unsafe(method_family = init)]
156 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
157
158 #[unsafe(method(node))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
161
162 #[unsafe(method(nodeWithFileNamed:))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn nodeWithFileNamed(
165 filename: &NSString,
166 mtm: MainThreadMarker,
167 ) -> Option<Retained<Self>>;
168
169 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
172 filename: &NSString,
173 classes: &NSSet<AnyClass>,
174 mtm: MainThreadMarker,
175 ) -> Result<Retained<Self>, Retained<NSError>>;
176 );
177}
178
179#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
181#[cfg(target_os = "macos")]
182impl SKAudioNode {
183 extern_methods!(
184 #[unsafe(method(new))]
185 #[unsafe(method_family = new)]
186 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
187 );
188}
189
190#[cfg(feature = "SKAction")]
193impl SKAction {
194 extern_methods!(
195 #[unsafe(method(stereoPanTo:duration:))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn stereoPanTo_duration(
198 v: c_float,
199 duration: NSTimeInterval,
200 ) -> Retained<SKAction>;
201
202 #[unsafe(method(stereoPanBy:duration:))]
203 #[unsafe(method_family = none)]
204 pub unsafe fn stereoPanBy_duration(
205 v: c_float,
206 duration: NSTimeInterval,
207 ) -> Retained<SKAction>;
208
209 #[unsafe(method(changeReverbTo:duration:))]
210 #[unsafe(method_family = none)]
211 pub unsafe fn changeReverbTo_duration(
212 v: c_float,
213 duration: NSTimeInterval,
214 ) -> Retained<SKAction>;
215
216 #[unsafe(method(changeReverbBy:duration:))]
217 #[unsafe(method_family = none)]
218 pub unsafe fn changeReverbBy_duration(
219 v: c_float,
220 duration: NSTimeInterval,
221 ) -> Retained<SKAction>;
222
223 #[unsafe(method(changeObstructionTo:duration:))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn changeObstructionTo_duration(
226 v: c_float,
227 duration: NSTimeInterval,
228 ) -> Retained<SKAction>;
229
230 #[unsafe(method(changeObstructionBy:duration:))]
231 #[unsafe(method_family = none)]
232 pub unsafe fn changeObstructionBy_duration(
233 v: c_float,
234 duration: NSTimeInterval,
235 ) -> Retained<SKAction>;
236
237 #[unsafe(method(changeOcclusionTo:duration:))]
238 #[unsafe(method_family = none)]
239 pub unsafe fn changeOcclusionTo_duration(
240 v: c_float,
241 duration: NSTimeInterval,
242 ) -> Retained<SKAction>;
243
244 #[unsafe(method(changeOcclusionBy:duration:))]
245 #[unsafe(method_family = none)]
246 pub unsafe fn changeOcclusionBy_duration(
247 v: c_float,
248 duration: NSTimeInterval,
249 ) -> Retained<SKAction>;
250 );
251}