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

use crate::*;

// NS_TYPED_ENUM
pub type UITransitionContextViewControllerKey = NSString;

// NS_TYPED_ENUM
pub type UITransitionContextViewKey = NSString;

extern_protocol!(
    pub unsafe trait UIViewControllerTransitionCoordinatorContext:
        NSObjectProtocol + IsMainThreadOnly
    {
        #[method(isAnimated)]
        unsafe fn isAnimated(&self) -> bool;

        #[cfg(feature = "UIViewController")]
        #[method(presentationStyle)]
        unsafe fn presentationStyle(&self) -> UIModalPresentationStyle;

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

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

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

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

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

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

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

        #[cfg(feature = "UIView")]
        #[method(completionCurve)]
        unsafe fn completionCurve(&self) -> UIViewAnimationCurve;

        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
        #[method_id(@__retain_semantics Other viewControllerForKey:)]
        unsafe fn viewControllerForKey(
            &self,
            key: &UITransitionContextViewControllerKey,
        ) -> Option<Retained<UIViewController>>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[method_id(@__retain_semantics Other viewForKey:)]
        unsafe fn viewForKey(&self, key: &UITransitionContextViewKey) -> Option<Retained<UIView>>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[method_id(@__retain_semantics Other containerView)]
        unsafe fn containerView(&self) -> Retained<UIView>;

        #[method(targetTransform)]
        unsafe fn targetTransform(&self) -> CGAffineTransform;
    }

    unsafe impl ProtocolType for dyn UIViewControllerTransitionCoordinatorContext {}
);

extern_protocol!(
    pub unsafe trait UIViewControllerTransitionCoordinator:
        UIViewControllerTransitionCoordinatorContext + IsMainThreadOnly
    {
        #[cfg(feature = "block2")]
        #[method(animateAlongsideTransition:completion:)]
        unsafe fn animateAlongsideTransition_completion(
            &self,
            animation: Option<
                &block2::Block<
                    dyn Fn(
                        NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>,
                    ),
                >,
            >,
            completion: Option<
                &block2::Block<
                    dyn Fn(
                        NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>,
                    ),
                >,
            >,
        ) -> bool;

        #[cfg(all(feature = "UIResponder", feature = "UIView", feature = "block2"))]
        #[method(animateAlongsideTransitionInView:animation:completion:)]
        unsafe fn animateAlongsideTransitionInView_animation_completion(
            &self,
            view: Option<&UIView>,
            animation: Option<
                &block2::Block<
                    dyn Fn(
                        NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>,
                    ),
                >,
            >,
            completion: Option<
                &block2::Block<
                    dyn Fn(
                        NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>,
                    ),
                >,
            >,
        ) -> bool;

        #[cfg(feature = "block2")]
        #[deprecated]
        #[method(notifyWhenInteractionEndsUsingBlock:)]
        unsafe fn notifyWhenInteractionEndsUsingBlock(
            &self,
            handler: &block2::Block<
                dyn Fn(NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>),
            >,
        );

        #[cfg(feature = "block2")]
        #[method(notifyWhenInteractionChangesUsingBlock:)]
        unsafe fn notifyWhenInteractionChangesUsingBlock(
            &self,
            handler: &block2::Block<
                dyn Fn(NonNull<ProtocolObject<dyn UIViewControllerTransitionCoordinatorContext>>),
            >,
        );
    }

    unsafe impl ProtocolType for dyn UIViewControllerTransitionCoordinator {}
);

extern_methods!(
    /// UIViewControllerTransitionCoordinator
    #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
    unsafe impl UIViewController {
        #[method_id(@__retain_semantics Other transitionCoordinator)]
        pub unsafe fn transitionCoordinator(
            &self,
        ) -> Option<Retained<ProtocolObject<dyn UIViewControllerTransitionCoordinator>>>;
    }
);