objc2-ui-kit 0.3.2

Bindings to the UIKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uidocumentpickerextensionviewcontroller?language=objc)
    #[unsafe(super(UIViewController, UIResponder, NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
    #[deprecated = "Use enumeration based NSFileProviderExtension instead"]
    pub struct UIDocumentPickerExtensionViewController;
);

#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
    unsafe impl NSCoding for UIDocumentPickerExtensionViewController {}
);

#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for UIDocumentPickerExtensionViewController {}
);

#[cfg(all(
    feature = "UIAppearance",
    feature = "UIResponder",
    feature = "UIViewController"
))]
extern_conformance!(
    unsafe impl UIAppearanceContainer for UIDocumentPickerExtensionViewController {}
);

#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
    unsafe impl UIContentContainer for UIDocumentPickerExtensionViewController {}
);

#[cfg(all(
    feature = "UIFocus",
    feature = "UIResponder",
    feature = "UIViewController"
))]
extern_conformance!(
    unsafe impl UIFocusEnvironment for UIDocumentPickerExtensionViewController {}
);

#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
extern_conformance!(
    unsafe impl UIResponderStandardEditActions for UIDocumentPickerExtensionViewController {}
);

#[cfg(all(
    feature = "UIResponder",
    feature = "UITraitCollection",
    feature = "UIViewController"
))]
extern_conformance!(
    unsafe impl UITraitEnvironment for UIDocumentPickerExtensionViewController {}
);

#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIDocumentPickerExtensionViewController {
    extern_methods!(
        #[deprecated = "Use enumeration based NSFileProviderExtension instead"]
        #[unsafe(method(dismissGrantingAccessToURL:))]
        #[unsafe(method_family = none)]
        pub fn dismissGrantingAccessToURL(&self, url: Option<&NSURL>);

        #[cfg(feature = "UIDocumentPickerViewController")]
        #[deprecated = "Use enumeration based NSFileProviderExtension instead"]
        #[unsafe(method(prepareForPresentationInMode:))]
        #[unsafe(method_family = none)]
        pub fn prepareForPresentationInMode(&self, mode: UIDocumentPickerMode);

        #[cfg(feature = "UIDocumentPickerViewController")]
        #[deprecated = "Use enumeration based NSFileProviderExtension instead"]
        #[unsafe(method(documentPickerMode))]
        #[unsafe(method_family = none)]
        pub fn documentPickerMode(&self) -> UIDocumentPickerMode;

        #[deprecated = "Use enumeration based NSFileProviderExtension instead"]
        #[unsafe(method(originalURL))]
        #[unsafe(method_family = none)]
        pub fn originalURL(&self) -> Option<Retained<NSURL>>;

        #[deprecated = "Use enumeration based NSFileProviderExtension instead"]
        #[unsafe(method(validTypes))]
        #[unsafe(method_family = none)]
        pub fn validTypes(&self) -> Option<Retained<NSArray<NSString>>>;

        #[deprecated = "Use enumeration based NSFileProviderExtension instead"]
        #[unsafe(method(providerIdentifier))]
        #[unsafe(method_family = none)]
        pub fn providerIdentifier(&self) -> Retained<NSString>;

        #[deprecated = "Use enumeration based NSFileProviderExtension instead"]
        #[unsafe(method(documentStorageURL))]
        #[unsafe(method_family = none)]
        pub fn documentStorageURL(&self) -> Option<Retained<NSURL>>;
    );
}

/// Methods declared on superclass `UIViewController`.
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIDocumentPickerExtensionViewController {
    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>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
impl UIDocumentPickerExtensionViewController {
    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>;
    );
}