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