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 fn colorPickerWithIdentifier(
35 identifier: &NSTouchBarItemIdentifier,
36 mtm: MainThreadMarker,
37 ) -> Retained<Self>;
38
39 #[unsafe(method(textColorPickerWithIdentifier:))]
41 #[unsafe(method_family = none)]
42 pub fn textColorPickerWithIdentifier(
43 identifier: &NSTouchBarItemIdentifier,
44 mtm: MainThreadMarker,
45 ) -> Retained<Self>;
46
47 #[unsafe(method(strokeColorPickerWithIdentifier:))]
49 #[unsafe(method_family = none)]
50 pub 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 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 fn color(&self) -> Retained<NSColor>;
68
69 #[cfg(feature = "NSColor")]
70 #[unsafe(method(setColor:))]
74 #[unsafe(method_family = none)]
75 pub fn setColor(&self, color: &NSColor);
76
77 #[unsafe(method(showsAlpha))]
79 #[unsafe(method_family = none)]
80 pub fn showsAlpha(&self) -> bool;
81
82 #[unsafe(method(setShowsAlpha:))]
84 #[unsafe(method_family = none)]
85 pub fn setShowsAlpha(&self, shows_alpha: bool);
86
87 #[cfg(feature = "NSColorSpace")]
88 #[unsafe(method(allowedColorSpaces))]
90 #[unsafe(method_family = none)]
91 pub fn allowedColorSpaces(&self) -> Option<Retained<NSArray<NSColorSpace>>>;
92
93 #[cfg(feature = "NSColorSpace")]
94 #[unsafe(method(setAllowedColorSpaces:))]
98 #[unsafe(method_family = none)]
99 pub fn setAllowedColorSpaces(&self, allowed_color_spaces: Option<&NSArray<NSColorSpace>>);
100
101 #[cfg(feature = "NSColorList")]
102 #[unsafe(method(colorList))]
104 #[unsafe(method_family = none)]
105 pub fn colorList(&self) -> Option<Retained<NSColorList>>;
106
107 #[cfg(feature = "NSColorList")]
108 #[unsafe(method(setColorList:))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn setColorList(&self, color_list: Option<&NSColorList>);
116
117 #[unsafe(method(customizationLabel))]
119 #[unsafe(method_family = none)]
120 pub fn customizationLabel(&self) -> Retained<NSString>;
121
122 #[unsafe(method(setCustomizationLabel:))]
126 #[unsafe(method_family = none)]
127 pub fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
128
129 #[unsafe(method(target))]
130 #[unsafe(method_family = none)]
131 pub fn target(&self) -> Option<Retained<AnyObject>>;
132
133 #[unsafe(method(setTarget:))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
143
144 #[unsafe(method(action))]
145 #[unsafe(method_family = none)]
146 pub fn action(&self) -> Option<Sel>;
147
148 #[unsafe(method(setAction:))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn setAction(&self, action: Option<Sel>);
156
157 #[unsafe(method(isEnabled))]
159 #[unsafe(method_family = none)]
160 pub fn isEnabled(&self) -> bool;
161
162 #[unsafe(method(setEnabled:))]
164 #[unsafe(method_family = none)]
165 pub fn setEnabled(&self, enabled: bool);
166 );
167}
168
169#[cfg(feature = "NSTouchBarItem")]
171impl NSColorPickerTouchBarItem {
172 extern_methods!(
173 #[unsafe(method(initWithIdentifier:))]
174 #[unsafe(method_family = init)]
175 pub fn initWithIdentifier(
176 this: Allocated<Self>,
177 identifier: &NSTouchBarItemIdentifier,
178 ) -> Retained<Self>;
179
180 #[unsafe(method(initWithCoder:))]
184 #[unsafe(method_family = init)]
185 pub unsafe fn initWithCoder(
186 this: Allocated<Self>,
187 coder: &NSCoder,
188 ) -> Option<Retained<Self>>;
189
190 #[unsafe(method(init))]
191 #[unsafe(method_family = init)]
192 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
193 );
194}
195
196#[cfg(feature = "NSTouchBarItem")]
198impl NSColorPickerTouchBarItem {
199 extern_methods!(
200 #[unsafe(method(new))]
201 #[unsafe(method_family = new)]
202 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
203 );
204}