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_protocol!(
pub unsafe trait MKMapItemDetailViewControllerDelegate:
NSObjectProtocol + MainThreadOnly
{
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(mapItemDetailViewControllerDidFinish:))]
#[unsafe(method_family = none)]
unsafe fn mapItemDetailViewControllerDidFinish(
&self,
detail_view_controller: &MKMapItemDetailViewController,
);
}
);
extern_class!(
#[unsafe(super(NSViewController, NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
pub struct MKMapItemDetailViewController;
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSCoding for MKMapItemDetailViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSEditor for MKMapItemDetailViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSObjectProtocol for MKMapItemDetailViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSSeguePerforming for MKMapItemDetailViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
extern_conformance!(
unsafe impl NSUserInterfaceItemIdentification for MKMapItemDetailViewController {}
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKMapItemDetailViewController {
extern_methods!(
#[cfg(feature = "MKMapItem")]
#[unsafe(method(mapItem))]
#[unsafe(method_family = none)]
pub unsafe fn mapItem(&self) -> Option<Retained<MKMapItem>>;
#[cfg(feature = "MKMapItem")]
#[unsafe(method(setMapItem:))]
#[unsafe(method_family = none)]
pub unsafe fn setMapItem(&self, map_item: Option<&MKMapItem>);
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn MKMapItemDetailViewControllerDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn MKMapItemDetailViewControllerDelegate>>,
);
#[cfg(feature = "MKMapItem")]
#[unsafe(method(initWithMapItem:displaysMap:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithMapItem_displaysMap(
this: Allocated<Self>,
map_item: Option<&MKMapItem>,
displays_map: bool,
) -> Retained<Self>;
#[cfg(feature = "MKMapItem")]
#[unsafe(method(initWithMapItem:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithMapItem(
this: Allocated<Self>,
map_item: Option<&MKMapItem>,
) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKMapItemDetailViewController {
extern_methods!(
#[unsafe(method(initWithNibName:bundle:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithNibName_bundle(
this: Allocated<Self>,
nib_name_or_nil: Option<&NSNibName>,
nib_bundle_or_nil: Option<&NSBundle>,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKMapItemDetailViewController {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
impl MKMapItemDetailViewController {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}