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 NSPopoverTouchBarItem;
);
#[cfg(feature = "NSTouchBarItem")]
extern_conformance!(
unsafe impl NSCoding for NSPopoverTouchBarItem {}
);
#[cfg(feature = "NSTouchBarItem")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSPopoverTouchBarItem {}
);
#[cfg(feature = "NSTouchBarItem")]
impl NSPopoverTouchBarItem {
extern_methods!(
#[cfg(feature = "NSTouchBar")]
#[unsafe(method(popoverTouchBar))]
#[unsafe(method_family = none)]
pub fn popoverTouchBar(&self) -> Retained<NSTouchBar>;
#[cfg(feature = "NSTouchBar")]
#[unsafe(method(setPopoverTouchBar:))]
#[unsafe(method_family = none)]
pub fn setPopoverTouchBar(&self, popover_touch_bar: &NSTouchBar);
#[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(all(feature = "NSResponder", feature = "NSView"))]
#[unsafe(method(collapsedRepresentation))]
#[unsafe(method_family = none)]
pub fn collapsedRepresentation(&self) -> Retained<NSView>;
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
#[unsafe(method(setCollapsedRepresentation:))]
#[unsafe(method_family = none)]
pub fn setCollapsedRepresentation(&self, collapsed_representation: &NSView);
#[cfg(feature = "NSImage")]
#[unsafe(method(collapsedRepresentationImage))]
#[unsafe(method_family = none)]
pub fn collapsedRepresentationImage(&self) -> Option<Retained<NSImage>>;
#[cfg(feature = "NSImage")]
#[unsafe(method(setCollapsedRepresentationImage:))]
#[unsafe(method_family = none)]
pub fn setCollapsedRepresentationImage(
&self,
collapsed_representation_image: Option<&NSImage>,
);
#[unsafe(method(collapsedRepresentationLabel))]
#[unsafe(method_family = none)]
pub fn collapsedRepresentationLabel(&self) -> Retained<NSString>;
#[unsafe(method(setCollapsedRepresentationLabel:))]
#[unsafe(method_family = none)]
pub fn setCollapsedRepresentationLabel(&self, collapsed_representation_label: &NSString);
#[cfg(feature = "NSTouchBar")]
#[unsafe(method(pressAndHoldTouchBar))]
#[unsafe(method_family = none)]
pub fn pressAndHoldTouchBar(&self) -> Option<Retained<NSTouchBar>>;
#[cfg(feature = "NSTouchBar")]
#[unsafe(method(setPressAndHoldTouchBar:))]
#[unsafe(method_family = none)]
pub fn setPressAndHoldTouchBar(&self, press_and_hold_touch_bar: Option<&NSTouchBar>);
#[unsafe(method(showsCloseButton))]
#[unsafe(method_family = none)]
pub fn showsCloseButton(&self) -> bool;
#[unsafe(method(setShowsCloseButton:))]
#[unsafe(method_family = none)]
pub fn setShowsCloseButton(&self, shows_close_button: bool);
#[unsafe(method(showPopover:))]
#[unsafe(method_family = none)]
pub unsafe fn showPopover(&self, sender: Option<&AnyObject>);
#[unsafe(method(dismissPopover:))]
#[unsafe(method_family = none)]
pub unsafe fn dismissPopover(&self, sender: Option<&AnyObject>);
#[cfg(feature = "NSGestureRecognizer")]
#[unsafe(method(makeStandardActivatePopoverGestureRecognizer))]
#[unsafe(method_family = none)]
pub fn makeStandardActivatePopoverGestureRecognizer(&self)
-> Retained<NSGestureRecognizer>;
);
}
#[cfg(feature = "NSTouchBarItem")]
impl NSPopoverTouchBarItem {
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 NSPopoverTouchBarItem {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}