objc2_ui_kit/generated/
UIBarAppearance.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct UIBarAppearance;
16);
17
18extern_conformance!(
19 unsafe impl NSCoding for UIBarAppearance {}
20);
21
22extern_conformance!(
23 unsafe impl NSCopying for UIBarAppearance {}
24);
25
26unsafe impl CopyingHelper for UIBarAppearance {
27 type Result = Self;
28}
29
30extern_conformance!(
31 unsafe impl NSObjectProtocol for UIBarAppearance {}
32);
33
34extern_conformance!(
35 unsafe impl NSSecureCoding for UIBarAppearance {}
36);
37
38impl UIBarAppearance {
39 extern_methods!(
40 #[unsafe(method(init))]
42 #[unsafe(method_family = init)]
43 pub fn init(this: Allocated<Self>) -> Retained<Self>;
44
45 #[cfg(feature = "UIDevice")]
46 #[unsafe(method(initWithIdiom:))]
48 #[unsafe(method_family = init)]
49 pub fn initWithIdiom(this: Allocated<Self>, idiom: UIUserInterfaceIdiom) -> Retained<Self>;
50
51 #[cfg(feature = "UIDevice")]
52 #[unsafe(method(idiom))]
54 #[unsafe(method_family = none)]
55 pub fn idiom(&self) -> UIUserInterfaceIdiom;
56
57 #[unsafe(method(initWithBarAppearance:))]
59 #[unsafe(method_family = init)]
60 pub fn initWithBarAppearance(
61 this: Allocated<Self>,
62 bar_appearance: &UIBarAppearance,
63 ) -> Retained<Self>;
64
65 #[unsafe(method(initWithCoder:))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
71
72 #[unsafe(method(copy))]
73 #[unsafe(method_family = copy)]
74 pub fn copy(&self) -> Retained<Self>;
75
76 #[unsafe(method(configureWithDefaultBackground))]
78 #[unsafe(method_family = none)]
79 pub fn configureWithDefaultBackground(&self);
80
81 #[unsafe(method(configureWithOpaqueBackground))]
83 #[unsafe(method_family = none)]
84 pub fn configureWithOpaqueBackground(&self);
85
86 #[unsafe(method(configureWithTransparentBackground))]
88 #[unsafe(method_family = none)]
89 pub fn configureWithTransparentBackground(&self);
90
91 #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
92 #[unsafe(method(backgroundEffect))]
94 #[unsafe(method_family = none)]
95 pub fn backgroundEffect(&self) -> Option<Retained<UIBlurEffect>>;
96
97 #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
98 #[unsafe(method(setBackgroundEffect:))]
102 #[unsafe(method_family = none)]
103 pub fn setBackgroundEffect(&self, background_effect: Option<&UIBlurEffect>);
104
105 #[cfg(feature = "UIColor")]
106 #[unsafe(method(backgroundColor))]
108 #[unsafe(method_family = none)]
109 pub fn backgroundColor(&self) -> Option<Retained<UIColor>>;
110
111 #[cfg(feature = "UIColor")]
112 #[unsafe(method(setBackgroundColor:))]
116 #[unsafe(method_family = none)]
117 pub fn setBackgroundColor(&self, background_color: Option<&UIColor>);
118
119 #[cfg(feature = "UIImage")]
120 #[unsafe(method(backgroundImage))]
122 #[unsafe(method_family = none)]
123 pub fn backgroundImage(&self) -> Option<Retained<UIImage>>;
124
125 #[cfg(feature = "UIImage")]
126 #[unsafe(method(setBackgroundImage:))]
128 #[unsafe(method_family = none)]
129 pub fn setBackgroundImage(&self, background_image: Option<&UIImage>);
130
131 #[cfg(feature = "UIView")]
132 #[unsafe(method(backgroundImageContentMode))]
134 #[unsafe(method_family = none)]
135 pub fn backgroundImageContentMode(&self) -> UIViewContentMode;
136
137 #[cfg(feature = "UIView")]
138 #[unsafe(method(setBackgroundImageContentMode:))]
140 #[unsafe(method_family = none)]
141 pub fn setBackgroundImageContentMode(
142 &self,
143 background_image_content_mode: UIViewContentMode,
144 );
145
146 #[cfg(feature = "UIColor")]
147 #[unsafe(method(shadowColor))]
149 #[unsafe(method_family = none)]
150 pub fn shadowColor(&self) -> Option<Retained<UIColor>>;
151
152 #[cfg(feature = "UIColor")]
153 #[unsafe(method(setShadowColor:))]
157 #[unsafe(method_family = none)]
158 pub fn setShadowColor(&self, shadow_color: Option<&UIColor>);
159
160 #[cfg(feature = "UIImage")]
161 #[unsafe(method(shadowImage))]
163 #[unsafe(method_family = none)]
164 pub fn shadowImage(&self) -> Option<Retained<UIImage>>;
165
166 #[cfg(feature = "UIImage")]
167 #[unsafe(method(setShadowImage:))]
169 #[unsafe(method_family = none)]
170 pub fn setShadowImage(&self, shadow_image: Option<&UIImage>);
171 );
172}
173
174impl UIBarAppearance {
176 extern_methods!(
177 #[unsafe(method(new))]
178 #[unsafe(method_family = new)]
179 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
180 );
181}