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")]
20extern_conformance!(
21 unsafe impl NSCoding for UIToolbarAppearance {}
22);
23
24#[cfg(feature = "UIBarAppearance")]
25extern_conformance!(
26 unsafe impl NSCopying for UIToolbarAppearance {}
27);
28
29#[cfg(feature = "UIBarAppearance")]
30unsafe impl CopyingHelper for UIToolbarAppearance {
31 type Result = Self;
32}
33
34#[cfg(feature = "UIBarAppearance")]
35extern_conformance!(
36 unsafe impl NSObjectProtocol for UIToolbarAppearance {}
37);
38
39#[cfg(feature = "UIBarAppearance")]
40extern_conformance!(
41 unsafe impl NSSecureCoding for UIToolbarAppearance {}
42);
43
44#[cfg(feature = "UIBarAppearance")]
45impl UIToolbarAppearance {
46 extern_methods!(
47 #[cfg(feature = "UIBarButtonItemAppearance")]
48 #[unsafe(method(buttonAppearance))]
50 #[unsafe(method_family = none)]
51 pub fn buttonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
52
53 #[cfg(feature = "UIBarButtonItemAppearance")]
54 #[unsafe(method(setButtonAppearance:))]
58 #[unsafe(method_family = none)]
59 pub fn setButtonAppearance(&self, button_appearance: &UIBarButtonItemAppearance);
60
61 #[cfg(feature = "UIBarButtonItemAppearance")]
62 #[unsafe(method(prominentButtonAppearance))]
67 #[unsafe(method_family = none)]
68 pub fn prominentButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
69
70 #[cfg(feature = "UIBarButtonItemAppearance")]
71 #[unsafe(method(setProminentButtonAppearance:))]
75 #[unsafe(method_family = none)]
76 pub fn setProminentButtonAppearance(
77 &self,
78 prominent_button_appearance: &UIBarButtonItemAppearance,
79 );
80
81 #[cfg(feature = "UIBarButtonItemAppearance")]
82 #[deprecated]
84 #[unsafe(method(doneButtonAppearance))]
85 #[unsafe(method_family = none)]
86 pub fn doneButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
87
88 #[cfg(feature = "UIBarButtonItemAppearance")]
89 #[deprecated]
93 #[unsafe(method(setDoneButtonAppearance:))]
94 #[unsafe(method_family = none)]
95 pub fn setDoneButtonAppearance(&self, done_button_appearance: &UIBarButtonItemAppearance);
96 );
97}
98
99#[cfg(feature = "UIBarAppearance")]
101impl UIToolbarAppearance {
102 extern_methods!(
103 #[unsafe(method(init))]
105 #[unsafe(method_family = init)]
106 pub fn init(this: Allocated<Self>) -> Retained<Self>;
107
108 #[cfg(feature = "UIDevice")]
109 #[unsafe(method(initWithIdiom:))]
111 #[unsafe(method_family = init)]
112 pub fn initWithIdiom(this: Allocated<Self>, idiom: UIUserInterfaceIdiom) -> Retained<Self>;
113
114 #[unsafe(method(initWithBarAppearance:))]
116 #[unsafe(method_family = init)]
117 pub fn initWithBarAppearance(
118 this: Allocated<Self>,
119 bar_appearance: &UIBarAppearance,
120 ) -> Retained<Self>;
121
122 #[unsafe(method(initWithCoder:))]
126 #[unsafe(method_family = init)]
127 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
128 );
129}
130
131#[cfg(feature = "UIBarAppearance")]
133impl UIToolbarAppearance {
134 extern_methods!(
135 #[unsafe(method(new))]
136 #[unsafe(method_family = new)]
137 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
138 );
139}