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 unsafe fn title(&self) -> Option<Retained<NSString>>;
134
135 #[unsafe(method(setTitle:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn setTitle(&self, title: Option<&NSString>);
139
140 #[unsafe(method(supportsAlpha))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn supportsAlpha(&self) -> bool;
146
147 #[unsafe(method(setSupportsAlpha:))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn setSupportsAlpha(&self, supports_alpha: bool);
151
152 #[cfg(feature = "UIColor")]
153 #[unsafe(method(selectedColor))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn selectedColor(&self) -> Option<Retained<UIColor>>;
158
159 #[cfg(feature = "UIColor")]
160 #[unsafe(method(setSelectedColor:))]
162 #[unsafe(method_family = none)]
163 pub unsafe fn setSelectedColor(&self, selected_color: Option<&UIColor>);
164 );
165}
166
167#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
169impl UIColorWell {
170 extern_methods!(
171 #[cfg(feature = "objc2-core-foundation")]
172 #[unsafe(method(initWithFrame:))]
173 #[unsafe(method_family = init)]
174 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
175
176 #[unsafe(method(initWithCoder:))]
177 #[unsafe(method_family = init)]
178 pub unsafe fn initWithCoder(
179 this: Allocated<Self>,
180 coder: &NSCoder,
181 ) -> Option<Retained<Self>>;
182
183 #[cfg(all(
184 feature = "UIAction",
185 feature = "UIMenuElement",
186 feature = "objc2-core-foundation"
187 ))]
188 #[unsafe(method(initWithFrame:primaryAction:))]
190 #[unsafe(method_family = init)]
191 pub unsafe fn initWithFrame_primaryAction(
192 this: Allocated<Self>,
193 frame: CGRect,
194 primary_action: Option<&UIAction>,
195 ) -> Retained<Self>;
196 );
197}
198
199#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
201impl UIColorWell {
202 extern_methods!(
203 #[unsafe(method(init))]
204 #[unsafe(method_family = init)]
205 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
206
207 #[unsafe(method(new))]
208 #[unsafe(method_family = new)]
209 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
210 );
211}