objc2_app_kit/generated/
NSColorPicker.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscolorpicker?language=objc)
12    #[unsafe(super(NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct NSColorPicker;
16);
17
18#[cfg(feature = "NSColorPicking")]
19extern_conformance!(
20    unsafe impl NSColorPickingDefault for NSColorPicker {}
21);
22
23extern_conformance!(
24    unsafe impl NSObjectProtocol for NSColorPicker {}
25);
26
27impl NSColorPicker {
28    extern_methods!(
29        #[cfg(all(
30            feature = "NSColorPanel",
31            feature = "NSPanel",
32            feature = "NSResponder",
33            feature = "NSWindow"
34        ))]
35        #[unsafe(method(initWithPickerMask:colorPanel:))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn initWithPickerMask_colorPanel(
38            this: Allocated<Self>,
39            mask: NSUInteger,
40            owning_color_panel: &NSColorPanel,
41        ) -> Option<Retained<Self>>;
42
43        #[cfg(all(
44            feature = "NSColorPanel",
45            feature = "NSPanel",
46            feature = "NSResponder",
47            feature = "NSWindow"
48        ))]
49        #[unsafe(method(colorPanel))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn colorPanel(&self) -> Retained<NSColorPanel>;
52
53        #[cfg(feature = "NSImage")]
54        #[unsafe(method(provideNewButtonImage))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn provideNewButtonImage(&self) -> Retained<NSImage>;
57
58        #[cfg(all(
59            feature = "NSActionCell",
60            feature = "NSButtonCell",
61            feature = "NSCell",
62            feature = "NSImage"
63        ))]
64        #[unsafe(method(insertNewButtonImage:in:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn insertNewButtonImage_in(
67            &self,
68            new_button_image: &NSImage,
69            button_cell: &NSButtonCell,
70        );
71
72        #[unsafe(method(viewSizeChanged:))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn viewSizeChanged(&self, sender: Option<&AnyObject>);
75
76        #[cfg(feature = "NSColorList")]
77        #[unsafe(method(attachColorList:))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn attachColorList(&self, color_list: &NSColorList);
80
81        #[cfg(feature = "NSColorList")]
82        #[unsafe(method(detachColorList:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn detachColorList(&self, color_list: &NSColorList);
85
86        #[cfg(feature = "NSColorPanel")]
87        #[unsafe(method(setMode:))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn setMode(&self, mode: NSColorPanelMode);
90
91        #[unsafe(method(buttonToolTip))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn buttonToolTip(&self) -> Retained<NSString>;
94
95        #[unsafe(method(minContentSize))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn minContentSize(&self) -> NSSize;
98    );
99}
100
101/// Methods declared on superclass `NSObject`.
102impl NSColorPicker {
103    extern_methods!(
104        #[unsafe(method(init))]
105        #[unsafe(method_family = init)]
106        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
107
108        #[unsafe(method(new))]
109        #[unsafe(method_family = new)]
110        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
111    );
112}