icrate 0.1.2

Bindings to Apple's frameworks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::CoreAnimation::*;
use crate::Foundation::*;

typed_enum!(
    pub type CAAnimationCalculationMode = NSString;
);

typed_enum!(
    pub type CAAnimationRotationMode = NSString;
);

typed_enum!(
    pub type CATransitionType = NSString;
);

typed_enum!(
    pub type CATransitionSubtype = NSString;
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreAnimation_CAAnimation")]
    pub struct CAAnimation;

    #[cfg(feature = "CoreAnimation_CAAnimation")]
    unsafe impl ClassType for CAAnimation {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreAnimation_CAAnimation")]
unsafe impl CAAction for CAAnimation {}

#[cfg(feature = "CoreAnimation_CAAnimation")]
unsafe impl CAMediaTiming for CAAnimation {}

#[cfg(feature = "CoreAnimation_CAAnimation")]
unsafe impl NSCoding for CAAnimation {}

#[cfg(feature = "CoreAnimation_CAAnimation")]
unsafe impl NSCopying for CAAnimation {}

#[cfg(feature = "CoreAnimation_CAAnimation")]
unsafe impl NSObjectProtocol for CAAnimation {}

#[cfg(feature = "CoreAnimation_CAAnimation")]
unsafe impl NSSecureCoding for CAAnimation {}

extern_methods!(
    #[cfg(feature = "CoreAnimation_CAAnimation")]
    unsafe impl CAAnimation {
        #[method_id(@__retain_semantics Other animation)]
        pub unsafe fn animation() -> Id<Self>;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other defaultValueForKey:)]
        pub unsafe fn defaultValueForKey(key: &NSString) -> Option<Id<AnyObject>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(shouldArchiveValueForKey:)]
        pub unsafe fn shouldArchiveValueForKey(&self, key: &NSString) -> bool;

        #[cfg(feature = "CoreAnimation_CAMediaTimingFunction")]
        #[method_id(@__retain_semantics Other timingFunction)]
        pub unsafe fn timingFunction(&self) -> Option<Id<CAMediaTimingFunction>>;

        #[cfg(feature = "CoreAnimation_CAMediaTimingFunction")]
        #[method(setTimingFunction:)]
        pub unsafe fn setTimingFunction(&self, timing_function: Option<&CAMediaTimingFunction>);

        #[method_id(@__retain_semantics Other delegate)]
        pub unsafe fn delegate(&self) -> Option<Id<ProtocolObject<dyn CAAnimationDelegate>>>;

        #[method(setDelegate:)]
        pub unsafe fn setDelegate(
            &self,
            delegate: Option<&ProtocolObject<dyn CAAnimationDelegate>>,
        );

        #[method(isRemovedOnCompletion)]
        pub unsafe fn isRemovedOnCompletion(&self) -> bool;

        #[method(setRemovedOnCompletion:)]
        pub unsafe fn setRemovedOnCompletion(&self, removed_on_completion: bool);

        #[method(preferredFrameRateRange)]
        pub unsafe fn preferredFrameRateRange(&self) -> CAFrameRateRange;

        #[method(setPreferredFrameRateRange:)]
        pub unsafe fn setPreferredFrameRateRange(
            &self,
            preferred_frame_rate_range: CAFrameRateRange,
        );
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreAnimation_CAAnimation")]
    unsafe impl CAAnimation {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_protocol!(
    pub unsafe trait CAAnimationDelegate: NSObjectProtocol {
        #[cfg(feature = "CoreAnimation_CAAnimation")]
        #[optional]
        #[method(animationDidStart:)]
        unsafe fn animationDidStart(&self, anim: &CAAnimation);

        #[cfg(feature = "CoreAnimation_CAAnimation")]
        #[optional]
        #[method(animationDidStop:finished:)]
        unsafe fn animationDidStop_finished(&self, anim: &CAAnimation, flag: bool);
    }

    unsafe impl ProtocolType for dyn CAAnimationDelegate {}
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
    pub struct CAPropertyAnimation;

    #[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
    unsafe impl ClassType for CAPropertyAnimation {
        #[inherits(NSObject)]
        type Super = CAAnimation;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
unsafe impl CAAction for CAPropertyAnimation {}

#[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
unsafe impl CAMediaTiming for CAPropertyAnimation {}

#[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
unsafe impl NSCoding for CAPropertyAnimation {}

#[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
unsafe impl NSCopying for CAPropertyAnimation {}

#[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
unsafe impl NSObjectProtocol for CAPropertyAnimation {}

#[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
unsafe impl NSSecureCoding for CAPropertyAnimation {}

extern_methods!(
    #[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
    unsafe impl CAPropertyAnimation {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other animationWithKeyPath:)]
        pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Id<Self>;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other keyPath)]
        pub unsafe fn keyPath(&self) -> Option<Id<NSString>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method(setKeyPath:)]
        pub unsafe fn setKeyPath(&self, key_path: Option<&NSString>);

        #[method(isAdditive)]
        pub unsafe fn isAdditive(&self) -> bool;

        #[method(setAdditive:)]
        pub unsafe fn setAdditive(&self, additive: bool);

        #[method(isCumulative)]
        pub unsafe fn isCumulative(&self) -> bool;

        #[method(setCumulative:)]
        pub unsafe fn setCumulative(&self, cumulative: bool);

        #[cfg(feature = "CoreAnimation_CAValueFunction")]
        #[method_id(@__retain_semantics Other valueFunction)]
        pub unsafe fn valueFunction(&self) -> Option<Id<CAValueFunction>>;

        #[cfg(feature = "CoreAnimation_CAValueFunction")]
        #[method(setValueFunction:)]
        pub unsafe fn setValueFunction(&self, value_function: Option<&CAValueFunction>);
    }
);

