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
18unsafe impl NSCoding for UIBarAppearance {}
19
20unsafe impl NSCopying for UIBarAppearance {}
21
22unsafe impl CopyingHelper for UIBarAppearance {
23 type Result = Self;
24}
25
26unsafe impl NSObjectProtocol for UIBarAppearance {}
27
28unsafe impl NSSecureCoding for UIBarAppearance {}
29
30impl UIBarAppearance {
31 extern_methods!(
32 #[unsafe(method(init))]
34 #[unsafe(method_family = init)]
35 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
36
37 #[cfg(feature = "UIDevice")]
38 #[unsafe(method(initWithIdiom:))]
40 #[unsafe(method_family = init)]
41 pub unsafe fn initWithIdiom(
42 this: Allocated<Self>,
43 idiom: UIUserInterfaceIdiom,
44 ) -> Retained<Self>;
45
46 #[cfg(feature = "UIDevice")]
47 #[unsafe(method(idiom))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn idiom(&self) -> UIUserInterfaceIdiom;
51
52 #[unsafe(method(initWithBarAppearance:))]
54 #[unsafe(method_family = init)]
55 pub unsafe fn initWithBarAppearance(
56 this: Allocated<Self>,
57 bar_appearance: &UIBarAppearance,
58 ) -> Retained<Self>;
59
60 #[unsafe(method(initWithCoder:))]
61 #[unsafe(method_family = init)]
62 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
63
64 #[unsafe(method(copy))]
65 #[unsafe(method_family = copy)]
66 pub unsafe fn copy(&self) -> Retained<Self>;
67
68 #[unsafe(method(configureWithDefaultBackground))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn configureWithDefaultBackground(&self);
72
73 #[unsafe(method(configureWithOpaqueBackground))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn configureWithOpaqueBackground(&self);
77
78 #[unsafe(method(configureWithTransparentBackground))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn configureWithTransparentBackground(&self);
82
83 #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
84 #[unsafe(method(backgroundEffect))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn backgroundEffect(&self) -> Option<Retained<UIBlurEffect>>;
88
89 #[cfg(all(feature = "UIBlurEffect", feature = "UIVisualEffect"))]
90 #[unsafe(method(setBackgroundEffect:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn setBackgroundEffect(&self, background_effect: Option<&UIBlurEffect>);
94
95 #[cfg(feature = "UIColor")]
96 #[unsafe(method(backgroundColor))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn backgroundColor(&self) -> Option<Retained<UIColor>>;
100
101 #[cfg(feature = "UIColor")]
102 #[unsafe(method(setBackgroundColor:))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn setBackgroundColor(&self, background_color: Option<&UIColor>);
106
107 #[cfg(feature = "UIImage")]
108 #[unsafe(method(backgroundImage))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn backgroundImage(&self) -> Option<Retained<UIImage>>;
112
113 #[cfg(feature = "UIImage")]
114 #[unsafe(method(setBackgroundImage:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setBackgroundImage(&self, background_image: Option<&UIImage>);
118
119 #[cfg(feature = "UIView")]
120 #[unsafe(method(backgroundImageContentMode))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn backgroundImageContentMode(&self) -> UIViewContentMode;
124
125 #[cfg(feature = "UIView")]
126 #[unsafe(method(setBackgroundImageContentMode:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn setBackgroundImageContentMode(
130 &self,
131 background_image_content_mode: UIViewContentMode,
132 );
133
134 #[cfg(feature = "UIColor")]
135 #[unsafe(method(shadowColor))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn shadowColor(&self) -> Option<Retained<UIColor>>;
139
140 #[cfg(feature = "UIColor")]
141 #[unsafe(method(setShadowColor:))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn setShadowColor(&self, shadow_color: Option<&UIColor>);
145
146 #[cfg(feature = "UIImage")]
147 #[unsafe(method(shadowImage))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn shadowImage(&self) -> Option<Retained<UIImage>>;
151
152 #[cfg(feature = "UIImage")]
153 #[unsafe(method(setShadowImage:))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn setShadowImage(&self, shadow_image: Option<&UIImage>);
157 );
158}
159
160impl UIBarAppearance {
162 extern_methods!(
163 #[unsafe(method(new))]
164 #[unsafe(method_family = new)]
165 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
166 );
167}