objc2_sprite_kit/generated/
SKEffectNode.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-image")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_core_image::*;
12use objc2_foundation::*;
13
14use crate::*;
15
16extern_class!(
17 #[unsafe(super(SKNode, NSResponder, NSObject))]
21 #[derive(Debug, PartialEq, Eq, Hash)]
22 #[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
23 #[cfg(target_os = "macos")]
24 pub struct SKEffectNode;
25);
26
27#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
28#[cfg(target_os = "macos")]
29unsafe impl NSCoding for SKEffectNode {}
30
31#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
32#[cfg(target_os = "macos")]
33unsafe impl NSCopying for SKEffectNode {}
34
35#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
36#[cfg(target_os = "macos")]
37unsafe impl CopyingHelper for SKEffectNode {
38 type Result = Self;
39}
40
41#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
42#[cfg(target_os = "macos")]
43unsafe impl NSObjectProtocol for SKEffectNode {}
44
45#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
46#[cfg(target_os = "macos")]
47unsafe impl NSSecureCoding for SKEffectNode {}
48
49#[cfg(all(
50 feature = "SKNode",
51 feature = "SKWarpGeometry",
52 feature = "objc2-app-kit"
53))]
54#[cfg(target_os = "macos")]
55unsafe impl SKWarpable for SKEffectNode {}
56
57#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
58#[cfg(target_os = "macos")]
59impl SKEffectNode {
60 extern_methods!(
61 #[cfg(feature = "objc2-core-image")]
62 #[unsafe(method(filter))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn filter(&self) -> Option<Retained<CIFilter>>;
68
69 #[cfg(feature = "objc2-core-image")]
70 #[unsafe(method(setFilter:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn setFilter(&self, filter: Option<&CIFilter>);
74
75 #[unsafe(method(shouldCenterFilter))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn shouldCenterFilter(&self) -> bool;
78
79 #[unsafe(method(setShouldCenterFilter:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setShouldCenterFilter(&self, should_center_filter: bool);
83
84 #[unsafe(method(shouldEnableEffects))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn shouldEnableEffects(&self) -> bool;
90
91 #[unsafe(method(setShouldEnableEffects:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn setShouldEnableEffects(&self, should_enable_effects: bool);
95
96 #[unsafe(method(shouldRasterize))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn shouldRasterize(&self) -> bool;
102
103 #[unsafe(method(setShouldRasterize:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn setShouldRasterize(&self, should_rasterize: bool);
107
108 #[unsafe(method(blendMode))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn blendMode(&self) -> SKBlendMode;
114
115 #[unsafe(method(setBlendMode:))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn setBlendMode(&self, blend_mode: SKBlendMode);
119
120 #[cfg(feature = "SKShader")]
121 #[unsafe(method(shader))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn shader(&self) -> Option<Retained<SKShader>>;
124
125 #[cfg(feature = "SKShader")]
126 #[unsafe(method(setShader:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn setShader(&self, shader: Option<&SKShader>);
130
131 #[cfg(feature = "SKAttribute")]
132 #[unsafe(method(attributeValues))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn attributeValues(&self) -> Retained<NSDictionary<NSString, SKAttributeValue>>;
137
138 #[cfg(feature = "SKAttribute")]
139 #[unsafe(method(setAttributeValues:))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn setAttributeValues(
143 &self,
144 attribute_values: &NSDictionary<NSString, SKAttributeValue>,
145 );
146
147 #[cfg(feature = "SKAttribute")]
148 #[unsafe(method(valueForAttributeNamed:))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn valueForAttributeNamed(
151 &self,
152 key: &NSString,
153 ) -> Option<Retained<SKAttributeValue>>;
154
155 #[cfg(feature = "SKAttribute")]
156 #[unsafe(method(setValue:forAttributeNamed:))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn setValue_forAttributeNamed(&self, value: &SKAttributeValue, key: &NSString);
159 );
160}
161
162#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
164#[cfg(target_os = "macos")]
165impl SKEffectNode {
166 extern_methods!(
167 #[unsafe(method(init))]
168 #[unsafe(method_family = init)]
169 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
170
171 #[unsafe(method(initWithCoder:))]
173 #[unsafe(method_family = init)]
174 pub unsafe fn initWithCoder(
175 this: Allocated<Self>,
176 a_decoder: &NSCoder,
177 ) -> Option<Retained<Self>>;
178
179 #[unsafe(method(node))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn node(mtm: MainThreadMarker) -> Retained<Self>;
182
183 #[unsafe(method(nodeWithFileNamed:))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn nodeWithFileNamed(
186 filename: &NSString,
187 mtm: MainThreadMarker,
188 ) -> Option<Retained<Self>>;
189
190 #[unsafe(method(nodeWithFileNamed:securelyWithClasses:andError:_))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn nodeWithFileNamed_securelyWithClasses_andError(
193 filename: &NSString,
194 classes: &NSSet<AnyClass>,
195 mtm: MainThreadMarker,
196 ) -> Result<Retained<Self>, Retained<NSError>>;
197 );
198}
199
200#[cfg(all(feature = "SKNode", feature = "objc2-app-kit"))]
202#[cfg(target_os = "macos")]
203impl SKEffectNode {
204 extern_methods!(
205 #[unsafe(method(new))]
206 #[unsafe(method_family = new)]
207 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
208 );
209}