extern_methods!(
    /// Methods declared on superclass `CAAnimation`
    #[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
    unsafe impl CAPropertyAnimation {
        #[method_id(@__retain_semantics Other animation)]
        pub unsafe fn animation() -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreAnimation_CAPropertyAnimation")]
    unsafe impl CAPropertyAnimation {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreAnimation_CABasicAnimation")]
    pub struct CABasicAnimation;

    #[cfg(feature = "CoreAnimation_CABasicAnimation")]
    unsafe impl ClassType for CABasicAnimation {
        #[inherits(CAAnimation, NSObject)]
        type Super = CAPropertyAnimation;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreAnimation_CABasicAnimation")]
unsafe impl CAAction for CABasicAnimation {}

#[cfg(feature = "CoreAnimation_CABasicAnimation")]
unsafe impl CAMediaTiming for CABasicAnimation {}

#[cfg(feature = "CoreAnimation_CABasicAnimation")]
unsafe impl NSCoding for CABasicAnimation {}

#[cfg(feature = "CoreAnimation_CABasicAnimation")]
unsafe impl NSCopying for CABasicAnimation {}

#[cfg(feature = "CoreAnimation_CABasicAnimation")]
unsafe impl NSObjectProtocol for CABasicAnimation {}

#[cfg(feature = "CoreAnimation_CABasicAnimation")]
unsafe impl NSSecureCoding for CABasicAnimation {}

extern_methods!(
    #[cfg(feature = "CoreAnimation_CABasicAnimation")]
    unsafe impl CABasicAnimation {
        #[method_id(@__retain_semantics Other fromValue)]
        pub unsafe fn fromValue(&self) -> Option<Id<AnyObject>>;

        #[method(setFromValue:)]
        pub unsafe fn setFromValue(&self, from_value: Option<&AnyObject>);

        #[method_id(@__retain_semantics Other toValue)]
        pub unsafe fn toValue(&self) -> Option<Id<AnyObject>>;

        #[method(setToValue:)]
        pub unsafe fn setToValue(&self, to_value: Option<&AnyObject>);

        #[method_id(@__retain_semantics Other byValue)]
        pub unsafe fn byValue(&self) -> Option<Id<AnyObject>>;

        #[method(setByValue:)]
        pub unsafe fn setByValue(&self, by_value: Option<&AnyObject>);
    }
);

extern_methods!(
    /// Methods declared on superclass `CAPropertyAnimation`
    #[cfg(feature = "CoreAnimation_CABasicAnimation")]
    unsafe impl CABasicAnimation {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other animationWithKeyPath:)]
        pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `CAAnimation`
    #[cfg(feature = "CoreAnimation_CABasicAnimation")]
    unsafe impl CABasicAnimation {
        #[method_id(@__retain_semantics Other animation)]
        pub unsafe fn animation() -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreAnimation_CABasicAnimation")]
    unsafe impl CABasicAnimation {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
    pub struct CAKeyframeAnimation;

    #[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
    unsafe impl ClassType for CAKeyframeAnimation {
        #[inherits(CAAnimation, NSObject)]
        type Super = CAPropertyAnimation;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
unsafe impl CAAction for CAKeyframeAnimation {}

#[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
unsafe impl CAMediaTiming for CAKeyframeAnimation {}

#[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
unsafe impl NSCoding for CAKeyframeAnimation {}

#[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
unsafe impl NSCopying for CAKeyframeAnimation {}

#[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
unsafe impl NSObjectProtocol for CAKeyframeAnimation {}

#[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
unsafe impl NSSecureCoding for CAKeyframeAnimation {}

extern_methods!(
    #[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
    unsafe impl CAKeyframeAnimation {
        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other values)]
        pub unsafe fn values(&self) -> Option<Id<NSArray>>;

        #[cfg(feature = "Foundation_NSArray")]
        #[method(setValues:)]
        pub unsafe fn setValues(&self, values: Option<&NSArray>);

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method_id(@__retain_semantics Other keyTimes)]
        pub unsafe fn keyTimes(&self) -> Option<Id<NSArray<NSNumber>>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method(setKeyTimes:)]
        pub unsafe fn setKeyTimes(&self, key_times: Option<&NSArray<NSNumber>>);

        #[cfg(all(
            feature = "CoreAnimation_CAMediaTimingFunction",
            feature = "Foundation_NSArray"
        ))]
        #[method_id(@__retain_semantics Other timingFunctions)]
        pub unsafe fn timingFunctions(&self) -> Option<Id<NSArray<CAMediaTimingFunction>>>;

        #[cfg(all(
            feature = "CoreAnimation_CAMediaTimingFunction",
            feature = "Foundation_NSArray"
        ))]
        #[method(setTimingFunctions:)]
        pub unsafe fn setTimingFunctions(
            &self,
            timing_functions: Option<&NSArray<CAMediaTimingFunction>>,
        );

        #[method_id(@__retain_semantics Other calculationMode)]
        pub unsafe fn calculationMode(&self) -> Id<CAAnimationCalculationMode>;

        #[method(setCalculationMode:)]
        pub unsafe fn setCalculationMode(&self, calculation_mode: &CAAnimationCalculationMode);

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method_id(@__retain_semantics Other tensionValues)]
        pub unsafe fn tensionValues(&self) -> Option<Id<NSArray<NSNumber>>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method(setTensionValues:)]
        pub unsafe fn setTensionValues(&self, tension_values: Option<&NSArray<NSNumber>>);

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method_id(@__retain_semantics Other continuityValues)]
        pub unsafe fn continuityValues(&self) -> Option<Id<NSArray<NSNumber>>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method(setContinuityValues:)]
        pub unsafe fn setContinuityValues(&self, continuity_values: Option<&NSArray<NSNumber>>);

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method_id(@__retain_semantics Other biasValues)]
        pub unsafe fn biasValues(&self) -> Option<Id<NSArray<NSNumber>>>;

        #[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSNumber"))]
        #[method(setBiasValues:)]
        pub unsafe fn setBiasValues(&self, bias_values: Option<&NSArray<NSNumber>>);

        #[method_id(@__retain_semantics Other rotationMode)]
        pub unsafe fn rotationMode(&self) -> Option<Id<CAAnimationRotationMode>>;

        #[method(setRotationMode:)]
        pub unsafe fn setRotationMode(&self, rotation_mode: Option<&CAAnimationRotationMode>);
    }
);

