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")]
19unsafe impl NSCoding for NSColorPickerTouchBarItem {}
20
21#[cfg(feature = "NSTouchBarItem")]
22unsafe impl NSObjectProtocol for NSColorPickerTouchBarItem {}
23
24#[cfg(feature = "NSTouchBarItem")]
25impl NSColorPickerTouchBarItem {
26 extern_methods!(
27 #[unsafe(method(colorPickerWithIdentifier:))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn colorPickerWithIdentifier(
31 identifier: &NSTouchBarItemIdentifier,
32 mtm: MainThreadMarker,
33 ) -> Retained<Self>;
34
35 #[unsafe(method(textColorPickerWithIdentifier:))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn textColorPickerWithIdentifier(
39 identifier: &NSTouchBarItemIdentifier,
40 mtm: MainThreadMarker,
41 ) -> Retained<Self>;
42
43 #[unsafe(method(strokeColorPickerWithIdentifier:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn strokeColorPickerWithIdentifier(
47 identifier: &NSTouchBarItemIdentifier,
48 mtm: MainThreadMarker,
49 ) -> Retained<Self>;
50
51 #[cfg(feature = "NSImage")]
52 #[unsafe(method(colorPickerWithIdentifier:buttonImage:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn colorPickerWithIdentifier_buttonImage(
55 identifier: &NSTouchBarItemIdentifier,
56 image: &NSImage,
57 mtm: MainThreadMarker,
58 ) -> Retained<Self>;
59
60 #[cfg(feature = "NSColor")]
61 #[unsafe(method(color))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn color(&self) -> Retained<NSColor>;
64
65 #[cfg(feature = "NSColor")]
66 #[unsafe(method(setColor:))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn setColor(&self, color: &NSColor);
70
71 #[unsafe(method(showsAlpha))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn showsAlpha(&self) -> bool;
75
76 #[unsafe(method(setShowsAlpha:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn setShowsAlpha(&self, shows_alpha: bool);
80
81 #[cfg(feature = "NSColorSpace")]
82 #[unsafe(method(allowedColorSpaces))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn allowedColorSpaces(&self) -> Option<Retained<NSArray<NSColorSpace>>>;
86
87 #[cfg(feature = "NSColorSpace")]
88 #[unsafe(method(setAllowedColorSpaces:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn setAllowedColorSpaces(
92 &self,
93 allowed_color_spaces: Option<&NSArray<NSColorSpace>>,
94 );
95
96 #[cfg(feature = "NSColorList")]
97 #[unsafe(method(colorList))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn colorList(&self) -> Option<Retained<NSColorList>>;
101
102 #[cfg(feature = "NSColorList")]
103 #[unsafe(method(setColorList:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn setColorList(&self, color_list: Option<&NSColorList>);
107
108 #[unsafe(method(customizationLabel))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn customizationLabel(&self) -> Retained<NSString>;
112
113 #[unsafe(method(setCustomizationLabel:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
117
118 #[unsafe(method(target))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
121
122 #[unsafe(method(setTarget:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
127
128 #[unsafe(method(action))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn action(&self) -> Option<Sel>;
131
132 #[unsafe(method(setAction:))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn setAction(&self, action: Option<Sel>);
136
137 #[unsafe(method(isEnabled))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn isEnabled(&self) -> bool;
141
142 #[unsafe(method(setEnabled:))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn setEnabled(&self, enabled: bool);
146 );
147}
148
149#[cfg(feature = "NSTouchBarItem")]
151impl NSColorPickerTouchBarItem {
152 extern_methods!(
153 #[unsafe(method(initWithIdentifier:))]
154 #[unsafe(method_family = init)]
155 pub unsafe fn initWithIdentifier(
156 this: Allocated<Self>,
157 identifier: &NSTouchBarItemIdentifier,
158 ) -> Retained<Self>;
159
160 #[unsafe(method(initWithCoder:))]
161 #[unsafe(method_family = init)]
162 pub unsafe fn initWithCoder(
163 this: Allocated<Self>,
164 coder: &NSCoder,
165 ) -> Option<Retained<Self>>;
166
167 #[unsafe(method(init))]
168 #[unsafe(method_family = init)]
169 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
170 );
171}
172
173#[cfg(feature = "NSTouchBarItem")]
175impl NSColorPickerTouchBarItem {
176 extern_methods!(
177 #[unsafe(method(new))]
178 #[unsafe(method_family = new)]
179 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
180 );
181}