use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait UIColorPickerViewControllerDelegate:
NSObjectProtocol + MainThreadOnly
{
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
#[deprecated]
#[optional]
#[unsafe(method(colorPickerViewControllerDidSelectColor:))]
#[unsafe(method_family = none)]
fn colorPickerViewControllerDidSelectColor(
&self,
view_controller: &UIColorPickerViewController,
);
#[cfg(all(
feature = "UIColor",
feature = "UIResponder",
feature = "UIViewController"
))]
#[optional]
#[unsafe(method(colorPickerViewController:didSelectColor:continuously:))]
#[unsafe(method_family = none)]
fn colorPickerViewController_didSelectColor_continuously(
&self,
view_controller: &UIColorPickerViewController,
color: &UIColor,
continuously: bool,
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
#[optional]
#[unsafe(method(colorPickerViewControllerDidFinish:))]
#[unsafe(method_family = none)]
fn colorPickerViewControllerDidFinish(&self, view_controller: &UIColorPickerViewController);
}
);
extern_class!(
#[unsafe(super(UIViewController, UIResponder, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
pub struct UIColorPickerViewController;
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
unsafe impl NSCoding for UIColorPickerViewController {}
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
unsafe impl NSObjectProtocol for UIColorPickerViewController {}
);
#[cfg(all(
feature = "UIAppearance",
feature = "UIResponder",
feature = "UIViewController"
))]
extern_conformance!(
unsafe impl UIAppearanceContainer for UIColorPickerViewController {}
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
unsafe impl UIContentContainer for UIColorPickerViewController {}
);
#[cfg(all(
feature = "UIFocus",
feature = "UIResponder",
feature = "UIViewController"
))]
extern_conformance!(
unsafe impl UIFocusEnvironment for UIColorPickerViewController {}
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for UIColorPickerViewController {}
);
#[cfg(all(
feature = "UIResponder",
feature = "UITraitCollection",
feature = "UIViewController"
))]
extern_conformance!(
unsafe impl UITraitEnvironment for UIColorPickerViewController {}
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIColorPickerViewController {
extern_methods!(
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn UIColorPickerViewControllerDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn UIColorPickerViewControllerDelegate>>,
);
#[cfg(feature = "UIColor")]
#[unsafe(method(selectedColor))]
#[unsafe(method_family = none)]
pub fn selectedColor(&self) -> Retained<UIColor>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setSelectedColor:))]
#[unsafe(method_family = none)]
pub fn setSelectedColor(&self, selected_color: &UIColor);
#[unsafe(method(supportsAlpha))]
#[unsafe(method_family = none)]
pub fn supportsAlpha(&self) -> bool;
#[unsafe(method(setSupportsAlpha:))]
#[unsafe(method_family = none)]
pub fn setSupportsAlpha(&self, supports_alpha: bool);
#[unsafe(method(supportsEyedropper))]
#[unsafe(method_family = none)]
pub fn supportsEyedropper(&self) -> bool;
#[unsafe(method(setSupportsEyedropper:))]
#[unsafe(method_family = none)]
pub fn setSupportsEyedropper(&self, supports_eyedropper: bool);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(maximumLinearExposure))]
#[unsafe(method_family = none)]
pub fn maximumLinearExposure(&self) -> CGFloat;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setMaximumLinearExposure:))]
#[unsafe(method_family = none)]
pub fn setMaximumLinearExposure(&self, maximum_linear_exposure: CGFloat);
#[unsafe(method(initWithNibName:bundle:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithNibName_bundle(
this: Allocated<Self>,
nib_name_or_nil: Option<&NSString>,
nib_bundle_or_nil: Option<&NSBundle>,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIColorPickerViewController {
extern_methods!(
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIColorPickerViewController {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}