objc2_quartz_core/generated/
CAAnimation.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
14/// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caanimationcalculationmode?language=objc)
15// NS_TYPED_ENUM
16pub type CAAnimationCalculationMode = NSString;
17
18/// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caanimationrotationmode?language=objc)
19// NS_TYPED_ENUM
20pub type CAAnimationRotationMode = NSString;
21
22/// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/catransitiontype?language=objc)
23// NS_TYPED_ENUM
24pub type CATransitionType = NSString;
25
26/// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/catransitionsubtype?language=objc)
27// NS_TYPED_ENUM
28pub type CATransitionSubtype = NSString;
29
30extern_class!(
31    /// The base animation class. *
32    ///
33    /// See also [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caanimation?language=objc)
34    #[unsafe(super(NSObject))]
35    #[derive(Debug, PartialEq, Eq, Hash)]
36    pub struct CAAnimation;
37);
38
39#[cfg(feature = "CALayer")]
40unsafe impl CAAction for CAAnimation {}
41
42#[cfg(feature = "CAMediaTiming")]
43unsafe impl CAMediaTiming for CAAnimation {}
44
45unsafe impl NSCoding for CAAnimation {}
46
47unsafe impl NSCopying for CAAnimation {}
48
49unsafe impl CopyingHelper for CAAnimation {
50    type Result = Self;
51}
52
53unsafe impl NSObjectProtocol for CAAnimation {}
54
55unsafe impl NSSecureCoding for CAAnimation {}
56
57impl CAAnimation {
58    extern_methods!(
59        #[unsafe(method(animation))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn animation() -> Retained<Self>;
62
63        #[unsafe(method(defaultValueForKey:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn defaultValueForKey(key: &NSString) -> Option<Retained<AnyObject>>;
66
67        #[unsafe(method(shouldArchiveValueForKey:))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn shouldArchiveValueForKey(&self, key: &NSString) -> bool;
70
71        #[cfg(feature = "CAMediaTimingFunction")]
72        #[unsafe(method(timingFunction))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn timingFunction(&self) -> Option<Retained<CAMediaTimingFunction>>;
75
76        #[cfg(feature = "CAMediaTimingFunction")]
77        /// Setter for [`timingFunction`][Self::timingFunction].
78        #[unsafe(method(setTimingFunction:))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn setTimingFunction(&self, timing_function: Option<&CAMediaTimingFunction>);
81
82        #[unsafe(method(delegate))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn CAAnimationDelegate>>>;
85
86        /// Setter for [`delegate`][Self::delegate].
87        #[unsafe(method(setDelegate:))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn setDelegate(
90            &self,
91            delegate: Option<&ProtocolObject<dyn CAAnimationDelegate>>,
92        );
93
94        #[unsafe(method(isRemovedOnCompletion))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn isRemovedOnCompletion(&self) -> bool;
97
98        /// Setter for [`isRemovedOnCompletion`][Self::isRemovedOnCompletion].
99        #[unsafe(method(setRemovedOnCompletion:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn setRemovedOnCompletion(&self, removed_on_completion: bool);
102
103        #[cfg(feature = "CAFrameRateRange")]
104        #[unsafe(method(preferredFrameRateRange))]
105        #[unsafe(method_family = none)]
106        pub unsafe fn preferredFrameRateRange(&self) -> CAFrameRateRange;
107
108        #[cfg(feature = "CAFrameRateRange")]
109        /// Setter for [`preferredFrameRateRange`][Self::preferredFrameRateRange].
110        #[unsafe(method(setPreferredFrameRateRange:))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn setPreferredFrameRateRange(
113            &self,
114            preferred_frame_rate_range: CAFrameRateRange,
115        );
116    );
117}
118
119/// Methods declared on superclass `NSObject`.
120impl CAAnimation {
121    extern_methods!(
122        #[unsafe(method(init))]
123        #[unsafe(method_family = init)]
124        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
125
126        #[unsafe(method(new))]
127        #[unsafe(method_family = new)]
128        pub unsafe fn new() -> Retained<Self>;
129    );
130}
131
132extern_protocol!(
133    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caanimationdelegate?language=objc)
134    pub unsafe trait CAAnimationDelegate: NSObjectProtocol {
135        #[optional]
136        #[unsafe(method(animationDidStart:))]
137        #[unsafe(method_family = none)]
138        unsafe fn animationDidStart(&self, anim: &CAAnimation);
139
140        #[optional]
141        #[unsafe(method(animationDidStop:finished:))]
142        #[unsafe(method_family = none)]
143        unsafe fn animationDidStop_finished(&self, anim: &CAAnimation, flag: bool);
144    }
145);
146
147extern_class!(
148    /// Subclass for property-based animations. *
149    ///
150    /// See also [Apple's documentation](https://developer.apple.com/documentation/quartzcore/capropertyanimation?language=objc)
151    #[unsafe(super(CAAnimation, NSObject))]
152    #[derive(Debug, PartialEq, Eq, Hash)]
153    pub struct CAPropertyAnimation;
154);
155
156#[cfg(feature = "CALayer")]
157unsafe impl CAAction for CAPropertyAnimation {}
158
159#[cfg(feature = "CAMediaTiming")]
160unsafe impl CAMediaTiming for CAPropertyAnimation {}
161
162unsafe impl NSCoding for CAPropertyAnimation {}
163
164unsafe impl NSCopying for CAPropertyAnimation {}
165
166unsafe impl CopyingHelper for CAPropertyAnimation {
167    type Result = Self;
168}
169
170unsafe impl NSObjectProtocol for CAPropertyAnimation {}
171
172unsafe impl NSSecureCoding for CAPropertyAnimation {}
173
174impl CAPropertyAnimation {
175    extern_methods!(
176        #[unsafe(method(animationWithKeyPath:))]
177        #[unsafe(method_family = none)]
178        pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Retained<Self>;
179
180        #[unsafe(method(keyPath))]
181        #[unsafe(method_family = none)]
182        pub unsafe fn keyPath(&self) -> Option<Retained<NSString>>;
183
184        /// Setter for [`keyPath`][Self::keyPath].
185        #[unsafe(method(setKeyPath:))]
186        #[unsafe(method_family = none)]
187        pub unsafe fn setKeyPath(&self, key_path: Option<&NSString>);
188
189        #[unsafe(method(isAdditive))]
190        #[unsafe(method_family = none)]
191        pub unsafe fn isAdditive(&self) -> bool;
192
193        /// Setter for [`isAdditive`][Self::isAdditive].
194        #[unsafe(method(setAdditive:))]
195        #[unsafe(method_family = none)]
196        pub unsafe fn setAdditive(&self, additive: bool);
197
198        #[unsafe(method(isCumulative))]
199        #[unsafe(method_family = none)]
200        pub unsafe fn isCumulative(&self) -> bool;
201
202        /// Setter for [`isCumulative`][Self::isCumulative].
203        #[unsafe(method(setCumulative:))]
204        #[unsafe(method_family = none)]
205        pub unsafe fn setCumulative(&self, cumulative: bool);
206
207        #[cfg(feature = "CAValueFunction")]
208        #[unsafe(method(valueFunction))]
209        #[unsafe(method_family = none)]
210        pub unsafe fn valueFunction(&self) -> Option<Retained<CAValueFunction>>;
211
212        #[cfg(feature = "CAValueFunction")]
213        /// Setter for [`valueFunction`][Self::valueFunction].
214        #[unsafe(method(setValueFunction:))]
215        #[unsafe(method_family = none)]
216        pub unsafe fn setValueFunction(&self, value_function: Option<&CAValueFunction>);
217    );
218}
219
220/// Methods declared on superclass `CAAnimation`.
221impl CAPropertyAnimation {
222    extern_methods!(
223        #[unsafe(method(animation))]
224        #[unsafe(method_family = none)]
225        pub unsafe fn animation() -> Retained<Self>;
226    );
227}
228
229/// Methods declared on superclass `NSObject`.
230impl CAPropertyAnimation {
231    extern_methods!(
232        #[unsafe(method(init))]
233        #[unsafe(method_family = init)]
234        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
235
236        #[unsafe(method(new))]
237        #[unsafe(method_family = new)]
238        pub unsafe fn new() -> Retained<Self>;
239    );
240}
241
242extern_class!(
243    /// Subclass for basic (single-keyframe) animations. *
244    ///
245    /// See also [Apple's documentation](https://developer.apple.com/documentation/quartzcore/cabasicanimation?language=objc)
246    #[unsafe(super(CAPropertyAnimation, CAAnimation, NSObject))]
247    #[derive(Debug, PartialEq, Eq, Hash)]
248    pub struct CABasicAnimation;
249);
250
251#[cfg(feature = "CALayer")]
252unsafe impl CAAction for CABasicAnimation {}
253
254#[cfg(feature = "CAMediaTiming")]
255unsafe impl CAMediaTiming for CABasicAnimation {}
256
257unsafe impl NSCoding for CABasicAnimation {}
258
259unsafe impl NSCopying for CABasicAnimation {}
260
261unsafe impl CopyingHelper for CABasicAnimation {
262    type Result = Self;
263}
264
265unsafe impl NSObjectProtocol for CABasicAnimation {}
266
267unsafe impl NSSecureCoding for CABasicAnimation {}
268
269impl CABasicAnimation {
270    extern_methods!(
271        #[unsafe(method(fromValue))]
272        #[unsafe(method_family = none)]
273        pub unsafe fn fromValue(&self) -> Option<Retained<AnyObject>>;
274
275        /// Setter for [`fromValue`][Self::fromValue].
276        #[unsafe(method(setFromValue:))]
277        #[unsafe(method_family = none)]
278        pub unsafe fn setFromValue(&self, from_value: Option<&AnyObject>);
279
280        #[unsafe(method(toValue))]
281        #[unsafe(method_family = none)]
282        pub unsafe fn toValue(&self) -> Option<Retained<AnyObject>>;
283
284        /// Setter for [`toValue`][Self::toValue].
285        #[unsafe(method(setToValue:))]
286        #[unsafe(method_family = none)]
287        pub unsafe fn setToValue(&self, to_value: Option<&AnyObject>);
288
289        #[unsafe(method(byValue))]
290        #[unsafe(method_family = none)]
291        pub unsafe fn byValue(&self) -> Option<Retained<AnyObject>>;
292
293        /// Setter for [`byValue`][Self::byValue].
294        #[unsafe(method(setByValue:))]
295        #[unsafe(method_family = none)]
296        pub unsafe fn setByValue(&self, by_value: Option<&AnyObject>);
297    );
298}
299
300/// Methods declared on superclass `CAPropertyAnimation`.
301impl CABasicAnimation {
302    extern_methods!(
303        #[unsafe(method(animationWithKeyPath:))]
304        #[unsafe(method_family = none)]
305        pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Retained<Self>;
306    );
307}
308
309/// Methods declared on superclass `CAAnimation`.
310impl CABasicAnimation {
311    extern_methods!(
312        #[unsafe(method(animation))]
313        #[unsafe(method_family = none)]
314        pub unsafe fn animation() -> Retained<Self>;
315    );
316}
317
318/// Methods declared on superclass `NSObject`.
319impl CABasicAnimation {
320    extern_methods!(
321        #[unsafe(method(init))]
322        #[unsafe(method_family = init)]
323        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
324
325        #[unsafe(method(new))]
326        #[unsafe(method_family = new)]
327        pub unsafe fn new() -> Retained<Self>;
328    );
329}
330
331extern_class!(
332    /// General keyframe animation class. *
333    ///
334    /// See also [Apple's documentation](https://developer.apple.com/documentation/quartzcore/cakeyframeanimation?language=objc)
335    #[unsafe(super(CAPropertyAnimation, CAAnimation, NSObject))]
336    #[derive(Debug, PartialEq, Eq, Hash)]
337    pub struct CAKeyframeAnimation;
338);
339
340#[cfg(feature = "CALayer")]
341unsafe impl CAAction for CAKeyframeAnimation {}
342
343#[cfg(feature = "CAMediaTiming")]
344unsafe impl CAMediaTiming for CAKeyframeAnimation {}
345
346unsafe impl NSCoding for CAKeyframeAnimation {}
347
348unsafe impl NSCopying for CAKeyframeAnimation {}
349
350unsafe impl CopyingHelper for CAKeyframeAnimation {
351    type Result = Self;
352}
353
354unsafe impl NSObjectProtocol for CAKeyframeAnimation {}
355
356unsafe impl NSSecureCoding for CAKeyframeAnimation {}
357
358impl CAKeyframeAnimation {
359    extern_methods!(
360        #[unsafe(method(values))]
361        #[unsafe(method_family = none)]
362        pub unsafe fn values(&self) -> Option<Retained<NSArray>>;
363
364        /// Setter for [`values`][Self::values].
365        #[unsafe(method(setValues:))]
366        #[unsafe(method_family = none)]
367        pub unsafe fn setValues(&self, values: Option<&NSArray>);
368
369        #[cfg(feature = "objc2-core-graphics")]
370        #[unsafe(method(path))]
371        #[unsafe(method_family = none)]
372        pub unsafe fn path(&self) -> Option<Retained<CGPath>>;
373
374        #[cfg(feature = "objc2-core-graphics")]
375        /// Setter for [`path`][Self::path].
376        #[unsafe(method(setPath:))]
377        #[unsafe(method_family = none)]
378        pub unsafe fn setPath(&self, path: Option<&CGPath>);
379
380        #[unsafe(method(keyTimes))]
381        #[unsafe(method_family = none)]
382        pub unsafe fn keyTimes(&self) -> Option<Retained<NSArray<NSNumber>>>;
383
384        /// Setter for [`keyTimes`][Self::keyTimes].
385        #[unsafe(method(setKeyTimes:))]
386        #[unsafe(method_family = none)]
387        pub unsafe fn setKeyTimes(&self, key_times: Option<&NSArray<NSNumber>>);
388
389        #[cfg(feature = "CAMediaTimingFunction")]
390        #[unsafe(method(timingFunctions))]
391        #[unsafe(method_family = none)]
392        pub unsafe fn timingFunctions(&self) -> Option<Retained<NSArray<CAMediaTimingFunction>>>;
393
394        #[cfg(feature = "CAMediaTimingFunction")]
395        /// Setter for [`timingFunctions`][Self::timingFunctions].
396        #[unsafe(method(setTimingFunctions:))]
397        #[unsafe(method_family = none)]
398        pub unsafe fn setTimingFunctions(
399            &self,
400            timing_functions: Option<&NSArray<CAMediaTimingFunction>>,
401        );
402
403        #[unsafe(method(calculationMode))]
404        #[unsafe(method_family = none)]
405        pub unsafe fn calculationMode(&self) -> Retained<CAAnimationCalculationMode>;
406
407        /// Setter for [`calculationMode`][Self::calculationMode].
408        #[unsafe(method(setCalculationMode:))]
409        #[unsafe(method_family = none)]
410        pub unsafe fn setCalculationMode(&self, calculation_mode: &CAAnimationCalculationMode);
411
412        #[unsafe(method(tensionValues))]
413        #[unsafe(method_family = none)]
414        pub unsafe fn tensionValues(&self) -> Option<Retained<NSArray<NSNumber>>>;
415
416        /// Setter for [`tensionValues`][Self::tensionValues].
417        #[unsafe(method(setTensionValues:))]
418        #[unsafe(method_family = none)]
419        pub unsafe fn setTensionValues(&self, tension_values: Option<&NSArray<NSNumber>>);
420
421        #[unsafe(method(continuityValues))]
422        #[unsafe(method_family = none)]
423        pub unsafe fn continuityValues(&self) -> Option<Retained<NSArray<NSNumber>>>;
424
425        /// Setter for [`continuityValues`][Self::continuityValues].
426        #[unsafe(method(setContinuityValues:))]
427        #[unsafe(method_family = none)]
428        pub unsafe fn setContinuityValues(&self, continuity_values: Option<&NSArray<NSNumber>>);
429
430        #[unsafe(method(biasValues))]
431        #[unsafe(method_family = none)]
432        pub unsafe fn biasValues(&self) -> Option<Retained<NSArray<NSNumber>>>;
433
434        /// Setter for [`biasValues`][Self::biasValues].
435        #[unsafe(method(setBiasValues:))]
436        #[unsafe(method_family = none)]
437        pub unsafe fn setBiasValues(&self, bias_values: Option<&NSArray<NSNumber>>);
438
439        #[unsafe(method(rotationMode))]
440        #[unsafe(method_family = none)]
441        pub unsafe fn rotationMode(&self) -> Option<Retained<CAAnimationRotationMode>>;
442
443        /// Setter for [`rotationMode`][Self::rotationMode].
444        #[unsafe(method(setRotationMode:))]
445        #[unsafe(method_family = none)]
446        pub unsafe fn setRotationMode(&self, rotation_mode: Option<&CAAnimationRotationMode>);
447    );
448}
449
450/// Methods declared on superclass `CAPropertyAnimation`.
451impl CAKeyframeAnimation {
452    extern_methods!(
453        #[unsafe(method(animationWithKeyPath:))]
454        #[unsafe(method_family = none)]
455        pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Retained<Self>;
456    );
457}
458
459/// Methods declared on superclass `CAAnimation`.
460impl CAKeyframeAnimation {
461    extern_methods!(
462        #[unsafe(method(animation))]
463        #[unsafe(method_family = none)]
464        pub unsafe fn animation() -> Retained<Self>;
465    );
466}
467
468/// Methods declared on superclass `NSObject`.
469impl CAKeyframeAnimation {
470    extern_methods!(
471        #[unsafe(method(init))]
472        #[unsafe(method_family = init)]
473        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
474
475        #[unsafe(method(new))]
476        #[unsafe(method_family = new)]
477        pub unsafe fn new() -> Retained<Self>;
478    );
479}
480
481extern "C" {
482    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcaanimationlinear?language=objc)
483    pub static kCAAnimationLinear: &'static CAAnimationCalculationMode;
484}
485
486extern "C" {
487    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcaanimationdiscrete?language=objc)
488    pub static kCAAnimationDiscrete: &'static CAAnimationCalculationMode;
489}
490
491extern "C" {
492    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcaanimationpaced?language=objc)
493    pub static kCAAnimationPaced: &'static CAAnimationCalculationMode;
494}
495
496extern "C" {
497    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcaanimationcubic?language=objc)
498    pub static kCAAnimationCubic: &'static CAAnimationCalculationMode;
499}
500
501extern "C" {
502    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcaanimationcubicpaced?language=objc)
503    pub static kCAAnimationCubicPaced: &'static CAAnimationCalculationMode;
504}
505
506extern "C" {
507    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcaanimationrotateauto?language=objc)
508    pub static kCAAnimationRotateAuto: &'static CAAnimationRotationMode;
509}
510
511extern "C" {
512    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcaanimationrotateautoreverse?language=objc)
513    pub static kCAAnimationRotateAutoReverse: &'static CAAnimationRotationMode;
514}
515
516extern_class!(
517    /// Subclass for mass-spring animations.
518    ///
519    /// See also [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caspringanimation?language=objc)
520    #[unsafe(super(CABasicAnimation, CAPropertyAnimation, CAAnimation, NSObject))]
521    #[derive(Debug, PartialEq, Eq, Hash)]
522    pub struct CASpringAnimation;
523);
524
525#[cfg(feature = "CALayer")]
526unsafe impl CAAction for CASpringAnimation {}
527
528#[cfg(feature = "CAMediaTiming")]
529unsafe impl CAMediaTiming for CASpringAnimation {}
530
531unsafe impl NSCoding for CASpringAnimation {}
532
533unsafe impl NSCopying for CASpringAnimation {}
534
535unsafe impl CopyingHelper for CASpringAnimation {
536    type Result = Self;
537}
538
539unsafe impl NSObjectProtocol for CASpringAnimation {}
540
541unsafe impl NSSecureCoding for CASpringAnimation {}
542
543impl CASpringAnimation {
544    extern_methods!(
545        #[cfg(feature = "objc2-core-foundation")]
546        #[unsafe(method(mass))]
547        #[unsafe(method_family = none)]
548        pub unsafe fn mass(&self) -> CGFloat;
549
550        #[cfg(feature = "objc2-core-foundation")]
551        /// Setter for [`mass`][Self::mass].
552        #[unsafe(method(setMass:))]
553        #[unsafe(method_family = none)]
554        pub unsafe fn setMass(&self, mass: CGFloat);
555
556        #[cfg(feature = "objc2-core-foundation")]
557        #[unsafe(method(stiffness))]
558        #[unsafe(method_family = none)]
559        pub unsafe fn stiffness(&self) -> CGFloat;
560
561        #[cfg(feature = "objc2-core-foundation")]
562        /// Setter for [`stiffness`][Self::stiffness].
563        #[unsafe(method(setStiffness:))]
564        #[unsafe(method_family = none)]
565        pub unsafe fn setStiffness(&self, stiffness: CGFloat);
566
567        #[cfg(feature = "objc2-core-foundation")]
568        #[unsafe(method(damping))]
569        #[unsafe(method_family = none)]
570        pub unsafe fn damping(&self) -> CGFloat;
571
572        #[cfg(feature = "objc2-core-foundation")]
573        /// Setter for [`damping`][Self::damping].
574        #[unsafe(method(setDamping:))]
575        #[unsafe(method_family = none)]
576        pub unsafe fn setDamping(&self, damping: CGFloat);
577
578        #[cfg(feature = "objc2-core-foundation")]
579        #[unsafe(method(initialVelocity))]
580        #[unsafe(method_family = none)]
581        pub unsafe fn initialVelocity(&self) -> CGFloat;
582
583        #[cfg(feature = "objc2-core-foundation")]
584        /// Setter for [`initialVelocity`][Self::initialVelocity].
585        #[unsafe(method(setInitialVelocity:))]
586        #[unsafe(method_family = none)]
587        pub unsafe fn setInitialVelocity(&self, initial_velocity: CGFloat);
588
589        #[unsafe(method(allowsOverdamping))]
590        #[unsafe(method_family = none)]
591        pub unsafe fn allowsOverdamping(&self) -> bool;
592
593        /// Setter for [`allowsOverdamping`][Self::allowsOverdamping].
594        #[unsafe(method(setAllowsOverdamping:))]
595        #[unsafe(method_family = none)]
596        pub unsafe fn setAllowsOverdamping(&self, allows_overdamping: bool);
597
598        #[cfg(feature = "objc2-core-foundation")]
599        #[unsafe(method(settlingDuration))]
600        #[unsafe(method_family = none)]
601        pub unsafe fn settlingDuration(&self) -> CFTimeInterval;
602
603        #[cfg(feature = "objc2-core-foundation")]
604        #[unsafe(method(initWithPerceptualDuration:bounce:))]
605        #[unsafe(method_family = init)]
606        pub unsafe fn initWithPerceptualDuration_bounce(
607            this: Allocated<Self>,
608            perceptual_duration: CFTimeInterval,
609            bounce: CGFloat,
610        ) -> Retained<Self>;
611
612        #[cfg(feature = "objc2-core-foundation")]
613        #[unsafe(method(perceptualDuration))]
614        #[unsafe(method_family = none)]
615        pub unsafe fn perceptualDuration(&self) -> CFTimeInterval;
616
617        #[cfg(feature = "objc2-core-foundation")]
618        #[unsafe(method(bounce))]
619        #[unsafe(method_family = none)]
620        pub unsafe fn bounce(&self) -> CGFloat;
621    );
622}
623
624/// Methods declared on superclass `CAPropertyAnimation`.
625impl CASpringAnimation {
626    extern_methods!(
627        #[unsafe(method(animationWithKeyPath:))]
628        #[unsafe(method_family = none)]
629        pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Retained<Self>;
630    );
631}
632
633/// Methods declared on superclass `CAAnimation`.
634impl CASpringAnimation {
635    extern_methods!(
636        #[unsafe(method(animation))]
637        #[unsafe(method_family = none)]
638        pub unsafe fn animation() -> Retained<Self>;
639    );
640}
641
642/// Methods declared on superclass `NSObject`.
643impl CASpringAnimation {
644    extern_methods!(
645        #[unsafe(method(init))]
646        #[unsafe(method_family = init)]
647        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
648
649        #[unsafe(method(new))]
650        #[unsafe(method_family = new)]
651        pub unsafe fn new() -> Retained<Self>;
652    );
653}
654
655extern_class!(
656    /// Transition animation subclass. *
657    ///
658    /// See also [Apple's documentation](https://developer.apple.com/documentation/quartzcore/catransition?language=objc)
659    #[unsafe(super(CAAnimation, NSObject))]
660    #[derive(Debug, PartialEq, Eq, Hash)]
661    pub struct CATransition;
662);
663
664#[cfg(feature = "CALayer")]
665unsafe impl CAAction for CATransition {}
666
667#[cfg(feature = "CAMediaTiming")]
668unsafe impl CAMediaTiming for CATransition {}
669
670unsafe impl NSCoding for CATransition {}
671
672unsafe impl NSCopying for CATransition {}
673
674unsafe impl CopyingHelper for CATransition {
675    type Result = Self;
676}
677
678unsafe impl NSObjectProtocol for CATransition {}
679
680unsafe impl NSSecureCoding for CATransition {}
681
682impl CATransition {
683    extern_methods!(
684        #[unsafe(method(type))]
685        #[unsafe(method_family = none)]
686        pub unsafe fn r#type(&self) -> Retained<CATransitionType>;
687
688        /// Setter for [`type`][Self::type].
689        #[unsafe(method(setType:))]
690        #[unsafe(method_family = none)]
691        pub unsafe fn setType(&self, r#type: &CATransitionType);
692
693        #[unsafe(method(subtype))]
694        #[unsafe(method_family = none)]
695        pub unsafe fn subtype(&self) -> Option<Retained<CATransitionSubtype>>;
696
697        /// Setter for [`subtype`][Self::subtype].
698        #[unsafe(method(setSubtype:))]
699        #[unsafe(method_family = none)]
700        pub unsafe fn setSubtype(&self, subtype: Option<&CATransitionSubtype>);
701
702        #[unsafe(method(startProgress))]
703        #[unsafe(method_family = none)]
704        pub unsafe fn startProgress(&self) -> c_float;
705
706        /// Setter for [`startProgress`][Self::startProgress].
707        #[unsafe(method(setStartProgress:))]
708        #[unsafe(method_family = none)]
709        pub unsafe fn setStartProgress(&self, start_progress: c_float);
710
711        #[unsafe(method(endProgress))]
712        #[unsafe(method_family = none)]
713        pub unsafe fn endProgress(&self) -> c_float;
714
715        /// Setter for [`endProgress`][Self::endProgress].
716        #[unsafe(method(setEndProgress:))]
717        #[unsafe(method_family = none)]
718        pub unsafe fn setEndProgress(&self, end_progress: c_float);
719
720        #[unsafe(method(filter))]
721        #[unsafe(method_family = none)]
722        pub unsafe fn filter(&self) -> Option<Retained<AnyObject>>;
723
724        /// Setter for [`filter`][Self::filter].
725        #[unsafe(method(setFilter:))]
726        #[unsafe(method_family = none)]
727        pub unsafe fn setFilter(&self, filter: Option<&AnyObject>);
728    );
729}
730
731/// Methods declared on superclass `CAAnimation`.
732impl CATransition {
733    extern_methods!(
734        #[unsafe(method(animation))]
735        #[unsafe(method_family = none)]
736        pub unsafe fn animation() -> Retained<Self>;
737    );
738}
739
740/// Methods declared on superclass `NSObject`.
741impl CATransition {
742    extern_methods!(
743        #[unsafe(method(init))]
744        #[unsafe(method_family = init)]
745        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
746
747        #[unsafe(method(new))]
748        #[unsafe(method_family = new)]
749        pub unsafe fn new() -> Retained<Self>;
750    );
751}
752
753extern "C" {
754    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcatransitionfade?language=objc)
755    pub static kCATransitionFade: &'static CATransitionType;
756}
757
758extern "C" {
759    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcatransitionmovein?language=objc)
760    pub static kCATransitionMoveIn: &'static CATransitionType;
761}
762
763extern "C" {
764    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcatransitionpush?language=objc)
765    pub static kCATransitionPush: &'static CATransitionType;
766}
767
768extern "C" {
769    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcatransitionreveal?language=objc)
770    pub static kCATransitionReveal: &'static CATransitionType;
771}
772
773extern "C" {
774    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcatransitionfromright?language=objc)
775    pub static kCATransitionFromRight: &'static CATransitionSubtype;
776}
777
778extern "C" {
779    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcatransitionfromleft?language=objc)
780    pub static kCATransitionFromLeft: &'static CATransitionSubtype;
781}
782
783extern "C" {
784    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcatransitionfromtop?language=objc)
785    pub static kCATransitionFromTop: &'static CATransitionSubtype;
786}
787
788extern "C" {
789    /// [Apple's documentation](https://developer.apple.com/documentation/quartzcore/kcatransitionfrombottom?language=objc)
790    pub static kCATransitionFromBottom: &'static CATransitionSubtype;
791}
792
793extern_class!(
794    /// Animation subclass for grouped animations. *
795    ///
796    /// See also [Apple's documentation](https://developer.apple.com/documentation/quartzcore/caanimationgroup?language=objc)
797    #[unsafe(super(CAAnimation, NSObject))]
798    #[derive(Debug, PartialEq, Eq, Hash)]
799    pub struct CAAnimationGroup;
800);
801
802#[cfg(feature = "CALayer")]
803unsafe impl CAAction for CAAnimationGroup {}
804
805#[cfg(feature = "CAMediaTiming")]
806unsafe impl CAMediaTiming for CAAnimationGroup {}
807
808unsafe impl NSCoding for CAAnimationGroup {}
809
810unsafe impl NSCopying for CAAnimationGroup {}
811
812unsafe impl CopyingHelper for CAAnimationGroup {
813    type Result = Self;
814}
815
816unsafe impl NSObjectProtocol for CAAnimationGroup {}
817
818unsafe impl NSSecureCoding for CAAnimationGroup {}
819
820impl CAAnimationGroup {
821    extern_methods!(
822        #[unsafe(method(animations))]
823        #[unsafe(method_family = none)]
824        pub unsafe fn animations(&self) -> Option<Retained<NSArray<CAAnimation>>>;
825
826        /// Setter for [`animations`][Self::animations].
827        #[unsafe(method(setAnimations:))]
828        #[unsafe(method_family = none)]
829        pub unsafe fn setAnimations(&self, animations: Option<&NSArray<CAAnimation>>);
830    );
831}
832
833/// Methods declared on superclass `CAAnimation`.
834impl CAAnimationGroup {
835    extern_methods!(
836        #[unsafe(method(animation))]
837        #[unsafe(method_family = none)]
838        pub unsafe fn animation() -> Retained<Self>;
839    );
840}
841
842/// Methods declared on superclass `NSObject`.
843impl CAAnimationGroup {
844    extern_methods!(
845        #[unsafe(method(init))]
846        #[unsafe(method_family = init)]
847        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
848
849        #[unsafe(method(new))]
850        #[unsafe(method_family = new)]
851        pub unsafe fn new() -> Retained<Self>;
852    );
853}