objc2_ui_kit/generated/
UIZoomTransitionOptions.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uizoomtransitionoptions?language=objc)
14    #[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        /// Called when an interactive dismissal of this transition begins.
35        /// Return value indicates whether the interaction should begin for the given context.
36        #[unsafe(method(interactiveDismissShouldBegin))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn interactiveDismissShouldBegin(
39            &self,
40        ) -> *mut block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionInteractionContext>) -> Bool>;
41
42        #[cfg(feature = "block2")]
43        /// Setter for [`interactiveDismissShouldBegin`][Self::interactiveDismissShouldBegin].
44        #[unsafe(method(setInteractiveDismissShouldBegin:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn setInteractiveDismissShouldBegin(
47            &self,
48            interactive_dismiss_should_begin: Option<
49                &block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionInteractionContext>) -> Bool>,
50            >,
51        );
52
53        #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
54        /// Return a frame in the zoomed view controller's view to which to align the source view.
55        /// Return `CGRectNull` to indicate no preference.
56        #[unsafe(method(alignmentRectProvider))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn alignmentRectProvider(
59            &self,
60        ) -> *mut block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionAlignmentRectContext>) -> CGRect>;
61
62        #[cfg(all(feature = "block2", feature = "objc2-core-foundation"))]
63        /// Setter for [`alignmentRectProvider`][Self::alignmentRectProvider].
64        #[unsafe(method(setAlignmentRectProvider:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn setAlignmentRectProvider(
67            &self,
68            alignment_rect_provider: Option<
69                &block2::DynBlock<dyn Fn(NonNull<UIZoomTransitionAlignmentRectContext>) -> CGRect>,
70            >,
71        );
72
73        #[cfg(feature = "UIColor")]
74        /// Dimming color to apply to the content behind the zoomed in view. Set to nil to use the default.
75        #[unsafe(method(dimmingColor))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn dimmingColor(&self) -> Option<Retained<UIColor>>;
78
79        #[cfg(feature = "UIColor")]
80        /// Setter for [`dimmingColor`][Self::dimmingColor].
81        #[unsafe(method(setDimmingColor:))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn setDimmingColor(&self, dimming_color: Option<&UIColor>);
84
85        #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
86        /// Visual effect to apply to the content behind the zoomed in view. Defaults to nil.
87        #[unsafe(method(dimmingVisualEffect))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn dimmingVisualEffect(
90            &self,
91            mtm: MainThreadMarker,
92        ) -> Option<Retained<UIBlurEffect>>;
93
94        #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
95        /// Setter for [`dimmingVisualEffect`][Self::dimmingVisualEffect].
96        #[unsafe(method(setDimmingVisualEffect:))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn setDimmingVisualEffect(&self, dimming_visual_effect: Option<&UIBlurEffect>);
99    );
100}
101
102/// Methods declared on superclass `NSObject`.
103impl UIZoomTransitionOptions {
104    extern_methods!(
105        #[unsafe(method(init))]
106        #[unsafe(method_family = init)]
107        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
108
109        #[unsafe(method(new))]
110        #[unsafe(method_family = new)]
111        pub unsafe fn new() -> Retained<Self>;
112    );
113}
114
115extern_class!(
116    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uizoomtransitioninteractioncontext?language=objc)
117    #[unsafe(super(NSObject))]
118    #[derive(Debug, PartialEq, Eq, Hash)]
119    pub struct UIZoomTransitionInteractionContext;
120);
121
122extern_conformance!(
123    unsafe impl NSObjectProtocol for UIZoomTransitionInteractionContext {}
124);
125
126impl UIZoomTransitionInteractionContext {
127    extern_methods!(
128        #[cfg(feature = "objc2-core-foundation")]
129        /// Location of the interaction in the displayed view controller's view's coordinate space.
130        #[unsafe(method(location))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn location(&self) -> CGPoint;
133
134        #[cfg(feature = "objc2-core-foundation")]
135        /// The interaction's velocity.
136        #[unsafe(method(velocity))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn velocity(&self) -> CGVector;
139
140        /// Whether the interaction would begin under the current conditions by default.
141        #[unsafe(method(willBegin))]
142        #[unsafe(method_family = none)]
143        pub unsafe fn willBegin(&self) -> bool;
144    );
145}
146
147/// Methods declared on superclass `NSObject`.
148impl UIZoomTransitionInteractionContext {
149    extern_methods!(
150        #[unsafe(method(init))]
151        #[unsafe(method_family = init)]
152        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
153
154        #[unsafe(method(new))]
155        #[unsafe(method_family = new)]
156        pub unsafe fn new() -> Retained<Self>;
157    );
158}
159
160extern_class!(
161    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uizoomtransitionalignmentrectcontext?language=objc)
162    #[unsafe(super(NSObject))]
163    #[derive(Debug, PartialEq, Eq, Hash)]
164    pub struct UIZoomTransitionAlignmentRectContext;
165);
166
167extern_conformance!(
168    unsafe impl NSObjectProtocol for UIZoomTransitionAlignmentRectContext {}
169);
170
171impl UIZoomTransitionAlignmentRectContext {
172    extern_methods!(
173        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
174        /// The transition's source view.
175        #[unsafe(method(sourceView))]
176        #[unsafe(method_family = none)]
177        pub unsafe fn sourceView(&self, mtm: MainThreadMarker) -> Retained<UIView>;
178
179        #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
180        /// The zoomed view controller.
181        #[unsafe(method(zoomedViewController))]
182        #[unsafe(method_family = none)]
183        pub unsafe fn zoomedViewController(
184            &self,
185            mtm: MainThreadMarker,
186        ) -> Retained<UIViewController>;
187    );
188}
189
190/// Methods declared on superclass `NSObject`.
191impl UIZoomTransitionAlignmentRectContext {
192    extern_methods!(
193        #[unsafe(method(init))]
194        #[unsafe(method_family = init)]
195        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
196
197        #[unsafe(method(new))]
198        #[unsafe(method_family = new)]
199        pub unsafe fn new() -> Retained<Self>;
200    );
201}