objc2_map_kit/generated/
MKPinAnnotationView.rs1use 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#[deprecated = "Use MKPinAnnotationView's pinTintColor instead"]
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct MKPinAnnotationColor(pub NSUInteger);
19impl MKPinAnnotationColor {
20 #[doc(alias = "MKPinAnnotationColorRed")]
21 #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"]
22 pub const Red: Self = Self(0);
23 #[doc(alias = "MKPinAnnotationColorGreen")]
24 #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"]
25 pub const Green: Self = Self(1);
26 #[doc(alias = "MKPinAnnotationColorPurple")]
27 #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"]
28 pub const Purple: Self = Self(2);
29}
30
31unsafe impl Encode for MKPinAnnotationColor {
32 const ENCODING: Encoding = NSUInteger::ENCODING;
33}
34
35unsafe impl RefEncode for MKPinAnnotationColor {
36 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39extern_class!(
40 #[unsafe(super(MKAnnotationView, NSView, NSResponder, NSObject))]
42 #[derive(Debug, PartialEq, Eq, Hash)]
43 #[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
44 #[cfg(target_os = "macos")]
45 #[deprecated]
46 pub struct MKPinAnnotationView;
47);
48
49#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
50#[cfg(target_os = "macos")]
51extern_conformance!(
52 unsafe impl NSAccessibility for MKPinAnnotationView {}
53);
54
55#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
56#[cfg(target_os = "macos")]
57extern_conformance!(
58 unsafe impl NSAccessibilityElementProtocol for MKPinAnnotationView {}
59);
60
61#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
62#[cfg(target_os = "macos")]
63extern_conformance!(
64 unsafe impl NSAnimatablePropertyContainer for MKPinAnnotationView {}
65);
66
67#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
68#[cfg(target_os = "macos")]
69extern_conformance!(
70 unsafe impl NSAppearanceCustomization for MKPinAnnotationView {}
71);
72
73#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
74#[cfg(target_os = "macos")]
75extern_conformance!(
76 unsafe impl NSCoding for MKPinAnnotationView {}
77);
78
79#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
80#[cfg(target_os = "macos")]
81extern_conformance!(
82 unsafe impl NSDraggingDestination for MKPinAnnotationView {}
83);
84
85#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
86#[cfg(target_os = "macos")]
87extern_conformance!(
88 unsafe impl NSObjectProtocol for MKPinAnnotationView {}
89);
90
91#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
92#[cfg(target_os = "macos")]
93extern_conformance!(
94 unsafe impl NSUserInterfaceItemIdentification for MKPinAnnotationView {}
95);
96
97#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
98#[cfg(target_os = "macos")]
99impl MKPinAnnotationView {
100 extern_methods!(
101 #[unsafe(method(redPinColor))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn redPinColor(mtm: MainThreadMarker) -> Retained<NSColor>;
104
105 #[unsafe(method(greenPinColor))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn greenPinColor(mtm: MainThreadMarker) -> Retained<NSColor>;
108
109 #[unsafe(method(purplePinColor))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn purplePinColor(mtm: MainThreadMarker) -> Retained<NSColor>;
112
113 #[unsafe(method(pinTintColor))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn pinTintColor(&self) -> Option<Retained<NSColor>>;
116
117 #[unsafe(method(setPinTintColor:))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn setPinTintColor(&self, pin_tint_color: Option<&NSColor>);
121
122 #[deprecated]
123 #[unsafe(method(animatesDrop))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn animatesDrop(&self) -> bool;
126
127 #[deprecated]
129 #[unsafe(method(setAnimatesDrop:))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn setAnimatesDrop(&self, animates_drop: bool);
132
133 #[deprecated = "Use pinTintColor instead"]
134 #[unsafe(method(pinColor))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn pinColor(&self) -> MKPinAnnotationColor;
137
138 #[deprecated = "Use pinTintColor instead"]
140 #[unsafe(method(setPinColor:))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn setPinColor(&self, pin_color: MKPinAnnotationColor);
143 );
144}
145
146#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
148#[cfg(target_os = "macos")]
149impl MKPinAnnotationView {
150 extern_methods!(
151 #[cfg(feature = "MKAnnotation")]
152 #[unsafe(method(initWithAnnotation:reuseIdentifier:))]
153 #[unsafe(method_family = init)]
154 pub unsafe fn initWithAnnotation_reuseIdentifier(
155 this: Allocated<Self>,
156 annotation: Option<&ProtocolObject<dyn MKAnnotation>>,
157 reuse_identifier: Option<&NSString>,
158 ) -> Retained<Self>;
159
160 #[unsafe(method(initWithCoder:))]
161 #[unsafe(method_family = init)]
162 pub unsafe fn initWithCoder(
163 this: Allocated<Self>,
164 a_decoder: &NSCoder,
165 ) -> Option<Retained<Self>>;
166 );
167}
168
169#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
171#[cfg(target_os = "macos")]
172impl MKPinAnnotationView {
173 extern_methods!(
174 #[unsafe(method(initWithFrame:))]
175 #[unsafe(method_family = init)]
176 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
177 );
178}
179
180#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
182#[cfg(target_os = "macos")]
183impl MKPinAnnotationView {
184 extern_methods!(
185 #[unsafe(method(init))]
186 #[unsafe(method_family = init)]
187 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
188 );
189}
190
191#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
193#[cfg(target_os = "macos")]
194impl MKPinAnnotationView {
195 extern_methods!(
196 #[unsafe(method(new))]
197 #[unsafe(method_family = new)]
198 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
199 );
200}