objc2_contacts_ui/generated/
CNContactPicker.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_class!(
14 #[unsafe(super(NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 pub struct CNContactPicker;
20);
21
22extern_conformance!(
23 unsafe impl NSObjectProtocol for CNContactPicker {}
24);
25
26impl CNContactPicker {
27 extern_methods!(
28 #[unsafe(method(displayedKeys))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn displayedKeys(&self) -> Retained<NSArray<NSString>>;
34
35 #[unsafe(method(setDisplayedKeys:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn setDisplayedKeys(&self, displayed_keys: &NSArray<NSString>);
41
42 #[cfg(feature = "CNContactPickerDelegate")]
43 #[unsafe(method(delegate))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn delegate(
47 &self,
48 ) -> Option<Retained<ProtocolObject<dyn CNContactPickerDelegate>>>;
49
50 #[cfg(feature = "CNContactPickerDelegate")]
51 #[unsafe(method(setDelegate:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setDelegate(
57 &self,
58 delegate: Option<&ProtocolObject<dyn CNContactPickerDelegate>>,
59 );
60
61 #[cfg(feature = "objc2-app-kit")]
62 #[cfg(target_os = "macos")]
63 #[unsafe(method(showRelativeToRect:ofView:preferredEdge:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn showRelativeToRect_ofView_preferredEdge(
67 &self,
68 positioning_rect: NSRect,
69 positioning_view: &NSView,
70 preferred_edge: NSRectEdge,
71 );
72
73 #[unsafe(method(close))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn close(&self);
77 );
78}
79
80impl CNContactPicker {
82 extern_methods!(
83 #[unsafe(method(init))]
84 #[unsafe(method_family = init)]
85 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
86
87 #[unsafe(method(new))]
88 #[unsafe(method_family = new)]
89 pub unsafe fn new() -> Retained<Self>;
90 );
91}