objc2_ui_kit/generated/
UINavigationBarAppearance.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 UINavigationBarAppearance;
17);
18
19#[cfg(feature = "UIBarAppearance")]
20extern_conformance!(
21 unsafe impl NSCoding for UINavigationBarAppearance {}
22);
23
24#[cfg(feature = "UIBarAppearance")]
25extern_conformance!(
26 unsafe impl NSCopying for UINavigationBarAppearance {}
27);
28
29#[cfg(feature = "UIBarAppearance")]
30unsafe impl CopyingHelper for UINavigationBarAppearance {
31 type Result = Self;
32}
33
34#[cfg(feature = "UIBarAppearance")]
35extern_conformance!(
36 unsafe impl NSObjectProtocol for UINavigationBarAppearance {}
37);
38
39#[cfg(feature = "UIBarAppearance")]
40extern_conformance!(
41 unsafe impl NSSecureCoding for UINavigationBarAppearance {}
42);
43
44#[cfg(feature = "UIBarAppearance")]
45impl UINavigationBarAppearance {
46 extern_methods!(
47 #[unsafe(method(titleTextAttributes))]
49 #[unsafe(method_family = none)]
50 pub fn titleTextAttributes(
51 &self,
52 ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
53
54 #[unsafe(method(setTitleTextAttributes:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn setTitleTextAttributes(
64 &self,
65 title_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
66 );
67
68 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
69 #[unsafe(method(titlePositionAdjustment))]
71 #[unsafe(method_family = none)]
72 pub fn titlePositionAdjustment(&self) -> UIOffset;
73
74 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
75 #[unsafe(method(setTitlePositionAdjustment:))]
77 #[unsafe(method_family = none)]
78 pub fn setTitlePositionAdjustment(&self, title_position_adjustment: UIOffset);
79
80 #[unsafe(method(subtitleTextAttributes))]
82 #[unsafe(method_family = none)]
83 pub fn subtitleTextAttributes(
84 &self,
85 ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
86
87 #[unsafe(method(setSubtitleTextAttributes:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn setSubtitleTextAttributes(
97 &self,
98 subtitle_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
99 );
100
101 #[unsafe(method(largeTitleTextAttributes))]
103 #[unsafe(method_family = none)]
104 pub fn largeTitleTextAttributes(
105 &self,
106 ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
107
108 #[unsafe(method(setLargeTitleTextAttributes:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setLargeTitleTextAttributes(
118 &self,
119 large_title_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
120 );
121
122 #[unsafe(method(largeSubtitleTextAttributes))]
125 #[unsafe(method_family = none)]
126 pub fn largeSubtitleTextAttributes(
127 &self,
128 ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
129
130 #[unsafe(method(setLargeSubtitleTextAttributes:))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn setLargeSubtitleTextAttributes(
140 &self,
141 large_subtitle_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
142 );
143
144 #[cfg(feature = "UIBarButtonItemAppearance")]
145 #[unsafe(method(buttonAppearance))]
147 #[unsafe(method_family = none)]
148 pub fn buttonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
149
150 #[cfg(feature = "UIBarButtonItemAppearance")]
151 #[unsafe(method(setButtonAppearance:))]
155 #[unsafe(method_family = none)]
156 pub fn setButtonAppearance(&self, button_appearance: &UIBarButtonItemAppearance);
157
158 #[cfg(feature = "UIBarButtonItemAppearance")]
159 #[unsafe(method(prominentButtonAppearance))]
164 #[unsafe(method_family = none)]
165 pub fn prominentButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
166
167 #[cfg(feature = "UIBarButtonItemAppearance")]
168 #[unsafe(method(setProminentButtonAppearance:))]
172 #[unsafe(method_family = none)]
173 pub fn setProminentButtonAppearance(
174 &self,
175 prominent_button_appearance: &UIBarButtonItemAppearance,
176 );
177
178 #[cfg(feature = "UIBarButtonItemAppearance")]
179 #[unsafe(method(backButtonAppearance))]
181 #[unsafe(method_family = none)]
182 pub fn backButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
183
184 #[cfg(feature = "UIBarButtonItemAppearance")]
185 #[unsafe(method(setBackButtonAppearance:))]
189 #[unsafe(method_family = none)]
190 pub fn setBackButtonAppearance(&self, back_button_appearance: &UIBarButtonItemAppearance);
191
192 #[cfg(feature = "UIImage")]
193 #[unsafe(method(backIndicatorImage))]
195 #[unsafe(method_family = none)]
196 pub fn backIndicatorImage(&self) -> Retained<UIImage>;
197
198 #[cfg(feature = "UIImage")]
199 #[unsafe(method(backIndicatorTransitionMaskImage))]
203 #[unsafe(method_family = none)]
204 pub fn backIndicatorTransitionMaskImage(&self) -> Retained<UIImage>;
205
206 #[cfg(feature = "UIImage")]
207 #[unsafe(method(setBackIndicatorImage:transitionMaskImage:))]
211 #[unsafe(method_family = none)]
212 pub fn setBackIndicatorImage_transitionMaskImage(
213 &self,
214 back_indicator_image: Option<&UIImage>,
215 back_indicator_transition_mask_image: Option<&UIImage>,
216 );
217
218 #[cfg(feature = "UIBarButtonItemAppearance")]
219 #[deprecated]
221 #[unsafe(method(doneButtonAppearance))]
222 #[unsafe(method_family = none)]
223 pub fn doneButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
224
225 #[cfg(feature = "UIBarButtonItemAppearance")]
226 #[deprecated]
230 #[unsafe(method(setDoneButtonAppearance:))]
231 #[unsafe(method_family = none)]
232 pub fn setDoneButtonAppearance(&self, done_button_appearance: &UIBarButtonItemAppearance);
233 );
234}
235
236#[cfg(feature = "UIBarAppearance")]
238impl UINavigationBarAppearance {
239 extern_methods!(
240 #[unsafe(method(init))]
242 #[unsafe(method_family = init)]
243 pub fn init(this: Allocated<Self>) -> Retained<Self>;
244
245 #[cfg(feature = "UIDevice")]
246 #[unsafe(method(initWithIdiom:))]
248 #[unsafe(method_family = init)]
249 pub fn initWithIdiom(this: Allocated<Self>, idiom: UIUserInterfaceIdiom) -> Retained<Self>;
250
251 #[unsafe(method(initWithBarAppearance:))]
253 #[unsafe(method_family = init)]
254 pub fn initWithBarAppearance(
255 this: Allocated<Self>,
256 bar_appearance: &UIBarAppearance,
257 ) -> Retained<Self>;
258
259 #[unsafe(method(initWithCoder:))]
263 #[unsafe(method_family = init)]
264 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
265 );
266}
267
268#[cfg(feature = "UIBarAppearance")]
270impl UINavigationBarAppearance {
271 extern_methods!(
272 #[unsafe(method(new))]
273 #[unsafe(method_family = new)]
274 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
275 );
276}