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 #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"]
21 #[doc(alias = "MKPinAnnotationColorRed")]
22 pub const Red: Self = Self(0);
23 #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"]
24 #[doc(alias = "MKPinAnnotationColorGreen")]
25 pub const Green: Self = Self(1);
26 #[deprecated = "Use MKPinAnnotationView's pinTintColor instead"]
27 #[doc(alias = "MKPinAnnotationColorPurple")]
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")]
51unsafe impl NSAccessibility for MKPinAnnotationView {}
52
53#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
54#[cfg(target_os = "macos")]
55unsafe impl NSAccessibilityElementProtocol for MKPinAnnotationView {}
56
57#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
58#[cfg(target_os = "macos")]
59unsafe impl NSAnimatablePropertyContainer for MKPinAnnotationView {}
60
61#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
62#[cfg(target_os = "macos")]
63unsafe impl NSAppearanceCustomization for MKPinAnnotationView {}
64
65#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
66#[cfg(target_os = "macos")]
67unsafe impl NSCoding for MKPinAnnotationView {}
68
69#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
70#[cfg(target_os = "macos")]
71unsafe impl NSDraggingDestination for MKPinAnnotationView {}
72
73#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
74#[cfg(target_os = "macos")]
75unsafe impl NSObjectProtocol for MKPinAnnotationView {}
76
77#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
78#[cfg(target_os = "macos")]
79unsafe impl NSUserInterfaceItemIdentification for MKPinAnnotationView {}
80
81#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
82#[cfg(target_os = "macos")]
83impl MKPinAnnotationView {
84 extern_methods!(
85 #[unsafe(method(redPinColor))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn redPinColor(mtm: MainThreadMarker) -> Retained<NSColor>;
88
89 #[unsafe(method(greenPinColor))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn greenPinColor(mtm: MainThreadMarker) -> Retained<NSColor>;
92
93 #[unsafe(method(purplePinColor))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn purplePinColor(mtm: MainThreadMarker) -> Retained<NSColor>;
96
97 #[unsafe(method(pinTintColor))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn pinTintColor(&self) -> Option<Retained<NSColor>>;
100
101 #[unsafe(method(setPinTintColor:))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn setPinTintColor(&self, pin_tint_color: Option<&NSColor>);
105
106 #[deprecated]
107 #[unsafe(method(animatesDrop))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn animatesDrop(&self) -> bool;
110
111 #[deprecated]
113 #[unsafe(method(setAnimatesDrop:))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn setAnimatesDrop(&self, animates_drop: bool);
116
117 #[deprecated = "Use pinTintColor instead"]
118 #[unsafe(method(pinColor))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn pinColor(&self) -> MKPinAnnotationColor;
121
122 #[deprecated = "Use pinTintColor instead"]
124 #[unsafe(method(setPinColor:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn setPinColor(&self, pin_color: MKPinAnnotationColor);
127 );
128}
129
130#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
132#[cfg(target_os = "macos")]
133impl MKPinAnnotationView {
134 extern_methods!(
135 #[cfg(feature = "MKAnnotation")]
136 #[unsafe(method(initWithAnnotation:reuseIdentifier:))]
137 #[unsafe(method_family = init)]
138 pub unsafe fn initWithAnnotation_reuseIdentifier(
139 this: Allocated<Self>,
140 annotation: Option<&ProtocolObject<dyn MKAnnotation>>,
141 reuse_identifier: Option<&NSString>,
142 ) -> Retained<Self>;
143
144 #[unsafe(method(initWithCoder:))]
145 #[unsafe(method_family = init)]
146 pub unsafe fn initWithCoder(
147 this: Allocated<Self>,
148 a_decoder: &NSCoder,
149 ) -> Option<Retained<Self>>;
150 );
151}
152
153#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
155#[cfg(target_os = "macos")]
156impl MKPinAnnotationView {
157 extern_methods!(
158 #[unsafe(method(initWithFrame:))]
159 #[unsafe(method_family = init)]
160 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
161 );
162}
163
164#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
166#[cfg(target_os = "macos")]
167impl MKPinAnnotationView {
168 extern_methods!(
169 #[unsafe(method(init))]
170 #[unsafe(method_family = init)]
171 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
172 );
173}
174
175#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
177#[cfg(target_os = "macos")]
178impl MKPinAnnotationView {
179 extern_methods!(
180 #[unsafe(method(new))]
181 #[unsafe(method_family = new)]
182 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
183 );
184}