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::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkhybridmapconfiguration?language=objc)
    #[unsafe(super(MKMapConfiguration, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MKMapConfiguration")]
    pub struct MKHybridMapConfiguration;
);

#[cfg(feature = "MKMapConfiguration")]
extern_conformance!(
    unsafe impl NSCoding for MKHybridMapConfiguration {}
);

#[cfg(feature = "MKMapConfiguration")]
extern_conformance!(
    unsafe impl NSCopying for MKHybridMapConfiguration {}
);

#[cfg(feature = "MKMapConfiguration")]
unsafe impl CopyingHelper for MKHybridMapConfiguration {
    type Result = Self;
}

#[cfg(feature = "MKMapConfiguration")]
extern_conformance!(
    unsafe impl NSObjectProtocol for MKHybridMapConfiguration {}
);

#[cfg(feature = "MKMapConfiguration")]
extern_conformance!(
    unsafe impl NSSecureCoding for MKHybridMapConfiguration {}
);

#[cfg(feature = "MKMapConfiguration")]
impl MKHybridMapConfiguration {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(initWithElevationStyle:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithElevationStyle(
            this: Allocated<Self>,
            elevation_style: MKMapElevationStyle,
        ) -> Retained<Self>;

        #[cfg(feature = "MKPointOfInterestFilter")]
        #[unsafe(method(pointOfInterestFilter))]
        #[unsafe(method_family = none)]
        pub unsafe fn pointOfInterestFilter(&self) -> Option<Retained<MKPointOfInterestFilter>>;

        #[cfg(feature = "MKPointOfInterestFilter")]
        /// Setter for [`pointOfInterestFilter`][Self::pointOfInterestFilter].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setPointOfInterestFilter:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPointOfInterestFilter(
            &self,
            point_of_interest_filter: Option<&MKPointOfInterestFilter>,
        );

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

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

/// Methods declared on superclass `MKMapConfiguration`.
#[cfg(feature = "MKMapConfiguration")]
impl MKHybridMapConfiguration {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}