objc2_map_kit/generated/
MKLookAroundViewController.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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/// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mklookaroundbadgeposition?language=objc)
14// NS_ENUM
15#[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    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mklookaroundviewcontroller?language=objc)
37    #[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")]
46unsafe impl NSCoding for MKLookAroundViewController {}
47
48#[cfg(feature = "objc2-app-kit")]
49#[cfg(target_os = "macos")]
50unsafe impl NSEditor for MKLookAroundViewController {}
51
52#[cfg(feature = "objc2-app-kit")]
53#[cfg(target_os = "macos")]
54unsafe impl NSObjectProtocol for MKLookAroundViewController {}
55
56#[cfg(feature = "objc2-app-kit")]
57#[cfg(target_os = "macos")]
58unsafe impl NSSecureCoding for MKLookAroundViewController {}
59
60#[cfg(feature = "objc2-app-kit")]
61#[cfg(target_os = "macos")]
62unsafe impl NSSeguePerforming for MKLookAroundViewController {}
63
64#[cfg(feature = "objc2-app-kit")]
65#[cfg(target_os = "macos")]
66unsafe impl NSUserInterfaceItemIdentification for MKLookAroundViewController {}
67
68#[cfg(feature = "objc2-app-kit")]
69#[cfg(target_os = "macos")]
70impl MKLookAroundViewController {
71    extern_methods!(
72        #[cfg(feature = "MKLookAroundScene")]
73        #[unsafe(method(initWithScene:))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn initWithScene(
76            this: Allocated<Self>,
77            scene: &MKLookAroundScene,
78        ) -> Retained<Self>;
79
80        #[unsafe(method(initWithNibName:bundle:))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn initWithNibName_bundle(
83            this: Allocated<Self>,
84            nib_name_or_nil: Option<&NSString>,
85            nib_bundle_or_nil: Option<&NSBundle>,
86        ) -> Retained<Self>;
87
88        #[unsafe(method(initWithCoder:))]
89        #[unsafe(method_family = init)]
90        pub unsafe fn initWithCoder(
91            this: Allocated<Self>,
92            coder: &NSCoder,
93        ) -> Option<Retained<Self>>;
94
95        #[unsafe(method(delegate))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn delegate(
98            &self,
99        ) -> Option<Retained<ProtocolObject<dyn MKLookAroundViewControllerDelegate>>>;
100
101        /// This is a [weak property][objc2::topics::weak_property].
102        /// Setter for [`delegate`][Self::delegate].
103        #[unsafe(method(setDelegate:))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn setDelegate(
106            &self,
107            delegate: Option<&ProtocolObject<dyn MKLookAroundViewControllerDelegate>>,
108        );
109
110        #[cfg(feature = "MKLookAroundScene")]
111        #[unsafe(method(scene))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn scene(&self) -> Option<Retained<MKLookAroundScene>>;
114
115        #[cfg(feature = "MKLookAroundScene")]
116        /// Setter for [`scene`][Self::scene].
117        #[unsafe(method(setScene:))]
118        #[unsafe(method_family = none)]
119        pub unsafe fn setScene(&self, scene: Option<&MKLookAroundScene>);
120
121        #[unsafe(method(isNavigationEnabled))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn isNavigationEnabled(&self) -> bool;
124
125        /// Setter for [`isNavigationEnabled`][Self::isNavigationEnabled].
126        #[unsafe(method(setNavigationEnabled:))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn setNavigationEnabled(&self, navigation_enabled: bool);
129
130        #[unsafe(method(showsRoadLabels))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn showsRoadLabels(&self) -> bool;
133
134        /// Setter for [`showsRoadLabels`][Self::showsRoadLabels].
135        #[unsafe(method(setShowsRoadLabels:))]
136        #[unsafe(method_family = none)]
137        pub unsafe fn setShowsRoadLabels(&self, shows_road_labels: bool);
138
139        #[cfg(feature = "MKPointOfInterestFilter")]
140        #[unsafe(method(pointOfInterestFilter))]
141        #[unsafe(method_family = none)]
142        pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;
143
144        #[cfg(feature = "MKPointOfInterestFilter")]
145        /// Setter for [`pointOfInterestFilter`][Self::pointOfInterestFilter].
146        #[unsafe(method(setPointOfInterestFilter:))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn setPointOfInterestFilter(
149            &self,
150            point_of_interest_filter: Option<&MKPointOfInterestFilter>,
151        );
152
153        #[unsafe(method(badgePosition))]
154        #[unsafe(method_family = none)]
155        pub unsafe fn badgePosition(&self) -> MKLookAroundBadgePosition;
156
157        /// Setter for [`badgePosition`][Self::badgePosition].
158        #[unsafe(method(setBadgePosition:))]
159        #[unsafe(method_family = none)]
160        pub unsafe fn setBadgePosition(&self, badge_position: MKLookAroundBadgePosition);
161    );
162}
163
164/// Methods declared on superclass `NSResponder`.
165#[cfg(feature = "objc2-app-kit")]
166#[cfg(target_os = "macos")]
167impl MKLookAroundViewController {
168    extern_methods!(
169        #[unsafe(method(init))]
170        #[unsafe(method_family = init)]
171        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
172    );
173}
174
175/// Methods declared on superclass `NSObject`.
176#[cfg(feature = "objc2-app-kit")]
177#[cfg(target_os = "macos")]
178impl MKLookAroundViewController {
179    extern_methods!(
180        #[unsafe(method(new))]
181        #[unsafe(method_family = new)]
182        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
183    );
184}
185
186extern_protocol!(
187    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mklookaroundviewcontrollerdelegate?language=objc)
188    pub unsafe trait MKLookAroundViewControllerDelegate: NSObjectProtocol {
189        #[cfg(feature = "objc2-app-kit")]
190        #[cfg(target_os = "macos")]
191        #[optional]
192        #[unsafe(method(lookAroundViewControllerWillUpdateScene:))]
193        #[unsafe(method_family = none)]
194        unsafe fn lookAroundViewControllerWillUpdateScene(
195            &self,
196            view_controller: &MKLookAroundViewController,
197        );
198
199        #[cfg(feature = "objc2-app-kit")]
200        #[cfg(target_os = "macos")]
201        #[optional]
202        #[unsafe(method(lookAroundViewControllerDidUpdateScene:))]
203        #[unsafe(method_family = none)]
204        unsafe fn lookAroundViewControllerDidUpdateScene(
205            &self,
206            view_controller: &MKLookAroundViewController,
207        );
208
209        #[cfg(feature = "objc2-app-kit")]
210        #[cfg(target_os = "macos")]
211        #[optional]
212        #[unsafe(method(lookAroundViewControllerWillPresentFullScreen:))]
213        #[unsafe(method_family = none)]
214        unsafe fn lookAroundViewControllerWillPresentFullScreen(
215            &self,
216            view_controller: &MKLookAroundViewController,
217        );
218
219        #[cfg(feature = "objc2-app-kit")]
220        #[cfg(target_os = "macos")]
221        #[optional]
222        #[unsafe(method(lookAroundViewControllerDidPresentFullScreen:))]
223        #[unsafe(method_family = none)]
224        unsafe fn lookAroundViewControllerDidPresentFullScreen(
225            &self,
226            view_controller: &MKLookAroundViewController,
227        );
228
229        #[cfg(feature = "objc2-app-kit")]
230        #[cfg(target_os = "macos")]
231        #[optional]
232        #[unsafe(method(lookAroundViewControllerWillDismissFullScreen:))]
233        #[unsafe(method_family = none)]
234        unsafe fn lookAroundViewControllerWillDismissFullScreen(
235            &self,
236            view_controller: &MKLookAroundViewController,
237        );
238
239        #[cfg(feature = "objc2-app-kit")]
240        #[cfg(target_os = "macos")]
241        #[optional]
242        #[unsafe(method(lookAroundViewControllerDidDismissFullScreen:))]
243        #[unsafe(method_family = none)]
244        unsafe fn lookAroundViewControllerDidDismissFullScreen(
245            &self,
246            view_controller: &MKLookAroundViewController,
247        );
248    }
249);