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 NSTrackingSeparatorToolbarItem;
);
#[cfg(feature = "NSToolbarItem")]
extern_conformance!(
unsafe impl NSCopying for NSTrackingSeparatorToolbarItem {}
);
#[cfg(feature = "NSToolbarItem")]
unsafe impl CopyingHelper for NSTrackingSeparatorToolbarItem {
type Result = Self;
}
#[cfg(feature = "NSToolbarItem")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSTrackingSeparatorToolbarItem {}
);
#[cfg(feature = "NSToolbarItem")]
impl NSTrackingSeparatorToolbarItem {
extern_methods!(
#[cfg(all(
feature = "NSResponder",
feature = "NSSplitView",
feature = "NSToolbar",
feature = "NSView"
))]
#[unsafe(method(trackingSeparatorToolbarItemWithIdentifier:splitView:dividerIndex:))]
#[unsafe(method_family = none)]
pub fn trackingSeparatorToolbarItemWithIdentifier_splitView_dividerIndex(
identifier: &NSToolbarItemIdentifier,
split_view: &NSSplitView,
divider_index: NSInteger,
) -> Retained<Self>;
#[cfg(all(feature = "NSResponder", feature = "NSSplitView", feature = "NSView"))]
#[unsafe(method(splitView))]
#[unsafe(method_family = none)]
pub fn splitView(&self) -> Retained<NSSplitView>;
#[cfg(all(feature = "NSResponder", feature = "NSSplitView", feature = "NSView"))]
#[unsafe(method(setSplitView:))]
#[unsafe(method_family = none)]
pub fn setSplitView(&self, split_view: &NSSplitView);
#[unsafe(method(dividerIndex))]
#[unsafe(method_family = none)]
pub fn dividerIndex(&self) -> NSInteger;
#[unsafe(method(setDividerIndex:))]
#[unsafe(method_family = none)]
pub fn setDividerIndex(&self, divider_index: NSInteger);
);
}
#[cfg(feature = "NSToolbarItem")]
impl NSTrackingSeparatorToolbarItem {
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 NSTrackingSeparatorToolbarItem {
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>;
);
}