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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MKMapItem;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MKMapItem {}
);
impl MKMapItem {
extern_methods!(
#[cfg(feature = "MKMapItemIdentifier")]
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Option<Retained<MKMapItemIdentifier>>;
#[cfg(feature = "MKMapItemIdentifier")]
#[unsafe(method(alternateIdentifiers))]
#[unsafe(method_family = none)]
pub unsafe fn alternateIdentifiers(&self) -> Retained<NSSet<MKMapItemIdentifier>>;
#[cfg(all(feature = "MKPlacemark", feature = "objc2-core-location"))]
#[deprecated = "Use location, address and addressRepresentations instead"]
#[unsafe(method(placemark))]
#[unsafe(method_family = none)]
pub unsafe fn placemark(&self) -> Retained<MKPlacemark>;
#[unsafe(method(isCurrentLocation))]
#[unsafe(method_family = none)]
pub unsafe fn isCurrentLocation(&self) -> bool;
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(location))]
#[unsafe(method_family = none)]
pub unsafe fn location(&self) -> Retained<CLLocation>;
#[cfg(feature = "MKAddress")]
#[unsafe(method(address))]
#[unsafe(method_family = none)]
pub unsafe fn address(&self) -> Option<Retained<MKAddress>>;
#[cfg(feature = "MKAddressRepresentations")]
#[unsafe(method(addressRepresentations))]
#[unsafe(method_family = none)]
pub unsafe fn addressRepresentations(&self) -> Option<Retained<MKAddressRepresentations>>;
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setName:))]
#[unsafe(method_family = none)]
pub unsafe fn setName(&self, name: Option<&NSString>);
#[unsafe(method(phoneNumber))]
#[unsafe(method_family = none)]
pub unsafe fn phoneNumber(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setPhoneNumber:))]
#[unsafe(method_family = none)]
pub unsafe fn setPhoneNumber(&self, phone_number: Option<&NSString>);
#[unsafe(method(url))]
#[unsafe(method_family = none)]
pub unsafe fn url(&self) -> Option<Retained<NSURL>>;
#[unsafe(method(setUrl:))]
#[unsafe(method_family = none)]
pub unsafe fn setUrl(&self, url: Option<&NSURL>);
#[unsafe(method(timeZone))]
#[unsafe(method_family = none)]
pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
#[unsafe(method(setTimeZone:))]
#[unsafe(method_family = none)]
pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);
#[cfg(feature = "MKPointOfInterestCategory")]
#[unsafe(method(pointOfInterestCategory))]
#[unsafe(method_family = none)]
pub unsafe fn pointOfInterestCategory(&self)
-> Option<Retained<MKPointOfInterestCategory>>;
#[cfg(feature = "MKPointOfInterestCategory")]
#[unsafe(method(setPointOfInterestCategory:))]
#[unsafe(method_family = none)]
pub unsafe fn setPointOfInterestCategory(
&self,
point_of_interest_category: Option<&MKPointOfInterestCategory>,
);
#[unsafe(method(mapItemForCurrentLocation))]
#[unsafe(method_family = none)]
pub unsafe fn mapItemForCurrentLocation() -> Retained<MKMapItem>;
#[cfg(all(feature = "MKPlacemark", feature = "objc2-core-location"))]
#[deprecated = "Use init(location:address:)"]
#[unsafe(method(initWithPlacemark:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithPlacemark(
this: Allocated<Self>,
placemark: &MKPlacemark,
) -> Retained<Self>;
#[cfg(all(feature = "MKAddress", feature = "objc2-core-location"))]
#[unsafe(method(initWithLocation:address:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLocation_address(
this: Allocated<Self>,
location: &CLLocation,
address: Option<&MKAddress>,
) -> Retained<Self>;
#[unsafe(method(openInMapsWithLaunchOptions:))]
#[unsafe(method_family = none)]
pub unsafe fn openInMapsWithLaunchOptions(
&self,
launch_options: Option<&NSDictionary<NSString, AnyObject>>,
) -> bool;
#[unsafe(method(openMapsWithItems:launchOptions:))]
#[unsafe(method_family = none)]
pub unsafe fn openMapsWithItems_launchOptions(
map_items: &NSArray<MKMapItem>,
launch_options: Option<&NSDictionary<NSString, AnyObject>>,
) -> bool;
#[cfg(feature = "block2")]
#[unsafe(method(openInMapsWithLaunchOptions:completionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn openInMapsWithLaunchOptions_completionHandler(
&self,
launch_options: Option<&NSDictionary<NSString, AnyObject>>,
completion: Option<&block2::DynBlock<dyn Fn(Bool)>>,
);
#[cfg(feature = "block2")]
#[unsafe(method(openMapsWithItems:launchOptions:completionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn openMapsWithItems_launchOptions_completionHandler(
map_items: &NSArray<MKMapItem>,
launch_options: Option<&NSDictionary<NSString, AnyObject>>,
completion: Option<&block2::DynBlock<dyn Fn(Bool)>>,
);
);
}
impl MKMapItem {
extern_methods!(
#[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>;
);
}
extern "C" {
pub static MKLaunchOptionsDirectionsModeKey: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsMapTypeKey: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsShowsTrafficKey: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsDirectionsModeDefault: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsDirectionsModeDriving: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsDirectionsModeWalking: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsDirectionsModeTransit: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsDirectionsModeCycling: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsMapCenterKey: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsMapSpanKey: &'static NSString;
}
extern "C" {
pub static MKLaunchOptionsCameraKey: &'static NSString;
}
impl MKMapItem {
extern_methods!();
}
extern_conformance!(
unsafe impl NSSecureCoding for MKMapItem {}
);
extern "C" {
pub static MKMapItemTypeIdentifier: &'static NSString;
}