use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSTouchBarItem")]
pub struct NSCustomTouchBarItem;
#[cfg(feature = "NSTouchBarItem")]
unsafe impl ClassType for NSCustomTouchBarItem {
#[inherits(NSObject)]
type Super = NSTouchBarItem;
type Mutability = MainThreadOnly;
}
);
#[cfg(feature = "NSTouchBarItem")]
unsafe impl NSCoding for NSCustomTouchBarItem {}
#[cfg(feature = "NSTouchBarItem")]
unsafe impl NSObjectProtocol for NSCustomTouchBarItem {}
extern_methods!(
#[cfg(feature = "NSTouchBarItem")]
unsafe impl NSCustomTouchBarItem {
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
#[method_id(@__retain_semantics Other view)]
pub unsafe fn view(&self) -> Id<NSView>;
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
#[method(setView:)]
pub unsafe fn setView(&self, view: &NSView);
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
#[method_id(@__retain_semantics Other viewController)]
pub unsafe fn viewController(&self) -> Option<Id<NSViewController>>;
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
#[method(setViewController:)]
pub unsafe fn setViewController(&self, view_controller: Option<&NSViewController>);
#[method_id(@__retain_semantics Other customizationLabel)]
pub unsafe fn customizationLabel(&self) -> Id<NSString>;
#[method(setCustomizationLabel:)]
pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
}
);
extern_methods!(
#[cfg(feature = "NSTouchBarItem")]
unsafe impl NSCustomTouchBarItem {
#[method_id(@__retain_semantics Init initWithIdentifier:)]
pub unsafe fn initWithIdentifier(
this: Allocated<Self>,
identifier: &NSTouchBarItemIdentifier,
) -> Id<Self>;
#[method_id(@__retain_semantics Init initWithCoder:)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Option<Id<Self>>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
#[cfg(feature = "NSTouchBarItem")]
unsafe impl NSCustomTouchBarItem {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Id<Self>;
}
);