use crate::common::*;
use crate::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSColorPickerTouchBarItem;
unsafe impl ClassType for NSColorPickerTouchBarItem {
#[inherits(NSObject)]
type Super = NSTouchBarItem;
}
);
extern_methods!(
unsafe impl NSColorPickerTouchBarItem {
#[method_id(@__retain_semantics Other colorPickerWithIdentifier:)]
pub unsafe fn colorPickerWithIdentifier(
identifier: &NSTouchBarItemIdentifier,
) -> Id<Self, Shared>;
#[method_id(@__retain_semantics Other textColorPickerWithIdentifier:)]
pub unsafe fn textColorPickerWithIdentifier(
identifier: &NSTouchBarItemIdentifier,
) -> Id<Self, Shared>;
#[method_id(@__retain_semantics Other strokeColorPickerWithIdentifier:)]
pub unsafe fn strokeColorPickerWithIdentifier(
identifier: &NSTouchBarItemIdentifier,
) -> Id<Self, Shared>;
#[method_id(@__retain_semantics Other colorPickerWithIdentifier:buttonImage:)]
pub unsafe fn colorPickerWithIdentifier_buttonImage(
identifier: &NSTouchBarItemIdentifier,
image: &NSImage,
) -> Id<Self, Shared>;
#[method_id(@__retain_semantics Other color)]
pub unsafe fn color(&self) -> Id<NSColor, Shared>;
#[method(setColor:)]
pub unsafe fn setColor(&self, color: &NSColor);
#[method(showsAlpha)]
pub unsafe fn showsAlpha(&self) -> bool;
#[method(setShowsAlpha:)]
pub unsafe fn setShowsAlpha(&self, showsAlpha: bool);
#[method_id(@__retain_semantics Other allowedColorSpaces)]
pub unsafe fn allowedColorSpaces(&self) -> Option<Id<NSArray<NSColorSpace>, Shared>>;
#[method(setAllowedColorSpaces:)]
pub unsafe fn setAllowedColorSpaces(
&self,
allowedColorSpaces: Option<&NSArray<NSColorSpace>>,
);
#[method_id(@__retain_semantics Other colorList)]
pub unsafe fn colorList(&self) -> Option<Id<NSColorList, Shared>>;
#[method(setColorList:)]
pub unsafe fn setColorList(&self, colorList: Option<&NSColorList>);
#[method_id(@__retain_semantics Other customizationLabel)]
pub unsafe fn customizationLabel(&self) -> Id<NSString, Shared>;
#[method(setCustomizationLabel:)]
pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>);
#[method_id(@__retain_semantics Other target)]
pub unsafe fn target(&self) -> Option<Id<Object, Shared>>;
#[method(setTarget:)]
pub unsafe fn setTarget(&self, target: Option<&Object>);
#[method(action)]
pub unsafe fn action(&self) -> Option<Sel>;
#[method(setAction:)]
pub unsafe fn setAction(&self, action: Option<Sel>);
#[method(isEnabled)]
pub unsafe fn isEnabled(&self) -> bool;
#[method(setEnabled:)]
pub unsafe fn setEnabled(&self, enabled: bool);
}
);
extern_methods!(
unsafe impl NSColorPickerTouchBarItem {
#[method_id(@__retain_semantics Init initWithIdentifier:)]
pub unsafe fn initWithIdentifier(
this: Option<Allocated<Self>>,
identifier: &NSTouchBarItemIdentifier,
) -> Id<Self, Shared>;
}
);