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 unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
44
45 #[cfg(feature = "UIDevice")]
46 #[unsafe(method(initWithIdiom:))]
48 #[unsafe(method_family = init)]
49 pub unsafe fn initWithIdiom(
50 this: Allocated<Self>,
51 idiom: UIUserInterfaceIdiom,
52 ) -> Retained<Self>;
53
54 #[cfg(feature = "UIDevice")]
55 #[unsafe(method(idiom))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn idiom(&self) -> UIUserInterfaceIdiom;
59
60 #[unsafe(method(initWithBarAppearance:))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn initWithBarAppearance(
64 this: Allocated<Self>,
65 bar_appearance: &UIBarAppearance,
66 ) -> Retained<Self>;
67
68 #[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 unsafe fn copy(&self) -> Retained<Self>;
75
76 #[unsafe(method(configureWithDefaultBackground))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn configureWithDefaultBackground(&self);
80
81 #[unsafe(method(configureWithOpaqueBackground))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn configureWithOpaqueBackground(&self);
85
86 #[unsafe(method(configureWithTransparentBackground))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn configureWithTransparentBackground(&self);
90
91 #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
92 #[unsafe(method(backgroundEffect))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn backgroundEffect(&self) -> Option<Retained<UIBlurEffect>>;
96
97 #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
98 #[unsafe(method(setBackgroundEffect:))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn setBackgroundEffect(&self, background_effect: Option<&UIBlurEffect>);
102
103 #[cfg(feature = "UIColor")]
104 #[unsafe(method(backgroundColor))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn backgroundColor(&self) -> Option<Retained<UIColor>>;
108
109 #[cfg(feature = "UIColor")]
110 #[unsafe(method(setBackgroundColor:))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn setBackgroundColor(&self, background_color: Option<&UIColor>);
114
115 #[cfg(feature = "UIImage")]
116 #[unsafe(method(backgroundImage))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn backgroundImage(&self) -> Option<Retained<UIImage>>;
120
121 #[cfg(feature = "UIImage")]
122 #[unsafe(method(setBackgroundImage:))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn setBackgroundImage(&self, background_image: Option<&UIImage>);
126
127 #[cfg(feature = "UIView")]
128 #[unsafe(method(backgroundImageContentMode))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn backgroundImageContentMode(&self) -> UIViewContentMode;
132
133 #[cfg(feature = "UIView")]
134 #[unsafe(method(setBackgroundImageContentMode:))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn setBackgroundImageContentMode(
138 &self,
139 background_image_content_mode: UIViewContentMode,
140 );
141
142 #[cfg(feature = "UIColor")]
143 #[unsafe(method(shadowColor))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn shadowColor(&self) -> Option<Retained<UIColor>>;
147
148 #[cfg(feature = "UIColor")]
149 #[unsafe(method(setShadowColor:))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn setShadowColor(&self, shadow_color: Option<&UIColor>);
153
154 #[cfg(feature = "UIImage")]
155 #[unsafe(method(shadowImage))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn shadowImage(&self) -> Option<Retained<UIImage>>;
159
160 #[cfg(feature = "UIImage")]
161 #[unsafe(method(setShadowImage:))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn setShadowImage(&self, shadow_image: Option<&UIImage>);
165 );
166}
167
168impl UIBarAppearance {
170 extern_methods!(
171 #[unsafe(method(new))]
172 #[unsafe(method_family = new)]
173 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
174 );
175}