objc2_map_kit/generated/
MKMarkerAnnotationView.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/mkmarkerannotationview?language=objc)
15    #[unsafe(super(MKAnnotationView, NSView, NSResponder, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
18    #[cfg(target_os = "macos")]
19    pub struct MKMarkerAnnotationView;
20);
21
22#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
23#[cfg(target_os = "macos")]
24extern_conformance!(
25    unsafe impl NSAccessibility for MKMarkerAnnotationView {}
26);
27
28#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
29#[cfg(target_os = "macos")]
30extern_conformance!(
31    unsafe impl NSAccessibilityElementProtocol for MKMarkerAnnotationView {}
32);
33
34#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
35#[cfg(target_os = "macos")]
36extern_conformance!(
37    unsafe impl NSAnimatablePropertyContainer for MKMarkerAnnotationView {}
38);
39
40#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
41#[cfg(target_os = "macos")]
42extern_conformance!(
43    unsafe impl NSAppearanceCustomization for MKMarkerAnnotationView {}
44);
45
46#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
47#[cfg(target_os = "macos")]
48extern_conformance!(
49    unsafe impl NSCoding for MKMarkerAnnotationView {}
50);
51
52#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
53#[cfg(target_os = "macos")]
54extern_conformance!(
55    unsafe impl NSDraggingDestination for MKMarkerAnnotationView {}
56);
57
58#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
59#[cfg(target_os = "macos")]
60extern_conformance!(
61    unsafe impl NSObjectProtocol for MKMarkerAnnotationView {}
62);
63
64#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
65#[cfg(target_os = "macos")]
66extern_conformance!(
67    unsafe impl NSUserInterfaceItemIdentification for MKMarkerAnnotationView {}
68);
69
70#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
71#[cfg(target_os = "macos")]
72impl MKMarkerAnnotationView {
73    extern_methods!(
74        #[cfg(feature = "MKTypes")]
75        #[unsafe(method(titleVisibility))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn titleVisibility(&self) -> MKFeatureVisibility;
78
79        #[cfg(feature = "MKTypes")]
80        /// Setter for [`titleVisibility`][Self::titleVisibility].
81        #[unsafe(method(setTitleVisibility:))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn setTitleVisibility(&self, title_visibility: MKFeatureVisibility);
84
85        #[cfg(feature = "MKTypes")]
86        #[unsafe(method(subtitleVisibility))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn subtitleVisibility(&self) -> MKFeatureVisibility;
89
90        #[cfg(feature = "MKTypes")]
91        /// Setter for [`subtitleVisibility`][Self::subtitleVisibility].
92        #[unsafe(method(setSubtitleVisibility:))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn setSubtitleVisibility(&self, subtitle_visibility: MKFeatureVisibility);
95
96        #[unsafe(method(markerTintColor))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn markerTintColor(&self) -> Option<Retained<NSColor>>;
99
100        /// Setter for [`markerTintColor`][Self::markerTintColor].
101        ///
102        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
103        #[unsafe(method(setMarkerTintColor:))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn setMarkerTintColor(&self, marker_tint_color: Option<&NSColor>);
106
107        #[unsafe(method(glyphTintColor))]
108        #[unsafe(method_family = none)]
109        pub unsafe fn glyphTintColor(&self) -> Option<Retained<NSColor>>;
110
111        /// Setter for [`glyphTintColor`][Self::glyphTintColor].
112        ///
113        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
114        #[unsafe(method(setGlyphTintColor:))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn setGlyphTintColor(&self, glyph_tint_color: Option<&NSColor>);
117
118        #[unsafe(method(glyphText))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn glyphText(&self) -> Option<Retained<NSString>>;
121
122        /// Setter for [`glyphText`][Self::glyphText].
123        ///
124        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
125        #[unsafe(method(setGlyphText:))]
126        #[unsafe(method_family = none)]
127        pub unsafe fn setGlyphText(&self, glyph_text: Option<&NSString>);
128
129        #[unsafe(method(glyphImage))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn glyphImage(&self) -> Option<Retained<NSImage>>;
132
133        /// Setter for [`glyphImage`][Self::glyphImage].
134        ///
135        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
136        #[unsafe(method(setGlyphImage:))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn setGlyphImage(&self, glyph_image: Option<&NSImage>);
139
140        #[unsafe(method(selectedGlyphImage))]
141        #[unsafe(method_family = none)]
142        pub unsafe fn selectedGlyphImage(&self) -> Option<Retained<NSImage>>;
143
144        /// Setter for [`selectedGlyphImage`][Self::selectedGlyphImage].
145        ///
146        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
147        #[unsafe(method(setSelectedGlyphImage:))]
148        #[unsafe(method_family = none)]
149        pub unsafe fn setSelectedGlyphImage(&self, selected_glyph_image: Option<&NSImage>);
150
151        #[unsafe(method(animatesWhenAdded))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn animatesWhenAdded(&self) -> bool;
154
155        /// Setter for [`animatesWhenAdded`][Self::animatesWhenAdded].
156        #[unsafe(method(setAnimatesWhenAdded:))]
157        #[unsafe(method_family = none)]
158        pub unsafe fn setAnimatesWhenAdded(&self, animates_when_added: bool);
159    );
160}
161
162/// Methods declared on superclass `MKAnnotationView`.
163#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
164#[cfg(target_os = "macos")]
165impl MKMarkerAnnotationView {
166    extern_methods!(
167        #[cfg(feature = "MKAnnotation")]
168        #[unsafe(method(initWithAnnotation:reuseIdentifier:))]
169        #[unsafe(method_family = init)]
170        pub unsafe fn initWithAnnotation_reuseIdentifier(
171            this: Allocated<Self>,
172            annotation: Option<&ProtocolObject<dyn MKAnnotation>>,
173            reuse_identifier: Option<&NSString>,
174        ) -> Retained<Self>;
175
176        /// # Safety
177        ///
178        /// `a_decoder` possibly has further requirements.
179        #[unsafe(method(initWithCoder:))]
180        #[unsafe(method_family = init)]
181        pub unsafe fn initWithCoder(
182            this: Allocated<Self>,
183            a_decoder: &NSCoder,
184        ) -> Option<Retained<Self>>;
185    );
186}
187
188/// Methods declared on superclass `NSView`.
189#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
190#[cfg(target_os = "macos")]
191impl MKMarkerAnnotationView {
192    extern_methods!(
193        #[unsafe(method(initWithFrame:))]
194        #[unsafe(method_family = init)]
195        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
196    );
197}
198
199/// Methods declared on superclass `NSResponder`.
200#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
201#[cfg(target_os = "macos")]
202impl MKMarkerAnnotationView {
203    extern_methods!(
204        #[unsafe(method(init))]
205        #[unsafe(method_family = init)]
206        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
207    );
208}
209
210/// Methods declared on superclass `NSObject`.
211#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
212#[cfg(target_os = "macos")]
213impl MKMarkerAnnotationView {
214    extern_methods!(
215        #[unsafe(method(new))]
216        #[unsafe(method_family = new)]
217        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
218    );
219}