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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-symbols")]
use objc2_symbols::*;

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIBarButtonItemStyle(pub NSInteger);
impl UIBarButtonItemStyle {
    #[doc(alias = "UIBarButtonItemStylePlain")]
    pub const Plain: Self = Self(0);
    #[deprecated]
    #[doc(alias = "UIBarButtonItemStyleBordered")]
    pub const Bordered: Self = Self(1);
    #[doc(alias = "UIBarButtonItemStyleDone")]
    pub const Done: Self = Self(2);
}

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

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

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct UIBarButtonSystemItem(pub NSInteger);
impl UIBarButtonSystemItem {
    #[doc(alias = "UIBarButtonSystemItemDone")]
    pub const Done: Self = Self(0);
    #[doc(alias = "UIBarButtonSystemItemCancel")]
    pub const Cancel: Self = Self(1);
    #[doc(alias = "UIBarButtonSystemItemEdit")]
    pub const Edit: Self = Self(2);
    #[doc(alias = "UIBarButtonSystemItemSave")]
    pub const Save: Self = Self(3);
    #[doc(alias = "UIBarButtonSystemItemAdd")]
    pub const Add: Self = Self(4);
    #[doc(alias = "UIBarButtonSystemItemFlexibleSpace")]
    pub const FlexibleSpace: Self = Self(5);
    #[doc(alias = "UIBarButtonSystemItemFixedSpace")]
    pub const FixedSpace: Self = Self(6);
    #[doc(alias = "UIBarButtonSystemItemCompose")]
    pub const Compose: Self = Self(7);
    #[doc(alias = "UIBarButtonSystemItemReply")]
    pub const Reply: Self = Self(8);
    #[doc(alias = "UIBarButtonSystemItemAction")]
    pub const Action: Self = Self(9);
    #[doc(alias = "UIBarButtonSystemItemOrganize")]
    pub const Organize: Self = Self(10);
    #[doc(alias = "UIBarButtonSystemItemBookmarks")]
    pub const Bookmarks: Self = Self(11);
    #[doc(alias = "UIBarButtonSystemItemSearch")]
    pub const Search: Self = Self(12);
    #[doc(alias = "UIBarButtonSystemItemRefresh")]
    pub const Refresh: Self = Self(13);
    #[doc(alias = "UIBarButtonSystemItemStop")]
    pub const Stop: Self = Self(14);
    #[doc(alias = "UIBarButtonSystemItemCamera")]
    pub const Camera: Self = Self(15);
    #[doc(alias = "UIBarButtonSystemItemTrash")]
    pub const Trash: Self = Self(16);
    #[doc(alias = "UIBarButtonSystemItemPlay")]
    pub const Play: Self = Self(17);
    #[doc(alias = "UIBarButtonSystemItemPause")]
    pub const Pause: Self = Self(18);
    #[doc(alias = "UIBarButtonSystemItemRewind")]
    pub const Rewind: Self = Self(19);
    #[doc(alias = "UIBarButtonSystemItemFastForward")]
    pub const FastForward: Self = Self(20);
    #[doc(alias = "UIBarButtonSystemItemUndo")]
    pub const Undo: Self = Self(21);
    #[doc(alias = "UIBarButtonSystemItemRedo")]
    pub const Redo: Self = Self(22);
    #[deprecated]
    #[doc(alias = "UIBarButtonSystemItemPageCurl")]
    pub const PageCurl: Self = Self(23);
    #[doc(alias = "UIBarButtonSystemItemClose")]
    pub const Close: Self = Self(24);
}

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

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

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

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

#[cfg(feature = "UIBarItem")]
unsafe impl NSCoding for UIBarButtonItem {}

#[cfg(feature = "UIBarItem")]
unsafe impl NSObjectProtocol for UIBarButtonItem {}

#[cfg(all(feature = "UIAppearance", feature = "UIBarItem"))]
unsafe impl UIAppearance for UIBarButtonItem {}

