use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSTouchBarItem, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSTouchBarItem")]
pub struct NSButtonTouchBarItem;
);
#[cfg(feature = "NSTouchBarItem")]
extern_conformance!(
unsafe impl NSCoding for NSButtonTouchBarItem {}
);
#[cfg(feature = "NSTouchBarItem")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSButtonTouchBarItem {}
);
#[cfg(feature = "NSTouchBarItem")]
impl NSButtonTouchBarItem {
extern_methods!(
#[unsafe(method(buttonTouchBarItemWithIdentifier:title:target:action:))]
#[unsafe(method_family = none)]
pub unsafe fn buttonTouchBarItemWithIdentifier_title_target_action(
identifier: &NSTouchBarItemIdentifier,
title: &NSString,
target: Option<&AnyObject>,
action: Option<Sel>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "NSImage")]
#[unsafe(method(buttonTouchBarItemWithIdentifier:image:target:action:))]
#[unsafe(method_family = none)]
pub unsafe fn buttonTouchBarItemWithIdentifier_image_target_action(
identifier: &NSTouchBarItemIdentifier,
image: &NSImage,
target: Option<&AnyObject>,
action: Option<Sel>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[cfg(feature = "NSImage")]
#[unsafe(method(buttonTouchBarItemWithIdentifier:title:image:target:action:))]
#[unsafe(method_family = none)]
pub unsafe fn buttonTouchBarItemWithIdentifier_title_image_target_action(
identifier: &NSTouchBarItemIdentifier,
title: &NSString,
image: &NSImage,
target: Option<&AnyObject>,
action: Option<Sel>,
mtm: MainThreadMarker,
) -> Retained<Self>;
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub fn title(&self) -> Retained<NSString>;
#[unsafe(method(setTitle:))]
#[unsafe(method_family = none)]
pub fn setTitle(&self, title: &NSString);
#[cfg(feature = "NSImage")]
#[unsafe(method(image))]
#[unsafe(method_family = none)]
pub fn image(&self) -> Option<Retained<NSImage>>;
#[cfg(feature = "NSImage")]
#[unsafe(method(setImage:))]
#[unsafe(method_family = none)]
pub fn setImage(&self, image: Option<&NSImage>);
#[cfg(feature = "NSColor")]
#[unsafe(method(bezelColor))]
#[unsafe(method_family = none)]
pub fn bezelColor(&self) -> Option<Retained<NSColor>>;
#[cfg(feature = "NSColor")]
#[unsafe(method(setBezelColor:))]
#[unsafe(method_family = none)]
pub fn setBezelColor(&self, bezel_color: Option<&NSColor>);
#[unsafe(method(target))]
#[unsafe(method_family = none)]
pub fn target(&self) -> Option<Retained<AnyObject>>;
#[unsafe(method(setTarget:))]
#[unsafe(method_family = none)]
pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
#[unsafe(method(action))]
#[unsafe(method_family = none)]
pub fn action(&self) -> Option<Sel>;
#[unsafe(method(setAction:))]
#[unsafe(method_family = none)]
pub unsafe fn setAction(&self, action: Option<Sel>);
#[unsafe(method(isEnabled))]
#[unsafe(method_family = none)]
pub fn isEnabled(&self) -> bool;
#[unsafe(method(setEnabled:))]
#[unsafe(method_family = none)]
pub fn setEnabled(&self, enabled: bool);
#[unsafe(method(customizationLabel))]
#[unsafe(method_family = none)]
pub fn customizationLabel(&self) -> Retained<NSString>;
#[unsafe(method(setCustomizationLabel:))]
#[unsafe(method_family = none)]
pub fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
);
}
#[cfg(feature = "NSTouchBarItem")]
impl NSButtonTouchBarItem {
extern_methods!(
#[unsafe(method(initWithIdentifier:))]
#[unsafe(method_family = init)]
pub fn initWithIdentifier(
this: Allocated<Self>,
identifier: &NSTouchBarItemIdentifier,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "NSTouchBarItem")]
impl NSButtonTouchBarItem {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}