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")]
26unsafe impl NSCoding for SK3DNode {}
27
28#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
29#[cfg(target_os = "macos")]
30unsafe impl NSCopying for SK3DNode {}
31
32#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
33#[cfg(target_os = "macos")]
34unsafe impl CopyingHelper for SK3DNode {
35 type Result = Self;
36}
37
38#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
39#[cfg(target_os = "macos")]
40unsafe impl NSObjectProtocol for SK3DNode {}
41
42#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
43#[cfg(target_os = "macos")]
44unsafe impl NSSecureCoding for SK3DNode {}
45
46#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
47#[cfg(target_os = "macos")]
48impl SK3DNode {
49 extern_methods!(
50 #[cfg(feature = "objc2-core-foundation")]
51 #[unsafe(method(initWithViewportSize:))]
54 #[unsafe(method_family = init)]
55 pub unsafe fn initWithViewportSize(
56 this: Allocated<Self>,
57 viewport_size: CGSize,
58 ) -> Retained<Self>;
59
60 #[unsafe(method(initWithCoder:))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn initWithCoder(
64 this: Allocated<Self>,
65 a_decoder: &NSCoder,
66 ) -> Option<Retained<Self>>;
67
68 #[cfg(feature = "objc2-core-foundation")]
69 #[unsafe(method(nodeWithViewportSize:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn nodeWithViewportSize(
73 viewport_size: CGSize,
74 mtm: MainThreadMarker,
75 ) -> Retained<Self>;
76
77 #[cfg(feature = "objc2-core-foundation")]
78 #[unsafe(method(viewportSize))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn viewportSize(&self) -> CGSize;
82
83 #[cfg(feature = "objc2-core-foundation")]
84 #[unsafe(method(setViewportSize:))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn setViewportSize(&self, viewport_size: CGSize);
88
89 #[unsafe(method(sceneTime))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn sceneTime(&self) -> NSTimeInterval;
93
94 #[unsafe(method(setSceneTime:))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn setSceneTime(&self, scene_time: NSTimeInterval);
98
99 #[unsafe(method(isPlaying))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn isPlaying(&self) -> bool;
103
104 #[unsafe(method(setPlaying:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn setPlaying(&self, playing: bool);
108
109 #[unsafe(method(loops))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn loops(&self) -> bool;
115
116 #[unsafe(method(setLoops:))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn setLoops(&self, loops: bool);
120
121 #[unsafe(method(autoenablesDefaultLighting))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn autoenablesDefaultLighting(&self) -> bool;
127
128 #[unsafe(method(setAutoenablesDefaultLighting:))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn setAutoenablesDefaultLighting(&self, autoenables_default_lighting: bool);
132 );
133}
134
135#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
137#[cfg(target_os = "macos")]
138impl SK3DNode {
139 extern_methods!(
140 #[unsafe(method(init))]
141 #[unsafe(method_family = init)]
142 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
143
144 #[unsafe(method(node))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
147
148 #[unsafe(method(nodeWithFileNamed:))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn nodeWithFileNamed(
151 filename: &NSString,
152 mtm: MainThreadMarker,
153 ) -> Option<Retained<Self>>;
154
155 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
158 filename: &NSString,
159 classes: &NSSet<AnyClass>,
160 mtm: MainThreadMarker,
161 ) -> Result<Retained<Self>, Retained<NSError>>;
162 );
163}
164
165#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
167#[cfg(target_os = "macos")]
168impl SK3DNode {
169 extern_methods!(
170 #[unsafe(method(new))]
171 #[unsafe(method_family = new)]
172 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
173 );
174}