objc2-map-kit 0.3.2

Bindings to the MapKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
use objc2_app_kit::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkmarkerannotationview?language=objc)
    #[unsafe(super(MKAnnotationView, NSView, NSResponder, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
    #[cfg(target_os = "macos")]
    pub struct MKMarkerAnnotationView;
);

#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSAccessibility for MKMarkerAnnotationView {}
);

#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSAccessibilityElementProtocol for MKMarkerAnnotationView {}
);

#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSAnimatablePropertyContainer for MKMarkerAnnotationView {}
);

#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSAppearanceCustomization for MKMarkerAnnotationView {}
);

#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSCoding for MKMarkerAnnotationView {}
);

#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSDraggingDestination for MKMarkerAnnotationView {}
);

#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSObjectProtocol for MKMarkerAnnotationView {}
);

#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
extern_conformance!(
    unsafe impl NSUserInterfaceItemIdentification for MKMarkerAnnotationView {}
);

#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl MKMarkerAnnotationView {
    extern_methods!(
        #[cfg(feature = "MKTypes")]
        #[unsafe(method(titleVisibility))]
        #[unsafe(method_family = none)]
        pub unsafe fn titleVisibility(&self) -> MKFeatureVisibility;

        #[cfg(feature = "MKTypes")]
        /// Setter for [`titleVisibility`][Self::titleVisibility].
        #[unsafe(method(setTitleVisibility:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTitleVisibility(&self, title_visibility: MKFeatureVisibility);

        #[cfg(feature = "MKTypes")]
        #[unsafe(method(subtitleVisibility))]
        #[unsafe(method_family = none)]
        pub unsafe fn subtitleVisibility(&self) -> MKFeatureVisibility;

        #[cfg(feature = "MKTypes")]
        /// Setter for [`subtitleVisibility`][Self::subtitleVisibility].
        #[unsafe(method(setSubtitleVisibility:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSubtitleVisibility(&self, subtitle_visibility: MKFeatureVisibility);

        #[unsafe(method(markerTintColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn markerTintColor(&self) -> Option<Retained<NSColor>>;

        /// Setter for [`markerTintColor`][Self::markerTintColor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setMarkerTintColor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMarkerTintColor(&self, marker_tint_color: Option<&NSColor>);

        #[unsafe(method(glyphTintColor))]
        #[unsafe(method_family = none)]
        pub unsafe fn glyphTintColor(&self) -> Option<Retained<NSColor>>;

        /// Setter for [`glyphTintColor`][Self::glyphTintColor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setGlyphTintColor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setGlyphTintColor(&self, glyph_tint_color: Option<&NSColor>);

        #[unsafe(method(glyphText))]
        #[unsafe(method_family = none)]
        pub unsafe fn glyphText(&self) -> Option<Retained<NSString>>;

        /// Setter for [`glyphText`][Self::glyphText].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setGlyphText:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setGlyphText(&self, glyph_text: Option<&NSString>);

        #[unsafe(method(glyphImage))]
        #[unsafe(method_family = none)]
        pub unsafe fn glyphImage(&self) -> Option<Retained<NSImage>>;

        /// Setter for [`glyphImage`][Self::glyphImage].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setGlyphImage:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setGlyphImage(&self, glyph_image: Option<&NSImage>);

        #[unsafe(method(selectedGlyphImage))]
        #[unsafe(method_family = none)]
        pub unsafe fn selectedGlyphImage(&self) -> Option<Retained<NSImage>>;

        /// Setter for [`selectedGlyphImage`][Self::selectedGlyphImage].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setSelectedGlyphImage:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSelectedGlyphImage(&self, selected_glyph_image: Option<&NSImage>);

        #[unsafe(method(animatesWhenAdded))]
        #[unsafe(method_family = none)]
        pub unsafe fn animatesWhenAdded(&self) -> bool;

        /// Setter for [`animatesWhenAdded`][Self::animatesWhenAdded].
        #[unsafe(method(setAnimatesWhenAdded:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAnimatesWhenAdded(&self, animates_when_added: bool);
    );
}

/// Methods declared on superclass `MKAnnotationView`.
#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl MKMarkerAnnotationView {
    extern_methods!(
        #[cfg(feature = "MKAnnotation")]
        #[unsafe(method(initWithAnnotation:reuseIdentifier:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithAnnotation_reuseIdentifier(
            this: Allocated<Self>,
            annotation: Option<&ProtocolObject<dyn MKAnnotation>>,
            reuse_identifier: Option<&NSString>,
        ) -> Retained<Self>;

        /// # Safety
        ///
        /// `a_decoder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            a_decoder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSView`.
#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl MKMarkerAnnotationView {
    extern_methods!(
        #[unsafe(method(initWithFrame:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSResponder`.
#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl MKMarkerAnnotationView {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "MKAnnotationView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
impl MKMarkerAnnotationView {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    );
}