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