use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSResponder")]
pub struct NSWindowController;
);
#[cfg(feature = "NSResponder")]
extern_conformance!(
unsafe impl NSCoding for NSWindowController {}
);
#[cfg(feature = "NSResponder")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSWindowController {}
);
#[cfg(all(feature = "NSResponder", feature = "NSStoryboardSegue"))]
extern_conformance!(
unsafe impl NSSeguePerforming for NSWindowController {}
);
#[cfg(feature = "NSResponder")]
impl NSWindowController {
extern_methods!(
#[cfg(feature = "NSWindow")]
#[unsafe(method(initWithWindow:))]
#[unsafe(method_family = init)]
pub fn initWithWindow(this: Allocated<Self>, window: Option<&NSWindow>) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSNib")]
#[unsafe(method(initWithWindowNibName:))]
#[unsafe(method_family = init)]
pub fn initWithWindowNibName(
this: Allocated<Self>,
window_nib_name: &NSNibName,
) -> Retained<Self>;
#[cfg(feature = "NSNib")]
#[unsafe(method(initWithWindowNibName:owner:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithWindowNibName_owner(
this: Allocated<Self>,
window_nib_name: &NSNibName,
owner: &AnyObject,
) -> Retained<Self>;
#[unsafe(method(initWithWindowNibPath:owner:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithWindowNibPath_owner(
this: Allocated<Self>,
window_nib_path: &NSString,
owner: &AnyObject,
) -> Retained<Self>;
#[cfg(feature = "NSNib")]
#[unsafe(method(windowNibName))]
#[unsafe(method_family = none)]
pub fn windowNibName(&self) -> Option<Retained<NSNibName>>;
#[unsafe(method(windowNibPath))]
#[unsafe(method_family = none)]
pub fn windowNibPath(&self) -> Option<Retained<NSString>>;
#[unsafe(method(owner))]
#[unsafe(method_family = none)]
pub fn owner(&self) -> Option<Retained<AnyObject>>;
#[cfg(feature = "NSWindow")]
#[unsafe(method(windowFrameAutosaveName))]
#[unsafe(method_family = none)]
pub fn windowFrameAutosaveName(&self) -> Retained<NSWindowFrameAutosaveName>;
#[cfg(feature = "NSWindow")]
#[unsafe(method(setWindowFrameAutosaveName:))]
#[unsafe(method_family = none)]
pub fn setWindowFrameAutosaveName(
&self,
window_frame_autosave_name: &NSWindowFrameAutosaveName,
);
#[unsafe(method(shouldCascadeWindows))]
#[unsafe(method_family = none)]
pub fn shouldCascadeWindows(&self) -> bool;
#[unsafe(method(setShouldCascadeWindows:))]
#[unsafe(method_family = none)]
pub fn setShouldCascadeWindows(&self, should_cascade_windows: bool);
#[cfg(feature = "NSPreviewRepresentingActivityItem")]
#[unsafe(method(previewRepresentableActivityItems))]
#[unsafe(method_family = none)]
pub fn previewRepresentableActivityItems(
&self,
) -> Option<Retained<NSArray<ProtocolObject<dyn NSPreviewRepresentableActivityItem>>>>;
#[cfg(feature = "NSPreviewRepresentingActivityItem")]
#[unsafe(method(setPreviewRepresentableActivityItems:))]
#[unsafe(method_family = none)]
pub fn setPreviewRepresentableActivityItems(
&self,
preview_representable_activity_items: Option<
&NSArray<ProtocolObject<dyn NSPreviewRepresentableActivityItem>>,
>,
);
#[unsafe(method(document))]
#[unsafe(method_family = none)]
pub unsafe fn document(&self) -> Option<Retained<AnyObject>>;
#[unsafe(method(setDocument:))]
#[unsafe(method_family = none)]
pub unsafe fn setDocument(&self, document: Option<&AnyObject>);
#[unsafe(method(setDocumentEdited:))]
#[unsafe(method_family = none)]
pub fn setDocumentEdited(&self, dirty_flag: bool);
#[unsafe(method(shouldCloseDocument))]
#[unsafe(method_family = none)]
pub fn shouldCloseDocument(&self) -> bool;
#[unsafe(method(setShouldCloseDocument:))]
#[unsafe(method_family = none)]
pub fn setShouldCloseDocument(&self, should_close_document: bool);
#[unsafe(method(synchronizeWindowTitleWithDocumentName))]
#[unsafe(method_family = none)]
pub fn synchronizeWindowTitleWithDocumentName(&self);
#[unsafe(method(windowTitleForDocumentDisplayName:))]
#[unsafe(method_family = none)]
pub fn windowTitleForDocumentDisplayName(
&self,
display_name: &NSString,
) -> Retained<NSString>;
#[cfg(feature = "NSViewController")]
#[unsafe(method(contentViewController))]
#[unsafe(method_family = none)]
pub fn contentViewController(&self) -> Option<Retained<NSViewController>>;
#[cfg(feature = "NSViewController")]
#[unsafe(method(setContentViewController:))]
#[unsafe(method_family = none)]
pub fn setContentViewController(&self, content_view_controller: Option<&NSViewController>);
#[cfg(feature = "NSWindow")]
#[unsafe(method(window))]
#[unsafe(method_family = none)]
pub fn window(&self) -> Option<Retained<NSWindow>>;
#[cfg(feature = "NSWindow")]
#[unsafe(method(setWindow:))]
#[unsafe(method_family = none)]
pub fn setWindow(&self, window: Option<&NSWindow>);
#[unsafe(method(isWindowLoaded))]
#[unsafe(method_family = none)]
pub fn isWindowLoaded(&self) -> bool;
#[unsafe(method(windowWillLoad))]
#[unsafe(method_family = none)]
pub fn windowWillLoad(&self);
#[unsafe(method(windowDidLoad))]
#[unsafe(method_family = none)]
pub fn windowDidLoad(&self);
#[unsafe(method(loadWindow))]
#[unsafe(method_family = none)]
pub fn loadWindow(&self);
#[unsafe(method(close))]
#[unsafe(method_family = none)]
pub fn close(&self);
#[unsafe(method(showWindow:))]
#[unsafe(method_family = none)]
pub unsafe fn showWindow(&self, sender: Option<&AnyObject>);
);
}
#[cfg(feature = "NSResponder")]
impl NSWindowController {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "NSResponder")]
impl NSWindowController {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[cfg(feature = "NSResponder")]
impl NSWindowController {
extern_methods!(
#[cfg(feature = "NSStoryboard")]
#[unsafe(method(storyboard))]
#[unsafe(method_family = none)]
pub fn storyboard(&self) -> Option<Retained<NSStoryboard>>;
);
}
#[cfg(feature = "NSResponder")]
impl NSWindowController {
extern_methods!(
#[unsafe(method(dismissController:))]
#[unsafe(method_family = none)]
pub unsafe fn dismissController(&self, sender: Option<&AnyObject>);
);
}