objc2_map_kit/generated/
MKLookAroundViewController.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct MKLookAroundBadgePosition(pub NSInteger);
18impl MKLookAroundBadgePosition {
19 #[doc(alias = "MKLookAroundBadgePositionTopLeading")]
20 pub const TopLeading: Self = Self(0);
21 #[doc(alias = "MKLookAroundBadgePositionTopTrailing")]
22 pub const TopTrailing: Self = Self(1);
23 #[doc(alias = "MKLookAroundBadgePositionBottomTrailing")]
24 pub const BottomTrailing: Self = Self(2);
25}
26
27unsafe impl Encode for MKLookAroundBadgePosition {
28 const ENCODING: Encoding = NSInteger::ENCODING;
29}
30
31unsafe impl RefEncode for MKLookAroundBadgePosition {
32 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
33}
34
35extern_class!(
36 #[unsafe(super(NSViewController, NSResponder, NSObject))]
38 #[derive(Debug, PartialEq, Eq, Hash)]
39 #[cfg(feature = "objc2-app-kit")]
40 #[cfg(target_os = "macos")]
41 pub struct MKLookAroundViewController;
42);
43
44#[cfg(feature = "objc2-app-kit")]
45#[cfg(target_os = "macos")]
46extern_conformance!(
47 unsafe impl NSCoding for MKLookAroundViewController {}
48);
49
50#[cfg(feature = "objc2-app-kit")]
51#[cfg(target_os = "macos")]
52extern_conformance!(
53 unsafe impl NSEditor for MKLookAroundViewController {}
54);
55
56#[cfg(feature = "objc2-app-kit")]
57#[cfg(target_os = "macos")]
58extern_conformance!(
59 unsafe impl NSObjectProtocol for MKLookAroundViewController {}
60);
61
62#[cfg(feature = "objc2-app-kit")]
63#[cfg(target_os = "macos")]
64extern_conformance!(
65 unsafe impl NSSecureCoding for MKLookAroundViewController {}
66);
67
68#[cfg(feature = "objc2-app-kit")]
69#[cfg(target_os = "macos")]
70extern_conformance!(
71 unsafe impl NSSeguePerforming for MKLookAroundViewController {}
72);
73
74#[cfg(feature = "objc2-app-kit")]
75#[cfg(target_os = "macos")]
76extern_conformance!(
77 unsafe impl NSUserInterfaceItemIdentification for MKLookAroundViewController {}
78);
79
80#[cfg(feature = "objc2-app-kit")]
81#[cfg(target_os = "macos")]
82impl MKLookAroundViewController {
83 extern_methods!(
84 #[cfg(feature = "MKLookAroundScene")]
85 #[unsafe(method(initWithScene:))]
86 #[unsafe(method_family = init)]
87 pub unsafe fn initWithScene(
88 this: Allocated<Self>,
89 scene: &MKLookAroundScene,
90 ) -> Retained<Self>;
91
92 #[unsafe(method(initWithNibName:bundle:))]
93 #[unsafe(method_family = init)]
94 pub unsafe fn initWithNibName_bundle(
95 this: Allocated<Self>,
96 nib_name_or_nil: Option<&NSString>,
97 nib_bundle_or_nil: Option<&NSBundle>,
98 ) -> Retained<Self>;
99
100 #[unsafe(method(initWithCoder:))]
104 #[unsafe(method_family = init)]
105 pub unsafe fn initWithCoder(
106 this: Allocated<Self>,
107 coder: &NSCoder,
108 ) -> Option<Retained<Self>>;
109
110 #[unsafe(method(delegate))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn delegate(
113 &self,
114 ) -> Option<Retained<ProtocolObject<dyn MKLookAroundViewControllerDelegate>>>;
115
116 #[unsafe(method(setDelegate:))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn setDelegate(
122 &self,
123 delegate: Option<&ProtocolObject<dyn MKLookAroundViewControllerDelegate>>,
124 );
125
126 #[cfg(feature = "MKLookAroundScene")]
127 #[unsafe(method(scene))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn scene(&self) -> Option<Retained<MKLookAroundScene>>;
130
131 #[cfg(feature = "MKLookAroundScene")]
132 #[unsafe(method(setScene:))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn setScene(&self, scene: Option<&MKLookAroundScene>);
138
139 #[unsafe(method(isNavigationEnabled))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn isNavigationEnabled(&self) -> bool;
142
143 #[unsafe(method(setNavigationEnabled:))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn setNavigationEnabled(&self, navigation_enabled: bool);
147
148 #[unsafe(method(showsRoadLabels))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn showsRoadLabels(&self) -> bool;
151
152 #[unsafe(method(setShowsRoadLabels:))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn setShowsRoadLabels(&self, shows_road_labels: bool);
156
157 #[cfg(feature = "MKPointOfInterestFilter")]
158 #[unsafe(method(pointOfInterestFilter))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;
161
162 #[cfg(feature = "MKPointOfInterestFilter")]
163 #[unsafe(method(setPointOfInterestFilter:))]
167 #[unsafe(method_family = none)]
168 pub unsafe fn setPointOfInterestFilter(
169 &self,
170 point_of_interest_filter: Option<&MKPointOfInterestFilter>,
171 );
172
173 #[unsafe(method(badgePosition))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn badgePosition(&self) -> MKLookAroundBadgePosition;
176
177 #[unsafe(method(setBadgePosition:))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn setBadgePosition(&self, badge_position: MKLookAroundBadgePosition);
181 );
182}
183
184#[cfg(feature = "objc2-app-kit")]
186#[cfg(target_os = "macos")]
187impl MKLookAroundViewController {
188 extern_methods!(
189 #[unsafe(method(init))]
190 #[unsafe(method_family = init)]
191 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
192 );
193}
194
195#[cfg(feature = "objc2-app-kit")]
197#[cfg(target_os = "macos")]
198impl MKLookAroundViewController {
199 extern_methods!(
200 #[unsafe(method(new))]
201 #[unsafe(method_family = new)]
202 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
203 );
204}
205
206extern_protocol!(
207 pub unsafe trait MKLookAroundViewControllerDelegate: NSObjectProtocol {
209 #[cfg(feature = "objc2-app-kit")]
210 #[cfg(target_os = "macos")]
211 #[optional]
212 #[unsafe(method(lookAroundViewControllerWillUpdateScene:))]
213 #[unsafe(method_family = none)]
214 unsafe fn lookAroundViewControllerWillUpdateScene(
215 &self,
216 view_controller: &MKLookAroundViewController,
217 );
218
219 #[cfg(feature = "objc2-app-kit")]
220 #[cfg(target_os = "macos")]
221 #[optional]
222 #[unsafe(method(lookAroundViewControllerDidUpdateScene:))]
223 #[unsafe(method_family = none)]
224 unsafe fn lookAroundViewControllerDidUpdateScene(
225 &self,
226 view_controller: &MKLookAroundViewController,
227 );
228
229 #[cfg(feature = "objc2-app-kit")]
230 #[cfg(target_os = "macos")]
231 #[optional]
232 #[unsafe(method(lookAroundViewControllerWillPresentFullScreen:))]
233 #[unsafe(method_family = none)]
234 unsafe fn lookAroundViewControllerWillPresentFullScreen(
235 &self,
236 view_controller: &MKLookAroundViewController,
237 );
238
239 #[cfg(feature = "objc2-app-kit")]
240 #[cfg(target_os = "macos")]
241 #[optional]
242 #[unsafe(method(lookAroundViewControllerDidPresentFullScreen:))]
243 #[unsafe(method_family = none)]
244 unsafe fn lookAroundViewControllerDidPresentFullScreen(
245 &self,
246 view_controller: &MKLookAroundViewController,
247 );
248
249 #[cfg(feature = "objc2-app-kit")]
250 #[cfg(target_os = "macos")]
251 #[optional]
252 #[unsafe(method(lookAroundViewControllerWillDismissFullScreen:))]
253 #[unsafe(method_family = none)]
254 unsafe fn lookAroundViewControllerWillDismissFullScreen(
255 &self,
256 view_controller: &MKLookAroundViewController,
257 );
258
259 #[cfg(feature = "objc2-app-kit")]
260 #[cfg(target_os = "macos")]
261 #[optional]
262 #[unsafe(method(lookAroundViewControllerDidDismissFullScreen:))]
263 #[unsafe(method_family = none)]
264 unsafe fn lookAroundViewControllerDidDismissFullScreen(
265 &self,
266 view_controller: &MKLookAroundViewController,
267 );
268 }
269);