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 fn title(&self) -> Retained<NSString>;
17
18 #[unsafe(method(setTitle:))]
22 #[unsafe(method_family = none)]
23 fn setTitle(&self, title: &NSString);
24
25 #[cfg(feature = "UIImage")]
26 #[unsafe(method(image))]
28 #[unsafe(method_family = none)]
29 fn image(&self) -> Option<Retained<UIImage>>;
30
31 #[cfg(feature = "UIImage")]
32 #[unsafe(method(setImage:))]
36 #[unsafe(method_family = none)]
37 fn setImage(&self, image: Option<&UIImage>);
38
39 #[cfg(feature = "UIImage")]
40 #[unsafe(method(selectedImage))]
42 #[unsafe(method_family = none)]
43 fn selectedImage(&self) -> Option<Retained<UIImage>>;
44
45 #[cfg(feature = "UIImage")]
46 #[unsafe(method(setSelectedImage:))]
50 #[unsafe(method_family = none)]
51 fn setSelectedImage(&self, selected_image: Option<&UIImage>);
52
53 #[unsafe(method(discoverabilityTitle))]
55 #[unsafe(method_family = none)]
56 fn discoverabilityTitle(&self) -> Option<Retained<NSString>>;
57
58 #[unsafe(method(setDiscoverabilityTitle:))]
62 #[unsafe(method_family = none)]
63 fn setDiscoverabilityTitle(&self, discoverability_title: Option<&NSString>);
64
65 #[cfg(feature = "UIMenuElement")]
66 #[unsafe(method(attributes))]
68 #[unsafe(method_family = none)]
69 fn attributes(&self) -> UIMenuElementAttributes;
70
71 #[cfg(feature = "UIMenuElement")]
72 #[unsafe(method(setAttributes:))]
74 #[unsafe(method_family = none)]
75 fn setAttributes(&self, attributes: UIMenuElementAttributes);
76
77 #[cfg(feature = "UIMenuElement")]
78 #[unsafe(method(state))]
80 #[unsafe(method_family = none)]
81 fn state(&self) -> UIMenuElementState;
82
83 #[cfg(feature = "UIMenuElement")]
84 #[unsafe(method(setState:))]
86 #[unsafe(method_family = none)]
87 fn setState(&self, state: UIMenuElementState);
88
89 #[cfg(feature = "UIMenuElement")]
90 #[unsafe(method(repeatBehavior))]
94 #[unsafe(method_family = none)]
95 fn repeatBehavior(&self) -> UIMenuElementRepeatBehavior;
96
97 #[cfg(feature = "UIMenuElement")]
98 #[unsafe(method(setRepeatBehavior:))]
100 #[unsafe(method_family = none)]
101 fn setRepeatBehavior(&self, repeat_behavior: UIMenuElementRepeatBehavior);
102
103 #[unsafe(method(sender))]
107 #[unsafe(method_family = none)]
108 fn sender(&self) -> Option<Retained<AnyObject>>;
109
110 #[cfg(feature = "UIPopoverPresentationControllerSourceItem")]
111 #[unsafe(method(presentationSourceItem))]
115 #[unsafe(method_family = none)]
116 fn presentationSourceItem(
117 &self,
118 ) -> Option<Retained<ProtocolObject<dyn UIPopoverPresentationControllerSourceItem>>>;
119
120 #[unsafe(method(performWithSender:target:))]
127 #[unsafe(method_family = none)]
128 unsafe fn performWithSender_target(
129 &self,
130 sender: Option<&AnyObject>,
131 target: Option<&AnyObject>,
132 );
133 }
134);