objc2_map_kit/generated/
MKMapSnapshotOptions.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
13extern_class!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkmapsnapshotoptions?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct MKMapSnapshotOptions;
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for MKMapSnapshotOptions {}
22);
23
24unsafe impl CopyingHelper for MKMapSnapshotOptions {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for MKMapSnapshotOptions {}
30);
31
32impl MKMapSnapshotOptions {
33    extern_methods!(
34        #[cfg(feature = "MKMapConfiguration")]
35        #[unsafe(method(preferredConfiguration))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn preferredConfiguration(&self) -> Retained<MKMapConfiguration>;
38
39        #[cfg(feature = "MKMapConfiguration")]
40        /// Setter for [`preferredConfiguration`][Self::preferredConfiguration].
41        #[unsafe(method(setPreferredConfiguration:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn setPreferredConfiguration(
44            &self,
45            preferred_configuration: &MKMapConfiguration,
46        );
47
48        #[cfg(feature = "MKMapCamera")]
49        #[unsafe(method(camera))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn camera(&self) -> Retained<MKMapCamera>;
52
53        #[cfg(feature = "MKMapCamera")]
54        /// Setter for [`camera`][Self::camera].
55        #[unsafe(method(setCamera:))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn setCamera(&self, camera: &MKMapCamera);
58
59        #[cfg(feature = "MKGeometry")]
60        #[unsafe(method(mapRect))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn mapRect(&self) -> MKMapRect;
63
64        #[cfg(feature = "MKGeometry")]
65        /// Setter for [`mapRect`][Self::mapRect].
66        #[unsafe(method(setMapRect:))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn setMapRect(&self, map_rect: MKMapRect);
69
70        #[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
71        #[unsafe(method(region))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn region(&self) -> MKCoordinateRegion;
74
75        #[cfg(all(feature = "MKGeometry", feature = "objc2-core-location"))]
76        /// Setter for [`region`][Self::region].
77        #[unsafe(method(setRegion:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn setRegion(&self, region: MKCoordinateRegion);
80
81        #[cfg(feature = "MKTypes")]
82        #[deprecated = "Use preferredConfiguration"]
83        #[unsafe(method(mapType))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn mapType(&self) -> MKMapType;
86
87        #[cfg(feature = "MKTypes")]
88        /// Setter for [`mapType`][Self::mapType].
89        #[deprecated = "Use preferredConfiguration"]
90        #[unsafe(method(setMapType:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn setMapType(&self, map_type: MKMapType);
93
94        #[cfg(feature = "MKPointOfInterestFilter")]
95        #[deprecated = "Use preferredConfiguration"]
96        #[unsafe(method(pointOfInterestFilter))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;
99
100        #[cfg(feature = "MKPointOfInterestFilter")]
101        /// Setter for [`pointOfInterestFilter`][Self::pointOfInterestFilter].
102        #[deprecated = "Use preferredConfiguration"]
103        #[unsafe(method(setPointOfInterestFilter:))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn setPointOfInterestFilter(
106            &self,
107            point_of_interest_filter: Option<&MKPointOfInterestFilter>,
108        );
109
110        #[deprecated = "Use preferredConfiguration"]
111        #[unsafe(method(showsPointsOfInterest))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn showsPointsOfInterest(&self) -> bool;
114
115        /// Setter for [`showsPointsOfInterest`][Self::showsPointsOfInterest].
116        #[deprecated = "Use preferredConfiguration"]
117        #[unsafe(method(setShowsPointsOfInterest:))]
118        #[unsafe(method_family = none)]
119        pub unsafe fn setShowsPointsOfInterest(&self, shows_points_of_interest: bool);
120
121        #[deprecated = "No longer supported."]
122        #[unsafe(method(showsBuildings))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn showsBuildings(&self) -> bool;
125
126        /// Setter for [`showsBuildings`][Self::showsBuildings].
127        #[deprecated = "No longer supported."]
128        #[unsafe(method(setShowsBuildings:))]
129        #[unsafe(method_family = none)]
130        pub unsafe fn setShowsBuildings(&self, shows_buildings: bool);
131
132        #[unsafe(method(size))]
133        #[unsafe(method_family = none)]
134        pub unsafe fn size(&self) -> NSSize;
135
136        /// Setter for [`size`][Self::size].
137        #[unsafe(method(setSize:))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn setSize(&self, size: NSSize);
140
141        #[cfg(feature = "objc2-app-kit")]
142        #[cfg(target_os = "macos")]
143        #[unsafe(method(appearance))]
144        #[unsafe(method_family = none)]
145        pub unsafe fn appearance(&self) -> Option<Retained<NSAppearance>>;
146
147        #[cfg(feature = "objc2-app-kit")]
148        #[cfg(target_os = "macos")]
149        /// Setter for [`appearance`][Self::appearance].
150        #[unsafe(method(setAppearance:))]
151        #[unsafe(method_family = none)]
152        pub unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>);
153    );
154}
155
156/// Methods declared on superclass `NSObject`.
157impl MKMapSnapshotOptions {
158    extern_methods!(
159        #[unsafe(method(init))]
160        #[unsafe(method_family = init)]
161        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
162
163        #[unsafe(method(new))]
164        #[unsafe(method_family = new)]
165        pub unsafe fn new() -> Retained<Self>;
166    );
167}