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