objc2_app_kit/generated/
NSColorPickerTouchBarItem.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSTouchBarItem, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "NSTouchBarItem")]
15 pub struct NSColorPickerTouchBarItem;
16);
17
18#[cfg(feature = "NSTouchBarItem")]
19extern_conformance!(
20 unsafe impl NSCoding for NSColorPickerTouchBarItem {}
21);
22
23#[cfg(feature = "NSTouchBarItem")]
24extern_conformance!(
25 unsafe impl NSObjectProtocol for NSColorPickerTouchBarItem {}
26);
27
28#[cfg(feature = "NSTouchBarItem")]
29impl NSColorPickerTouchBarItem {
30 extern_methods!(
31 #[unsafe(method(colorPickerWithIdentifier:))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn colorPickerWithIdentifier(
35 identifier: &NSTouchBarItemIdentifier,
36 mtm: MainThreadMarker,
37 ) -> Retained<Self>;
38
39 #[unsafe(method(textColorPickerWithIdentifier:))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn textColorPickerWithIdentifier(
43 identifier: &NSTouchBarItemIdentifier,
44 mtm: MainThreadMarker,
45 ) -> Retained<Self>;
46
47 #[unsafe(method(strokeColorPickerWithIdentifier:))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn strokeColorPickerWithIdentifier(
51 identifier: &NSTouchBarItemIdentifier,
52 mtm: MainThreadMarker,
53 ) -> Retained<Self>;
54
55 #[cfg(feature = "NSImage")]
56 #[unsafe(method(colorPickerWithIdentifier:buttonImage:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn colorPickerWithIdentifier_buttonImage(
59 identifier: &NSTouchBarItemIdentifier,
60 image: &NSImage,
61 mtm: MainThreadMarker,
62 ) -> Retained<Self>;
63
64 #[cfg(feature = "NSColor")]
65 #[unsafe(method(color))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn color(&self) -> Retained<NSColor>;
68
69 #[cfg(feature = "NSColor")]
70 #[unsafe(method(setColor:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn setColor(&self, color: &NSColor);
74
75 #[unsafe(method(showsAlpha))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn showsAlpha(&self) -> bool;
79
80 #[unsafe(method(setShowsAlpha:))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn setShowsAlpha(&self, shows_alpha: bool);
84
85 #[cfg(feature = "NSColorSpace")]
86 #[unsafe(method(allowedColorSpaces))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn allowedColorSpaces(&self) -> Option<Retained<NSArray<NSColorSpace>>>;
90
91 #[cfg(feature = "NSColorSpace")]
92 #[unsafe(method(setAllowedColorSpaces:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn setAllowedColorSpaces(
96 &self,
97 allowed_color_spaces: Option<&NSArray<NSColorSpace>>,
98 );
99
100 #[cfg(feature = "NSColorList")]
101 #[unsafe(method(colorList))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn colorList(&self) -> Option<Retained<NSColorList>>;
105
106 #[cfg(feature = "NSColorList")]
107 #[unsafe(method(setColorList:))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn setColorList(&self, color_list: Option<&NSColorList>);
111
112 #[unsafe(method(customizationLabel))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn customizationLabel(&self) -> Retained<NSString>;
116
117 #[unsafe(method(setCustomizationLabel:))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
121
122 #[unsafe(method(target))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
125
126 #[unsafe(method(setTarget:))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
131
132 #[unsafe(method(action))]
133 #[unsafe(method_family = none)]
134 pub unsafe fn action(&self) -> Option<Sel>;
135
136 #[unsafe(method(setAction:))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn setAction(&self, action: Option<Sel>);
140
141 #[unsafe(method(isEnabled))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn isEnabled(&self) -> bool;
145
146 #[unsafe(method(setEnabled:))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn setEnabled(&self, enabled: bool);
150 );
151}
152
153#[cfg(feature = "NSTouchBarItem")]
155impl NSColorPickerTouchBarItem {
156 extern_methods!(
157 #[unsafe(method(initWithIdentifier:))]
158 #[unsafe(method_family = init)]
159 pub unsafe fn initWithIdentifier(
160 this: Allocated<Self>,
161 identifier: &NSTouchBarItemIdentifier,
162 ) -> Retained<Self>;
163
164 #[unsafe(method(initWithCoder:))]
165 #[unsafe(method_family = init)]
166 pub unsafe fn initWithCoder(
167 this: Allocated<Self>,
168 coder: &NSCoder,
169 ) -> Option<Retained<Self>>;
170
171 #[unsafe(method(init))]
172 #[unsafe(method_family = init)]
173 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
174 );
175}
176
177#[cfg(feature = "NSTouchBarItem")]
179impl NSColorPickerTouchBarItem {
180 extern_methods!(
181 #[unsafe(method(new))]
182 #[unsafe(method_family = new)]
183 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
184 );
185}