objc2_ui_kit/generated/
UIToolbarAppearance.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(UIBarAppearance, NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "UIBarAppearance")]
16 pub struct UIToolbarAppearance;
17);
18
19#[cfg(feature = "UIBarAppearance")]
20unsafe impl NSCoding for UIToolbarAppearance {}
21
22#[cfg(feature = "UIBarAppearance")]
23unsafe impl NSCopying for UIToolbarAppearance {}
24
25#[cfg(feature = "UIBarAppearance")]
26unsafe impl CopyingHelper for UIToolbarAppearance {
27 type Result = Self;
28}
29
30#[cfg(feature = "UIBarAppearance")]
31unsafe impl NSObjectProtocol for UIToolbarAppearance {}
32
33#[cfg(feature = "UIBarAppearance")]
34unsafe impl NSSecureCoding for UIToolbarAppearance {}
35
36#[cfg(feature = "UIBarAppearance")]
37impl UIToolbarAppearance {
38 extern_methods!(
39 #[cfg(feature = "UIBarButtonItemAppearance")]
40 #[unsafe(method(buttonAppearance))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn buttonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
44
45 #[cfg(feature = "UIBarButtonItemAppearance")]
46 #[unsafe(method(setButtonAppearance:))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn setButtonAppearance(&self, button_appearance: &UIBarButtonItemAppearance);
50
51 #[cfg(feature = "UIBarButtonItemAppearance")]
52 #[unsafe(method(doneButtonAppearance))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn doneButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
56
57 #[cfg(feature = "UIBarButtonItemAppearance")]
58 #[unsafe(method(setDoneButtonAppearance:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn setDoneButtonAppearance(
62 &self,
63 done_button_appearance: &UIBarButtonItemAppearance,
64 );
65 );
66}
67
68#[cfg(feature = "UIBarAppearance")]
70impl UIToolbarAppearance {
71 extern_methods!(
72 #[unsafe(method(init))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77 #[cfg(feature = "UIDevice")]
78 #[unsafe(method(initWithIdiom:))]
80 #[unsafe(method_family = init)]
81 pub unsafe fn initWithIdiom(
82 this: Allocated<Self>,
83 idiom: UIUserInterfaceIdiom,
84 ) -> Retained<Self>;
85
86 #[unsafe(method(initWithBarAppearance:))]
88 #[unsafe(method_family = init)]
89 pub unsafe fn initWithBarAppearance(
90 this: Allocated<Self>,
91 bar_appearance: &UIBarAppearance,
92 ) -> Retained<Self>;
93
94 #[unsafe(method(initWithCoder:))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
97 );
98}
99
100#[cfg(feature = "UIBarAppearance")]
102impl UIToolbarAppearance {
103 extern_methods!(
104 #[unsafe(method(new))]
105 #[unsafe(method_family = new)]
106 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
107 );
108}