1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UITabBarItemStateAppearance;

    unsafe impl ClassType for UITabBarItemStateAppearance {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSObjectProtocol for UITabBarItemStateAppearance {}

extern_methods!(
    unsafe impl UITabBarItemStateAppearance {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;

        #[method_id(@__retain_semantics Other titleTextAttributes)]
        pub unsafe fn titleTextAttributes(
            &self,
        ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;

        #[method(setTitleTextAttributes:)]
        pub unsafe fn setTitleTextAttributes(
            &self,
            title_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
        );

        #[cfg(feature = "UIGeometry")]
        #[method(titlePositionAdjustment)]
        pub unsafe fn titlePositionAdjustment(&self) -> UIOffset;

        #[cfg(feature = "UIGeometry")]
        #[method(setTitlePositionAdjustment:)]
        pub unsafe fn setTitlePositionAdjustment(&self, title_position_adjustment: UIOffset);

        #[cfg(feature = "UIColor")]
        #[method_id(@__retain_semantics Other iconColor)]
        pub unsafe fn iconColor(&self) -> Option<Retained<UIColor>>;

        #[cfg(feature = "UIColor")]
        #[method(setIconColor:)]
        pub unsafe fn setIconColor(&self, icon_color: Option<&UIColor>);

        #[cfg(feature = "UIGeometry")]
        #[method(badgePositionAdjustment)]
        pub unsafe fn badgePositionAdjustment(&self) -> UIOffset;

        #[cfg(feature = "UIGeometry")]
        #[method(setBadgePositionAdjustment:)]
        pub unsafe fn setBadgePositionAdjustment(&self, badge_position_adjustment: UIOffset);

        #[cfg(feature = "UIColor")]
        #[method_id(@__retain_semantics Other badgeBackgroundColor)]
        pub unsafe fn badgeBackgroundColor(&self) -> Option<Retained<UIColor>>;

        #[cfg(feature = "UIColor")]
        #[method(setBadgeBackgroundColor:)]
        pub unsafe fn setBadgeBackgroundColor(&self, badge_background_color: Option<&UIColor>);

        #[method_id(@__retain_semantics Other badgeTextAttributes)]
        pub unsafe fn badgeTextAttributes(
            &self,
        ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;

        #[method(setBadgeTextAttributes:)]
        pub unsafe fn setBadgeTextAttributes(
            &self,
            badge_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
        );

        #[cfg(feature = "UIGeometry")]
        #[method(badgeTitlePositionAdjustment)]
        pub unsafe fn badgeTitlePositionAdjustment(&self) -> UIOffset;

        #[cfg(feature = "UIGeometry")]
        #[method(setBadgeTitlePositionAdjustment:)]
        pub unsafe fn setBadgeTitlePositionAdjustment(
            &self,
            badge_title_position_adjustment: UIOffset,
        );
    }
);

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UITabBarItemAppearanceStyle(pub NSInteger);
impl UITabBarItemAppearanceStyle {
    #[doc(alias = "UITabBarItemAppearanceStyleStacked")]
    pub const Stacked: Self = Self(0);
    #[doc(alias = "UITabBarItemAppearanceStyleInline")]
    pub const Inline: Self = Self(1);
    #[doc(alias = "UITabBarItemAppearanceStyleCompactInline")]
    pub const CompactInline: Self = Self(2);
}

unsafe impl Encode for UITabBarItemAppearanceStyle {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for UITabBarItemAppearanceStyle {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UITabBarItemAppearance;

    unsafe impl ClassType for UITabBarItemAppearance {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSCoding for UITabBarItemAppearance {}

unsafe impl NSCopying for UITabBarItemAppearance {}

unsafe impl NSObjectProtocol for UITabBarItemAppearance {}

unsafe impl NSSecureCoding for UITabBarItemAppearance {}

extern_methods!(
    unsafe impl UITabBarItemAppearance {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithStyle:)]
        pub unsafe fn initWithStyle(
            this: Allocated<Self>,
            style: UITabBarItemAppearanceStyle,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;

        #[method_id(@__retain_semantics CopyOrMutCopy copy)]
        pub unsafe fn copy(&self) -> Retained<Self>;

        #[method(configureWithDefaultForStyle:)]
        pub unsafe fn configureWithDefaultForStyle(&self, style: UITabBarItemAppearanceStyle);

        #[method_id(@__retain_semantics Other normal)]
        pub unsafe fn normal(&self) -> Retained<UITabBarItemStateAppearance>;

        #[method_id(@__retain_semantics Other selected)]
        pub unsafe fn selected(&self) -> Retained<UITabBarItemStateAppearance>;

        #[method_id(@__retain_semantics Other disabled)]
        pub unsafe fn disabled(&self) -> Retained<UITabBarItemStateAppearance>;

        #[method_id(@__retain_semantics Other focused)]
        pub unsafe fn focused(&self) -> Retained<UITabBarItemStateAppearance>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl UITabBarItemAppearance {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "UIBarAppearance")]
    pub struct UITabBarAppearance;

    #[cfg(feature = "UIBarAppearance")]
    unsafe impl ClassType for UITabBarAppearance {
        #[inherits(NSObject)]
        type Super = UIBarAppearance;
        type Mutability = MainThreadOnly;
    }
);

#[cfg(feature = "UIBarAppearance")]
unsafe impl NSCoding for UITabBarAppearance {}

#[cfg(feature = "UIBarAppearance")]
unsafe impl NSCopying for UITabBarAppearance {}

#[cfg(feature = "UIBarAppearance")]
unsafe impl NSObjectProtocol for UITabBarAppearance {}

#[cfg(feature = "UIBarAppearance")]
unsafe impl NSSecureCoding for UITabBarAppearance {}

extern_methods!(
    #[cfg(feature = "UIBarAppearance")]
    unsafe impl UITabBarAppearance {
        #[method_id(@__retain_semantics Other stackedLayoutAppearance)]
        pub unsafe fn stackedLayoutAppearance(&self) -> Retained<UITabBarItemAppearance>;

        #[method(setStackedLayoutAppearance:)]
        pub unsafe fn setStackedLayoutAppearance(
            &self,
            stacked_layout_appearance: &UITabBarItemAppearance,
        );

        #[method_id(@__retain_semantics Other inlineLayoutAppearance)]
        pub unsafe fn inlineLayoutAppearance(&self) -> Retained<UITabBarItemAppearance>;

        #[method(setInlineLayoutAppearance:)]
        pub unsafe fn setInlineLayoutAppearance(
            &self,
            inline_layout_appearance: &UITabBarItemAppearance,
        );

        #[method_id(@__retain_semantics Other compactInlineLayoutAppearance)]
        pub unsafe fn compactInlineLayoutAppearance(&self) -> Retained<UITabBarItemAppearance>;

        #[method(setCompactInlineLayoutAppearance:)]
        pub unsafe fn setCompactInlineLayoutAppearance(
            &self,
            compact_inline_layout_appearance: &UITabBarItemAppearance,
        );

        #[cfg(feature = "UIColor")]
        #[method_id(@__retain_semantics Other selectionIndicatorTintColor)]
        pub unsafe fn selectionIndicatorTintColor(&self) -> Option<Retained<UIColor>>;

        #[cfg(feature = "UIColor")]
        #[method(setSelectionIndicatorTintColor:)]
        pub unsafe fn setSelectionIndicatorTintColor(
            &self,
            selection_indicator_tint_color: Option<&UIColor>,
        );

        #[cfg(feature = "UIImage")]
        #[method_id(@__retain_semantics Other selectionIndicatorImage)]
        pub unsafe fn selectionIndicatorImage(&self) -> Option<Retained<UIImage>>;

        #[cfg(feature = "UIImage")]
        #[method(setSelectionIndicatorImage:)]
        pub unsafe fn setSelectionIndicatorImage(
            &self,
            selection_indicator_image: Option<&UIImage>,
        );

        #[cfg(feature = "UITabBar")]
        #[method(stackedItemPositioning)]
        pub unsafe fn stackedItemPositioning(&self) -> UITabBarItemPositioning;

        #[cfg(feature = "UITabBar")]
        #[method(setStackedItemPositioning:)]
        pub unsafe fn setStackedItemPositioning(
            &self,
            stacked_item_positioning: UITabBarItemPositioning,
        );

        #[method(stackedItemWidth)]
        pub unsafe fn stackedItemWidth(&self) -> CGFloat;

        #[method(setStackedItemWidth:)]
        pub unsafe fn setStackedItemWidth(&self, stacked_item_width: CGFloat);

        #[method(stackedItemSpacing)]
        pub unsafe fn stackedItemSpacing(&self) -> CGFloat;

        #[method(setStackedItemSpacing:)]
        pub unsafe fn setStackedItemSpacing(&self, stacked_item_spacing: CGFloat);
    }
);

extern_methods!(
    /// Methods declared on superclass `UIBarAppearance`
    #[cfg(feature = "UIBarAppearance")]
    unsafe impl UITabBarAppearance {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[cfg(feature = "UIDevice")]
        #[method_id(@__retain_semantics Init initWithIdiom:)]
        pub unsafe fn initWithIdiom(
            this: Allocated<Self>,
            idiom: UIUserInterfaceIdiom,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithBarAppearance:)]
        pub unsafe fn initWithBarAppearance(
            this: Allocated<Self>,
            bar_appearance: &UIBarAppearance,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "UIBarAppearance")]
    unsafe impl UITabBarAppearance {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);