use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSToolbarItem, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSToolbarItem")]
pub struct NSMenuToolbarItem;
);
#[cfg(feature = "NSToolbarItem")]
extern_conformance!(
unsafe impl NSCopying for NSMenuToolbarItem {}
);
#[cfg(feature = "NSToolbarItem")]
unsafe impl CopyingHelper for NSMenuToolbarItem {
type Result = Self;
}
#[cfg(feature = "NSToolbarItem")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSMenuToolbarItem {}
);
#[cfg(feature = "NSToolbarItem")]
impl NSMenuToolbarItem {
extern_methods!(
#[cfg(feature = "NSMenu")]
#[unsafe(method(menu))]
#[unsafe(method_family = none)]
pub fn menu(&self) -> Retained<NSMenu>;
#[cfg(feature = "NSMenu")]
#[unsafe(method(setMenu:))]
#[unsafe(method_family = none)]
pub fn setMenu(&self, menu: &NSMenu);
#[unsafe(method(showsIndicator))]
#[unsafe(method_family = none)]
pub fn showsIndicator(&self) -> bool;
#[unsafe(method(setShowsIndicator:))]
#[unsafe(method_family = none)]
pub fn setShowsIndicator(&self, shows_indicator: bool);
);
}
#[cfg(feature = "NSToolbarItem")]
impl NSMenuToolbarItem {
extern_methods!(
#[cfg(feature = "NSToolbar")]
#[unsafe(method(initWithItemIdentifier:))]
#[unsafe(method_family = init)]
pub fn initWithItemIdentifier(
this: Allocated<Self>,
item_identifier: &NSToolbarItemIdentifier,
) -> Retained<Self>;
);
}
#[cfg(feature = "NSToolbarItem")]
impl NSMenuToolbarItem {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}