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"))]
31unsafe impl CALayerDelegate for UIColorWell {}
32
33#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
34unsafe impl NSCoding for UIColorWell {}
35
36#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
37unsafe impl NSObjectProtocol for UIColorWell {}
38
39#[cfg(all(
40 feature = "UIAppearance",
41 feature = "UIControl",
42 feature = "UIResponder",
43 feature = "UIView"
44))]
45unsafe impl UIAppearance for UIColorWell {}
46
47#[cfg(all(
48 feature = "UIAppearance",
49 feature = "UIControl",
50 feature = "UIResponder",
51 feature = "UIView"
52))]
53unsafe impl UIAppearanceContainer for UIColorWell {}
54
55#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
56unsafe impl UICoordinateSpace for UIColorWell {}
57
58#[cfg(all(
59 feature = "UIControl",
60 feature = "UIDynamicBehavior",
61 feature = "UIResponder",
62 feature = "UIView"
63))]
64unsafe impl UIDynamicItem for UIColorWell {}
65
66#[cfg(all(
67 feature = "UIControl",
68 feature = "UIFocus",
69 feature = "UIResponder",
70 feature = "UIView"
71))]
72unsafe impl UIFocusEnvironment for UIColorWell {}
73
74#[cfg(all(
75 feature = "UIControl",
76 feature = "UIFocus",
77 feature = "UIResponder",
78 feature = "UIView"
79))]
80unsafe impl UIFocusItem for UIColorWell {}
81
82#[cfg(all(
83 feature = "UIControl",
84 feature = "UIFocus",
85 feature = "UIResponder",
86 feature = "UIView"
87))]
88unsafe impl UIFocusItemContainer for UIColorWell {}
89
90#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
91unsafe impl UIResponderStandardEditActions for UIColorWell {}
92
93#[cfg(all(
94 feature = "UIControl",
95 feature = "UIResponder",
96 feature = "UITraitCollection",
97 feature = "UIView"
98))]
99unsafe impl UITraitEnvironment for UIColorWell {}
100
101#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
102impl UIColorWell {
103 extern_methods!(
104 #[unsafe(method(title))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn title(&self) -> Option<Retained<NSString>>;
110
111 #[unsafe(method(setTitle:))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn setTitle(&self, title: Option<&NSString>);
115
116 #[unsafe(method(supportsAlpha))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn supportsAlpha(&self) -> bool;
122
123 #[unsafe(method(setSupportsAlpha:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn setSupportsAlpha(&self, supports_alpha: bool);
127
128 #[cfg(feature = "UIColor")]
129 #[unsafe(method(selectedColor))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn selectedColor(&self) -> Option<Retained<UIColor>>;
134
135 #[cfg(feature = "UIColor")]
136 #[unsafe(method(setSelectedColor:))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn setSelectedColor(&self, selected_color: Option<&UIColor>);
140 );
141}
142
143#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
145impl UIColorWell {
146 extern_methods!(
147 #[cfg(feature = "objc2-core-foundation")]
148 #[unsafe(method(initWithFrame:))]
149 #[unsafe(method_family = init)]
150 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
151
152 #[unsafe(method(initWithCoder:))]
153 #[unsafe(method_family = init)]
154 pub unsafe fn initWithCoder(
155 this: Allocated<Self>,
156 coder: &NSCoder,
157 ) -> Option<Retained<Self>>;
158
159 #[cfg(all(
160 feature = "UIAction",
161 feature = "UIMenuElement",
162 feature = "objc2-core-foundation"
163 ))]
164 #[unsafe(method(initWithFrame:primaryAction:))]
166 #[unsafe(method_family = init)]
167 pub unsafe fn initWithFrame_primaryAction(
168 this: Allocated<Self>,
169 frame: CGRect,
170 primary_action: Option<&UIAction>,
171 ) -> Retained<Self>;
172 );
173}
174
175#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
177impl UIColorWell {
178 extern_methods!(
179 #[unsafe(method(init))]
180 #[unsafe(method_family = init)]
181 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
182
183 #[unsafe(method(new))]
184 #[unsafe(method_family = new)]
185 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
186 );
187}