objc2_ui_kit/generated/
UITabBarAppearance.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
12extern_class!(
13 #[unsafe(super(NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct UITabBarItemStateAppearance;
18);
19
20extern_conformance!(
21 unsafe impl NSObjectProtocol for UITabBarItemStateAppearance {}
22);
23
24impl UITabBarItemStateAppearance {
25 extern_methods!(
26 #[unsafe(method(init))]
27 #[unsafe(method_family = init)]
28 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
29
30 #[unsafe(method(new))]
31 #[unsafe(method_family = new)]
32 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
33
34 #[unsafe(method(titleTextAttributes))]
36 #[unsafe(method_family = none)]
37 pub fn titleTextAttributes(
38 &self,
39 ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
40
41 #[unsafe(method(setTitleTextAttributes:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn setTitleTextAttributes(
51 &self,
52 title_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
53 );
54
55 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
56 #[unsafe(method(titlePositionAdjustment))]
58 #[unsafe(method_family = none)]
59 pub fn titlePositionAdjustment(&self) -> UIOffset;
60
61 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
62 #[unsafe(method(setTitlePositionAdjustment:))]
64 #[unsafe(method_family = none)]
65 pub fn setTitlePositionAdjustment(&self, title_position_adjustment: UIOffset);
66
67 #[cfg(feature = "UIColor")]
68 #[unsafe(method(iconColor))]
70 #[unsafe(method_family = none)]
71 pub fn iconColor(&self) -> Option<Retained<UIColor>>;
72
73 #[cfg(feature = "UIColor")]
74 #[unsafe(method(setIconColor:))]
78 #[unsafe(method_family = none)]
79 pub fn setIconColor(&self, icon_color: Option<&UIColor>);
80
81 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
82 #[unsafe(method(badgePositionAdjustment))]
84 #[unsafe(method_family = none)]
85 pub fn badgePositionAdjustment(&self) -> UIOffset;
86
87 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
88 #[unsafe(method(setBadgePositionAdjustment:))]
90 #[unsafe(method_family = none)]
91 pub fn setBadgePositionAdjustment(&self, badge_position_adjustment: UIOffset);
92
93 #[cfg(feature = "UIColor")]
94 #[unsafe(method(badgeBackgroundColor))]
96 #[unsafe(method_family = none)]
97 pub fn badgeBackgroundColor(&self) -> Option<Retained<UIColor>>;
98
99 #[cfg(feature = "UIColor")]
100 #[unsafe(method(setBadgeBackgroundColor:))]
104 #[unsafe(method_family = none)]
105 pub fn setBadgeBackgroundColor(&self, badge_background_color: Option<&UIColor>);
106
107 #[unsafe(method(badgeTextAttributes))]
109 #[unsafe(method_family = none)]
110 pub fn badgeTextAttributes(
111 &self,
112 ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
113
114 #[unsafe(method(setBadgeTextAttributes:))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn setBadgeTextAttributes(
124 &self,
125 badge_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
126 );
127
128 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
129 #[unsafe(method(badgeTitlePositionAdjustment))]
131 #[unsafe(method_family = none)]
132 pub fn badgeTitlePositionAdjustment(&self) -> UIOffset;
133
134 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
135 #[unsafe(method(setBadgeTitlePositionAdjustment:))]
137 #[unsafe(method_family = none)]
138 pub fn setBadgeTitlePositionAdjustment(&self, badge_title_position_adjustment: UIOffset);
139 );
140}
141
142#[repr(transparent)]
145#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
146pub struct UITabBarItemAppearanceStyle(pub NSInteger);
147impl UITabBarItemAppearanceStyle {
148 #[doc(alias = "UITabBarItemAppearanceStyleStacked")]
149 pub const Stacked: Self = Self(0);
150 #[doc(alias = "UITabBarItemAppearanceStyleInline")]
151 pub const Inline: Self = Self(1);
152 #[doc(alias = "UITabBarItemAppearanceStyleCompactInline")]
153 pub const CompactInline: Self = Self(2);
154}
155
156unsafe impl Encode for UITabBarItemAppearanceStyle {
157 const ENCODING: Encoding = NSInteger::ENCODING;
158}
159
160unsafe impl RefEncode for UITabBarItemAppearanceStyle {
161 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
162}
163
164extern_class!(
165 #[unsafe(super(NSObject))]
167 #[thread_kind = MainThreadOnly]
168 #[derive(Debug, PartialEq, Eq, Hash)]
169 pub struct UITabBarItemAppearance;
170);
171
172extern_conformance!(
173 unsafe impl NSCoding for UITabBarItemAppearance {}
174);
175
176extern_conformance!(
177 unsafe impl NSCopying for UITabBarItemAppearance {}
178);
179
180unsafe impl CopyingHelper for UITabBarItemAppearance {
181 type Result = Self;
182}
183
184extern_conformance!(
185 unsafe impl NSObjectProtocol for UITabBarItemAppearance {}
186);
187
188extern_conformance!(
189 unsafe impl NSSecureCoding for UITabBarItemAppearance {}
190);
191
192impl UITabBarItemAppearance {
193 extern_methods!(
194 #[unsafe(method(init))]
196 #[unsafe(method_family = init)]
197 pub fn init(this: Allocated<Self>) -> Retained<Self>;
198
199 #[unsafe(method(initWithStyle:))]
201 #[unsafe(method_family = init)]
202 pub fn initWithStyle(
203 this: Allocated<Self>,
204 style: UITabBarItemAppearanceStyle,
205 ) -> Retained<Self>;
206
207 #[unsafe(method(initWithCoder:))]
211 #[unsafe(method_family = init)]
212 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
213
214 #[unsafe(method(copy))]
215 #[unsafe(method_family = copy)]
216 pub fn copy(&self) -> Retained<Self>;
217
218 #[unsafe(method(configureWithDefaultForStyle:))]
220 #[unsafe(method_family = none)]
221 pub fn configureWithDefaultForStyle(&self, style: UITabBarItemAppearanceStyle);
222
223 #[unsafe(method(normal))]
225 #[unsafe(method_family = none)]
226 pub fn normal(&self) -> Retained<UITabBarItemStateAppearance>;
227
228 #[unsafe(method(selected))]
230 #[unsafe(method_family = none)]
231 pub fn selected(&self) -> Retained<UITabBarItemStateAppearance>;
232
233 #[unsafe(method(disabled))]
235 #[unsafe(method_family = none)]
236 pub fn disabled(&self) -> Retained<UITabBarItemStateAppearance>;
237
238 #[unsafe(method(focused))]
240 #[unsafe(method_family = none)]
241 pub fn focused(&self) -> Retained<UITabBarItemStateAppearance>;
242 );
243}
244
245impl UITabBarItemAppearance {
247 extern_methods!(
248 #[unsafe(method(new))]
249 #[unsafe(method_family = new)]
250 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
251 );
252}
253
254extern_class!(
255 #[unsafe(super(UIBarAppearance, NSObject))]
257 #[thread_kind = MainThreadOnly]
258 #[derive(Debug, PartialEq, Eq, Hash)]
259 #[cfg(feature = "UIBarAppearance")]
260 pub struct UITabBarAppearance;
261);
262
263#[cfg(feature = "UIBarAppearance")]
264extern_conformance!(
265 unsafe impl NSCoding for UITabBarAppearance {}
266);
267
268#[cfg(feature = "UIBarAppearance")]
269extern_conformance!(
270 unsafe impl NSCopying for UITabBarAppearance {}
271);
272
273#[cfg(feature = "UIBarAppearance")]
274unsafe impl CopyingHelper for UITabBarAppearance {
275 type Result = Self;
276}
277
278#[cfg(feature = "UIBarAppearance")]
279extern_conformance!(
280 unsafe impl NSObjectProtocol for UITabBarAppearance {}
281);
282
283#[cfg(feature = "UIBarAppearance")]
284extern_conformance!(
285 unsafe impl NSSecureCoding for UITabBarAppearance {}
286);
287
288#[cfg(feature = "UIBarAppearance")]
289impl UITabBarAppearance {
290 extern_methods!(
291 #[unsafe(method(stackedLayoutAppearance))]
293 #[unsafe(method_family = none)]
294 pub fn stackedLayoutAppearance(&self) -> Retained<UITabBarItemAppearance>;
295
296 #[unsafe(method(setStackedLayoutAppearance:))]
300 #[unsafe(method_family = none)]
301 pub fn setStackedLayoutAppearance(
302 &self,
303 stacked_layout_appearance: &UITabBarItemAppearance,
304 );
305
306 #[unsafe(method(inlineLayoutAppearance))]
308 #[unsafe(method_family = none)]
309 pub fn inlineLayoutAppearance(&self) -> Retained<UITabBarItemAppearance>;
310
311 #[unsafe(method(setInlineLayoutAppearance:))]
315 #[unsafe(method_family = none)]
316 pub fn setInlineLayoutAppearance(&self, inline_layout_appearance: &UITabBarItemAppearance);
317
318 #[unsafe(method(compactInlineLayoutAppearance))]
320 #[unsafe(method_family = none)]
321 pub fn compactInlineLayoutAppearance(&self) -> Retained<UITabBarItemAppearance>;
322
323 #[unsafe(method(setCompactInlineLayoutAppearance:))]
327 #[unsafe(method_family = none)]
328 pub fn setCompactInlineLayoutAppearance(
329 &self,
330 compact_inline_layout_appearance: &UITabBarItemAppearance,
331 );
332
333 #[cfg(feature = "UIColor")]
334 #[unsafe(method(selectionIndicatorTintColor))]
336 #[unsafe(method_family = none)]
337 pub fn selectionIndicatorTintColor(&self) -> Option<Retained<UIColor>>;
338
339 #[cfg(feature = "UIColor")]
340 #[unsafe(method(setSelectionIndicatorTintColor:))]
344 #[unsafe(method_family = none)]
345 pub fn setSelectionIndicatorTintColor(
346 &self,
347 selection_indicator_tint_color: Option<&UIColor>,
348 );
349
350 #[cfg(feature = "UIImage")]
351 #[unsafe(method(selectionIndicatorImage))]
353 #[unsafe(method_family = none)]
354 pub fn selectionIndicatorImage(&self) -> Option<Retained<UIImage>>;
355
356 #[cfg(feature = "UIImage")]
357 #[unsafe(method(setSelectionIndicatorImage:))]
359 #[unsafe(method_family = none)]
360 pub fn setSelectionIndicatorImage(&self, selection_indicator_image: Option<&UIImage>);
361
362 #[cfg(feature = "UITabBar")]
363 #[unsafe(method(stackedItemPositioning))]
365 #[unsafe(method_family = none)]
366 pub fn stackedItemPositioning(&self) -> UITabBarItemPositioning;
367
368 #[cfg(feature = "UITabBar")]
369 #[unsafe(method(setStackedItemPositioning:))]
371 #[unsafe(method_family = none)]
372 pub fn setStackedItemPositioning(&self, stacked_item_positioning: UITabBarItemPositioning);
373
374 #[cfg(feature = "objc2-core-foundation")]
375 #[unsafe(method(stackedItemWidth))]
376 #[unsafe(method_family = none)]
377 pub fn stackedItemWidth(&self) -> CGFloat;
378
379 #[cfg(feature = "objc2-core-foundation")]
380 #[unsafe(method(setStackedItemWidth:))]
382 #[unsafe(method_family = none)]
383 pub fn setStackedItemWidth(&self, stacked_item_width: CGFloat);
384
385 #[cfg(feature = "objc2-core-foundation")]
386 #[unsafe(method(stackedItemSpacing))]
387 #[unsafe(method_family = none)]
388 pub fn stackedItemSpacing(&self) -> CGFloat;
389
390 #[cfg(feature = "objc2-core-foundation")]
391 #[unsafe(method(setStackedItemSpacing:))]
393 #[unsafe(method_family = none)]
394 pub fn setStackedItemSpacing(&self, stacked_item_spacing: CGFloat);
395 );
396}
397
398#[cfg(feature = "UIBarAppearance")]
400impl UITabBarAppearance {
401 extern_methods!(
402 #[unsafe(method(init))]
404 #[unsafe(method_family = init)]
405 pub fn init(this: Allocated<Self>) -> Retained<Self>;
406
407 #[cfg(feature = "UIDevice")]
408 #[unsafe(method(initWithIdiom:))]
410 #[unsafe(method_family = init)]
411 pub fn initWithIdiom(this: Allocated<Self>, idiom: UIUserInterfaceIdiom) -> Retained<Self>;
412
413 #[unsafe(method(initWithBarAppearance:))]
415 #[unsafe(method_family = init)]
416 pub fn initWithBarAppearance(
417 this: Allocated<Self>,
418 bar_appearance: &UIBarAppearance,
419 ) -> Retained<Self>;
420
421 #[unsafe(method(initWithCoder:))]
425 #[unsafe(method_family = init)]
426 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
427 );
428}
429
430#[cfg(feature = "UIBarAppearance")]
432impl UITabBarAppearance {
433 extern_methods!(
434 #[unsafe(method(new))]
435 #[unsafe(method_family = new)]
436 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
437 );
438}