objc2_ui_kit/generated/
UITimingParameters.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-foundation")]
6use objc2_core_foundation::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicubictimingparameters?language=objc)
13    #[unsafe(super(NSObject))]
14    #[thread_kind = MainThreadOnly]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct UICubicTimingParameters;
17);
18
19unsafe impl NSCoding for UICubicTimingParameters {}
20
21unsafe impl NSCopying for UICubicTimingParameters {}
22
23unsafe impl CopyingHelper for UICubicTimingParameters {
24    type Result = Self;
25}
26
27unsafe impl NSObjectProtocol for UICubicTimingParameters {}
28
29#[cfg(feature = "UITimingCurveProvider")]
30unsafe impl UITimingCurveProvider for UICubicTimingParameters {}
31
32impl UICubicTimingParameters {
33    extern_methods!(
34        #[cfg(feature = "UIView")]
35        #[unsafe(method(animationCurve))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn animationCurve(&self) -> UIViewAnimationCurve;
38
39        #[cfg(feature = "objc2-core-foundation")]
40        #[unsafe(method(controlPoint1))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn controlPoint1(&self) -> CGPoint;
43
44        #[cfg(feature = "objc2-core-foundation")]
45        #[unsafe(method(controlPoint2))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn controlPoint2(&self) -> CGPoint;
48
49        #[unsafe(method(init))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
52
53        #[unsafe(method(initWithCoder:))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn initWithCoder(
56            this: Allocated<Self>,
57            coder: &NSCoder,
58        ) -> Option<Retained<Self>>;
59
60        #[cfg(feature = "UIView")]
61        #[unsafe(method(initWithAnimationCurve:))]
62        #[unsafe(method_family = init)]
63        pub unsafe fn initWithAnimationCurve(
64            this: Allocated<Self>,
65            curve: UIViewAnimationCurve,
66        ) -> Retained<Self>;
67
68        #[cfg(feature = "objc2-core-foundation")]
69        #[unsafe(method(initWithControlPoint1:controlPoint2:))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn initWithControlPoint1_controlPoint2(
72            this: Allocated<Self>,
73            point1: CGPoint,
74            point2: CGPoint,
75        ) -> Retained<Self>;
76    );
77}
78
79/// Methods declared on superclass `NSObject`.
80impl UICubicTimingParameters {
81    extern_methods!(
82        #[unsafe(method(new))]
83        #[unsafe(method_family = new)]
84        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
85    );
86}
87
88extern_class!(
89    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uispringtimingparameters?language=objc)
90    #[unsafe(super(NSObject))]
91    #[thread_kind = MainThreadOnly]
92    #[derive(Debug, PartialEq, Eq, Hash)]
93    pub struct UISpringTimingParameters;
94);
95
96unsafe impl NSCoding for UISpringTimingParameters {}
97
98unsafe impl NSCopying for UISpringTimingParameters {}
99
100unsafe impl CopyingHelper for UISpringTimingParameters {
101    type Result = Self;
102}
103
104unsafe impl NSObjectProtocol for UISpringTimingParameters {}
105
106#[cfg(feature = "UITimingCurveProvider")]
107unsafe impl UITimingCurveProvider for UISpringTimingParameters {}
108
109impl UISpringTimingParameters {
110    extern_methods!(
111        #[cfg(feature = "objc2-core-foundation")]
112        #[unsafe(method(initialVelocity))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn initialVelocity(&self) -> CGVector;
115
116        #[unsafe(method(init))]
117        #[unsafe(method_family = init)]
118        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
119
120        #[unsafe(method(initWithCoder:))]
121        #[unsafe(method_family = init)]
122        pub unsafe fn initWithCoder(
123            this: Allocated<Self>,
124            coder: &NSCoder,
125        ) -> Option<Retained<Self>>;
126
127        #[cfg(feature = "objc2-core-foundation")]
128        #[unsafe(method(initWithDampingRatio:initialVelocity:))]
129        #[unsafe(method_family = init)]
130        pub unsafe fn initWithDampingRatio_initialVelocity(
131            this: Allocated<Self>,
132            ratio: CGFloat,
133            velocity: CGVector,
134        ) -> Retained<Self>;
135
136        #[cfg(feature = "objc2-core-foundation")]
137        #[unsafe(method(initWithMass:stiffness:damping:initialVelocity:))]
138        #[unsafe(method_family = init)]
139        pub unsafe fn initWithMass_stiffness_damping_initialVelocity(
140            this: Allocated<Self>,
141            mass: CGFloat,
142            stiffness: CGFloat,
143            damping: CGFloat,
144            velocity: CGVector,
145        ) -> Retained<Self>;
146
147        #[cfg(feature = "objc2-core-foundation")]
148        #[unsafe(method(initWithDampingRatio:))]
149        #[unsafe(method_family = init)]
150        pub unsafe fn initWithDampingRatio(this: Allocated<Self>, ratio: CGFloat)
151            -> Retained<Self>;
152
153        #[cfg(feature = "objc2-core-foundation")]
154        #[unsafe(method(initWithDuration:bounce:initialVelocity:))]
155        #[unsafe(method_family = init)]
156        pub unsafe fn initWithDuration_bounce_initialVelocity(
157            this: Allocated<Self>,
158            duration: NSTimeInterval,
159            bounce: CGFloat,
160            velocity: CGVector,
161        ) -> Retained<Self>;
162
163        #[cfg(feature = "objc2-core-foundation")]
164        #[unsafe(method(initWithDuration:bounce:))]
165        #[unsafe(method_family = init)]
166        pub unsafe fn initWithDuration_bounce(
167            this: Allocated<Self>,
168            duration: NSTimeInterval,
169            bounce: CGFloat,
170        ) -> Retained<Self>;
171    );
172}
173
174/// Methods declared on superclass `NSObject`.
175impl UISpringTimingParameters {
176    extern_methods!(
177        #[unsafe(method(new))]
178        #[unsafe(method_family = new)]
179        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
180    );
181}