objc2_ui_kit/generated/
UIBarButtonItemGroup.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct UIBarButtonItemGroup;
16);
17
18extern_conformance!(
19 unsafe impl NSCoding for UIBarButtonItemGroup {}
20);
21
22extern_conformance!(
23 unsafe impl NSObjectProtocol for UIBarButtonItemGroup {}
24);
25
26impl UIBarButtonItemGroup {
27 extern_methods!(
28 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
29 #[unsafe(method(initWithBarButtonItems:representativeItem:))]
31 #[unsafe(method_family = init)]
32 pub fn initWithBarButtonItems_representativeItem(
33 this: Allocated<Self>,
34 bar_button_items: &NSArray<UIBarButtonItem>,
35 representative_item: Option<&UIBarButtonItem>,
36 ) -> Retained<Self>;
37
38 #[unsafe(method(initWithCoder:))]
42 #[unsafe(method_family = init)]
43 pub unsafe fn initWithCoder(
44 this: Allocated<Self>,
45 coder: &NSCoder,
46 ) -> Option<Retained<Self>>;
47
48 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
49 #[unsafe(method(fixedGroupWithRepresentativeItem:items:))]
51 #[unsafe(method_family = none)]
52 pub fn fixedGroupWithRepresentativeItem_items(
53 representative_item: Option<&UIBarButtonItem>,
54 items: &NSArray<UIBarButtonItem>,
55 mtm: MainThreadMarker,
56 ) -> Retained<UIBarButtonItemGroup>;
57
58 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
59 #[unsafe(method(movableGroupWithCustomizationIdentifier:representativeItem:items:))]
61 #[unsafe(method_family = none)]
62 pub fn movableGroupWithCustomizationIdentifier_representativeItem_items(
63 customization_identifier: &NSString,
64 representative_item: Option<&UIBarButtonItem>,
65 items: &NSArray<UIBarButtonItem>,
66 mtm: MainThreadMarker,
67 ) -> Retained<UIBarButtonItemGroup>;
68
69 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
70 #[unsafe(method(optionalGroupWithCustomizationIdentifier:inDefaultCustomization:representativeItem:items:))]
72 #[unsafe(method_family = none)]
73 pub fn optionalGroupWithCustomizationIdentifier_inDefaultCustomization_representativeItem_items(
74 customization_identifier: &NSString,
75 in_default_customization: bool,
76 representative_item: Option<&UIBarButtonItem>,
77 items: &NSArray<UIBarButtonItem>,
78 mtm: MainThreadMarker,
79 ) -> Retained<UIBarButtonItemGroup>;
80
81 #[unsafe(method(groupWithFixedSpace))]
86 #[unsafe(method_family = none)]
87 pub fn groupWithFixedSpace(mtm: MainThreadMarker) -> Retained<UIBarButtonItemGroup>;
88
89 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
90 #[unsafe(method(barButtonItems))]
92 #[unsafe(method_family = none)]
93 pub fn barButtonItems(&self) -> Retained<NSArray<UIBarButtonItem>>;
94
95 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
96 #[unsafe(method(setBarButtonItems:))]
100 #[unsafe(method_family = none)]
101 pub fn setBarButtonItems(&self, bar_button_items: &NSArray<UIBarButtonItem>);
102
103 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
104 #[unsafe(method(representativeItem))]
109 #[unsafe(method_family = none)]
110 pub fn representativeItem(&self) -> Option<Retained<UIBarButtonItem>>;
111
112 #[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
113 #[unsafe(method(setRepresentativeItem:))]
115 #[unsafe(method_family = none)]
116 pub fn setRepresentativeItem(&self, representative_item: Option<&UIBarButtonItem>);
117
118 #[unsafe(method(isDisplayingRepresentativeItem))]
120 #[unsafe(method_family = none)]
121 pub fn isDisplayingRepresentativeItem(&self) -> bool;
122
123 #[unsafe(method(alwaysAvailable))]
125 #[unsafe(method_family = none)]
126 pub fn alwaysAvailable(&self) -> bool;
127
128 #[unsafe(method(setAlwaysAvailable:))]
130 #[unsafe(method_family = none)]
131 pub fn setAlwaysAvailable(&self, always_available: bool);
132
133 #[cfg(feature = "UIMenuElement")]
134 #[unsafe(method(menuRepresentation))]
136 #[unsafe(method_family = none)]
137 pub fn menuRepresentation(&self) -> Option<Retained<UIMenuElement>>;
138
139 #[cfg(feature = "UIMenuElement")]
140 #[unsafe(method(setMenuRepresentation:))]
144 #[unsafe(method_family = none)]
145 pub fn setMenuRepresentation(&self, menu_representation: Option<&UIMenuElement>);
146
147 #[unsafe(method(isHidden))]
149 #[unsafe(method_family = none)]
150 pub fn isHidden(&self) -> bool;
151
152 #[unsafe(method(setHidden:))]
154 #[unsafe(method_family = none)]
155 pub fn setHidden(&self, hidden: bool);
156 );
157}
158
159impl UIBarButtonItemGroup {
161 extern_methods!(
162 #[unsafe(method(init))]
163 #[unsafe(method_family = init)]
164 pub fn init(this: Allocated<Self>) -> Retained<Self>;
165
166 #[unsafe(method(new))]
167 #[unsafe(method_family = new)]
168 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
169 );
170}
171
172#[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
174impl UIBarButtonItem {
175 extern_methods!(
176 #[unsafe(method(buttonGroup))]
178 #[unsafe(method_family = none)]
179 pub fn buttonGroup(&self) -> Option<Retained<UIBarButtonItemGroup>>;
180 );
181}