objc2_ui_kit/generated/
UIZoomTransitionOptions.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct UIZoomTransitionOptions;
17);
18
19extern_conformance!(
20 unsafe impl NSCopying for UIZoomTransitionOptions {}
21);
22
23unsafe impl CopyingHelper for UIZoomTransitionOptions {
24 type Result = Self;
25}
26
27extern_conformance!(
28 unsafe impl NSObjectProtocol for UIZoomTransitionOptions {}
29);
30
31impl UIZoomTransitionOptions {
32 extern_methods!(
33 #[cfg(feature = "block2")]
34 #[unsafe(method(interactiveDismissShouldBegin))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn interactiveDismissShouldBegin(
43 &self,
44 ) -> *mut block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionInteractionContext>) -> Bool>;
45
46 #[cfg(feature = "block2")]
47 #[unsafe(method(setInteractiveDismissShouldBegin:))]
51 #[unsafe(method_family = none)]
52 pub fn setInteractiveDismissShouldBegin(
53 &self,
54 interactive_dismiss_should_begin: Option<
55 &block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionInteractionContext>) -> Bool>,
56 >,
57 );
58
59 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
60 #[unsafe(method(alignmentRectProvider))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn alignmentRectProvider(
69 &self,
70 ) -> *mut block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionAlignmentRectContext>) -> CGRect>;
71
72 #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
73 #[unsafe(method(setAlignmentRectProvider:))]
77 #[unsafe(method_family = none)]
78 pub fn setAlignmentRectProvider(
79 &self,
80 alignment_rect_provider: Option<
81 &block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionAlignmentRectContext>) -> CGRect>,
82 >,
83 );
84
85 #[cfg(feature = "UIColor")]
86 #[unsafe(method(dimmingColor))]
88 #[unsafe(method_family = none)]
89 pub fn dimmingColor(&self) -> Option<Retained<UIColor>>;
90
91 #[cfg(feature = "UIColor")]
92 #[unsafe(method(setDimmingColor:))]
94 #[unsafe(method_family = none)]
95 pub fn setDimmingColor(&self, dimming_color: Option<&UIColor>);
96
97 #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
98 #[unsafe(method(dimmingVisualEffect))]
100 #[unsafe(method_family = none)]
101 pub fn dimmingVisualEffect(&self, mtm: MainThreadMarker) -> Option<Retained<UIBlurEffect>>;
102
103 #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
104 #[unsafe(method(setDimmingVisualEffect:))]
106 #[unsafe(method_family = none)]
107 pub fn setDimmingVisualEffect(&self, dimming_visual_effect: Option<&UIBlurEffect>);
108 );
109}
110
111impl UIZoomTransitionOptions {
113 extern_methods!(
114 #[unsafe(method(init))]
115 #[unsafe(method_family = init)]
116 pub fn init(this: Allocated<Self>) -> Retained<Self>;
117
118 #[unsafe(method(new))]
119 #[unsafe(method_family = new)]
120 pub fn new() -> Retained<Self>;
121 );
122}
123
124impl DefaultRetained for UIZoomTransitionOptions {
125 #[inline]
126 fn default_retained() -> Retained<Self> {
127 Self::new()
128 }
129}
130
131extern_class!(
132 #[unsafe(super(NSObject))]
134 #[derive(Debug, PartialEq, Eq, Hash)]
135 pub struct UIZoomTransitionInteractionContext;
136);
137
138extern_conformance!(
139 unsafe impl NSObjectProtocol for UIZoomTransitionInteractionContext {}
140);
141
142impl UIZoomTransitionInteractionContext {
143 extern_methods!(
144 #[cfg(feature = "objc2-core-foundation")]
145 #[unsafe(method(location))]
147 #[unsafe(method_family = none)]
148 pub fn location(&self) -> CGPoint;
149
150 #[cfg(feature = "objc2-core-foundation")]
151 #[unsafe(method(velocity))]
153 #[unsafe(method_family = none)]
154 pub fn velocity(&self) -> CGVector;
155
156 #[unsafe(method(willBegin))]
158 #[unsafe(method_family = none)]
159 pub fn willBegin(&self) -> bool;
160 );
161}
162
163impl UIZoomTransitionInteractionContext {
165 extern_methods!(
166 #[unsafe(method(init))]
167 #[unsafe(method_family = init)]
168 pub fn init(this: Allocated<Self>) -> Retained<Self>;
169
170 #[unsafe(method(new))]
171 #[unsafe(method_family = new)]
172 pub fn new() -> Retained<Self>;
173 );
174}
175
176impl DefaultRetained for UIZoomTransitionInteractionContext {
177 #[inline]
178 fn default_retained() -> Retained<Self> {
179 Self::new()
180 }
181}
182
183extern_class!(
184 #[unsafe(super(NSObject))]
186 #[derive(Debug, PartialEq, Eq, Hash)]
187 pub struct UIZoomTransitionAlignmentRectContext;
188);
189
190extern_conformance!(
191 unsafe impl NSObjectProtocol for UIZoomTransitionAlignmentRectContext {}
192);
193
194impl UIZoomTransitionAlignmentRectContext {
195 extern_methods!(
196 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
197 #[unsafe(method(sourceView))]
199 #[unsafe(method_family = none)]
200 pub fn sourceView(&self, mtm: MainThreadMarker) -> Retained<UIView>;
201
202 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
203 #[unsafe(method(zoomedViewController))]
205 #[unsafe(method_family = none)]
206 pub fn zoomedViewController(&self, mtm: MainThreadMarker) -> Retained<UIViewController>;
207 );
208}
209
210impl UIZoomTransitionAlignmentRectContext {
212 extern_methods!(
213 #[unsafe(method(init))]
214 #[unsafe(method_family = init)]
215 pub fn init(this: Allocated<Self>) -> Retained<Self>;
216
217 #[unsafe(method(new))]
218 #[unsafe(method_family = new)]
219 pub fn new() -> Retained<Self>;
220 );
221}
222
223impl DefaultRetained for UIZoomTransitionAlignmentRectContext {
224 #[inline]
225 fn default_retained() -> Retained<Self> {
226 Self::new()
227 }
228}