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