use crate::common::*;
use crate::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSPanel;
unsafe impl ClassType for NSPanel {
#[inherits(NSResponder, NSObject)]
type Super = NSWindow;
}
);
extern_methods!(
unsafe impl NSPanel {
#[method(isFloatingPanel)]
pub unsafe fn isFloatingPanel(&self) -> bool;
#[method(setFloatingPanel:)]
pub unsafe fn setFloatingPanel(&self, floatingPanel: bool);
#[method(becomesKeyOnlyIfNeeded)]
pub unsafe fn becomesKeyOnlyIfNeeded(&self) -> bool;
#[method(setBecomesKeyOnlyIfNeeded:)]
pub unsafe fn setBecomesKeyOnlyIfNeeded(&self, becomesKeyOnlyIfNeeded: bool);
#[method(worksWhenModal)]
pub unsafe fn worksWhenModal(&self) -> bool;
#[method(setWorksWhenModal:)]
pub unsafe fn setWorksWhenModal(&self, worksWhenModal: bool);
}
);
extern_fn!(
pub unsafe fn NSReleaseAlertPanel(panel: Option<&Object>);
);
extern_enum!(
#[underlying(c_int)]
pub enum {
NSAlertDefaultReturn = 1,
NSAlertAlternateReturn = 0,
NSAlertOtherReturn = -1,
NSAlertErrorReturn = -2,
}
);
extern_methods!(
unsafe impl NSPanel {
#[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:)]
pub unsafe fn initWithContentRect_styleMask_backing_defer(
this: Option<Allocated<Self>>,
contentRect: NSRect,
style: NSWindowStyleMask,
backingStoreType: NSBackingStoreType,
flag: bool,
) -> Id<Self, Shared>;
#[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:screen:)]
pub unsafe fn initWithContentRect_styleMask_backing_defer_screen(
this: Option<Allocated<Self>>,
contentRect: NSRect,
style: NSWindowStyleMask,
backingStoreType: NSBackingStoreType,
flag: bool,
screen: Option<&NSScreen>,
) -> Id<Self, Shared>;
#[method_id(@__retain_semantics Other windowWithContentViewController:)]
pub unsafe fn windowWithContentViewController(
contentViewController: &NSViewController,
) -> Id<Self, Shared>;
}
);