objc2_ui_kit/generated/
UIColorWell.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-quartz-core")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_quartz_core::*;
12
13use crate::*;
14
15extern_class!(
16 #[unsafe(super(UIControl, UIView, UIResponder, NSObject))]
18 #[thread_kind = MainThreadOnly]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
21 pub struct UIColorWell;
22);
23
24#[cfg(all(
25 feature = "UIControl",
26 feature = "UIResponder",
27 feature = "UIView",
28 feature = "objc2-quartz-core"
29))]
30#[cfg(not(target_os = "watchos"))]
31extern_conformance!(
32 unsafe impl CALayerDelegate for UIColorWell {}
33);
34
35#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
36extern_conformance!(
37 unsafe impl NSCoding for UIColorWell {}
38);
39
40#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
41extern_conformance!(
42 unsafe impl NSObjectProtocol for UIColorWell {}
43);
44
45#[cfg(all(
46 feature = "UIAppearance",
47 feature = "UIControl",
48 feature = "UIResponder",
49 feature = "UIView"
50))]
51extern_conformance!(
52 unsafe impl UIAppearance for UIColorWell {}
53);
54
55#[cfg(all(
56 feature = "UIAppearance",
57 feature = "UIControl",
58 feature = "UIResponder",
59 feature = "UIView"
60))]
61extern_conformance!(
62 unsafe impl UIAppearanceContainer for UIColorWell {}
63);
64
65#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
66extern_conformance!(
67 unsafe impl UICoordinateSpace for UIColorWell {}
68);
69
70#[cfg(all(
71 feature = "UIControl",
72 feature = "UIDynamicBehavior",
73 feature = "UIResponder",
74 feature = "UIView"
75))]
76extern_conformance!(
77 unsafe impl UIDynamicItem for UIColorWell {}
78);
79
80#[cfg(all(
81 feature = "UIControl",
82 feature = "UIFocus",
83 feature = "UIResponder",
84 feature = "UIView"
85))]
86extern_conformance!(
87 unsafe impl UIFocusEnvironment for UIColorWell {}
88);
89
90#[cfg(all(
91 feature = "UIControl",
92 feature = "UIFocus",
93 feature = "UIResponder",
94 feature = "UIView"
95))]
96extern_conformance!(
97 unsafe impl UIFocusItem for UIColorWell {}
98);
99
100#[cfg(all(
101 feature = "UIControl",
102 feature = "UIFocus",
103 feature = "UIResponder",
104 feature = "UIView"
105))]
106extern_conformance!(
107 unsafe impl UIFocusItemContainer for UIColorWell {}
108);
109
110#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
111extern_conformance!(
112 unsafe impl UIResponderStandardEditActions for UIColorWell {}
113);
114
115#[cfg(all(
116 feature = "UIControl",
117 feature = "UIResponder",
118 feature = "UITraitCollection",
119 feature = "UIView"
120))]
121extern_conformance!(
122 unsafe impl UITraitEnvironment for UIColorWell {}
123);
124
125#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
126impl UIColorWell {
127 extern_methods!(
128 #[unsafe(method(title))]
132 #[unsafe(method_family = none)]
133 pub fn title(&self) -> Option<Retained<NSString>>;
134
135 #[unsafe(method(setTitle:))]
139 #[unsafe(method_family = none)]
140 pub fn setTitle(&self, title: Option<&NSString>);
141
142 #[unsafe(method(supportsAlpha))]
146 #[unsafe(method_family = none)]
147 pub fn supportsAlpha(&self) -> bool;
148
149 #[unsafe(method(setSupportsAlpha:))]
151 #[unsafe(method_family = none)]
152 pub fn setSupportsAlpha(&self, supports_alpha: bool);
153
154 #[cfg(feature = "UIColor")]
155 #[unsafe(method(selectedColor))]
158 #[unsafe(method_family = none)]
159 pub fn selectedColor(&self) -> Option<Retained<UIColor>>;
160
161 #[cfg(feature = "UIColor")]
162 #[unsafe(method(setSelectedColor:))]
164 #[unsafe(method_family = none)]
165 pub fn setSelectedColor(&self, selected_color: Option<&UIColor>);
166
167 #[unsafe(method(supportsEyedropper))]
169 #[unsafe(method_family = none)]
170 pub fn supportsEyedropper(&self) -> bool;
171
172 #[unsafe(method(setSupportsEyedropper:))]
174 #[unsafe(method_family = none)]
175 pub fn setSupportsEyedropper(&self, supports_eyedropper: bool);
176
177 #[cfg(feature = "objc2-core-foundation")]
178 #[unsafe(method(maximumLinearExposure))]
180 #[unsafe(method_family = none)]
181 pub fn maximumLinearExposure(&self) -> CGFloat;
182
183 #[cfg(feature = "objc2-core-foundation")]
184 #[unsafe(method(setMaximumLinearExposure:))]
186 #[unsafe(method_family = none)]
187 pub fn setMaximumLinearExposure(&self, maximum_linear_exposure: CGFloat);
188 );
189}
190
191#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
193impl UIColorWell {
194 extern_methods!(
195 #[cfg(feature = "objc2-core-foundation")]
196 #[unsafe(method(initWithFrame:))]
197 #[unsafe(method_family = init)]
198 pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
199
200 #[unsafe(method(initWithCoder:))]
204 #[unsafe(method_family = init)]
205 pub unsafe fn initWithCoder(
206 this: Allocated<Self>,
207 coder: &NSCoder,
208 ) -> Option<Retained<Self>>;
209
210 #[cfg(all(
211 feature = "UIAction",
212 feature = "UIMenuElement",
213 feature = "objc2-core-foundation"
214 ))]
215 #[unsafe(method(initWithFrame:primaryAction:))]
217 #[unsafe(method_family = init)]
218 pub fn initWithFrame_primaryAction(
219 this: Allocated<Self>,
220 frame: CGRect,
221 primary_action: Option<&UIAction>,
222 ) -> Retained<Self>;
223 );
224}
225
226#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
228impl UIColorWell {
229 extern_methods!(
230 #[unsafe(method(init))]
231 #[unsafe(method_family = init)]
232 pub fn init(this: Allocated<Self>) -> Retained<Self>;
233 );
234}
235
236#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
238impl UIColorWell {
239 extern_methods!(
240 #[unsafe(method(new))]
241 #[unsafe(method_family = new)]
242 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
243 );
244}