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:))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn initWithCoder(
86 this: Allocated<Self>,
87 a_decoder: &NSCoder,
88 ) -> Option<Retained<Self>>;
89
90 #[unsafe(method(initWithFileNamed:))]
94 #[unsafe(method_family = init)]
95 pub unsafe fn initWithFileNamed(this: Allocated<Self>, name: &NSString) -> Retained<Self>;
96
97 #[unsafe(method(initWithURL:))]
101 #[unsafe(method_family = init)]
102 pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
103
104 #[cfg(feature = "objc2-avf-audio")]
105 #[unsafe(method(avAudioNode))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn avAudioNode(&self) -> Option<Retained<AVAudioNode>>;
109
110 #[cfg(feature = "objc2-avf-audio")]
111 #[unsafe(method(setAvAudioNode:))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn setAvAudioNode(&self, av_audio_node: Option<&AVAudioNode>);
115
116 #[unsafe(method(autoplayLooped))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn autoplayLooped(&self) -> bool;
128
129 #[unsafe(method(setAutoplayLooped:))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn setAutoplayLooped(&self, autoplay_looped: bool);
133
134 #[unsafe(method(isPositional))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn isPositional(&self) -> bool;
144
145 #[unsafe(method(setPositional:))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn setPositional(&self, positional: bool);
149 );
150}
151
152#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
154#[cfg(target_os = "macos")]
155impl SKAudioNode {
156 extern_methods!(
157 #[unsafe(method(init))]
158 #[unsafe(method_family = init)]
159 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
160
161 #[unsafe(method(node))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
164
165 #[unsafe(method(nodeWithFileNamed:))]
166 #[unsafe(method_family = none)]
167 pub unsafe fn nodeWithFileNamed(
168 filename: &NSString,
169 mtm: MainThreadMarker,
170 ) -> Option<Retained<Self>>;
171
172 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
178 filename: &NSString,
179 classes: &NSSet<AnyClass>,
180 mtm: MainThreadMarker,
181 ) -> Result<Retained<Self>, Retained<NSError>>;
182 );
183}
184
185#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
187#[cfg(target_os = "macos")]
188impl SKAudioNode {
189 extern_methods!(
190 #[unsafe(method(new))]
191 #[unsafe(method_family = new)]
192 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
193 );
194}
195
196#[cfg(feature = "SKAction")]
200impl SKAction {
201 extern_methods!(
202 #[unsafe(method(stereoPanTo:duration:))]
203 #[unsafe(method_family = none)]
204 pub unsafe fn stereoPanTo_duration(
205 v: c_float,
206 duration: NSTimeInterval,
207 ) -> Retained<SKAction>;
208
209 #[unsafe(method(stereoPanBy:duration:))]
210 #[unsafe(method_family = none)]
211 pub unsafe fn stereoPanBy_duration(
212 v: c_float,
213 duration: NSTimeInterval,
214 ) -> Retained<SKAction>;
215
216 #[unsafe(method(changeReverbTo:duration:))]
217 #[unsafe(method_family = none)]
218 pub unsafe fn changeReverbTo_duration(
219 v: c_float,
220 duration: NSTimeInterval,
221 ) -> Retained<SKAction>;
222
223 #[unsafe(method(changeReverbBy:duration:))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn changeReverbBy_duration(
226 v: c_float,
227 duration: NSTimeInterval,
228 ) -> Retained<SKAction>;
229
230 #[unsafe(method(changeObstructionTo:duration:))]
231 #[unsafe(method_family = none)]
232 pub unsafe fn changeObstructionTo_duration(
233 v: c_float,
234 duration: NSTimeInterval,
235 ) -> Retained<SKAction>;
236
237 #[unsafe(method(changeObstructionBy:duration:))]
238 #[unsafe(method_family = none)]
239 pub unsafe fn changeObstructionBy_duration(
240 v: c_float,
241 duration: NSTimeInterval,
242 ) -> Retained<SKAction>;
243
244 #[unsafe(method(changeOcclusionTo:duration:))]
245 #[unsafe(method_family = none)]
246 pub unsafe fn changeOcclusionTo_duration(
247 v: c_float,
248 duration: NSTimeInterval,
249 ) -> Retained<SKAction>;
250
251 #[unsafe(method(changeOcclusionBy:duration:))]
252 #[unsafe(method_family = none)]
253 pub unsafe fn changeOcclusionBy_duration(
254 v: c_float,
255 duration: NSTimeInterval,
256 ) -> Retained<SKAction>;
257 );
258}