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 unsafe fn titleTextAttributes(
51 &self,
52 ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
53
54 #[unsafe(method(setTitleTextAttributes:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn setTitleTextAttributes(
58 &self,
59 title_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
60 );
61
62 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
63 #[unsafe(method(titlePositionAdjustment))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn titlePositionAdjustment(&self) -> UIOffset;
67
68 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
69 #[unsafe(method(setTitlePositionAdjustment:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setTitlePositionAdjustment(&self, title_position_adjustment: UIOffset);
73
74 #[unsafe(method(largeTitleTextAttributes))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn largeTitleTextAttributes(
78 &self,
79 ) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
80
81 #[unsafe(method(setLargeTitleTextAttributes:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn setLargeTitleTextAttributes(
85 &self,
86 large_title_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
87 );
88
89 #[cfg(feature = "UIBarButtonItemAppearance")]
90 #[unsafe(method(buttonAppearance))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn buttonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
94
95 #[cfg(feature = "UIBarButtonItemAppearance")]
96 #[unsafe(method(setButtonAppearance:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn setButtonAppearance(&self, button_appearance: &UIBarButtonItemAppearance);
100
101 #[cfg(feature = "UIBarButtonItemAppearance")]
102 #[unsafe(method(doneButtonAppearance))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn doneButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
106
107 #[cfg(feature = "UIBarButtonItemAppearance")]
108 #[unsafe(method(setDoneButtonAppearance:))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn setDoneButtonAppearance(
112 &self,
113 done_button_appearance: &UIBarButtonItemAppearance,
114 );
115
116 #[cfg(feature = "UIBarButtonItemAppearance")]
117 #[unsafe(method(backButtonAppearance))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn backButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
121
122 #[cfg(feature = "UIBarButtonItemAppearance")]
123 #[unsafe(method(setBackButtonAppearance:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn setBackButtonAppearance(
127 &self,
128 back_button_appearance: &UIBarButtonItemAppearance,
129 );
130
131 #[cfg(feature = "UIImage")]
132 #[unsafe(method(backIndicatorImage))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn backIndicatorImage(&self) -> Retained<UIImage>;
136
137 #[cfg(feature = "UIImage")]
138 #[unsafe(method(backIndicatorTransitionMaskImage))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn backIndicatorTransitionMaskImage(&self) -> Retained<UIImage>;
144
145 #[cfg(feature = "UIImage")]
146 #[unsafe(method(setBackIndicatorImage:transitionMaskImage:))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn setBackIndicatorImage_transitionMaskImage(
152 &self,
153 back_indicator_image: Option<&UIImage>,
154 back_indicator_transition_mask_image: Option<&UIImage>,
155 );
156 );
157}
158
159#[cfg(feature = "UIBarAppearance")]
161impl UINavigationBarAppearance {
162 extern_methods!(
163 #[unsafe(method(init))]
165 #[unsafe(method_family = init)]
166 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
167
168 #[cfg(feature = "UIDevice")]
169 #[unsafe(method(initWithIdiom:))]
171 #[unsafe(method_family = init)]
172 pub unsafe fn initWithIdiom(
173 this: Allocated<Self>,
174 idiom: UIUserInterfaceIdiom,
175 ) -> Retained<Self>;
176
177 #[unsafe(method(initWithBarAppearance:))]
179 #[unsafe(method_family = init)]
180 pub unsafe fn initWithBarAppearance(
181 this: Allocated<Self>,
182 bar_appearance: &UIBarAppearance,
183 ) -> Retained<Self>;
184
185 #[unsafe(method(initWithCoder:))]
186 #[unsafe(method_family = init)]
187 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
188 );
189}
190
191#[cfg(feature = "UIBarAppearance")]
193impl UINavigationBarAppearance {
194 extern_methods!(
195 #[unsafe(method(new))]
196 #[unsafe(method_family = new)]
197 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
198 );
199}