objc2_app_kit/generated/
NSSharingServicePickerToolbarItem.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSToolbarItem, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "NSToolbarItem")]
15 pub struct NSSharingServicePickerToolbarItem;
16);
17
18#[cfg(feature = "NSToolbarItem")]
19unsafe impl NSCopying for NSSharingServicePickerToolbarItem {}
20
21#[cfg(feature = "NSToolbarItem")]
22unsafe impl CopyingHelper for NSSharingServicePickerToolbarItem {
23 type Result = Self;
24}
25
26#[cfg(feature = "NSToolbarItem")]
27unsafe impl NSObjectProtocol for NSSharingServicePickerToolbarItem {}
28
29#[cfg(feature = "NSToolbarItem")]
30impl NSSharingServicePickerToolbarItem {
31 extern_methods!(
32 #[cfg(feature = "NSSharingService")]
33 #[unsafe(method(delegate))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn delegate(
36 &self,
37 ) -> Option<Retained<ProtocolObject<dyn NSSharingServicePickerToolbarItemDelegate>>>;
38
39 #[cfg(feature = "NSSharingService")]
40 #[unsafe(method(setDelegate:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn setDelegate(
45 &self,
46 delegate: Option<&ProtocolObject<dyn NSSharingServicePickerToolbarItemDelegate>>,
47 );
48 );
49}
50
51#[cfg(feature = "NSToolbarItem")]
53impl NSSharingServicePickerToolbarItem {
54 extern_methods!(
55 #[cfg(feature = "NSToolbar")]
56 #[unsafe(method(initWithItemIdentifier:))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn initWithItemIdentifier(
60 this: Allocated<Self>,
61 item_identifier: &NSToolbarItemIdentifier,
62 ) -> Retained<Self>;
63 );
64}
65
66#[cfg(feature = "NSToolbarItem")]
68impl NSSharingServicePickerToolbarItem {
69 extern_methods!(
70 #[unsafe(method(init))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
73
74 #[unsafe(method(new))]
75 #[unsafe(method_family = new)]
76 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
77 );
78}
79
80extern_protocol!(
81 #[cfg(feature = "NSSharingService")]
83 pub unsafe trait NSSharingServicePickerToolbarItemDelegate:
84 NSSharingServicePickerDelegate + MainThreadOnly
85 {
86 #[cfg(feature = "NSToolbarItem")]
87 #[unsafe(method(itemsForSharingServicePickerToolbarItem:))]
92 #[unsafe(method_family = none)]
93 unsafe fn itemsForSharingServicePickerToolbarItem(
94 &self,
95 picker_toolbar_item: &NSSharingServicePickerToolbarItem,
96 ) -> Retained<NSArray>;
97 }
98);