extern_methods!(
    /// Methods declared on superclass `CAPropertyAnimation`
    #[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
    unsafe impl CAKeyframeAnimation {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other animationWithKeyPath:)]
        pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `CAAnimation`
    #[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
    unsafe impl CAKeyframeAnimation {
        #[method_id(@__retain_semantics Other animation)]
        pub unsafe fn animation() -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreAnimation_CAKeyframeAnimation")]
    unsafe impl CAKeyframeAnimation {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_static!(kCAAnimationLinear: &'static CAAnimationCalculationMode);

extern_static!(kCAAnimationDiscrete: &'static CAAnimationCalculationMode);

extern_static!(kCAAnimationPaced: &'static CAAnimationCalculationMode);

extern_static!(kCAAnimationCubic: &'static CAAnimationCalculationMode);

extern_static!(kCAAnimationCubicPaced: &'static CAAnimationCalculationMode);

extern_static!(kCAAnimationRotateAuto: &'static CAAnimationRotationMode);

extern_static!(kCAAnimationRotateAutoReverse: &'static CAAnimationRotationMode);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreAnimation_CASpringAnimation")]
    pub struct CASpringAnimation;

    #[cfg(feature = "CoreAnimation_CASpringAnimation")]
    unsafe impl ClassType for CASpringAnimation {
        #[inherits(CAPropertyAnimation, CAAnimation, NSObject)]
        type Super = CABasicAnimation;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreAnimation_CASpringAnimation")]
unsafe impl CAAction for CASpringAnimation {}

#[cfg(feature = "CoreAnimation_CASpringAnimation")]
unsafe impl CAMediaTiming for CASpringAnimation {}

#[cfg(feature = "CoreAnimation_CASpringAnimation")]
unsafe impl NSCoding for CASpringAnimation {}

#[cfg(feature = "CoreAnimation_CASpringAnimation")]
unsafe impl NSCopying for CASpringAnimation {}

#[cfg(feature = "CoreAnimation_CASpringAnimation")]
unsafe impl NSObjectProtocol for CASpringAnimation {}

#[cfg(feature = "CoreAnimation_CASpringAnimation")]
unsafe impl NSSecureCoding for CASpringAnimation {}

extern_methods!(
    #[cfg(feature = "CoreAnimation_CASpringAnimation")]
    unsafe impl CASpringAnimation {
        #[method(mass)]
        pub unsafe fn mass(&self) -> CGFloat;

        #[method(setMass:)]
        pub unsafe fn setMass(&self, mass: CGFloat);

        #[method(stiffness)]
        pub unsafe fn stiffness(&self) -> CGFloat;

        #[method(setStiffness:)]
        pub unsafe fn setStiffness(&self, stiffness: CGFloat);

        #[method(damping)]
        pub unsafe fn damping(&self) -> CGFloat;

        #[method(setDamping:)]
        pub unsafe fn setDamping(&self, damping: CGFloat);

        #[method(initialVelocity)]
        pub unsafe fn initialVelocity(&self) -> CGFloat;

        #[method(setInitialVelocity:)]
        pub unsafe fn setInitialVelocity(&self, initial_velocity: CGFloat);

        #[method(allowsOverdamping)]
        pub unsafe fn allowsOverdamping(&self) -> bool;

        #[method(setAllowsOverdamping:)]
        pub unsafe fn setAllowsOverdamping(&self, allows_overdamping: bool);

        #[method(settlingDuration)]
        pub unsafe fn settlingDuration(&self) -> CFTimeInterval;

        #[method_id(@__retain_semantics Init initWithPerceptualDuration:bounce:)]
        pub unsafe fn initWithPerceptualDuration_bounce(
            this: Allocated<Self>,
            perceptual_duration: CFTimeInterval,
            bounce: CGFloat,
        ) -> Id<Self>;

        #[method(perceptualDuration)]
        pub unsafe fn perceptualDuration(&self) -> CFTimeInterval;

        #[method(bounce)]
        pub unsafe fn bounce(&self) -> CGFloat;
    }
);

extern_methods!(
    /// Methods declared on superclass `CAPropertyAnimation`
    #[cfg(feature = "CoreAnimation_CASpringAnimation")]
    unsafe impl CASpringAnimation {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other animationWithKeyPath:)]
        pub unsafe fn animationWithKeyPath(path: Option<&NSString>) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `CAAnimation`
    #[cfg(feature = "CoreAnimation_CASpringAnimation")]
    unsafe impl CASpringAnimation {
        #[method_id(@__retain_semantics Other animation)]
        pub unsafe fn animation() -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreAnimation_CASpringAnimation")]
    unsafe impl CASpringAnimation {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreAnimation_CATransition")]
    pub struct CATransition;

    #[cfg(feature = "CoreAnimation_CATransition")]
    unsafe impl ClassType for CATransition {
        #[inherits(NSObject)]
        type Super = CAAnimation;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreAnimation_CATransition")]
unsafe impl CAAction for CATransition {}

#[cfg(feature = "CoreAnimation_CATransition")]
unsafe impl CAMediaTiming for CATransition {}

#[cfg(feature = "CoreAnimation_CATransition")]
unsafe impl NSCoding for CATransition {}

#[cfg(feature = "CoreAnimation_CATransition")]
unsafe impl NSCopying for CATransition {}

#[cfg(feature = "CoreAnimation_CATransition")]
unsafe impl NSObjectProtocol for CATransition {}

#[cfg(feature = "CoreAnimation_CATransition")]
unsafe impl NSSecureCoding for CATransition {}

extern_methods!(
    #[cfg(feature = "CoreAnimation_CATransition")]
    unsafe impl CATransition {
        #[method_id(@__retain_semantics Other type)]
        pub unsafe fn r#type(&self) -> Id<CATransitionType>;

        #[method(setType:)]
        pub unsafe fn setType(&self, r#type: &CATransitionType);

        #[method_id(@__retain_semantics Other subtype)]
        pub unsafe fn subtype(&self) -> Option<Id<CATransitionSubtype>>;

        #[method(setSubtype:)]
        pub unsafe fn setSubtype(&self, subtype: Option<&CATransitionSubtype>);

        #[method(startProgress)]
        pub unsafe fn startProgress(&self) -> c_float;

        #[method(setStartProgress:)]
        pub unsafe fn setStartProgress(&self, start_progress: c_float);

        #[method(endProgress)]
        pub unsafe fn endProgress(&self) -> c_float;

        #[method(setEndProgress:)]
        pub unsafe fn setEndProgress(&self, end_progress: c_float);

        #[method_id(@__retain_semantics Other filter)]
        pub unsafe fn filter(&self) -> Option<Id<AnyObject>>;

        #[method(setFilter:)]
        pub unsafe fn setFilter(&self, filter: Option<&AnyObject>);
    }
);

extern_methods!(
    /// Methods declared on superclass `CAAnimation`
    #[cfg(feature = "CoreAnimation_CATransition")]
    unsafe impl CATransition {
        #[method_id(@__retain_semantics Other animation)]
        pub unsafe fn animation() -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreAnimation_CATransition")]
    unsafe impl CATransition {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_static!(kCATransitionFade: &'static CATransitionType);

extern_static!(kCATransitionMoveIn: &'static CATransitionType);

extern_static!(kCATransitionPush: &'static CATransitionType);

extern_static!(kCATransitionReveal: &'static CATransitionType);

extern_static!(kCATransitionFromRight: &'static CATransitionSubtype);

extern_static!(kCATransitionFromLeft: &'static CATransitionSubtype);

extern_static!(kCATransitionFromTop: &'static CATransitionSubtype);

extern_static!(kCATransitionFromBottom: &'static CATransitionSubtype);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreAnimation_CAAnimationGroup")]
    pub struct CAAnimationGroup;

    #[cfg(feature = "CoreAnimation_CAAnimationGroup")]
    unsafe impl ClassType for CAAnimationGroup {
        #[inherits(NSObject)]
        type Super = CAAnimation;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreAnimation_CAAnimationGroup")]
unsafe impl CAAction for CAAnimationGroup {}

#[cfg(feature = "CoreAnimation_CAAnimationGroup")]
unsafe impl CAMediaTiming for CAAnimationGroup {}

#[cfg(feature = "CoreAnimation_CAAnimationGroup")]
unsafe impl NSCoding for CAAnimationGroup {}

#[cfg(feature = "CoreAnimation_CAAnimationGroup")]
unsafe impl NSCopying for CAAnimationGroup {}

#[cfg(feature = "CoreAnimation_CAAnimationGroup")]
unsafe impl NSObjectProtocol for CAAnimationGroup {}

#[cfg(feature = "CoreAnimation_CAAnimationGroup")]
unsafe impl NSSecureCoding for CAAnimationGroup {}

extern_methods!(
    #[cfg(feature = "CoreAnimation_CAAnimationGroup")]
    unsafe impl CAAnimationGroup {
        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other animations)]
        pub unsafe fn animations(&self) -> Option<Id<NSArray<CAAnimation>>>;

        #[cfg(feature = "Foundation_NSArray")]
        #[method(setAnimations:)]
        pub unsafe fn setAnimations(&self, animations: Option<&NSArray<CAAnimation>>);
    }
);

extern_methods!(
    /// Methods declared on superclass `CAAnimation`
    #[cfg(feature = "CoreAnimation_CAAnimationGroup")]
    unsafe impl CAAnimationGroup {
        #[method_id(@__retain_semantics Other animation)]
        pub unsafe fn animation() -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreAnimation_CAAnimationGroup")]
    unsafe impl CAAnimationGroup {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);