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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CNContactPicker;
);
extern_conformance!(
unsafe impl NSObjectProtocol for CNContactPicker {}
);
impl CNContactPicker {
extern_methods!(
#[unsafe(method(displayedKeys))]
#[unsafe(method_family = none)]
pub unsafe fn displayedKeys(&self) -> Retained<NSArray<NSString>>;
#[unsafe(method(setDisplayedKeys:))]
#[unsafe(method_family = none)]
pub unsafe fn setDisplayedKeys(&self, displayed_keys: &NSArray<NSString>);
#[cfg(feature = "CNContactPickerDelegate")]
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn CNContactPickerDelegate>>>;
#[cfg(feature = "CNContactPickerDelegate")]
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn CNContactPickerDelegate>>,
);
#[cfg(feature = "objc2-app-kit")]
#[cfg(target_os = "macos")]
#[unsafe(method(showRelativeToRect:ofView:preferredEdge:))]
#[unsafe(method_family = none)]
pub unsafe fn showRelativeToRect_ofView_preferredEdge(
&self,
positioning_rect: NSRect,
positioning_view: &NSView,
preferred_edge: NSRectEdge,
);
#[unsafe(method(close))]
#[unsafe(method_family = none)]
pub unsafe fn close(&self);
);
}
impl CNContactPicker {
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>;
);
}