objc2_map_kit/generated/
MKMapCamera.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-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-location")]
9use objc2_core_location::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14extern_class!(
15    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkmapcamera?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct MKMapCamera;
19);
20
21unsafe impl NSCoding for MKMapCamera {}
22
23unsafe impl NSCopying for MKMapCamera {}
24
25unsafe impl CopyingHelper for MKMapCamera {
26    type Result = Self;
27}
28
29unsafe impl NSObjectProtocol for MKMapCamera {}
30
31unsafe impl NSSecureCoding for MKMapCamera {}
32
33impl MKMapCamera {
34    extern_methods!(
35        #[cfg(feature = "objc2-core-location")]
36        #[unsafe(method(centerCoordinate))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn centerCoordinate(&self) -> CLLocationCoordinate2D;
39
40        #[cfg(feature = "objc2-core-location")]
41        /// Setter for [`centerCoordinate`][Self::centerCoordinate].
42        #[unsafe(method(setCenterCoordinate:))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn setCenterCoordinate(&self, center_coordinate: CLLocationCoordinate2D);
45
46        #[cfg(feature = "objc2-core-location")]
47        #[unsafe(method(centerCoordinateDistance))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn centerCoordinateDistance(&self) -> CLLocationDistance;
50
51        #[cfg(feature = "objc2-core-location")]
52        /// Setter for [`centerCoordinateDistance`][Self::centerCoordinateDistance].
53        #[unsafe(method(setCenterCoordinateDistance:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setCenterCoordinateDistance(
56            &self,
57            center_coordinate_distance: CLLocationDistance,
58        );
59
60        #[cfg(feature = "objc2-core-location")]
61        #[unsafe(method(heading))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn heading(&self) -> CLLocationDirection;
64
65        #[cfg(feature = "objc2-core-location")]
66        /// Setter for [`heading`][Self::heading].
67        #[unsafe(method(setHeading:))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn setHeading(&self, heading: CLLocationDirection);
70
71        #[cfg(feature = "objc2-core-foundation")]
72        #[unsafe(method(pitch))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn pitch(&self) -> CGFloat;
75
76        #[cfg(feature = "objc2-core-foundation")]
77        /// Setter for [`pitch`][Self::pitch].
78        #[unsafe(method(setPitch:))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn setPitch(&self, pitch: CGFloat);
81
82        #[cfg(feature = "objc2-core-location")]
83        #[deprecated = "Use centerCoordinateDistance"]
84        #[unsafe(method(altitude))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn altitude(&self) -> CLLocationDistance;
87
88        #[cfg(feature = "objc2-core-location")]
89        /// Setter for [`altitude`][Self::altitude].
90        #[deprecated = "Use centerCoordinateDistance"]
91        #[unsafe(method(setAltitude:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn setAltitude(&self, altitude: CLLocationDistance);
94
95        #[unsafe(method(camera))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn camera() -> Retained<Self>;
98
99        #[cfg(feature = "objc2-core-location")]
100        #[unsafe(method(cameraLookingAtCenterCoordinate:fromEyeCoordinate:eyeAltitude:))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn cameraLookingAtCenterCoordinate_fromEyeCoordinate_eyeAltitude(
103            center_coordinate: CLLocationCoordinate2D,
104            eye_coordinate: CLLocationCoordinate2D,
105            eye_altitude: CLLocationDistance,
106        ) -> Retained<Self>;
107
108        #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-core-location"))]
109        #[unsafe(method(cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn cameraLookingAtCenterCoordinate_fromDistance_pitch_heading(
112            center_coordinate: CLLocationCoordinate2D,
113            distance: CLLocationDistance,
114            pitch: CGFloat,
115            heading: CLLocationDirection,
116        ) -> Retained<Self>;
117
118        #[cfg(all(feature = "MKMapItem", feature = "objc2-core-foundation"))]
119        #[unsafe(method(cameraLookingAtMapItem:forViewSize:allowPitch:))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn cameraLookingAtMapItem_forViewSize_allowPitch(
122            map_item: &MKMapItem,
123            view_size: CGSize,
124            allow_pitch: bool,
125        ) -> Retained<Self>;
126    );
127}
128
129/// Methods declared on superclass `NSObject`.
130impl MKMapCamera {
131    extern_methods!(
132        #[unsafe(method(init))]
133        #[unsafe(method_family = init)]
134        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
135
136        #[unsafe(method(new))]
137        #[unsafe(method_family = new)]
138        pub unsafe fn new() -> Retained<Self>;
139    );
140}