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:))]
70 #[unsafe(method_family = init)]
71 pub unsafe fn initWithCoder(
72 this: Allocated<Self>,
73 a_decoder: &NSCoder,
74 ) -> Option<Retained<Self>>;
75
76 #[cfg(feature = "objc2-core-foundation")]
77 #[unsafe(method(nodeWithViewportSize:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn nodeWithViewportSize(
81 viewport_size: CGSize,
82 mtm: MainThreadMarker,
83 ) -> Retained<Self>;
84
85 #[cfg(feature = "objc2-core-foundation")]
86 #[unsafe(method(viewportSize))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn viewportSize(&self) -> CGSize;
90
91 #[cfg(feature = "objc2-core-foundation")]
92 #[unsafe(method(setViewportSize:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn setViewportSize(&self, viewport_size: CGSize);
96
97 #[unsafe(method(sceneTime))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn sceneTime(&self) -> NSTimeInterval;
101
102 #[unsafe(method(setSceneTime:))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn setSceneTime(&self, scene_time: NSTimeInterval);
106
107 #[unsafe(method(isPlaying))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn isPlaying(&self) -> bool;
111
112 #[unsafe(method(setPlaying:))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn setPlaying(&self, playing: bool);
116
117 #[unsafe(method(loops))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn loops(&self) -> bool;
123
124 #[unsafe(method(setLoops:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn setLoops(&self, loops: bool);
128
129 #[unsafe(method(autoenablesDefaultLighting))]
133 #[unsafe(method_family = none)]
134 pub unsafe fn autoenablesDefaultLighting(&self) -> bool;
135
136 #[unsafe(method(setAutoenablesDefaultLighting:))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn setAutoenablesDefaultLighting(&self, autoenables_default_lighting: bool);
140 );
141}
142
143#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
145#[cfg(target_os = "macos")]
146impl SK3DNode {
147 extern_methods!(
148 #[unsafe(method(init))]
149 #[unsafe(method_family = init)]
150 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
151
152 #[unsafe(method(node))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
155
156 #[unsafe(method(nodeWithFileNamed:))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn nodeWithFileNamed(
159 filename: &NSString,
160 mtm: MainThreadMarker,
161 ) -> Option<Retained<Self>>;
162
163 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
166 filename: &NSString,
167 classes: &NSSet<AnyClass>,
168 mtm: MainThreadMarker,
169 ) -> Result<Retained<Self>, Retained<NSError>>;
170 );
171}
172
173#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
175#[cfg(target_os = "macos")]
176impl SK3DNode {
177 extern_methods!(
178 #[unsafe(method(new))]
179 #[unsafe(method_family = new)]
180 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
181 );
182}