use crate::common::*;
use crate::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;
ns_enum!(
#[underlying(NSUInteger)]
pub enum NSTabState {
NSSelectedTab = 0,
NSBackgroundTab = 1,
NSPressedTab = 2,
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "AppKit_NSTabViewItem")]
pub struct NSTabViewItem;
#[cfg(feature = "AppKit_NSTabViewItem")]
unsafe impl ClassType for NSTabViewItem {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "AppKit_NSTabViewItem")]
unsafe impl NSCoding for NSTabViewItem {}
#[cfg(feature = "AppKit_NSTabViewItem")]
unsafe impl NSObjectProtocol for NSTabViewItem {}
extern_methods!(
#[cfg(feature = "AppKit_NSTabViewItem")]
unsafe impl NSTabViewItem {
#[cfg(feature = "AppKit_NSViewController")]
#[method_id(@__retain_semantics Other tabViewItemWithViewController:)]
pub unsafe fn tabViewItemWithViewController(view_controller: &NSViewController)
-> Id<Self>;
#[method_id(@__retain_semantics Init initWithIdentifier:)]
pub unsafe fn initWithIdentifier(
this: Allocated<Self>,
identifier: Option<&AnyObject>,
) -> Id<Self>;
#[method_id(@__retain_semantics Other identifier)]
pub unsafe fn identifier(&self) -> Option<Id<AnyObject>>;
#[method(setIdentifier:)]
pub unsafe fn setIdentifier(&self, identifier: Option<&AnyObject>);
#[cfg(feature = "AppKit_NSColor")]
#[method_id(@__retain_semantics Other color)]
pub unsafe fn color(&self) -> Id<NSColor>;
#[cfg(feature = "AppKit_NSColor")]
#[method(setColor:)]
pub unsafe fn setColor(&self, color: &NSColor);
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other label)]
pub unsafe fn label(&self) -> Id<NSString>;
#[cfg(feature = "Foundation_NSString")]
#[method(setLabel:)]
pub unsafe fn setLabel(&self, label: &NSString);
#[cfg(feature = "AppKit_NSImage")]
#[method_id(@__retain_semantics Other image)]
pub unsafe fn image(&self) -> Option<Id<NSImage>>;
#[cfg(feature = "AppKit_NSImage")]
#[method(setImage:)]
pub unsafe fn setImage(&self, image: Option<&NSImage>);
#[cfg(feature = "AppKit_NSView")]
#[method_id(@__retain_semantics Other view)]
pub unsafe fn view(&self, mtm: MainThreadMarker) -> Option<Id<NSView>>;
#[cfg(feature = "AppKit_NSView")]
#[method(setView:)]
pub unsafe fn setView(&self, view: Option<&NSView>);
#[cfg(feature = "AppKit_NSViewController")]
#[method_id(@__retain_semantics Other viewController)]
pub unsafe fn viewController(&self, mtm: MainThreadMarker) -> Option<Id<NSViewController>>;
#[cfg(feature = "AppKit_NSViewController")]
#[method(setViewController:)]
pub unsafe fn setViewController(&self, view_controller: Option<&NSViewController>);
#[method(tabState)]
pub unsafe fn tabState(&self) -> NSTabState;
#[cfg(feature = "AppKit_NSTabView")]
#[method_id(@__retain_semantics Other tabView)]
pub unsafe fn tabView(&self, mtm: MainThreadMarker) -> Option<Id<NSTabView>>;
#[cfg(feature = "AppKit_NSView")]
#[method_id(@__retain_semantics Other initialFirstResponder)]
pub unsafe fn initialFirstResponder(&self, mtm: MainThreadMarker) -> Option<Id<NSView>>;
#[cfg(feature = "AppKit_NSView")]
#[method(setInitialFirstResponder:)]
pub unsafe fn setInitialFirstResponder(&self, initial_first_responder: Option<&NSView>);
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other toolTip)]
pub unsafe fn toolTip(&self) -> Option<Id<NSString>>;
#[cfg(feature = "Foundation_NSString")]
#[method(setToolTip:)]
pub unsafe fn setToolTip(&self, tool_tip: Option<&NSString>);
#[method(drawLabel:inRect:)]
pub unsafe fn drawLabel_inRect(&self, should_truncate_label: bool, label_rect: NSRect);
#[method(sizeOfLabel:)]
pub unsafe fn sizeOfLabel(&self, compute_min: bool) -> NSSize;
}
);
extern_methods!(
#[cfg(feature = "AppKit_NSTabViewItem")]
unsafe impl NSTabViewItem {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);