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"))]
104unsafe impl UILargeContentViewerItem for UIView {}
105
106extern_class!(
107 #[unsafe(super(NSObject))]
114 #[thread_kind = MainThreadOnly]
115 #[derive(Debug, PartialEq, Eq, Hash)]
116 pub struct UILargeContentViewerInteraction;
117);
118
119unsafe impl NSObjectProtocol for UILargeContentViewerInteraction {}
120
121#[cfg(feature = "UIInteraction")]
122unsafe impl UIInteraction for UILargeContentViewerInteraction {}
123
124impl UILargeContentViewerInteraction {
125 extern_methods!(
126 #[unsafe(method(initWithDelegate:))]
127 #[unsafe(method_family = init)]
128 pub unsafe fn initWithDelegate(
129 this: Allocated<Self>,
130 delegate: Option<&ProtocolObject<dyn UILargeContentViewerInteractionDelegate>>,
131 ) -> Retained<Self>;
132
133 #[unsafe(method(delegate))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn delegate(
136 &self,
137 ) -> Option<Retained<ProtocolObject<dyn UILargeContentViewerInteractionDelegate>>>;
138
139 #[cfg(feature = "UIGestureRecognizer")]
140 #[unsafe(method(gestureRecognizerForExclusionRelationship))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn gestureRecognizerForExclusionRelationship(
144 &self,
145 ) -> Retained<UIGestureRecognizer>;
146
147 #[unsafe(method(isEnabled))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn isEnabled(mtm: MainThreadMarker) -> bool;
155 );
156}
157
158impl UILargeContentViewerInteraction {
160 extern_methods!(
161 #[unsafe(method(init))]
162 #[unsafe(method_family = init)]
163 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
164
165 #[unsafe(method(new))]
166 #[unsafe(method_family = new)]
167 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
168 );
169}
170
171extern_protocol!(
172 pub unsafe trait UILargeContentViewerInteractionDelegate:
174 NSObjectProtocol + MainThreadOnly
175 {
176 #[cfg(feature = "objc2-core-foundation")]
177 #[optional]
183 #[unsafe(method(largeContentViewerInteraction:didEndOnItem:atPoint:))]
184 #[unsafe(method_family = none)]
185 unsafe fn largeContentViewerInteraction_didEndOnItem_atPoint(
186 &self,
187 interaction: &UILargeContentViewerInteraction,
188 item: Option<&ProtocolObject<dyn UILargeContentViewerItem>>,
189 point: CGPoint,
190 );
191
192 #[cfg(feature = "objc2-core-foundation")]
193 #[optional]
196 #[unsafe(method(largeContentViewerInteraction:itemAtPoint:))]
197 #[unsafe(method_family = none)]
198 unsafe fn largeContentViewerInteraction_itemAtPoint(
199 &self,
200 interaction: &UILargeContentViewerInteraction,
201 point: CGPoint,
202 ) -> Option<Retained<ProtocolObject<dyn UILargeContentViewerItem>>>;
203
204 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
205 #[optional]
208 #[unsafe(method(viewControllerForLargeContentViewerInteraction:))]
209 #[unsafe(method_family = none)]
210 unsafe fn viewControllerForLargeContentViewerInteraction(
211 &self,
212 interaction: &UILargeContentViewerInteraction,
213 ) -> Retained<UIViewController>;
214 }
215);
216
217extern "C" {
218 pub static UILargeContentViewerInteractionEnabledStatusDidChangeNotification:
222 &'static NSNotificationName;
223}