extern_methods!(
    #[cfg(feature = "UIBarItem")]
    unsafe impl UIBarButtonItem {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

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

        #[cfg(feature = "UIImage")]
        #[method_id(@__retain_semantics Init initWithImage:style:target:action:)]
        pub unsafe fn initWithImage_style_target_action(
            this: Allocated<Self>,
            image: Option<&UIImage>,
            style: UIBarButtonItemStyle,
            target: Option<&AnyObject>,
            action: Option<Sel>,
        ) -> Retained<Self>;

        #[cfg(feature = "UIImage")]
        #[method_id(@__retain_semantics Init initWithImage:landscapeImagePhone:style:target:action:)]
        pub unsafe fn initWithImage_landscapeImagePhone_style_target_action(
            this: Allocated<Self>,
            image: Option<&UIImage>,
            landscape_image_phone: Option<&UIImage>,
            style: UIBarButtonItemStyle,
            target: Option<&AnyObject>,
            action: Option<Sel>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithTitle:style:target:action:)]
        pub unsafe fn initWithTitle_style_target_action(
            this: Allocated<Self>,
            title: Option<&NSString>,
            style: UIBarButtonItemStyle,
            target: Option<&AnyObject>,
            action: Option<Sel>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithBarButtonSystemItem:target:action:)]
        pub unsafe fn initWithBarButtonSystemItem_target_action(
            this: Allocated<Self>,
            system_item: UIBarButtonSystemItem,
            target: Option<&AnyObject>,
            action: Option<Sel>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[method_id(@__retain_semantics Init initWithCustomView:)]
        pub unsafe fn initWithCustomView(
            this: Allocated<Self>,
            custom_view: &UIView,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Init initWithBarButtonSystemItem:primaryAction:)]
        pub unsafe fn initWithBarButtonSystemItem_primaryAction(
            this: Allocated<Self>,
            system_item: UIBarButtonSystemItem,
            primary_action: Option<&UIAction>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Init initWithPrimaryAction:)]
        pub unsafe fn initWithPrimaryAction(
            this: Allocated<Self>,
            primary_action: Option<&UIAction>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Init initWithBarButtonSystemItem:menu:)]
        pub unsafe fn initWithBarButtonSystemItem_menu(
            this: Allocated<Self>,
            system_item: UIBarButtonSystemItem,
            menu: Option<&UIMenu>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Init initWithTitle:menu:)]
        pub unsafe fn initWithTitle_menu(
            this: Allocated<Self>,
            title: Option<&NSString>,
            menu: Option<&UIMenu>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIImage", feature = "UIMenu", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Init initWithImage:menu:)]
        pub unsafe fn initWithImage_menu(
            this: Allocated<Self>,
            image: Option<&UIImage>,
            menu: Option<&UIMenu>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIAction", feature = "UIMenu", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Init initWithPrimaryAction:menu:)]
        pub unsafe fn initWithPrimaryAction_menu(
            this: Allocated<Self>,
            primary_action: Option<&UIAction>,
            menu: Option<&UIMenu>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIAction", feature = "UIMenu", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Init initWithBarButtonSystemItem:primaryAction:menu:)]
        pub unsafe fn initWithBarButtonSystemItem_primaryAction_menu(
            this: Allocated<Self>,
            system_item: UIBarButtonSystemItem,
            primary_action: Option<&UIAction>,
            menu: Option<&UIMenu>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "UIImage", feature = "UIMenu", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Init initWithTitle:image:target:action:menu:)]
        pub unsafe fn initWithTitle_image_target_action_menu(
            this: Allocated<Self>,
            title: Option<&NSString>,
            image: Option<&UIImage>,
            target: Option<&AnyObject>,
            action: Option<Sel>,
            menu: Option<&UIMenu>,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Other fixedSpaceItemOfWidth:)]
        pub unsafe fn fixedSpaceItemOfWidth(
            width: CGFloat,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

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

        #[method(style)]
        pub unsafe fn style(&self) -> UIBarButtonItemStyle;

        #[method(setStyle:)]
        pub unsafe fn setStyle(&self, style: UIBarButtonItemStyle);

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

        #[method(setWidth:)]
        pub unsafe fn setWidth(&self, width: CGFloat);

        #[method_id(@__retain_semantics Other possibleTitles)]
        pub unsafe fn possibleTitles(&self) -> Option<Retained<NSSet<NSString>>>;

        #[method(setPossibleTitles:)]
        pub unsafe fn setPossibleTitles(&self, possible_titles: Option<&NSSet<NSString>>);

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[method_id(@__retain_semantics Other customView)]
        pub unsafe fn customView(&self) -> Option<Retained<UIView>>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[method(setCustomView:)]
        pub unsafe fn setCustomView(&self, custom_view: Option<&UIView>);

        #[method(action)]
        pub unsafe fn action(&self) -> Option<Sel>;

        #[method(setAction:)]
        pub unsafe fn setAction(&self, action: Option<Sel>);

        #[method_id(@__retain_semantics Other target)]
        pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;

        #[method(setTarget:)]
        pub unsafe fn setTarget(&self, target: Option<&AnyObject>);

        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Other primaryAction)]
        pub unsafe fn primaryAction(&self) -> Option<Retained<UIAction>>;

        #[cfg(all(feature = "UIAction", feature = "UIMenuElement"))]
        #[method(setPrimaryAction:)]
        pub unsafe fn setPrimaryAction(&self, primary_action: Option<&UIAction>);

        #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
        #[method_id(@__retain_semantics Other menu)]
        pub unsafe fn menu(&self) -> Option<Retained<UIMenu>>;

        #[cfg(all(feature = "UIMenu", feature = "UIMenuElement"))]
        #[method(setMenu:)]
        pub unsafe fn setMenu(&self, menu: Option<&UIMenu>);

        #[cfg(feature = "UIContextMenuConfiguration")]
        #[method(preferredMenuElementOrder)]
        pub unsafe fn preferredMenuElementOrder(&self) -> UIContextMenuConfigurationElementOrder;

        #[cfg(feature = "UIContextMenuConfiguration")]
        #[method(setPreferredMenuElementOrder:)]
        pub unsafe fn setPreferredMenuElementOrder(
            &self,
            preferred_menu_element_order: UIContextMenuConfigurationElementOrder,
        );

        #[method(changesSelectionAsPrimaryAction)]
        pub unsafe fn changesSelectionAsPrimaryAction(&self) -> bool;

        #[method(setChangesSelectionAsPrimaryAction:)]
        pub unsafe fn setChangesSelectionAsPrimaryAction(
            &self,
            changes_selection_as_primary_action: bool,
        );

        #[method(isSelected)]
        pub unsafe fn isSelected(&self) -> bool;

        #[method(setSelected:)]
        pub unsafe fn setSelected(&self, selected: bool);

        #[method(isHidden)]
        pub unsafe fn isHidden(&self) -> bool;

        #[method(setHidden:)]
        pub unsafe fn setHidden(&self, hidden: bool);

        #[method(isSymbolAnimationEnabled)]
        pub unsafe fn isSymbolAnimationEnabled(&self) -> bool;

        #[method(setSymbolAnimationEnabled:)]
        pub unsafe fn setSymbolAnimationEnabled(&self, symbol_animation_enabled: bool);

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

        #[cfg(feature = "UIMenuElement")]
        #[method(setMenuRepresentation:)]
        pub unsafe fn setMenuRepresentation(&self, menu_representation: Option<&UIMenuElement>);

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

        #[cfg(feature = "UIBarButtonItemGroup")]
        #[method_id(@__retain_semantics Other creatingMovableGroupWithCustomizationIdentifier:)]
        pub unsafe fn creatingMovableGroupWithCustomizationIdentifier(
            &self,
            customization_identifier: &NSString,
        ) -> Retained<UIBarButtonItemGroup>;

        #[cfg(feature = "UIBarButtonItemGroup")]
        #[method_id(@__retain_semantics Other creatingOptionalGroupWithCustomizationIdentifier:inDefaultCustomization:)]
        pub unsafe fn creatingOptionalGroupWithCustomizationIdentifier_inDefaultCustomization(
            &self,
            customization_identifier: &NSString,
            in_default_customization: bool,
        ) -> Retained<UIBarButtonItemGroup>;

        #[cfg(all(feature = "UIBarCommon", feature = "UIControl", feature = "UIImage"))]
        #[method(setBackgroundImage:forState:barMetrics:)]
        pub unsafe fn setBackgroundImage_forState_barMetrics(
            &self,
            background_image: Option<&UIImage>,
            state: UIControlState,
            bar_metrics: UIBarMetrics,
        );

        #[cfg(all(feature = "UIBarCommon", feature = "UIControl", feature = "UIImage"))]
        #[method_id(@__retain_semantics Other backgroundImageForState:barMetrics:)]
        pub unsafe fn backgroundImageForState_barMetrics(
            &self,
            state: UIControlState,
            bar_metrics: UIBarMetrics,
        ) -> Option<Retained<UIImage>>;

        #[cfg(all(feature = "UIBarCommon", feature = "UIControl", feature = "UIImage"))]
        #[method(setBackgroundImage:forState:style:barMetrics:)]
        pub unsafe fn setBackgroundImage_forState_style_barMetrics(
            &self,
            background_image: Option<&UIImage>,
            state: UIControlState,
            style: UIBarButtonItemStyle,
            bar_metrics: UIBarMetrics,
        );

        #[cfg(all(feature = "UIBarCommon", feature = "UIControl", feature = "UIImage"))]
        #[method_id(@__retain_semantics Other backgroundImageForState:style:barMetrics:)]
        pub unsafe fn backgroundImageForState_style_barMetrics(
            &self,
            state: UIControlState,
            style: UIBarButtonItemStyle,
            bar_metrics: UIBarMetrics,
        ) -> Option<Retained<UIImage>>;

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

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

        #[cfg(feature = "UIBarCommon")]
        #[method(setBackgroundVerticalPositionAdjustment:forBarMetrics:)]
        pub unsafe fn setBackgroundVerticalPositionAdjustment_forBarMetrics(
            &self,
            adjustment: CGFloat,
            bar_metrics: UIBarMetrics,
        );

        #[cfg(feature = "UIBarCommon")]
        #[method(backgroundVerticalPositionAdjustmentForBarMetrics:)]
        pub unsafe fn backgroundVerticalPositionAdjustmentForBarMetrics(
            &self,
            bar_metrics: UIBarMetrics,
        ) -> CGFloat;

        #[cfg(all(feature = "UIBarCommon", feature = "UIGeometry"))]
        #[method(setTitlePositionAdjustment:forBarMetrics:)]
        pub unsafe fn setTitlePositionAdjustment_forBarMetrics(
            &self,
            adjustment: UIOffset,
            bar_metrics: UIBarMetrics,
        );

        #[cfg(all(feature = "UIBarCommon", feature = "UIGeometry"))]
        #[method(titlePositionAdjustmentForBarMetrics:)]
        pub unsafe fn titlePositionAdjustmentForBarMetrics(
            &self,
            bar_metrics: UIBarMetrics,
        ) -> UIOffset;

        #[cfg(all(feature = "UIBarCommon", feature = "UIControl", feature = "UIImage"))]
        #[method(setBackButtonBackgroundImage:forState:barMetrics:)]
        pub unsafe fn setBackButtonBackgroundImage_forState_barMetrics(
            &self,
            background_image: Option<&UIImage>,
            state: UIControlState,
            bar_metrics: UIBarMetrics,
        );

        #[cfg(all(feature = "UIBarCommon", feature = "UIControl", feature = "UIImage"))]
        #[method_id(@__retain_semantics Other backButtonBackgroundImageForState:barMetrics:)]
        pub unsafe fn backButtonBackgroundImageForState_barMetrics(
            &self,
            state: UIControlState,
            bar_metrics: UIBarMetrics,
        ) -> Option<Retained<UIImage>>;

        #[cfg(all(feature = "UIBarCommon", feature = "UIGeometry"))]
        #[method(setBackButtonTitlePositionAdjustment:forBarMetrics:)]
        pub unsafe fn setBackButtonTitlePositionAdjustment_forBarMetrics(
            &self,
            adjustment: UIOffset,
            bar_metrics: UIBarMetrics,
        );

        #[cfg(all(feature = "UIBarCommon", feature = "UIGeometry"))]
        #[method(backButtonTitlePositionAdjustmentForBarMetrics:)]
        pub unsafe fn backButtonTitlePositionAdjustmentForBarMetrics(
            &self,
            bar_metrics: UIBarMetrics,
        ) -> UIOffset;

        #[cfg(feature = "UIBarCommon")]
        #[method(setBackButtonBackgroundVerticalPositionAdjustment:forBarMetrics:)]
        pub unsafe fn setBackButtonBackgroundVerticalPositionAdjustment_forBarMetrics(
            &self,
            adjustment: CGFloat,
            bar_metrics: UIBarMetrics,
        );

        #[cfg(feature = "UIBarCommon")]
        #[method(backButtonBackgroundVerticalPositionAdjustmentForBarMetrics:)]
        pub unsafe fn backButtonBackgroundVerticalPositionAdjustmentForBarMetrics(
            &self,
            bar_metrics: UIBarMetrics,
        ) -> CGFloat;
    }
);

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

