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-core-location")]
use objc2_core_location::*;
use objc2_foundation::*;

use crate::*;

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

extern_conformance!(
    unsafe impl NSObjectProtocol for MKReverseGeocodingRequest {}
);

impl MKReverseGeocodingRequest {
    extern_methods!(
        #[unsafe(method(isCancelled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isCancelled(&self) -> bool;

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

        #[cfg(feature = "objc2-core-location")]
        #[unsafe(method(location))]
        #[unsafe(method_family = none)]
        pub unsafe fn location(&self) -> Retained<CLLocation>;

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

        /// Setter for [`preferredLocale`][Self::preferredLocale].
        #[unsafe(method(setPreferredLocale:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPreferredLocale(&self, preferred_locale: Option<&NSLocale>);

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

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        #[cfg(feature = "objc2-core-location")]
        #[unsafe(method(initWithLocation:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithLocation(
            this: Allocated<Self>,
            location: &CLLocation,
        ) -> Option<Retained<Self>>;

        #[cfg(all(feature = "MKMapItem", feature = "block2"))]
        #[unsafe(method(getMapItemsWithCompletionHandler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn getMapItemsWithCompletionHandler(
            &self,
            completion_handler: &block2::DynBlock<dyn Fn(*mut NSArray<MKMapItem>, *mut NSError)>,
        );

        #[unsafe(method(cancel))]
        #[unsafe(method_family = none)]
        pub unsafe fn cancel(&self);
    );
}