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")]
37unsafe impl NSCoding for SKAudioNode {}
38
39#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
40#[cfg(target_os = "macos")]
41unsafe impl NSCopying for SKAudioNode {}
42
43#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
44#[cfg(target_os = "macos")]
45unsafe impl CopyingHelper for SKAudioNode {
46 type Result = Self;
47}
48
49#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
50#[cfg(target_os = "macos")]
51unsafe impl NSObjectProtocol for SKAudioNode {}
52
53#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
54#[cfg(target_os = "macos")]
55unsafe impl NSSecureCoding for SKAudioNode {}
56
57#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
58#[cfg(target_os = "macos")]
59impl SKAudioNode {
60 extern_methods!(
61 #[cfg(feature = "objc2-avf-audio")]
62 #[unsafe(method(initWithAVAudioNode:))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn initWithAVAudioNode(
68 this: Allocated<Self>,
69 node: Option<&AVAudioNode>,
70 ) -> Retained<Self>;
71
72 #[unsafe(method(initWithCoder:))]
73 #[unsafe(method_family = init)]
74 pub unsafe fn initWithCoder(
75 this: Allocated<Self>,
76 a_decoder: &NSCoder,
77 ) -> Option<Retained<Self>>;
78
79 #[unsafe(method(initWithFileNamed:))]
83 #[unsafe(method_family = init)]
84 pub unsafe fn initWithFileNamed(this: Allocated<Self>, name: &NSString) -> Retained<Self>;
85
86 #[unsafe(method(initWithURL:))]
90 #[unsafe(method_family = init)]
91 pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
92
93 #[cfg(feature = "objc2-avf-audio")]
94 #[unsafe(method(avAudioNode))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn avAudioNode(&self) -> Option<Retained<AVAudioNode>>;
98
99 #[cfg(feature = "objc2-avf-audio")]
100 #[unsafe(method(setAvAudioNode:))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn setAvAudioNode(&self, av_audio_node: Option<&AVAudioNode>);
104
105 #[unsafe(method(autoplayLooped))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn autoplayLooped(&self) -> bool;
117
118 #[unsafe(method(setAutoplayLooped:))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn setAutoplayLooped(&self, autoplay_looped: bool);
122
123 #[unsafe(method(isPositional))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn isPositional(&self) -> bool;
133
134 #[unsafe(method(setPositional:))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn setPositional(&self, positional: bool);
138 );
139}
140
141#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
143#[cfg(target_os = "macos")]
144impl SKAudioNode {
145 extern_methods!(
146 #[unsafe(method(init))]
147 #[unsafe(method_family = init)]
148 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
149
150 #[unsafe(method(node))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
153
154 #[unsafe(method(nodeWithFileNamed:))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn nodeWithFileNamed(
157 filename: &NSString,
158 mtm: MainThreadMarker,
159 ) -> Option<Retained<Self>>;
160
161 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
164 filename: &NSString,
165 classes: &NSSet<AnyClass>,
166 mtm: MainThreadMarker,
167 ) -> Result<Retained<Self>, Retained<NSError>>;
168 );
169}
170
171#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
173#[cfg(target_os = "macos")]
174impl SKAudioNode {
175 extern_methods!(
176 #[unsafe(method(new))]
177 #[unsafe(method_family = new)]
178 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
179 );
180}
181
182#[cfg(feature = "SKAction")]
185impl SKAction {
186 extern_methods!(
187 #[unsafe(method(stereoPanTo:duration:))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn stereoPanTo_duration(
190 v: c_float,
191 duration: NSTimeInterval,
192 ) -> Retained<SKAction>;
193
194 #[unsafe(method(stereoPanBy:duration:))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn stereoPanBy_duration(
197 v: c_float,
198 duration: NSTimeInterval,
199 ) -> Retained<SKAction>;
200
201 #[unsafe(method(changeReverbTo:duration:))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn changeReverbTo_duration(
204 v: c_float,
205 duration: NSTimeInterval,
206 ) -> Retained<SKAction>;
207
208 #[unsafe(method(changeReverbBy:duration:))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn changeReverbBy_duration(
211 v: c_float,
212 duration: NSTimeInterval,
213 ) -> Retained<SKAction>;
214
215 #[unsafe(method(changeObstructionTo:duration:))]
216 #[unsafe(method_family = none)]
217 pub unsafe fn changeObstructionTo_duration(
218 v: c_float,
219 duration: NSTimeInterval,
220 ) -> Retained<SKAction>;
221
222 #[unsafe(method(changeObstructionBy:duration:))]
223 #[unsafe(method_family = none)]
224 pub unsafe fn changeObstructionBy_duration(
225 v: c_float,
226 duration: NSTimeInterval,
227 ) -> Retained<SKAction>;
228
229 #[unsafe(method(changeOcclusionTo:duration:))]
230 #[unsafe(method_family = none)]
231 pub unsafe fn changeOcclusionTo_duration(
232 v: c_float,
233 duration: NSTimeInterval,
234 ) -> Retained<SKAction>;
235
236 #[unsafe(method(changeOcclusionBy:duration:))]
237 #[unsafe(method_family = none)]
238 pub unsafe fn changeOcclusionBy_duration(
239 v: c_float,
240 duration: NSTimeInterval,
241 ) -> Retained<SKAction>;
242 );
243}