objc2_ui_kit/generated/
UIMenuLeaf.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait UIMenuLeaf: NSObjectProtocol + MainThreadOnly {
13 #[unsafe(method(title))]
15 #[unsafe(method_family = none)]
16 unsafe fn title(&self) -> Retained<NSString>;
17
18 #[unsafe(method(setTitle:))]
20 #[unsafe(method_family = none)]
21 unsafe fn setTitle(&self, title: &NSString);
22
23 #[cfg(feature = "UIImage")]
24 #[unsafe(method(image))]
26 #[unsafe(method_family = none)]
27 unsafe fn image(&self) -> Option<Retained<UIImage>>;
28
29 #[cfg(feature = "UIImage")]
30 #[unsafe(method(setImage:))]
32 #[unsafe(method_family = none)]
33 unsafe fn setImage(&self, image: Option<&UIImage>);
34
35 #[cfg(feature = "UIImage")]
36 #[unsafe(method(selectedImage))]
38 #[unsafe(method_family = none)]
39 unsafe fn selectedImage(&self) -> Option<Retained<UIImage>>;
40
41 #[cfg(feature = "UIImage")]
42 #[unsafe(method(setSelectedImage:))]
44 #[unsafe(method_family = none)]
45 unsafe fn setSelectedImage(&self, selected_image: Option<&UIImage>);
46
47 #[unsafe(method(discoverabilityTitle))]
49 #[unsafe(method_family = none)]
50 unsafe fn discoverabilityTitle(&self) -> Option<Retained<NSString>>;
51
52 #[unsafe(method(setDiscoverabilityTitle:))]
54 #[unsafe(method_family = none)]
55 unsafe fn setDiscoverabilityTitle(&self, discoverability_title: Option<&NSString>);
56
57 #[cfg(feature = "UIMenuElement")]
58 #[unsafe(method(attributes))]
60 #[unsafe(method_family = none)]
61 unsafe fn attributes(&self) -> UIMenuElementAttributes;
62
63 #[cfg(feature = "UIMenuElement")]
64 #[unsafe(method(setAttributes:))]
66 #[unsafe(method_family = none)]
67 unsafe fn setAttributes(&self, attributes: UIMenuElementAttributes);
68
69 #[cfg(feature = "UIMenuElement")]
70 #[unsafe(method(state))]
72 #[unsafe(method_family = none)]
73 unsafe fn state(&self) -> UIMenuElementState;
74
75 #[cfg(feature = "UIMenuElement")]
76 #[unsafe(method(setState:))]
78 #[unsafe(method_family = none)]
79 unsafe fn setState(&self, state: UIMenuElementState);
80
81 #[unsafe(method(sender))]
85 #[unsafe(method_family = none)]
86 unsafe fn sender(&self) -> Option<Retained<AnyObject>>;
87
88 #[cfg(feature = "UIPopoverPresentationControllerSourceItem")]
89 #[unsafe(method(presentationSourceItem))]
93 #[unsafe(method_family = none)]
94 unsafe fn presentationSourceItem(
95 &self,
96 ) -> Option<Retained<ProtocolObject<dyn UIPopoverPresentationControllerSourceItem>>>;
97
98 #[unsafe(method(performWithSender:target:))]
100 #[unsafe(method_family = none)]
101 unsafe fn performWithSender_target(
102 &self,
103 sender: Option<&AnyObject>,
104 target: Option<&AnyObject>,
105 );
106 }
107);