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:))]
101 #[unsafe(method_family = init)]
102 pub unsafe fn initWithCoder(
103 this: Allocated<Self>,
104 coder: &NSCoder,
105 ) -> Option<Retained<Self>>;
106
107 #[unsafe(method(delegate))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn delegate(
110 &self,
111 ) -> Option<Retained<ProtocolObject<dyn MKLookAroundViewControllerDelegate>>>;
112
113 #[unsafe(method(setDelegate:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setDelegate(
118 &self,
119 delegate: Option<&ProtocolObject<dyn MKLookAroundViewControllerDelegate>>,
120 );
121
122 #[cfg(feature = "MKLookAroundScene")]
123 #[unsafe(method(scene))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn scene(&self) -> Option<Retained<MKLookAroundScene>>;
126
127 #[cfg(feature = "MKLookAroundScene")]
128 #[unsafe(method(setScene:))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn setScene(&self, scene: Option<&MKLookAroundScene>);
132
133 #[unsafe(method(isNavigationEnabled))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn isNavigationEnabled(&self) -> bool;
136
137 #[unsafe(method(setNavigationEnabled:))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn setNavigationEnabled(&self, navigation_enabled: bool);
141
142 #[unsafe(method(showsRoadLabels))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn showsRoadLabels(&self) -> bool;
145
146 #[unsafe(method(setShowsRoadLabels:))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn setShowsRoadLabels(&self, shows_road_labels: bool);
150
151 #[cfg(feature = "MKPointOfInterestFilter")]
152 #[unsafe(method(pointOfInterestFilter))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;
155
156 #[cfg(feature = "MKPointOfInterestFilter")]
157 #[unsafe(method(setPointOfInterestFilter:))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn setPointOfInterestFilter(
161 &self,
162 point_of_interest_filter: Option<&MKPointOfInterestFilter>,
163 );
164
165 #[unsafe(method(badgePosition))]
166 #[unsafe(method_family = none)]
167 pub unsafe fn badgePosition(&self) -> MKLookAroundBadgePosition;
168
169 #[unsafe(method(setBadgePosition:))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn setBadgePosition(&self, badge_position: MKLookAroundBadgePosition);
173 );
174}
175
176#[cfg(feature = "objc2-app-kit")]
178#[cfg(target_os = "macos")]
179impl MKLookAroundViewController {
180 extern_methods!(
181 #[unsafe(method(init))]
182 #[unsafe(method_family = init)]
183 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
184 );
185}
186
187#[cfg(feature = "objc2-app-kit")]
189#[cfg(target_os = "macos")]
190impl MKLookAroundViewController {
191 extern_methods!(
192 #[unsafe(method(new))]
193 #[unsafe(method_family = new)]
194 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
195 );
196}
197
198extern_protocol!(
199 pub unsafe trait MKLookAroundViewControllerDelegate: NSObjectProtocol {
201 #[cfg(feature = "objc2-app-kit")]
202 #[cfg(target_os = "macos")]
203 #[optional]
204 #[unsafe(method(lookAroundViewControllerWillUpdateScene:))]
205 #[unsafe(method_family = none)]
206 unsafe fn lookAroundViewControllerWillUpdateScene(
207 &self,
208 view_controller: &MKLookAroundViewController,
209 );
210
211 #[cfg(feature = "objc2-app-kit")]
212 #[cfg(target_os = "macos")]
213 #[optional]
214 #[unsafe(method(lookAroundViewControllerDidUpdateScene:))]
215 #[unsafe(method_family = none)]
216 unsafe fn lookAroundViewControllerDidUpdateScene(
217 &self,
218 view_controller: &MKLookAroundViewController,
219 );
220
221 #[cfg(feature = "objc2-app-kit")]
222 #[cfg(target_os = "macos")]
223 #[optional]
224 #[unsafe(method(lookAroundViewControllerWillPresentFullScreen:))]
225 #[unsafe(method_family = none)]
226 unsafe fn lookAroundViewControllerWillPresentFullScreen(
227 &self,
228 view_controller: &MKLookAroundViewController,
229 );
230
231 #[cfg(feature = "objc2-app-kit")]
232 #[cfg(target_os = "macos")]
233 #[optional]
234 #[unsafe(method(lookAroundViewControllerDidPresentFullScreen:))]
235 #[unsafe(method_family = none)]
236 unsafe fn lookAroundViewControllerDidPresentFullScreen(
237 &self,
238 view_controller: &MKLookAroundViewController,
239 );
240
241 #[cfg(feature = "objc2-app-kit")]
242 #[cfg(target_os = "macos")]
243 #[optional]
244 #[unsafe(method(lookAroundViewControllerWillDismissFullScreen:))]
245 #[unsafe(method_family = none)]
246 unsafe fn lookAroundViewControllerWillDismissFullScreen(
247 &self,
248 view_controller: &MKLookAroundViewController,
249 );
250
251 #[cfg(feature = "objc2-app-kit")]
252 #[cfg(target_os = "macos")]
253 #[optional]
254 #[unsafe(method(lookAroundViewControllerDidDismissFullScreen:))]
255 #[unsafe(method_family = none)]
256 unsafe fn lookAroundViewControllerDidDismissFullScreen(
257 &self,
258 view_controller: &MKLookAroundViewController,
259 );
260 }
261);