objc2_quartz_core/generated/
CAEmitterCell.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-graphics")]
9use objc2_core_graphics::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14extern_class!(
15    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caemittercell?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct CAEmitterCell;
19);
20
21#[cfg(feature = "CAMediaTiming")]
22extern_conformance!(
23    unsafe impl CAMediaTiming for CAEmitterCell {}
24);
25
26extern_conformance!(
27    unsafe impl NSCoding for CAEmitterCell {}
28);
29
30extern_conformance!(
31    unsafe impl NSObjectProtocol for CAEmitterCell {}
32);
33
34extern_conformance!(
35    unsafe impl NSSecureCoding for CAEmitterCell {}
36);
37
38impl CAEmitterCell {
39    extern_methods!(
40        #[unsafe(method(emitterCell))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn emitterCell() -> Retained<Self>;
43
44        #[unsafe(method(defaultValueForKey:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn defaultValueForKey(key: &NSString) -> Option<Retained<AnyObject>>;
47
48        #[unsafe(method(shouldArchiveValueForKey:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn shouldArchiveValueForKey(&self, key: &NSString) -> bool;
51
52        #[unsafe(method(name))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn name(&self) -> Option<Retained<NSString>>;
55
56        /// Setter for [`name`][Self::name].
57        #[unsafe(method(setName:))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn setName(&self, name: Option<&NSString>);
60
61        #[unsafe(method(isEnabled))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn isEnabled(&self) -> bool;
64
65        /// Setter for [`isEnabled`][Self::isEnabled].
66        #[unsafe(method(setEnabled:))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn setEnabled(&self, enabled: bool);
69
70        #[unsafe(method(birthRate))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn birthRate(&self) -> c_float;
73
74        /// Setter for [`birthRate`][Self::birthRate].
75        #[unsafe(method(setBirthRate:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn setBirthRate(&self, birth_rate: c_float);
78
79        #[unsafe(method(lifetime))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn lifetime(&self) -> c_float;
82
83        /// Setter for [`lifetime`][Self::lifetime].
84        #[unsafe(method(setLifetime:))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn setLifetime(&self, lifetime: c_float);
87
88        #[unsafe(method(lifetimeRange))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn lifetimeRange(&self) -> c_float;
91
92        /// Setter for [`lifetimeRange`][Self::lifetimeRange].
93        #[unsafe(method(setLifetimeRange:))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn setLifetimeRange(&self, lifetime_range: c_float);
96
97        #[cfg(feature = "objc2-core-foundation")]
98        #[unsafe(method(emissionLatitude))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn emissionLatitude(&self) -> CGFloat;
101
102        #[cfg(feature = "objc2-core-foundation")]
103        /// Setter for [`emissionLatitude`][Self::emissionLatitude].
104        #[unsafe(method(setEmissionLatitude:))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn setEmissionLatitude(&self, emission_latitude: CGFloat);
107
108        #[cfg(feature = "objc2-core-foundation")]
109        #[unsafe(method(emissionLongitude))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn emissionLongitude(&self) -> CGFloat;
112
113        #[cfg(feature = "objc2-core-foundation")]
114        /// Setter for [`emissionLongitude`][Self::emissionLongitude].
115        #[unsafe(method(setEmissionLongitude:))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn setEmissionLongitude(&self, emission_longitude: CGFloat);
118
119        #[cfg(feature = "objc2-core-foundation")]
120        #[unsafe(method(emissionRange))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn emissionRange(&self) -> CGFloat;
123
124        #[cfg(feature = "objc2-core-foundation")]
125        /// Setter for [`emissionRange`][Self::emissionRange].
126        #[unsafe(method(setEmissionRange:))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn setEmissionRange(&self, emission_range: CGFloat);
129
130        #[cfg(feature = "objc2-core-foundation")]
131        #[unsafe(method(velocity))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn velocity(&self) -> CGFloat;
134
135        #[cfg(feature = "objc2-core-foundation")]
136        /// Setter for [`velocity`][Self::velocity].
137        #[unsafe(method(setVelocity:))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn setVelocity(&self, velocity: CGFloat);
140
141        #[cfg(feature = "objc2-core-foundation")]
142        #[unsafe(method(velocityRange))]
143        #[unsafe(method_family = none)]
144        pub unsafe fn velocityRange(&self) -> CGFloat;
145
146        #[cfg(feature = "objc2-core-foundation")]
147        /// Setter for [`velocityRange`][Self::velocityRange].
148        #[unsafe(method(setVelocityRange:))]
149        #[unsafe(method_family = none)]
150        pub unsafe fn setVelocityRange(&self, velocity_range: CGFloat);
151
152        #[cfg(feature = "objc2-core-foundation")]
153        #[unsafe(method(xAcceleration))]
154        #[unsafe(method_family = none)]
155        pub unsafe fn xAcceleration(&self) -> CGFloat;
156
157        #[cfg(feature = "objc2-core-foundation")]
158        /// Setter for [`xAcceleration`][Self::xAcceleration].
159        #[unsafe(method(setXAcceleration:))]
160        #[unsafe(method_family = none)]
161        pub unsafe fn setXAcceleration(&self, x_acceleration: CGFloat);
162
163        #[cfg(feature = "objc2-core-foundation")]
164        #[unsafe(method(yAcceleration))]
165        #[unsafe(method_family = none)]
166        pub unsafe fn yAcceleration(&self) -> CGFloat;
167
168        #[cfg(feature = "objc2-core-foundation")]
169        /// Setter for [`yAcceleration`][Self::yAcceleration].
170        #[unsafe(method(setYAcceleration:))]
171        #[unsafe(method_family = none)]
172        pub unsafe fn setYAcceleration(&self, y_acceleration: CGFloat);
173
174        #[cfg(feature = "objc2-core-foundation")]
175        #[unsafe(method(zAcceleration))]
176        #[unsafe(method_family = none)]
177        pub unsafe fn zAcceleration(&self) -> CGFloat;
178
179        #[cfg(feature = "objc2-core-foundation")]
180        /// Setter for [`zAcceleration`][Self::zAcceleration].
181        #[unsafe(method(setZAcceleration:))]
182        #[unsafe(method_family = none)]
183        pub unsafe fn setZAcceleration(&self, z_acceleration: CGFloat);
184
185        #[cfg(feature = "objc2-core-foundation")]
186        #[unsafe(method(scale))]
187        #[unsafe(method_family = none)]
188        pub unsafe fn scale(&self) -> CGFloat;
189
190        #[cfg(feature = "objc2-core-foundation")]
191        /// Setter for [`scale`][Self::scale].
192        #[unsafe(method(setScale:))]
193        #[unsafe(method_family = none)]
194        pub unsafe fn setScale(&self, scale: CGFloat);
195
196        #[cfg(feature = "objc2-core-foundation")]
197        #[unsafe(method(scaleRange))]
198        #[unsafe(method_family = none)]
199        pub unsafe fn scaleRange(&self) -> CGFloat;
200
201        #[cfg(feature = "objc2-core-foundation")]
202        /// Setter for [`scaleRange`][Self::scaleRange].
203        #[unsafe(method(setScaleRange:))]
204        #[unsafe(method_family = none)]
205        pub unsafe fn setScaleRange(&self, scale_range: CGFloat);
206
207        #[cfg(feature = "objc2-core-foundation")]
208        #[unsafe(method(scaleSpeed))]
209        #[unsafe(method_family = none)]
210        pub unsafe fn scaleSpeed(&self) -> CGFloat;
211
212        #[cfg(feature = "objc2-core-foundation")]
213        /// Setter for [`scaleSpeed`][Self::scaleSpeed].
214        #[unsafe(method(setScaleSpeed:))]
215        #[unsafe(method_family = none)]
216        pub unsafe fn setScaleSpeed(&self, scale_speed: CGFloat);
217
218        #[cfg(feature = "objc2-core-foundation")]
219        #[unsafe(method(spin))]
220        #[unsafe(method_family = none)]
221        pub unsafe fn spin(&self) -> CGFloat;
222
223        #[cfg(feature = "objc2-core-foundation")]
224        /// Setter for [`spin`][Self::spin].
225        #[unsafe(method(setSpin:))]
226        #[unsafe(method_family = none)]
227        pub unsafe fn setSpin(&self, spin: CGFloat);
228
229        #[cfg(feature = "objc2-core-foundation")]
230        #[unsafe(method(spinRange))]
231        #[unsafe(method_family = none)]
232        pub unsafe fn spinRange(&self) -> CGFloat;
233
234        #[cfg(feature = "objc2-core-foundation")]
235        /// Setter for [`spinRange`][Self::spinRange].
236        #[unsafe(method(setSpinRange:))]
237        #[unsafe(method_family = none)]
238        pub unsafe fn setSpinRange(&self, spin_range: CGFloat);
239
240        #[cfg(feature = "objc2-core-graphics")]
241        #[unsafe(method(color))]
242        #[unsafe(method_family = none)]
243        pub unsafe fn color(&self) -> Option<Retained<CGColor>>;
244
245        #[cfg(feature = "objc2-core-graphics")]
246        /// Setter for [`color`][Self::color].
247        #[unsafe(method(setColor:))]
248        #[unsafe(method_family = none)]
249        pub unsafe fn setColor(&self, color: Option<&CGColor>);
250
251        #[unsafe(method(redRange))]
252        #[unsafe(method_family = none)]
253        pub unsafe fn redRange(&self) -> c_float;
254
255        /// Setter for [`redRange`][Self::redRange].
256        #[unsafe(method(setRedRange:))]
257        #[unsafe(method_family = none)]
258        pub unsafe fn setRedRange(&self, red_range: c_float);
259
260        #[unsafe(method(greenRange))]
261        #[unsafe(method_family = none)]
262        pub unsafe fn greenRange(&self) -> c_float;
263
264        /// Setter for [`greenRange`][Self::greenRange].
265        #[unsafe(method(setGreenRange:))]
266        #[unsafe(method_family = none)]
267        pub unsafe fn setGreenRange(&self, green_range: c_float);
268
269        #[unsafe(method(blueRange))]
270        #[unsafe(method_family = none)]
271        pub unsafe fn blueRange(&self) -> c_float;
272
273        /// Setter for [`blueRange`][Self::blueRange].
274        #[unsafe(method(setBlueRange:))]
275        #[unsafe(method_family = none)]
276        pub unsafe fn setBlueRange(&self, blue_range: c_float);
277
278        #[unsafe(method(alphaRange))]
279        #[unsafe(method_family = none)]
280        pub unsafe fn alphaRange(&self) -> c_float;
281
282        /// Setter for [`alphaRange`][Self::alphaRange].
283        #[unsafe(method(setAlphaRange:))]
284        #[unsafe(method_family = none)]
285        pub unsafe fn setAlphaRange(&self, alpha_range: c_float);
286
287        #[unsafe(method(redSpeed))]
288        #[unsafe(method_family = none)]
289        pub unsafe fn redSpeed(&self) -> c_float;
290
291        /// Setter for [`redSpeed`][Self::redSpeed].
292        #[unsafe(method(setRedSpeed:))]
293        #[unsafe(method_family = none)]
294        pub unsafe fn setRedSpeed(&self, red_speed: c_float);
295
296        #[unsafe(method(greenSpeed))]
297        #[unsafe(method_family = none)]
298        pub unsafe fn greenSpeed(&self) -> c_float;
299
300        /// Setter for [`greenSpeed`][Self::greenSpeed].
301        #[unsafe(method(setGreenSpeed:))]
302        #[unsafe(method_family = none)]
303        pub unsafe fn setGreenSpeed(&self, green_speed: c_float);
304
305        #[unsafe(method(blueSpeed))]
306        #[unsafe(method_family = none)]
307        pub unsafe fn blueSpeed(&self) -> c_float;
308
309        /// Setter for [`blueSpeed`][Self::blueSpeed].
310        #[unsafe(method(setBlueSpeed:))]
311        #[unsafe(method_family = none)]
312        pub unsafe fn setBlueSpeed(&self, blue_speed: c_float);
313
314        #[unsafe(method(alphaSpeed))]
315        #[unsafe(method_family = none)]
316        pub unsafe fn alphaSpeed(&self) -> c_float;
317
318        /// Setter for [`alphaSpeed`][Self::alphaSpeed].
319        #[unsafe(method(setAlphaSpeed:))]
320        #[unsafe(method_family = none)]
321        pub unsafe fn setAlphaSpeed(&self, alpha_speed: c_float);
322
323        #[unsafe(method(contents))]
324        #[unsafe(method_family = none)]
325        pub unsafe fn contents(&self) -> Option<Retained<AnyObject>>;
326
327        /// Setter for [`contents`][Self::contents].
328        #[unsafe(method(setContents:))]
329        #[unsafe(method_family = none)]
330        pub unsafe fn setContents(&self, contents: Option<&AnyObject>);
331
332        #[cfg(feature = "objc2-core-foundation")]
333        #[unsafe(method(contentsRect))]
334        #[unsafe(method_family = none)]
335        pub unsafe fn contentsRect(&self) -> CGRect;
336
337        #[cfg(feature = "objc2-core-foundation")]
338        /// Setter for [`contentsRect`][Self::contentsRect].
339        #[unsafe(method(setContentsRect:))]
340        #[unsafe(method_family = none)]
341        pub unsafe fn setContentsRect(&self, contents_rect: CGRect);
342
343        #[cfg(feature = "objc2-core-foundation")]
344        #[unsafe(method(contentsScale))]
345        #[unsafe(method_family = none)]
346        pub unsafe fn contentsScale(&self) -> CGFloat;
347
348        #[cfg(feature = "objc2-core-foundation")]
349        /// Setter for [`contentsScale`][Self::contentsScale].
350        #[unsafe(method(setContentsScale:))]
351        #[unsafe(method_family = none)]
352        pub unsafe fn setContentsScale(&self, contents_scale: CGFloat);
353
354        #[unsafe(method(minificationFilter))]
355        #[unsafe(method_family = none)]
356        pub unsafe fn minificationFilter(&self) -> Retained<NSString>;
357
358        /// Setter for [`minificationFilter`][Self::minificationFilter].
359        #[unsafe(method(setMinificationFilter:))]
360        #[unsafe(method_family = none)]
361        pub unsafe fn setMinificationFilter(&self, minification_filter: &NSString);
362
363        #[unsafe(method(magnificationFilter))]
364        #[unsafe(method_family = none)]
365        pub unsafe fn magnificationFilter(&self) -> Retained<NSString>;
366
367        /// Setter for [`magnificationFilter`][Self::magnificationFilter].
368        #[unsafe(method(setMagnificationFilter:))]
369        #[unsafe(method_family = none)]
370        pub unsafe fn setMagnificationFilter(&self, magnification_filter: &NSString);
371
372        #[unsafe(method(minificationFilterBias))]
373        #[unsafe(method_family = none)]
374        pub unsafe fn minificationFilterBias(&self) -> c_float;
375
376        /// Setter for [`minificationFilterBias`][Self::minificationFilterBias].
377        #[unsafe(method(setMinificationFilterBias:))]
378        #[unsafe(method_family = none)]
379        pub unsafe fn setMinificationFilterBias(&self, minification_filter_bias: c_float);
380
381        #[unsafe(method(emitterCells))]
382        #[unsafe(method_family = none)]
383        pub unsafe fn emitterCells(&self) -> Option<Retained<NSArray<CAEmitterCell>>>;
384
385        /// Setter for [`emitterCells`][Self::emitterCells].
386        #[unsafe(method(setEmitterCells:))]
387        #[unsafe(method_family = none)]
388        pub unsafe fn setEmitterCells(&self, emitter_cells: Option<&NSArray<CAEmitterCell>>);
389
390        #[unsafe(method(style))]
391        #[unsafe(method_family = none)]
392        pub unsafe fn style(&self) -> Option<Retained<NSDictionary>>;
393
394        /// Setter for [`style`][Self::style].
395        #[unsafe(method(setStyle:))]
396        #[unsafe(method_family = none)]
397        pub unsafe fn setStyle(&self, style: Option<&NSDictionary>);
398    );
399}
400
401/// Methods declared on superclass `NSObject`.
402impl CAEmitterCell {
403    extern_methods!(
404        #[unsafe(method(init))]
405        #[unsafe(method_family = init)]
406        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
407
408        #[unsafe(method(new))]
409        #[unsafe(method_family = new)]
410        pub unsafe fn new() -> Retained<Self>;
411    );
412}