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 unsafe fn showsLargeContentViewer(&self) -> bool;
21
22 #[unsafe(method(largeContentTitle))]
24 #[unsafe(method_family = none)]
25 unsafe fn largeContentTitle(&self) -> Option<Retained<NSString>>;
26
27 #[cfg(feature = "UIImage")]
28 #[unsafe(method(largeContentImage))]
30 #[unsafe(method_family = none)]
31 unsafe fn largeContentImage(&self) -> Option<Retained<UIImage>>;
32
33 #[unsafe(method(scalesLargeContentImage))]
37 #[unsafe(method_family = none)]
38 unsafe fn scalesLargeContentImage(&self) -> bool;
39
40 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
41 #[unsafe(method(largeContentImageInsets))]
43 #[unsafe(method_family = none)]
44 unsafe 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 unsafe fn showsLargeContentViewer(&self) -> bool;
55
56 #[unsafe(method(setShowsLargeContentViewer:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn setShowsLargeContentViewer(&self, shows_large_content_viewer: bool);
60
61 #[unsafe(method(largeContentTitle))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn largeContentTitle(&self) -> Option<Retained<NSString>>;
64
65 #[unsafe(method(setLargeContentTitle:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn setLargeContentTitle(&self, large_content_title: Option<&NSString>);
69
70 #[cfg(feature = "UIImage")]
71 #[unsafe(method(largeContentImage))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn largeContentImage(&self) -> Option<Retained<UIImage>>;
74
75 #[cfg(feature = "UIImage")]
76 #[unsafe(method(setLargeContentImage:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn setLargeContentImage(&self, large_content_image: Option<&UIImage>);
80
81 #[unsafe(method(scalesLargeContentImage))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn scalesLargeContentImage(&self) -> bool;
84
85 #[unsafe(method(setScalesLargeContentImage:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn setScalesLargeContentImage(&self, scales_large_content_image: bool);
89
90 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
91 #[unsafe(method(largeContentImageInsets))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn largeContentImageInsets(&self) -> UIEdgeInsets;
94
95 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
96 #[unsafe(method(setLargeContentImageInsets:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn setLargeContentImageInsets(&self, large_content_image_insets: UIEdgeInsets);
100 );
101}
102
103#[cfg(all(feature = "UIResponder", feature = "UIView"))]
104extern_conformance!(
105 unsafe impl UILargeContentViewerItem for UIView {}
106);
107
108extern_class!(
109 #[unsafe(super(NSObject))]
116 #[thread_kind = MainThreadOnly]
117 #[derive(Debug, PartialEq, Eq, Hash)]
118 pub struct UILargeContentViewerInteraction;
119);
120
121extern_conformance!(
122 unsafe impl NSObjectProtocol for UILargeContentViewerInteraction {}
123);
124
125#[cfg(feature = "UIInteraction")]
126extern_conformance!(
127 unsafe impl UIInteraction for UILargeContentViewerInteraction {}
128);
129
130impl UILargeContentViewerInteraction {
131 extern_methods!(
132 #[unsafe(method(initWithDelegate:))]
133 #[unsafe(method_family = init)]
134 pub unsafe fn initWithDelegate(
135 this: Allocated<Self>,
136 delegate: Option<&ProtocolObject<dyn UILargeContentViewerInteractionDelegate>>,
137 ) -> Retained<Self>;
138
139 #[unsafe(method(delegate))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn delegate(
142 &self,
143 ) -> Option<Retained<ProtocolObject<dyn UILargeContentViewerInteractionDelegate>>>;
144
145 #[cfg(feature = "UIGestureRecognizer")]
146 #[unsafe(method(gestureRecognizerForExclusionRelationship))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn gestureRecognizerForExclusionRelationship(
150 &self,
151 ) -> Retained<UIGestureRecognizer>;
152
153 #[unsafe(method(isEnabled))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn isEnabled(mtm: MainThreadMarker) -> bool;
161 );
162}
163
164impl UILargeContentViewerInteraction {
166 extern_methods!(
167 #[unsafe(method(init))]
168 #[unsafe(method_family = init)]
169 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
170
171 #[unsafe(method(new))]
172 #[unsafe(method_family = new)]
173 pub unsafe 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 unsafe 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 unsafe 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 unsafe fn viewControllerForLargeContentViewerInteraction(
217 &self,
218 interaction: &UILargeContentViewerInteraction,
219 ) -> Retained<UIViewController>;
220 }
221);
222
223extern "C" {
224 pub static UILargeContentViewerInteractionEnabledStatusDidChangeNotification:
228 &'static NSNotificationName;
229}