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")]
28unsafe impl NSCoding for SKVideoNode {}
29
30#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
31#[cfg(target_os = "macos")]
32unsafe impl NSCopying for SKVideoNode {}
33
34#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
35#[cfg(target_os = "macos")]
36unsafe impl CopyingHelper for SKVideoNode {
37 type Result = Self;
38}
39
40#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
41#[cfg(target_os = "macos")]
42unsafe impl NSObjectProtocol for SKVideoNode {}
43
44#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
45#[cfg(target_os = "macos")]
46unsafe impl NSSecureCoding for SKVideoNode {}
47
48#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
49#[cfg(target_os = "macos")]
50impl SKVideoNode {
51 extern_methods!(
52 #[cfg(feature = "objc2-av-foundation")]
53 #[unsafe(method(videoNodeWithAVPlayer:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn videoNodeWithAVPlayer(
57 player: &AVPlayer,
58 mtm: MainThreadMarker,
59 ) -> Retained<SKVideoNode>;
60
61 #[deprecated]
63 #[unsafe(method(videoNodeWithVideoFileNamed:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn videoNodeWithVideoFileNamed(
66 video_file: &NSString,
67 mtm: MainThreadMarker,
68 ) -> Retained<SKVideoNode>;
69
70 #[unsafe(method(videoNodeWithFileNamed:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn videoNodeWithFileNamed(
73 video_file: &NSString,
74 mtm: MainThreadMarker,
75 ) -> Retained<SKVideoNode>;
76
77 #[deprecated]
79 #[unsafe(method(videoNodeWithVideoURL:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn videoNodeWithVideoURL(
82 video_url: &NSURL,
83 mtm: MainThreadMarker,
84 ) -> Retained<SKVideoNode>;
85
86 #[unsafe(method(videoNodeWithURL:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn videoNodeWithURL(
89 video_url: &NSURL,
90 mtm: MainThreadMarker,
91 ) -> Retained<SKVideoNode>;
92
93 #[cfg(feature = "objc2-av-foundation")]
94 #[unsafe(method(initWithAVPlayer:))]
98 #[unsafe(method_family = init)]
99 pub unsafe fn initWithAVPlayer(this: Allocated<Self>, player: &AVPlayer) -> Retained<Self>;
100
101 #[deprecated]
103 #[unsafe(method(initWithVideoFileNamed:))]
104 #[unsafe(method_family = init)]
105 pub unsafe fn initWithVideoFileNamed(
106 this: Allocated<Self>,
107 video_file: &NSString,
108 ) -> Retained<Self>;
109
110 #[unsafe(method(initWithFileNamed:))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn initWithFileNamed(
113 this: Allocated<Self>,
114 video_file: &NSString,
115 ) -> Retained<Self>;
116
117 #[deprecated]
118 #[unsafe(method(initWithVideoURL:))]
119 #[unsafe(method_family = init)]
120 pub unsafe fn initWithVideoURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
121
122 #[unsafe(method(initWithURL:))]
123 #[unsafe(method_family = init)]
124 pub unsafe fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
125
126 #[unsafe(method(initWithCoder:))]
128 #[unsafe(method_family = init)]
129 pub unsafe fn initWithCoder(
130 this: Allocated<Self>,
131 a_decoder: &NSCoder,
132 ) -> Option<Retained<Self>>;
133
134 #[unsafe(method(play))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn play(&self);
137
138 #[unsafe(method(pause))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn pause(&self);
141
142 #[cfg(feature = "objc2-core-foundation")]
143 #[unsafe(method(size))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn size(&self) -> CGSize;
147
148 #[cfg(feature = "objc2-core-foundation")]
149 #[unsafe(method(setSize:))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn setSize(&self, size: CGSize);
153
154 #[cfg(feature = "objc2-core-foundation")]
155 #[unsafe(method(anchorPoint))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn anchorPoint(&self) -> CGPoint;
159
160 #[cfg(feature = "objc2-core-foundation")]
161 #[unsafe(method(setAnchorPoint:))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn setAnchorPoint(&self, anchor_point: CGPoint);
165 );
166}
167
168#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
170#[cfg(target_os = "macos")]
171impl SKVideoNode {
172 extern_methods!(
173 #[unsafe(method(init))]
174 #[unsafe(method_family = init)]
175 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
176
177 #[unsafe(method(node))]
178 #[unsafe(method_family = none)]
179 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
180
181 #[unsafe(method(nodeWithFileNamed:))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn nodeWithFileNamed(
184 filename: &NSString,
185 mtm: MainThreadMarker,
186 ) -> Option<Retained<Self>>;
187
188 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
189 #[unsafe(method_family = none)]
190 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
191 filename: &NSString,
192 classes: &NSSet<AnyClass>,
193 mtm: MainThreadMarker,
194 ) -> Result<Retained<Self>, Retained<NSError>>;
195 );
196}
197
198#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
200#[cfg(target_os = "macos")]
201impl SKVideoNode {
202 extern_methods!(
203 #[unsafe(method(new))]
204 #[unsafe(method_family = new)]
205 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
206 );
207}