objc2_ui_kit/generated/
UIContentUnavailableConfiguration.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct UIContentUnavailableAlignment(pub NSInteger);
17impl UIContentUnavailableAlignment {
18 #[doc(alias = "UIContentUnavailableAlignmentCenter")]
19 pub const Center: Self = Self(0);
20 #[doc(alias = "UIContentUnavailableAlignmentNatural")]
21 pub const Natural: Self = Self(1);
22}
23
24unsafe impl Encode for UIContentUnavailableAlignment {
25 const ENCODING: Encoding = NSInteger::ENCODING;
26}
27
28unsafe impl RefEncode for UIContentUnavailableAlignment {
29 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
30}
31
32extern_class!(
33 #[unsafe(super(NSObject))]
35 #[thread_kind = MainThreadOnly]
36 #[derive(Debug, PartialEq, Eq, Hash)]
37 pub struct UIContentUnavailableConfiguration;
38);
39
40extern_conformance!(
41 unsafe impl NSCoding for UIContentUnavailableConfiguration {}
42);
43
44extern_conformance!(
45 unsafe impl NSCopying for UIContentUnavailableConfiguration {}
46);
47
48unsafe impl CopyingHelper for UIContentUnavailableConfiguration {
49 type Result = Self;
50}
51
52extern_conformance!(
53 unsafe impl NSObjectProtocol for UIContentUnavailableConfiguration {}
54);
55
56extern_conformance!(
57 unsafe impl NSSecureCoding for UIContentUnavailableConfiguration {}
58);
59
60#[cfg(feature = "UIContentConfiguration")]
61extern_conformance!(
62 unsafe impl UIContentConfiguration for UIContentUnavailableConfiguration {}
63);
64
65impl UIContentUnavailableConfiguration {
66 extern_methods!(
67 #[unsafe(method(emptyConfiguration))]
69 #[unsafe(method_family = none)]
70 pub fn emptyConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
71
72 #[unsafe(method(loadingConfiguration))]
74 #[unsafe(method_family = none)]
75 pub fn loadingConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
76
77 #[unsafe(method(searchConfiguration))]
79 #[unsafe(method_family = none)]
80 pub fn searchConfiguration(mtm: MainThreadMarker) -> Retained<Self>;
81
82 #[unsafe(method(new))]
83 #[unsafe(method_family = new)]
84 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
85
86 #[unsafe(method(init))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90 #[cfg(feature = "UIImage")]
91 #[unsafe(method(image))]
93 #[unsafe(method_family = none)]
94 pub fn image(&self) -> Option<Retained<UIImage>>;
95
96 #[cfg(feature = "UIImage")]
97 #[unsafe(method(setImage:))]
99 #[unsafe(method_family = none)]
100 pub fn setImage(&self, image: Option<&UIImage>);
101
102 #[cfg(feature = "UIContentUnavailableImageProperties")]
103 #[unsafe(method(imageProperties))]
105 #[unsafe(method_family = none)]
106 pub fn imageProperties(&self) -> Retained<UIContentUnavailableImageProperties>;
107
108 #[unsafe(method(text))]
110 #[unsafe(method_family = none)]
111 pub fn text(&self) -> Option<Retained<NSString>>;
112
113 #[unsafe(method(setText:))]
117 #[unsafe(method_family = none)]
118 pub fn setText(&self, text: Option<&NSString>);
119
120 #[unsafe(method(attributedText))]
122 #[unsafe(method_family = none)]
123 pub fn attributedText(&self) -> Option<Retained<NSAttributedString>>;
124
125 #[unsafe(method(setAttributedText:))]
129 #[unsafe(method_family = none)]
130 pub fn setAttributedText(&self, attributed_text: Option<&NSAttributedString>);
131
132 #[cfg(feature = "UIContentUnavailableTextProperties")]
133 #[unsafe(method(textProperties))]
135 #[unsafe(method_family = none)]
136 pub fn textProperties(&self) -> Retained<UIContentUnavailableTextProperties>;
137
138 #[unsafe(method(secondaryText))]
140 #[unsafe(method_family = none)]
141 pub fn secondaryText(&self) -> Option<Retained<NSString>>;
142
143 #[unsafe(method(setSecondaryText:))]
147 #[unsafe(method_family = none)]
148 pub fn setSecondaryText(&self, secondary_text: Option<&NSString>);
149
150 #[unsafe(method(secondaryAttributedText))]
152 #[unsafe(method_family = none)]
153 pub fn secondaryAttributedText(&self) -> Option<Retained<NSAttributedString>>;
154
155 #[unsafe(method(setSecondaryAttributedText:))]
159 #[unsafe(method_family = none)]
160 pub fn setSecondaryAttributedText(
161 &self,
162 secondary_attributed_text: Option<&NSAttributedString>,
163 );
164
165 #[cfg(feature = "UIContentUnavailableTextProperties")]
166 #[unsafe(method(secondaryTextProperties))]
168 #[unsafe(method_family = none)]
169 pub fn secondaryTextProperties(&self) -> Retained<UIContentUnavailableTextProperties>;
170
171 #[cfg(feature = "UIButtonConfiguration")]
172 #[unsafe(method(button))]
174 #[unsafe(method_family = none)]
175 pub fn button(&self) -> Retained<UIButtonConfiguration>;
176
177 #[cfg(feature = "UIButtonConfiguration")]
178 #[unsafe(method(setButton:))]
180 #[unsafe(method_family = none)]
181 pub fn setButton(&self, button: &UIButtonConfiguration);
182
183 #[cfg(feature = "UIContentUnavailableButtonProperties")]
184 #[unsafe(method(buttonProperties))]
186 #[unsafe(method_family = none)]
187 pub fn buttonProperties(&self) -> Retained<UIContentUnavailableButtonProperties>;
188
189 #[cfg(feature = "UIButtonConfiguration")]
190 #[unsafe(method(secondaryButton))]
192 #[unsafe(method_family = none)]
193 pub fn secondaryButton(&self) -> Retained<UIButtonConfiguration>;
194
195 #[cfg(feature = "UIButtonConfiguration")]
196 #[unsafe(method(setSecondaryButton:))]
198 #[unsafe(method_family = none)]
199 pub fn setSecondaryButton(&self, secondary_button: &UIButtonConfiguration);
200
201 #[cfg(feature = "UIContentUnavailableButtonProperties")]
202 #[unsafe(method(secondaryButtonProperties))]
204 #[unsafe(method_family = none)]
205 pub fn secondaryButtonProperties(&self) -> Retained<UIContentUnavailableButtonProperties>;
206
207 #[unsafe(method(alignment))]
209 #[unsafe(method_family = none)]
210 pub fn alignment(&self) -> UIContentUnavailableAlignment;
211
212 #[unsafe(method(setAlignment:))]
214 #[unsafe(method_family = none)]
215 pub fn setAlignment(&self, alignment: UIContentUnavailableAlignment);
216
217 #[cfg(feature = "UIGeometry")]
218 #[unsafe(method(axesPreservingSuperviewLayoutMargins))]
220 #[unsafe(method_family = none)]
221 pub fn axesPreservingSuperviewLayoutMargins(&self) -> UIAxis;
222
223 #[cfg(feature = "UIGeometry")]
224 #[unsafe(method(setAxesPreservingSuperviewLayoutMargins:))]
226 #[unsafe(method_family = none)]
227 pub fn setAxesPreservingSuperviewLayoutMargins(
228 &self,
229 axes_preserving_superview_layout_margins: UIAxis,
230 );
231
232 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
233 #[unsafe(method(directionalLayoutMargins))]
235 #[unsafe(method_family = none)]
236 pub fn directionalLayoutMargins(&self) -> NSDirectionalEdgeInsets;
237
238 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
239 #[unsafe(method(setDirectionalLayoutMargins:))]
241 #[unsafe(method_family = none)]
242 pub fn setDirectionalLayoutMargins(
243 &self,
244 directional_layout_margins: NSDirectionalEdgeInsets,
245 );
246
247 #[cfg(feature = "objc2-core-foundation")]
248 #[unsafe(method(imageToTextPadding))]
250 #[unsafe(method_family = none)]
251 pub fn imageToTextPadding(&self) -> CGFloat;
252
253 #[cfg(feature = "objc2-core-foundation")]
254 #[unsafe(method(setImageToTextPadding:))]
256 #[unsafe(method_family = none)]
257 pub fn setImageToTextPadding(&self, image_to_text_padding: CGFloat);
258
259 #[cfg(feature = "objc2-core-foundation")]
260 #[unsafe(method(textToSecondaryTextPadding))]
262 #[unsafe(method_family = none)]
263 pub fn textToSecondaryTextPadding(&self) -> CGFloat;
264
265 #[cfg(feature = "objc2-core-foundation")]
266 #[unsafe(method(setTextToSecondaryTextPadding:))]
268 #[unsafe(method_family = none)]
269 pub fn setTextToSecondaryTextPadding(&self, text_to_secondary_text_padding: CGFloat);
270
271 #[cfg(feature = "objc2-core-foundation")]
272 #[unsafe(method(textToButtonPadding))]
274 #[unsafe(method_family = none)]
275 pub fn textToButtonPadding(&self) -> CGFloat;
276
277 #[cfg(feature = "objc2-core-foundation")]
278 #[unsafe(method(setTextToButtonPadding:))]
280 #[unsafe(method_family = none)]
281 pub fn setTextToButtonPadding(&self, text_to_button_padding: CGFloat);
282
283 #[cfg(feature = "objc2-core-foundation")]
284 #[unsafe(method(buttonToSecondaryButtonPadding))]
286 #[unsafe(method_family = none)]
287 pub fn buttonToSecondaryButtonPadding(&self) -> CGFloat;
288
289 #[cfg(feature = "objc2-core-foundation")]
290 #[unsafe(method(setButtonToSecondaryButtonPadding:))]
292 #[unsafe(method_family = none)]
293 pub fn setButtonToSecondaryButtonPadding(
294 &self,
295 button_to_secondary_button_padding: CGFloat,
296 );
297
298 #[cfg(feature = "UIBackgroundConfiguration")]
299 #[unsafe(method(background))]
301 #[unsafe(method_family = none)]
302 pub fn background(&self) -> Retained<UIBackgroundConfiguration>;
303
304 #[cfg(feature = "UIBackgroundConfiguration")]
305 #[unsafe(method(setBackground:))]
307 #[unsafe(method_family = none)]
308 pub fn setBackground(&self, background: &UIBackgroundConfiguration);
309 );
310}