objc2_ui_kit/generated/
UIColorPickerViewController.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
10use crate::*;
11
12extern_protocol!(
13 pub unsafe trait UIColorPickerViewControllerDelegate:
15 NSObjectProtocol + MainThreadOnly
16 {
17 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
18 #[deprecated]
20 #[optional]
21 #[unsafe(method(colorPickerViewControllerDidSelectColor:))]
22 #[unsafe(method_family = none)]
23 fn colorPickerViewControllerDidSelectColor(
24 &self,
25 view_controller: &UIColorPickerViewController,
26 );
27
28 #[cfg(all(
29 feature = "UIColor",
30 feature = "UIResponder",
31 feature = "UIViewController"
32 ))]
33 #[optional]
43 #[unsafe(method(colorPickerViewController:didSelectColor:continuously:))]
44 #[unsafe(method_family = none)]
45 fn colorPickerViewController_didSelectColor_continuously(
46 &self,
47 view_controller: &UIColorPickerViewController,
48 color: &UIColor,
49 continuously: bool,
50 );
51
52 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
53 #[optional]
57 #[unsafe(method(colorPickerViewControllerDidFinish:))]
58 #[unsafe(method_family = none)]
59 fn colorPickerViewControllerDidFinish(&self, view_controller: &UIColorPickerViewController);
60 }
61);
62
63extern_class!(
64 #[unsafe(super(UIViewController, UIResponder, NSObject))]
66 #[thread_kind = MainThreadOnly]
67 #[derive(Debug, PartialEq, Eq, Hash)]
68 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
69 pub struct UIColorPickerViewController;
70);
71
72#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
73extern_conformance!(
74 unsafe impl NSCoding for UIColorPickerViewController {}
75);
76
77#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
78extern_conformance!(
79 unsafe impl NSObjectProtocol for UIColorPickerViewController {}
80);
81
82#[cfg(all(
83 feature = "UIAppearance",
84 feature = "UIResponder",
85 feature = "UIViewController"
86))]
87extern_conformance!(
88 unsafe impl UIAppearanceContainer for UIColorPickerViewController {}
89);
90
91#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
92extern_conformance!(
93 unsafe impl UIContentContainer for UIColorPickerViewController {}
94);
95
96#[cfg(all(
97 feature = "UIFocus",
98 feature = "UIResponder",
99 feature = "UIViewController"
100))]
101extern_conformance!(
102 unsafe impl UIFocusEnvironment for UIColorPickerViewController {}
103);
104
105#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
106extern_conformance!(
107 unsafe impl UIResponderStandardEditActions for UIColorPickerViewController {}
108);
109
110#[cfg(all(
111 feature = "UIResponder",
112 feature = "UITraitCollection",
113 feature = "UIViewController"
114))]
115extern_conformance!(
116 unsafe impl UITraitEnvironment for UIColorPickerViewController {}
117);
118
119#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
120impl UIColorPickerViewController {
121 extern_methods!(
122 #[unsafe(method(delegate))]
123 #[unsafe(method_family = none)]
124 pub fn delegate(
125 &self,
126 ) -> Option<Retained<ProtocolObject<dyn UIColorPickerViewControllerDelegate>>>;
127
128 #[unsafe(method(setDelegate:))]
132 #[unsafe(method_family = none)]
133 pub fn setDelegate(
134 &self,
135 delegate: Option<&ProtocolObject<dyn UIColorPickerViewControllerDelegate>>,
136 );
137
138 #[cfg(feature = "UIColor")]
139 #[unsafe(method(selectedColor))]
142 #[unsafe(method_family = none)]
143 pub fn selectedColor(&self) -> Retained<UIColor>;
144
145 #[cfg(feature = "UIColor")]
146 #[unsafe(method(setSelectedColor:))]
148 #[unsafe(method_family = none)]
149 pub fn setSelectedColor(&self, selected_color: &UIColor);
150
151 #[unsafe(method(supportsAlpha))]
155 #[unsafe(method_family = none)]
156 pub fn supportsAlpha(&self) -> bool;
157
158 #[unsafe(method(setSupportsAlpha:))]
160 #[unsafe(method_family = none)]
161 pub fn setSupportsAlpha(&self, supports_alpha: bool);
162
163 #[unsafe(method(supportsEyedropper))]
165 #[unsafe(method_family = none)]
166 pub fn supportsEyedropper(&self) -> bool;
167
168 #[unsafe(method(setSupportsEyedropper:))]
170 #[unsafe(method_family = none)]
171 pub fn setSupportsEyedropper(&self, supports_eyedropper: bool);
172
173 #[cfg(feature = "objc2-core-foundation")]
174 #[unsafe(method(maximumLinearExposure))]
176 #[unsafe(method_family = none)]
177 pub fn maximumLinearExposure(&self) -> CGFloat;
178
179 #[cfg(feature = "objc2-core-foundation")]
180 #[unsafe(method(setMaximumLinearExposure:))]
182 #[unsafe(method_family = none)]
183 pub fn setMaximumLinearExposure(&self, maximum_linear_exposure: CGFloat);
184
185 #[unsafe(method(initWithNibName:bundle:))]
186 #[unsafe(method_family = init)]
187 pub unsafe fn initWithNibName_bundle(
188 this: Allocated<Self>,
189 nib_name_or_nil: Option<&NSString>,
190 nib_bundle_or_nil: Option<&NSBundle>,
191 ) -> Retained<Self>;
192
193 #[unsafe(method(init))]
194 #[unsafe(method_family = init)]
195 pub fn init(this: Allocated<Self>) -> Retained<Self>;
196 );
197}
198
199#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
201impl UIColorPickerViewController {
202 extern_methods!(
203 #[unsafe(method(initWithCoder:))]
207 #[unsafe(method_family = init)]
208 pub unsafe fn initWithCoder(
209 this: Allocated<Self>,
210 coder: &NSCoder,
211 ) -> Option<Retained<Self>>;
212 );
213}
214
215#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
217impl UIColorPickerViewController {
218 extern_methods!(
219 #[unsafe(method(new))]
220 #[unsafe(method_family = new)]
221 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
222 );
223}