objc2_quartz_core/generated/
CAEmitterLayer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12pub type CAEmitterLayerEmitterShape = NSString;
15
16pub type CAEmitterLayerEmitterMode = NSString;
19
20pub type CAEmitterLayerRenderMode = NSString;
23
24extern_class!(
25 #[unsafe(super(CALayer, NSObject))]
27 #[derive(Debug, PartialEq, Eq, Hash)]
28 #[cfg(feature = "CALayer")]
29 pub struct CAEmitterLayer;
30);
31
32#[cfg(all(feature = "CALayer", feature = "CAMediaTiming"))]
33extern_conformance!(
34 unsafe impl CAMediaTiming for CAEmitterLayer {}
35);
36
37#[cfg(feature = "CALayer")]
38extern_conformance!(
39 unsafe impl NSCoding for CAEmitterLayer {}
40);
41
42#[cfg(feature = "CALayer")]
43extern_conformance!(
44 unsafe impl NSObjectProtocol for CAEmitterLayer {}
45);
46
47#[cfg(feature = "CALayer")]
48extern_conformance!(
49 unsafe impl NSSecureCoding for CAEmitterLayer {}
50);
51
52#[cfg(feature = "CALayer")]
53impl CAEmitterLayer {
54 extern_methods!(
55 #[cfg(feature = "CAEmitterCell")]
56 #[unsafe(method(emitterCells))]
57 #[unsafe(method_family = none)]
58 pub fn emitterCells(&self) -> Option<Retained<NSArray<CAEmitterCell>>>;
59
60 #[cfg(feature = "CAEmitterCell")]
61 #[unsafe(method(setEmitterCells:))]
65 #[unsafe(method_family = none)]
66 pub fn setEmitterCells(&self, emitter_cells: Option<&NSArray<CAEmitterCell>>);
67
68 #[unsafe(method(birthRate))]
69 #[unsafe(method_family = none)]
70 pub fn birthRate(&self) -> c_float;
71
72 #[unsafe(method(setBirthRate:))]
74 #[unsafe(method_family = none)]
75 pub fn setBirthRate(&self, birth_rate: c_float);
76
77 #[unsafe(method(lifetime))]
78 #[unsafe(method_family = none)]
79 pub fn lifetime(&self) -> c_float;
80
81 #[unsafe(method(setLifetime:))]
83 #[unsafe(method_family = none)]
84 pub fn setLifetime(&self, lifetime: c_float);
85
86 #[cfg(feature = "objc2-core-foundation")]
87 #[unsafe(method(emitterPosition))]
88 #[unsafe(method_family = none)]
89 pub fn emitterPosition(&self) -> CGPoint;
90
91 #[cfg(feature = "objc2-core-foundation")]
92 #[unsafe(method(setEmitterPosition:))]
94 #[unsafe(method_family = none)]
95 pub fn setEmitterPosition(&self, emitter_position: CGPoint);
96
97 #[cfg(feature = "objc2-core-foundation")]
98 #[unsafe(method(emitterZPosition))]
99 #[unsafe(method_family = none)]
100 pub fn emitterZPosition(&self) -> CGFloat;
101
102 #[cfg(feature = "objc2-core-foundation")]
103 #[unsafe(method(setEmitterZPosition:))]
105 #[unsafe(method_family = none)]
106 pub fn setEmitterZPosition(&self, emitter_z_position: CGFloat);
107
108 #[cfg(feature = "objc2-core-foundation")]
109 #[unsafe(method(emitterSize))]
110 #[unsafe(method_family = none)]
111 pub fn emitterSize(&self) -> CGSize;
112
113 #[cfg(feature = "objc2-core-foundation")]
114 #[unsafe(method(setEmitterSize:))]
116 #[unsafe(method_family = none)]
117 pub fn setEmitterSize(&self, emitter_size: CGSize);
118
119 #[cfg(feature = "objc2-core-foundation")]
120 #[unsafe(method(emitterDepth))]
121 #[unsafe(method_family = none)]
122 pub fn emitterDepth(&self) -> CGFloat;
123
124 #[cfg(feature = "objc2-core-foundation")]
125 #[unsafe(method(setEmitterDepth:))]
127 #[unsafe(method_family = none)]
128 pub fn setEmitterDepth(&self, emitter_depth: CGFloat);
129
130 #[unsafe(method(emitterShape))]
131 #[unsafe(method_family = none)]
132 pub fn emitterShape(&self) -> Retained<CAEmitterLayerEmitterShape>;
133
134 #[unsafe(method(setEmitterShape:))]
138 #[unsafe(method_family = none)]
139 pub fn setEmitterShape(&self, emitter_shape: &CAEmitterLayerEmitterShape);
140
141 #[unsafe(method(emitterMode))]
142 #[unsafe(method_family = none)]
143 pub fn emitterMode(&self) -> Retained<CAEmitterLayerEmitterMode>;
144
145 #[unsafe(method(setEmitterMode:))]
149 #[unsafe(method_family = none)]
150 pub fn setEmitterMode(&self, emitter_mode: &CAEmitterLayerEmitterMode);
151
152 #[unsafe(method(renderMode))]
153 #[unsafe(method_family = none)]
154 pub fn renderMode(&self) -> Retained<CAEmitterLayerRenderMode>;
155
156 #[unsafe(method(setRenderMode:))]
160 #[unsafe(method_family = none)]
161 pub fn setRenderMode(&self, render_mode: &CAEmitterLayerRenderMode);
162
163 #[unsafe(method(preservesDepth))]
164 #[unsafe(method_family = none)]
165 pub fn preservesDepth(&self) -> bool;
166
167 #[unsafe(method(setPreservesDepth:))]
169 #[unsafe(method_family = none)]
170 pub fn setPreservesDepth(&self, preserves_depth: bool);
171
172 #[unsafe(method(velocity))]
173 #[unsafe(method_family = none)]
174 pub fn velocity(&self) -> c_float;
175
176 #[unsafe(method(setVelocity:))]
178 #[unsafe(method_family = none)]
179 pub fn setVelocity(&self, velocity: c_float);
180
181 #[unsafe(method(scale))]
182 #[unsafe(method_family = none)]
183 pub fn scale(&self) -> c_float;
184
185 #[unsafe(method(setScale:))]
187 #[unsafe(method_family = none)]
188 pub fn setScale(&self, scale: c_float);
189
190 #[unsafe(method(spin))]
191 #[unsafe(method_family = none)]
192 pub fn spin(&self) -> c_float;
193
194 #[unsafe(method(setSpin:))]
196 #[unsafe(method_family = none)]
197 pub fn setSpin(&self, spin: c_float);
198
199 #[unsafe(method(seed))]
200 #[unsafe(method_family = none)]
201 pub fn seed(&self) -> c_uint;
202
203 #[unsafe(method(setSeed:))]
205 #[unsafe(method_family = none)]
206 pub fn setSeed(&self, seed: c_uint);
207 );
208}
209
210#[cfg(feature = "CALayer")]
212impl CAEmitterLayer {
213 extern_methods!(
214 #[unsafe(method(layer))]
216 #[unsafe(method_family = none)]
217 pub fn layer() -> Retained<Self>;
218
219 #[unsafe(method(init))]
220 #[unsafe(method_family = init)]
221 pub fn init(this: Allocated<Self>) -> Retained<Self>;
222
223 #[unsafe(method(initWithLayer:))]
227 #[unsafe(method_family = init)]
228 pub unsafe fn initWithLayer(this: Allocated<Self>, layer: &AnyObject) -> Retained<Self>;
229 );
230}
231
232#[cfg(feature = "CALayer")]
234impl CAEmitterLayer {
235 extern_methods!(
236 #[unsafe(method(new))]
237 #[unsafe(method_family = new)]
238 pub fn new() -> Retained<Self>;
239 );
240}
241
242#[cfg(feature = "CALayer")]
243impl DefaultRetained for CAEmitterLayer {
244 #[inline]
245 fn default_retained() -> Retained<Self> {
246 Self::new()
247 }
248}
249
250extern "C" {
251 pub static kCAEmitterLayerPoint: &'static CAEmitterLayerEmitterShape;
255}
256
257extern "C" {
258 pub static kCAEmitterLayerLine: &'static CAEmitterLayerEmitterShape;
260}
261
262extern "C" {
263 pub static kCAEmitterLayerRectangle: &'static CAEmitterLayerEmitterShape;
265}
266
267extern "C" {
268 pub static kCAEmitterLayerCuboid: &'static CAEmitterLayerEmitterShape;
270}
271
272extern "C" {
273 pub static kCAEmitterLayerCircle: &'static CAEmitterLayerEmitterShape;
275}
276
277extern "C" {
278 pub static kCAEmitterLayerSphere: &'static CAEmitterLayerEmitterShape;
280}
281
282extern "C" {
283 pub static kCAEmitterLayerPoints: &'static CAEmitterLayerEmitterMode;
287}
288
289extern "C" {
290 pub static kCAEmitterLayerOutline: &'static CAEmitterLayerEmitterMode;
292}
293
294extern "C" {
295 pub static kCAEmitterLayerSurface: &'static CAEmitterLayerEmitterMode;
297}
298
299extern "C" {
300 pub static kCAEmitterLayerVolume: &'static CAEmitterLayerEmitterMode;
302}
303
304extern "C" {
305 pub static kCAEmitterLayerUnordered: &'static CAEmitterLayerRenderMode;
309}
310
311extern "C" {
312 pub static kCAEmitterLayerOldestFirst: &'static CAEmitterLayerRenderMode;
314}
315
316extern "C" {
317 pub static kCAEmitterLayerOldestLast: &'static CAEmitterLayerRenderMode;
319}
320
321extern "C" {
322 pub static kCAEmitterLayerBackToFront: &'static CAEmitterLayerRenderMode;
324}
325
326extern "C" {
327 pub static kCAEmitterLayerAdditive: &'static CAEmitterLayerRenderMode;
329}