use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(UIViewController, UIResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
pub struct UIDocumentViewController;
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
unsafe impl NSCoding for UIDocumentViewController {}
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
unsafe impl NSObjectProtocol for UIDocumentViewController {}
);
#[cfg(all(
feature = "UIAppearance",
feature = "UIResponder",
feature = "UIViewController"
))]
extern_conformance!(
unsafe impl UIAppearanceContainer for UIDocumentViewController {}
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
unsafe impl UIContentContainer for UIDocumentViewController {}
);
#[cfg(all(
feature = "UIFocus",
feature = "UIResponder",
feature = "UIViewController"
))]
extern_conformance!(
unsafe impl UIFocusEnvironment for UIDocumentViewController {}
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for UIDocumentViewController {}
);
#[cfg(all(
feature = "UIResponder",
feature = "UITraitCollection",
feature = "UIViewController"
))]
extern_conformance!(
unsafe impl UITraitEnvironment for UIDocumentViewController {}
);
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIDocumentViewController {
extern_methods!(
#[cfg(feature = "UIDocument")]
#[unsafe(method(initWithDocument:))]
#[unsafe(method_family = init)]
pub fn initWithDocument(
this: Allocated<Self>,
document: Option<&UIDocument>,
) -> Retained<Self>;
#[cfg(feature = "UIDocument")]
#[unsafe(method(document))]
#[unsafe(method_family = none)]
pub fn document(&self) -> Option<Retained<UIDocument>>;
#[cfg(feature = "UIDocument")]
#[unsafe(method(setDocument:))]
#[unsafe(method_family = none)]
pub fn setDocument(&self, document: Option<&UIDocument>);
#[cfg(feature = "UIDocumentViewControllerLaunchOptions")]
#[unsafe(method(launchOptions))]
#[unsafe(method_family = none)]
pub fn launchOptions(&self) -> Retained<UIDocumentViewControllerLaunchOptions>;
#[cfg(feature = "UIDocumentViewControllerLaunchOptions")]
#[unsafe(method(setLaunchOptions:))]
#[unsafe(method_family = none)]
pub fn setLaunchOptions(&self, launch_options: &UIDocumentViewControllerLaunchOptions);
#[unsafe(method(navigationItemDidUpdate))]
#[unsafe(method_family = none)]
pub fn navigationItemDidUpdate(&self);
#[cfg(feature = "block2")]
#[unsafe(method(openDocumentWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub fn openDocumentWithCompletionHandler(
&self,
completion_handler: &block2::DynBlock<dyn Fn(Bool)>,
);
#[unsafe(method(documentDidOpen))]
#[unsafe(method_family = none)]
pub fn documentDidOpen(&self);
#[cfg(feature = "UIBarButtonItemGroup")]
#[unsafe(method(undoRedoItemGroup))]
#[unsafe(method_family = none)]
pub fn undoRedoItemGroup(&self) -> Retained<UIBarButtonItemGroup>;
);
}
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIDocumentViewController {
extern_methods!(
#[unsafe(method(initWithNibName:bundle:))]
#[unsafe(method_family = init)]
pub fn initWithNibName_bundle(
this: Allocated<Self>,
nib_name_or_nil: Option<&NSString>,
nib_bundle_or_nil: Option<&NSBundle>,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
);
}
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIDocumentViewController {
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>;
);
}