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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIViewPropertyAnimator;

    unsafe impl ClassType for UIViewPropertyAnimator {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCopying for UIViewPropertyAnimator {}

unsafe impl NSObjectProtocol for UIViewPropertyAnimator {}

#[cfg(feature = "UIViewAnimating")]
unsafe impl UIViewAnimating for UIViewPropertyAnimator {}

#[cfg(feature = "UIViewAnimating")]
unsafe impl UIViewImplicitlyAnimating for UIViewPropertyAnimator {}

extern_methods!(
    unsafe impl UIViewPropertyAnimator {
        #[cfg(feature = "UITimingCurveProvider")]
        #[method_id(@__retain_semantics Other timingParameters)]
        pub unsafe fn timingParameters(
            &self,
        ) -> Option<Retained<ProtocolObject<dyn UITimingCurveProvider>>>;

        #[method(duration)]
        pub unsafe fn duration(&self) -> NSTimeInterval;

        #[method(delay)]
        pub unsafe fn delay(&self) -> NSTimeInterval;

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

        #[method(setUserInteractionEnabled:)]
        pub unsafe fn setUserInteractionEnabled(&self, user_interaction_enabled: bool);

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

        #[method(setManualHitTestingEnabled:)]
        pub unsafe fn setManualHitTestingEnabled(&self, manual_hit_testing_enabled: bool);

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

        #[method(setInterruptible:)]
        pub unsafe fn setInterruptible(&self, interruptible: bool);

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

        #[method(setScrubsLinearly:)]
        pub unsafe fn setScrubsLinearly(&self, scrubs_linearly: bool);

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

        #[method(setPausesOnCompletion:)]
        pub unsafe fn setPausesOnCompletion(&self, pauses_on_completion: bool);

        #[cfg(feature = "UITimingCurveProvider")]
        #[method_id(@__retain_semantics Init initWithDuration:timingParameters:)]
        pub unsafe fn initWithDuration_timingParameters(
            this: Allocated<Self>,
            duration: NSTimeInterval,
            parameters: &ProtocolObject<dyn UITimingCurveProvider>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIView", feature = "block2"))]
        #[method_id(@__retain_semantics Init initWithDuration:curve:animations:)]
        pub unsafe fn initWithDuration_curve_animations(
            this: Allocated<Self>,
            duration: NSTimeInterval,
            curve: UIViewAnimationCurve,
            animations: Option<&block2::Block<dyn Fn()>>,
        ) -> Retained<Self>;

        #[cfg(feature = "block2")]
        #[method_id(@__retain_semantics Init initWithDuration:controlPoint1:controlPoint2:animations:)]
        pub unsafe fn initWithDuration_controlPoint1_controlPoint2_animations(
            this: Allocated<Self>,
            duration: NSTimeInterval,
            point1: CGPoint,
            point2: CGPoint,
            animations: Option<&block2::Block<dyn Fn()>>,
        ) -> Retained<Self>;

        #[cfg(feature = "block2")]
        #[method_id(@__retain_semantics Init initWithDuration:dampingRatio:animations:)]
        pub unsafe fn initWithDuration_dampingRatio_animations(
            this: Allocated<Self>,
            duration: NSTimeInterval,
            ratio: CGFloat,
            animations: Option<&block2::Block<dyn Fn()>>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIView", feature = "UIViewAnimating", feature = "block2"))]
        #[method_id(@__retain_semantics Other runningPropertyAnimatorWithDuration:delay:options:animations:completion:)]
        pub unsafe fn runningPropertyAnimatorWithDuration_delay_options_animations_completion(
            duration: NSTimeInterval,
            delay: NSTimeInterval,
            options: UIViewAnimationOptions,
            animations: &block2::Block<dyn Fn()>,
            completion: Option<&block2::Block<dyn Fn(UIViewAnimatingPosition)>>,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(feature = "block2")]
        #[method(addAnimations:delayFactor:)]
        pub unsafe fn addAnimations_delayFactor(
            &self,
            animation: &block2::Block<dyn Fn()>,
            delay_factor: CGFloat,
        );

        #[cfg(feature = "block2")]
        #[method(addAnimations:)]
        pub unsafe fn addAnimations(&self, animation: &block2::Block<dyn Fn()>);

        #[cfg(all(feature = "UIViewAnimating", feature = "block2"))]
        #[method(addCompletion:)]
        pub unsafe fn addCompletion(
            &self,
            completion: &block2::Block<dyn Fn(UIViewAnimatingPosition)>,
        );

        #[cfg(feature = "UITimingCurveProvider")]
        #[method(continueAnimationWithTimingParameters:durationFactor:)]
        pub unsafe fn continueAnimationWithTimingParameters_durationFactor(
            &self,
            parameters: Option<&ProtocolObject<dyn UITimingCurveProvider>>,
            duration_factor: CGFloat,
        );
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl UIViewPropertyAnimator {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);