extern_methods!(
    /// SpringLoading
    #[cfg(feature = "UIBarItem")]
    unsafe impl UIBarButtonItem {}
);

#[cfg(all(feature = "UIBarItem", feature = "UISpringLoadedInteractionSupporting"))]
unsafe impl UISpringLoadedInteractionSupporting for UIBarButtonItem {}

extern_methods!(
    #[cfg(feature = "UIBarItem")]
    unsafe impl UIBarButtonItem {
        #[cfg(feature = "objc2-symbols")]
        #[method(addSymbolEffect:)]
        pub unsafe fn addSymbolEffect(&self, symbol_effect: &NSSymbolEffect);

        #[cfg(feature = "objc2-symbols")]
        #[method(addSymbolEffect:options:)]
        pub unsafe fn addSymbolEffect_options(
            &self,
            symbol_effect: &NSSymbolEffect,
            options: &NSSymbolEffectOptions,
        );

        #[cfg(feature = "objc2-symbols")]
        #[method(addSymbolEffect:options:animated:)]
        pub unsafe fn addSymbolEffect_options_animated(
            &self,
            symbol_effect: &NSSymbolEffect,
            options: &NSSymbolEffectOptions,
            animated: bool,
        );

        #[cfg(feature = "objc2-symbols")]
        #[method(removeSymbolEffectOfType:)]
        pub unsafe fn removeSymbolEffectOfType(&self, symbol_effect: &NSSymbolEffect);

        #[cfg(feature = "objc2-symbols")]
        #[method(removeSymbolEffectOfType:options:)]
        pub unsafe fn removeSymbolEffectOfType_options(
            &self,
            symbol_effect: &NSSymbolEffect,
            options: &NSSymbolEffectOptions,
        );

        #[cfg(feature = "objc2-symbols")]
        #[method(removeSymbolEffectOfType:options:animated:)]
        pub unsafe fn removeSymbolEffectOfType_options_animated(
            &self,
            symbol_effect: &NSSymbolEffect,
            options: &NSSymbolEffectOptions,
            animated: bool,
        );

        #[method(removeAllSymbolEffects)]
        pub unsafe fn removeAllSymbolEffects(&self);

        #[cfg(feature = "objc2-symbols")]
        #[method(removeAllSymbolEffectsWithOptions:)]
        pub unsafe fn removeAllSymbolEffectsWithOptions(&self, options: &NSSymbolEffectOptions);

        #[cfg(feature = "objc2-symbols")]
        #[method(removeAllSymbolEffectsWithOptions:animated:)]
        pub unsafe fn removeAllSymbolEffectsWithOptions_animated(
            &self,
            options: &NSSymbolEffectOptions,
            animated: bool,
        );

        #[cfg(all(feature = "UIImage", feature = "objc2-symbols"))]
        #[method(setSymbolImage:withContentTransition:)]
        pub unsafe fn setSymbolImage_withContentTransition(
            &self,
            symbol_image: &UIImage,
            transition: &NSSymbolContentTransition,
        );

        #[cfg(all(feature = "UIImage", feature = "objc2-symbols"))]
        #[method(setSymbolImage:withContentTransition:options:)]
        pub unsafe fn setSymbolImage_withContentTransition_options(
            &self,
            symbol_image: &UIImage,
            transition: &NSSymbolContentTransition,
            options: &NSSymbolEffectOptions,
        );
    }
);