objc2_sprite_kit/generated/
SKReferenceNode.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::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(SKNode, NSResponder, NSObject))]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
18 #[cfg(target_os = "macos")]
19 pub struct SKReferenceNode;
20);
21
22#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
23#[cfg(target_os = "macos")]
24extern_conformance!(
25 unsafe impl NSCoding for SKReferenceNode {}
26);
27
28#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
29#[cfg(target_os = "macos")]
30extern_conformance!(
31 unsafe impl NSCopying for SKReferenceNode {}
32);
33
34#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
35#[cfg(target_os = "macos")]
36unsafe impl CopyingHelper for SKReferenceNode {
37 type Result = Self;
38}
39
40#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
41#[cfg(target_os = "macos")]
42extern_conformance!(
43 unsafe impl NSObjectProtocol for SKReferenceNode {}
44);
45
46#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
47#[cfg(target_os = "macos")]
48extern_conformance!(
49 unsafe impl NSSecureCoding for SKReferenceNode {}
50);
51
52#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
53#[cfg(target_os = "macos")]
54impl SKReferenceNode {
55 extern_methods!(
56 #[unsafe(method(initWithURL:))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn initWithURL(this: Allocated<Self>, url: Option<&NSURL>) -> Retained<Self>;
60
61 #[unsafe(method(initWithFileNamed:))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn initWithFileNamed(
65 this: Allocated<Self>,
66 file_name: Option<&NSString>,
67 ) -> Retained<Self>;
68
69 #[unsafe(method(initWithCoder:))]
75 #[unsafe(method_family = init)]
76 pub unsafe fn initWithCoder(
77 this: Allocated<Self>,
78 a_decoder: &NSCoder,
79 ) -> Option<Retained<Self>>;
80
81 #[unsafe(method(referenceNodeWithFileNamed:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn referenceNodeWithFileNamed(
85 file_name: &NSString,
86 mtm: MainThreadMarker,
87 ) -> Retained<Self>;
88
89 #[unsafe(method(referenceNodeWithURL:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn referenceNodeWithURL(
93 reference_url: &NSURL,
94 mtm: MainThreadMarker,
95 ) -> Retained<Self>;
96
97 #[unsafe(method(didLoadReferenceNode:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn didLoadReferenceNode(&self, node: Option<&SKNode>);
101
102 #[unsafe(method(resolveReferenceNode))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn resolveReferenceNode(&self);
109 );
110}
111
112#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
114#[cfg(target_os = "macos")]
115impl SKReferenceNode {
116 extern_methods!(
117 #[unsafe(method(init))]
118 #[unsafe(method_family = init)]
119 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
120
121 #[unsafe(method(node))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
124
125 #[unsafe(method(nodeWithFileNamed:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn nodeWithFileNamed(
128 filename: &NSString,
129 mtm: MainThreadMarker,
130 ) -> Option<Retained<Self>>;
131
132 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
138 filename: &NSString,
139 classes: &NSSet<AnyClass>,
140 mtm: MainThreadMarker,
141 ) -> Result<Retained<Self>, Retained<NSError>>;
142 );
143}
144
145#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
147#[cfg(target_os = "macos")]
148impl SKReferenceNode {
149 extern_methods!(
150 #[unsafe(method(new))]
151 #[unsafe(method_family = new)]
152 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
153 );
154}