objc2_sprite_kit/generated/
SKVideoNode.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-av-foundation")]
10use objc2_av_foundation::*;
11#[cfg(feature = "objc2-core-foundation")]
12use objc2_core_foundation::*;
13use objc2_foundation::*;
14
15use crate::*;
16
17extern_class!(
18 #[unsafe(super(SKNode, NSResponder, NSObject))]
20 #[derive(Debug, PartialEq, Eq, Hash)]
21 #[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
22 #[cfg(target_os = "macos")]
23 pub struct SKVideoNode;
24);
25
26#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
27#[cfg(target_os = "macos")]
28extern_conformance!(
29 unsafe impl NSCoding for SKVideoNode {}
30);
31
32#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
33#[cfg(target_os = "macos")]
34extern_conformance!(
35 unsafe impl NSCopying for SKVideoNode {}
36);
37
38#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
39#[cfg(target_os = "macos")]
40unsafe impl CopyingHelper for SKVideoNode {
41 type Result = Self;
42}
43
44#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
45#[cfg(target_os = "macos")]
46extern_conformance!(
47 unsafe impl NSObjectProtocol for SKVideoNode {}
48);
49
50#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
51#[cfg(target_os = "macos")]
52extern_conformance!(
53 unsafe impl NSSecureCoding for SKVideoNode {}
54);
55
56#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
57#[cfg(target_os = "macos")]
58impl SKVideoNode {
59 extern_methods!(
60 #[cfg(feature = "objc2-av-foundation")]
61 #[unsafe(method(videoNodeWithAVPlayer:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn videoNodeWithAVPlayer(
65 player: &AVPlayer,
66 mtm: MainThreadMarker,
67 ) -> Retained<SKVideoNode>;
68
69 #[deprecated]
71 #[unsafe(method(videoNodeWithVideoFileNamed:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn videoNodeWithVideoFileNamed(
74 video_file: &NSString,
75 mtm: MainThreadMarker,
76 ) -> Retained<SKVideoNode>;
77
78 #[unsafe(method(videoNodeWithFileNamed:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn videoNodeWithFileNamed(
81 video_file: &NSString,
82 mtm: MainThreadMarker,
83 ) -> Retained<SKVideoNode>;
84
85 #[deprecated]
87 #[unsafe(method(videoNodeWithVideoURL:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn videoNodeWithVideoURL(
90 video_url: &NSURL,
91 mtm: MainThreadMarker,
92 ) -> Retained<SKVideoNode>;
93
94 #[unsafe(method(videoNodeWithURL:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn videoNodeWithURL(
97 video_url: &NSURL,
98 mtm: MainThreadMarker,
99 ) -> Retained<SKVideoNode>;
100
101 #[cfg(feature = "objc2-av-foundation")]
102 #[unsafe(method(initWithAVPlayer:))]
106 #[unsafe(method_family = init)]
107 pub unsafe fn initWithAVPlayer(this: Allocated<Self>, player: &AVPlayer) -> Retained<Self>;
108
109 #[deprecated]
111 #[unsafe(method(initWithVideoFileNamed:))]
112 #[unsafe(method_family = init)]
113 pub unsafe fn initWithVideoFileNamed(
114 this: Allocated<Self>,
115 video_file: &NSString,
116 ) -> Retained<Self>;
117
118 #[unsafe(method(initWithFileNamed:))]
119 #[unsafe(method_family = init)]
120 pub unsafe fn initWithFileNamed(
121 this: Allocated<Self>,
122 video_file: &NSString,
123 ) -> Retained<Self>;
124
125 #[deprecated]
126 #[unsafe(method(initWithVideoURL:))]
127 #[unsafe(method_family = init)]
128 pub unsafe fn initWithVideoURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
129
130 #[unsafe(method(initWithURL:))]
131 #[unsafe(method_family = init)]
132 pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
133
134 #[unsafe(method(initWithCoder:))]
140 #[unsafe(method_family = init)]
141 pub unsafe fn initWithCoder(
142 this: Allocated<Self>,
143 a_decoder: &NSCoder,
144 ) -> Option<Retained<Self>>;
145
146 #[unsafe(method(play))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn play(&self);
149
150 #[unsafe(method(pause))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn pause(&self);
153
154 #[cfg(feature = "objc2-core-foundation")]
155 #[unsafe(method(size))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn size(&self) -> CGSize;
159
160 #[cfg(feature = "objc2-core-foundation")]
161 #[unsafe(method(setSize:))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn setSize(&self, size: CGSize);
165
166 #[cfg(feature = "objc2-core-foundation")]
167 #[unsafe(method(anchorPoint))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn anchorPoint(&self) -> CGPoint;
171
172 #[cfg(feature = "objc2-core-foundation")]
173 #[unsafe(method(setAnchorPoint:))]
175 #[unsafe(method_family = none)]
176 pub unsafe fn setAnchorPoint(&self, anchor_point: CGPoint);
177 );
178}
179
180#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
182#[cfg(target_os = "macos")]
183impl SKVideoNode {
184 extern_methods!(
185 #[unsafe(method(init))]
186 #[unsafe(method_family = init)]
187 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
188
189 #[unsafe(method(node))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
192
193 #[unsafe(method(nodeWithFileNamed:))]
194 #[unsafe(method_family = none)]
195 pub unsafe fn nodeWithFileNamed(
196 filename: &NSString,
197 mtm: MainThreadMarker,
198 ) -> Option<Retained<Self>>;
199
200 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
206 filename: &NSString,
207 classes: &NSSet<AnyClass>,
208 mtm: MainThreadMarker,
209 ) -> Result<Retained<Self>, Retained<NSError>>;
210 );
211}
212
213#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
215#[cfg(target_os = "macos")]
216impl SKVideoNode {
217 extern_methods!(
218 #[unsafe(method(new))]
219 #[unsafe(method_family = new)]
220 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
221 );
222}