objc2_sprite_kit/generated/
SK3DNode.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-core-foundation")]
10use objc2_core_foundation::*;
11use objc2_foundation::*;
12
13use crate::*;
14
15extern_class!(
16 #[unsafe(super(SKNode, NSResponder, NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
20 #[cfg(target_os = "macos")]
21 pub struct SK3DNode;
22);
23
24#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
25#[cfg(target_os = "macos")]
26extern_conformance!(
27 unsafe impl NSCoding for SK3DNode {}
28);
29
30#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
31#[cfg(target_os = "macos")]
32extern_conformance!(
33 unsafe impl NSCopying for SK3DNode {}
34);
35
36#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
37#[cfg(target_os = "macos")]
38unsafe impl CopyingHelper for SK3DNode {
39 type Result = Self;
40}
41
42#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
43#[cfg(target_os = "macos")]
44extern_conformance!(
45 unsafe impl NSObjectProtocol for SK3DNode {}
46);
47
48#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
49#[cfg(target_os = "macos")]
50extern_conformance!(
51 unsafe impl NSSecureCoding for SK3DNode {}
52);
53
54#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
55#[cfg(target_os = "macos")]
56impl SK3DNode {
57 extern_methods!(
58 #[cfg(feature = "objc2-core-foundation")]
59 #[unsafe(method(initWithViewportSize:))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn initWithViewportSize(
64 this: Allocated<Self>,
65 viewport_size: CGSize,
66 ) -> Retained<Self>;
67
68 #[unsafe(method(initWithCoder:))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn initWithCoder(
76 this: Allocated<Self>,
77 a_decoder: &NSCoder,
78 ) -> Option<Retained<Self>>;
79
80 #[cfg(feature = "objc2-core-foundation")]
81 #[unsafe(method(nodeWithViewportSize:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn nodeWithViewportSize(
85 viewport_size: CGSize,
86 mtm: MainThreadMarker,
87 ) -> Retained<Self>;
88
89 #[cfg(feature = "objc2-core-foundation")]
90 #[unsafe(method(viewportSize))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn viewportSize(&self) -> CGSize;
94
95 #[cfg(feature = "objc2-core-foundation")]
96 #[unsafe(method(setViewportSize:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn setViewportSize(&self, viewport_size: CGSize);
100
101 #[unsafe(method(sceneTime))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn sceneTime(&self) -> NSTimeInterval;
105
106 #[unsafe(method(setSceneTime:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn setSceneTime(&self, scene_time: NSTimeInterval);
110
111 #[unsafe(method(isPlaying))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn isPlaying(&self) -> bool;
115
116 #[unsafe(method(setPlaying:))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn setPlaying(&self, playing: bool);
120
121 #[unsafe(method(loops))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn loops(&self) -> bool;
127
128 #[unsafe(method(setLoops:))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn setLoops(&self, loops: bool);
132
133 #[unsafe(method(autoenablesDefaultLighting))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn autoenablesDefaultLighting(&self) -> bool;
139
140 #[unsafe(method(setAutoenablesDefaultLighting:))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn setAutoenablesDefaultLighting(&self, autoenables_default_lighting: bool);
144 );
145}
146
147#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
149#[cfg(target_os = "macos")]
150impl SK3DNode {
151 extern_methods!(
152 #[unsafe(method(init))]
153 #[unsafe(method_family = init)]
154 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
155
156 #[unsafe(method(node))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
159
160 #[unsafe(method(nodeWithFileNamed:))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn nodeWithFileNamed(
163 filename: &NSString,
164 mtm: MainThreadMarker,
165 ) -> Option<Retained<Self>>;
166
167 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
173 filename: &NSString,
174 classes: &NSSet<AnyClass>,
175 mtm: MainThreadMarker,
176 ) -> Result<Retained<Self>, Retained<NSError>>;
177 );
178}
179
180#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
182#[cfg(target_os = "macos")]
183impl SK3DNode {
184 extern_methods!(
185 #[unsafe(method(new))]
186 #[unsafe(method_family = new)]
187 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
188 );
189}