objc2_ui_kit/generated/
UILargeContentViewer.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_protocol!(
13 pub unsafe trait UILargeContentViewerItem: NSObjectProtocol + MainThreadOnly {
15 #[unsafe(method(showsLargeContentViewer))]
19 #[unsafe(method_family = none)]
20 fn showsLargeContentViewer(&self) -> bool;
21
22 #[unsafe(method(largeContentTitle))]
24 #[unsafe(method_family = none)]
25 fn largeContentTitle(&self) -> Option<Retained<NSString>>;
26
27 #[cfg(feature = "UIImage")]
28 #[unsafe(method(largeContentImage))]
30 #[unsafe(method_family = none)]
31 fn largeContentImage(&self) -> Option<Retained<UIImage>>;
32
33 #[unsafe(method(scalesLargeContentImage))]
37 #[unsafe(method_family = none)]
38 fn scalesLargeContentImage(&self) -> bool;
39
40 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
41 #[unsafe(method(largeContentImageInsets))]
43 #[unsafe(method_family = none)]
44 fn largeContentImageInsets(&self) -> UIEdgeInsets;
45 }
46);
47
48#[cfg(all(feature = "UIResponder", feature = "UIView"))]
50impl UIView {
51 extern_methods!(
52 #[unsafe(method(showsLargeContentViewer))]
53 #[unsafe(method_family = none)]
54 pub fn showsLargeContentViewer(&self) -> bool;
55
56 #[unsafe(method(setShowsLargeContentViewer:))]
58 #[unsafe(method_family = none)]
59 pub fn setShowsLargeContentViewer(&self, shows_large_content_viewer: bool);
60
61 #[unsafe(method(largeContentTitle))]
62 #[unsafe(method_family = none)]
63 pub fn largeContentTitle(&self) -> Option<Retained<NSString>>;
64
65 #[unsafe(method(setLargeContentTitle:))]
69 #[unsafe(method_family = none)]
70 pub fn setLargeContentTitle(&self, large_content_title: Option<&NSString>);
71
72 #[cfg(feature = "UIImage")]
73 #[unsafe(method(largeContentImage))]
74 #[unsafe(method_family = none)]
75 pub fn largeContentImage(&self) -> Option<Retained<UIImage>>;
76
77 #[cfg(feature = "UIImage")]
78 #[unsafe(method(setLargeContentImage:))]
80 #[unsafe(method_family = none)]
81 pub fn setLargeContentImage(&self, large_content_image: Option<&UIImage>);
82
83 #[unsafe(method(scalesLargeContentImage))]
84 #[unsafe(method_family = none)]
85 pub fn scalesLargeContentImage(&self) -> bool;
86
87 #[unsafe(method(setScalesLargeContentImage:))]
89 #[unsafe(method_family = none)]
90 pub fn setScalesLargeContentImage(&self, scales_large_content_image: bool);
91
92 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
93 #[unsafe(method(largeContentImageInsets))]
94 #[unsafe(method_family = none)]
95 pub fn largeContentImageInsets(&self) -> UIEdgeInsets;
96
97 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
98 #[unsafe(method(setLargeContentImageInsets:))]
100 #[unsafe(method_family = none)]
101 pub fn setLargeContentImageInsets(&self, large_content_image_insets: UIEdgeInsets);
102 );
103}
104
105#[cfg(all(feature = "UIResponder", feature = "UIView"))]
106extern_conformance!(
107 unsafe impl UILargeContentViewerItem for UIView {}
108);
109
110extern_class!(
111 #[unsafe(super(NSObject))]
118 #[thread_kind = MainThreadOnly]
119 #[derive(Debug, PartialEq, Eq, Hash)]
120 pub struct UILargeContentViewerInteraction;
121);
122
123extern_conformance!(
124 unsafe impl NSObjectProtocol for UILargeContentViewerInteraction {}
125);
126
127#[cfg(feature = "UIInteraction")]
128extern_conformance!(
129 unsafe impl UIInteraction for UILargeContentViewerInteraction {}
130);
131
132impl UILargeContentViewerInteraction {
133 extern_methods!(
134 #[unsafe(method(initWithDelegate:))]
135 #[unsafe(method_family = init)]
136 pub fn initWithDelegate(
137 this: Allocated<Self>,
138 delegate: Option<&ProtocolObject<dyn UILargeContentViewerInteractionDelegate>>,
139 ) -> Retained<Self>;
140
141 #[unsafe(method(delegate))]
142 #[unsafe(method_family = none)]
143 pub fn delegate(
144 &self,
145 ) -> Option<Retained<ProtocolObject<dyn UILargeContentViewerInteractionDelegate>>>;
146
147 #[cfg(feature = "UIGestureRecognizer")]
148 #[unsafe(method(gestureRecognizerForExclusionRelationship))]
150 #[unsafe(method_family = none)]
151 pub fn gestureRecognizerForExclusionRelationship(&self) -> Retained<UIGestureRecognizer>;
152
153 #[unsafe(method(isEnabled))]
159 #[unsafe(method_family = none)]
160 pub fn isEnabled(mtm: MainThreadMarker) -> bool;
161 );
162}
163
164impl UILargeContentViewerInteraction {
166 extern_methods!(
167 #[unsafe(method(init))]
168 #[unsafe(method_family = init)]
169 pub fn init(this: Allocated<Self>) -> Retained<Self>;
170
171 #[unsafe(method(new))]
172 #[unsafe(method_family = new)]
173 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
174 );
175}
176
177extern_protocol!(
178 pub unsafe trait UILargeContentViewerInteractionDelegate:
180 NSObjectProtocol + MainThreadOnly
181 {
182 #[cfg(feature = "objc2-core-foundation")]
183 #[optional]
189 #[unsafe(method(largeContentViewerInteraction:didEndOnItem:atPoint:))]
190 #[unsafe(method_family = none)]
191 fn largeContentViewerInteraction_didEndOnItem_atPoint(
192 &self,
193 interaction: &UILargeContentViewerInteraction,
194 item: Option<&ProtocolObject<dyn UILargeContentViewerItem>>,
195 point: CGPoint,
196 );
197
198 #[cfg(feature = "objc2-core-foundation")]
199 #[optional]
202 #[unsafe(method(largeContentViewerInteraction:itemAtPoint:))]
203 #[unsafe(method_family = none)]
204 fn largeContentViewerInteraction_itemAtPoint(
205 &self,
206 interaction: &UILargeContentViewerInteraction,
207 point: CGPoint,
208 ) -> Option<Retained<ProtocolObject<dyn UILargeContentViewerItem>>>;
209
210 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
211 #[optional]
214 #[unsafe(method(viewControllerForLargeContentViewerInteraction:))]
215 #[unsafe(method_family = none)]
216 fn viewControllerForLargeContentViewerInteraction(
217 &self,
218 interaction: &UILargeContentViewerInteraction,
219 ) -> Retained<UIViewController>;
220 }
221);
222
223extern "C" {
224 pub static UILargeContentViewerInteractionEnabledStatusDidChangeNotification:
228 &'static NSNotificationName;
229}