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 NSCustomTouchBarItem;
);
#[cfg(feature = "NSTouchBarItem")]
extern_conformance!(
unsafe impl NSCoding for NSCustomTouchBarItem {}
);
#[cfg(feature = "NSTouchBarItem")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSCustomTouchBarItem {}
);
#[cfg(feature = "NSTouchBarItem")]
impl NSCustomTouchBarItem {
extern_methods!(
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
#[unsafe(method(view))]
#[unsafe(method_family = none)]
pub fn view(&self) -> Retained<NSView>;
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
#[unsafe(method(setView:))]
#[unsafe(method_family = none)]
pub fn setView(&self, view: &NSView);
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
#[unsafe(method(viewController))]
#[unsafe(method_family = none)]
pub fn viewController(&self) -> Option<Retained<NSViewController>>;
#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
#[unsafe(method(setViewController:))]
#[unsafe(method_family = none)]
pub fn setViewController(&self, view_controller: Option<&NSViewController>);
#[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 NSCustomTouchBarItem {
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 NSCustomTouchBarItem {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}