objc2_ui_kit/generated/
UIMainMenuSystem.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(UIMenuSystem, NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[cfg(feature = "UIMenuSystem")]
18 pub struct UIMainMenuSystem;
19);
20
21#[cfg(feature = "UIMenuSystem")]
22extern_conformance!(
23 unsafe impl NSObjectProtocol for UIMainMenuSystem {}
24);
25
26#[cfg(feature = "UIMenuSystem")]
27impl UIMainMenuSystem {
28 extern_methods!(
29 #[unsafe(method(sharedSystem))]
31 #[unsafe(method_family = none)]
32 pub fn sharedSystem(mtm: MainThreadMarker) -> Retained<UIMainMenuSystem>;
33
34 #[cfg(all(feature = "UIMenuBuilder", feature = "block2"))]
35 #[unsafe(method(setBuildConfiguration:buildHandler:))]
41 #[unsafe(method_family = none)]
42 pub fn setBuildConfiguration_buildHandler(
43 &self,
44 configuration: &UIMainMenuSystemConfiguration,
45 build_handler: Option<
46 &block2::DynBlock<dyn Fn(NonNull<ProtocolObject<dyn UIMenuBuilder>>)>,
47 >,
48 );
49
50 #[unsafe(method(mainSystem))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn mainSystem(mtm: MainThreadMarker) -> Retained<UIMenuSystem>;
53
54 #[unsafe(method(contextSystem))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn contextSystem(mtm: MainThreadMarker) -> Retained<UIMenuSystem>;
57 );
58}
59
60#[cfg(feature = "UIMenuSystem")]
62impl UIMainMenuSystem {
63 extern_methods!(
64 #[unsafe(method(new))]
65 #[unsafe(method_family = new)]
66 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
67
68 #[unsafe(method(init))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71 );
72}
73
74extern_class!(
75 #[unsafe(super(NSObject))]
80 #[thread_kind = MainThreadOnly]
81 #[derive(Debug, PartialEq, Eq, Hash)]
82 pub struct UIMainMenuSystemConfiguration;
83);
84
85extern_conformance!(
86 unsafe impl NSCopying for UIMainMenuSystemConfiguration {}
87);
88
89unsafe impl CopyingHelper for UIMainMenuSystemConfiguration {
90 type Result = Self;
91}
92
93extern_conformance!(
94 unsafe impl NSObjectProtocol for UIMainMenuSystemConfiguration {}
95);
96
97impl UIMainMenuSystemConfiguration {
98 extern_methods!(
99 #[cfg(feature = "UIMenuSystem")]
100 #[unsafe(method(newScenePreference))]
102 #[unsafe(method_family = none)]
103 pub fn newScenePreference(&self) -> UIMenuSystemElementGroupPreference;
104
105 #[cfg(feature = "UIMenuSystem")]
106 #[unsafe(method(setNewScenePreference:))]
108 #[unsafe(method_family = none)]
109 pub fn setNewScenePreference(
110 &self,
111 new_scene_preference: UIMenuSystemElementGroupPreference,
112 );
113
114 #[cfg(feature = "UIMenuSystem")]
115 #[unsafe(method(documentPreference))]
117 #[unsafe(method_family = none)]
118 pub fn documentPreference(&self) -> UIMenuSystemElementGroupPreference;
119
120 #[cfg(feature = "UIMenuSystem")]
121 #[unsafe(method(setDocumentPreference:))]
123 #[unsafe(method_family = none)]
124 pub fn setDocumentPreference(
125 &self,
126 document_preference: UIMenuSystemElementGroupPreference,
127 );
128
129 #[cfg(feature = "UIMenuSystem")]
130 #[unsafe(method(printingPreference))]
132 #[unsafe(method_family = none)]
133 pub fn printingPreference(&self) -> UIMenuSystemElementGroupPreference;
134
135 #[cfg(feature = "UIMenuSystem")]
136 #[unsafe(method(setPrintingPreference:))]
138 #[unsafe(method_family = none)]
139 pub fn setPrintingPreference(
140 &self,
141 printing_preference: UIMenuSystemElementGroupPreference,
142 );
143
144 #[cfg(feature = "UIMenuSystem")]
145 #[unsafe(method(findingPreference))]
147 #[unsafe(method_family = none)]
148 pub fn findingPreference(&self) -> UIMenuSystemElementGroupPreference;
149
150 #[cfg(feature = "UIMenuSystem")]
151 #[unsafe(method(setFindingPreference:))]
153 #[unsafe(method_family = none)]
154 pub fn setFindingPreference(&self, finding_preference: UIMenuSystemElementGroupPreference);
155
156 #[cfg(feature = "UIMenuSystem")]
157 #[unsafe(method(findingConfiguration))]
159 #[unsafe(method_family = none)]
160 pub fn findingConfiguration(&self) -> Retained<UIMenuSystemFindElementGroupConfiguration>;
161
162 #[cfg(feature = "UIMenuSystem")]
163 #[unsafe(method(toolbarPreference))]
165 #[unsafe(method_family = none)]
166 pub fn toolbarPreference(&self) -> UIMenuSystemElementGroupPreference;
167
168 #[cfg(feature = "UIMenuSystem")]
169 #[unsafe(method(setToolbarPreference:))]
171 #[unsafe(method_family = none)]
172 pub fn setToolbarPreference(&self, toolbar_preference: UIMenuSystemElementGroupPreference);
173
174 #[cfg(feature = "UIMenuSystem")]
175 #[unsafe(method(sidebarPreference))]
177 #[unsafe(method_family = none)]
178 pub fn sidebarPreference(&self) -> UIMenuSystemElementGroupPreference;
179
180 #[cfg(feature = "UIMenuSystem")]
181 #[unsafe(method(setSidebarPreference:))]
183 #[unsafe(method_family = none)]
184 pub fn setSidebarPreference(&self, sidebar_preference: UIMenuSystemElementGroupPreference);
185
186 #[cfg(feature = "UIMenuSystem")]
187 #[unsafe(method(inspectorPreference))]
189 #[unsafe(method_family = none)]
190 pub fn inspectorPreference(&self) -> UIMenuSystemElementGroupPreference;
191
192 #[cfg(feature = "UIMenuSystem")]
193 #[unsafe(method(setInspectorPreference:))]
195 #[unsafe(method_family = none)]
196 pub fn setInspectorPreference(
197 &self,
198 inspector_preference: UIMenuSystemElementGroupPreference,
199 );
200
201 #[cfg(feature = "UIMenuSystem")]
202 #[unsafe(method(textFormattingPreference))]
204 #[unsafe(method_family = none)]
205 pub fn textFormattingPreference(&self) -> UIMenuSystemElementGroupPreference;
206
207 #[cfg(feature = "UIMenuSystem")]
208 #[unsafe(method(setTextFormattingPreference:))]
210 #[unsafe(method_family = none)]
211 pub fn setTextFormattingPreference(
212 &self,
213 text_formatting_preference: UIMenuSystemElementGroupPreference,
214 );
215 );
216}
217
218impl UIMainMenuSystemConfiguration {
220 extern_methods!(
221 #[unsafe(method(init))]
222 #[unsafe(method_family = init)]
223 pub fn init(this: Allocated<Self>) -> Retained<Self>;
224
225 #[unsafe(method(new))]
226 #[unsafe(method_family = new)]
227 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
228 );
229}