objc2_app_kit/generated/
NSColorPicker.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[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 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 fn colorPanel(&self) -> Retained<NSColorPanel>;
52
53 #[cfg(feature = "NSImage")]
54 #[unsafe(method(provideNewButtonImage))]
55 #[unsafe(method_family = none)]
56 pub 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 fn insertNewButtonImage_in(
67 &self,
68 new_button_image: &NSImage,
69 button_cell: &NSButtonCell,
70 );
71
72 #[unsafe(method(viewSizeChanged:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn viewSizeChanged(&self, sender: Option<&AnyObject>);
78
79 #[cfg(feature = "NSColorList")]
80 #[unsafe(method(attachColorList:))]
81 #[unsafe(method_family = none)]
82 pub fn attachColorList(&self, color_list: &NSColorList);
83
84 #[cfg(feature = "NSColorList")]
85 #[unsafe(method(detachColorList:))]
86 #[unsafe(method_family = none)]
87 pub fn detachColorList(&self, color_list: &NSColorList);
88
89 #[cfg(feature = "NSColorPanel")]
90 #[unsafe(method(setMode:))]
91 #[unsafe(method_family = none)]
92 pub fn setMode(&self, mode: NSColorPanelMode);
93
94 #[unsafe(method(buttonToolTip))]
95 #[unsafe(method_family = none)]
96 pub fn buttonToolTip(&self) -> Retained<NSString>;
97
98 #[unsafe(method(minContentSize))]
99 #[unsafe(method_family = none)]
100 pub fn minContentSize(&self) -> NSSize;
101 );
102}
103
104impl NSColorPicker {
106 extern_methods!(
107 #[unsafe(method(init))]
108 #[unsafe(method_family = init)]
109 pub fn init(this: Allocated<Self>) -> Retained<Self>;
110
111 #[unsafe(method(new))]
112 #[unsafe(method_family = new)]
113 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
114 );
115}