objc2_ui_kit/generated/
UITimingParameters.rs1use 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 #[unsafe(super(NSObject))]
14 #[thread_kind = MainThreadOnly]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct UICubicTimingParameters;
17);
18
19extern_conformance!(
20 unsafe impl NSCoding for UICubicTimingParameters {}
21);
22
23extern_conformance!(
24 unsafe impl NSCopying for UICubicTimingParameters {}
25);
26
27unsafe impl CopyingHelper for UICubicTimingParameters {
28 type Result = Self;
29}
30
31extern_conformance!(
32 unsafe impl NSObjectProtocol for UICubicTimingParameters {}
33);
34
35#[cfg(feature = "UITimingCurveProvider")]
36extern_conformance!(
37 unsafe impl UITimingCurveProvider for UICubicTimingParameters {}
38);
39
40impl UICubicTimingParameters {
41 extern_methods!(
42 #[cfg(feature = "UIView")]
43 #[unsafe(method(animationCurve))]
44 #[unsafe(method_family = none)]
45 pub fn animationCurve(&self) -> UIViewAnimationCurve;
46
47 #[cfg(feature = "objc2-core-foundation")]
48 #[unsafe(method(controlPoint1))]
49 #[unsafe(method_family = none)]
50 pub fn controlPoint1(&self) -> CGPoint;
51
52 #[cfg(feature = "objc2-core-foundation")]
53 #[unsafe(method(controlPoint2))]
54 #[unsafe(method_family = none)]
55 pub fn controlPoint2(&self) -> CGPoint;
56
57 #[unsafe(method(init))]
58 #[unsafe(method_family = init)]
59 pub fn init(this: Allocated<Self>) -> Retained<Self>;
60
61 #[unsafe(method(initWithCoder:))]
65 #[unsafe(method_family = init)]
66 pub unsafe fn initWithCoder(
67 this: Allocated<Self>,
68 coder: &NSCoder,
69 ) -> Option<Retained<Self>>;
70
71 #[cfg(feature = "UIView")]
72 #[unsafe(method(initWithAnimationCurve:))]
73 #[unsafe(method_family = init)]
74 pub fn initWithAnimationCurve(
75 this: Allocated<Self>,
76 curve: UIViewAnimationCurve,
77 ) -> Retained<Self>;
78
79 #[cfg(feature = "objc2-core-foundation")]
80 #[unsafe(method(initWithControlPoint1:controlPoint2:))]
81 #[unsafe(method_family = init)]
82 pub fn initWithControlPoint1_controlPoint2(
83 this: Allocated<Self>,
84 point1: CGPoint,
85 point2: CGPoint,
86 ) -> Retained<Self>;
87 );
88}
89
90impl UICubicTimingParameters {
92 extern_methods!(
93 #[unsafe(method(new))]
94 #[unsafe(method_family = new)]
95 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
96 );
97}
98
99extern_class!(
100 #[unsafe(super(NSObject))]
102 #[thread_kind = MainThreadOnly]
103 #[derive(Debug, PartialEq, Eq, Hash)]
104 pub struct UISpringTimingParameters;
105);
106
107extern_conformance!(
108 unsafe impl NSCoding for UISpringTimingParameters {}
109);
110
111extern_conformance!(
112 unsafe impl NSCopying for UISpringTimingParameters {}
113);
114
115unsafe impl CopyingHelper for UISpringTimingParameters {
116 type Result = Self;
117}
118
119extern_conformance!(
120 unsafe impl NSObjectProtocol for UISpringTimingParameters {}
121);
122
123#[cfg(feature = "UITimingCurveProvider")]
124extern_conformance!(
125 unsafe impl UITimingCurveProvider for UISpringTimingParameters {}
126);
127
128impl UISpringTimingParameters {
129 extern_methods!(
130 #[cfg(feature = "objc2-core-foundation")]
131 #[unsafe(method(initialVelocity))]
132 #[unsafe(method_family = none)]
133 pub fn initialVelocity(&self) -> CGVector;
134
135 #[unsafe(method(init))]
136 #[unsafe(method_family = init)]
137 pub fn init(this: Allocated<Self>) -> Retained<Self>;
138
139 #[unsafe(method(initWithCoder:))]
143 #[unsafe(method_family = init)]
144 pub unsafe fn initWithCoder(
145 this: Allocated<Self>,
146 coder: &NSCoder,
147 ) -> Option<Retained<Self>>;
148
149 #[cfg(feature = "objc2-core-foundation")]
150 #[unsafe(method(initWithDampingRatio:initialVelocity:))]
151 #[unsafe(method_family = init)]
152 pub fn initWithDampingRatio_initialVelocity(
153 this: Allocated<Self>,
154 ratio: CGFloat,
155 velocity: CGVector,
156 ) -> Retained<Self>;
157
158 #[cfg(feature = "objc2-core-foundation")]
159 #[unsafe(method(initWithMass:stiffness:damping:initialVelocity:))]
160 #[unsafe(method_family = init)]
161 pub fn initWithMass_stiffness_damping_initialVelocity(
162 this: Allocated<Self>,
163 mass: CGFloat,
164 stiffness: CGFloat,
165 damping: CGFloat,
166 velocity: CGVector,
167 ) -> Retained<Self>;
168
169 #[cfg(feature = "objc2-core-foundation")]
170 #[unsafe(method(initWithDampingRatio:))]
171 #[unsafe(method_family = init)]
172 pub fn initWithDampingRatio(this: Allocated<Self>, ratio: CGFloat) -> Retained<Self>;
173
174 #[cfg(feature = "objc2-core-foundation")]
175 #[unsafe(method(initWithDuration:bounce:initialVelocity:))]
176 #[unsafe(method_family = init)]
177 pub fn initWithDuration_bounce_initialVelocity(
178 this: Allocated<Self>,
179 duration: NSTimeInterval,
180 bounce: CGFloat,
181 velocity: CGVector,
182 ) -> Retained<Self>;
183
184 #[cfg(feature = "objc2-core-foundation")]
185 #[unsafe(method(initWithDuration:bounce:))]
186 #[unsafe(method_family = init)]
187 pub fn initWithDuration_bounce(
188 this: Allocated<Self>,
189 duration: NSTimeInterval,
190 bounce: CGFloat,
191 ) -> Retained<Self>;
192 );
193}
194
195impl UISpringTimingParameters {
197 extern_methods!(
198 #[unsafe(method(new))]
199 #[unsafe(method_family = new)]
200 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
201 );
202}