use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[cfg(all(
feature = "UIResponder",
feature = "UIViewController",
feature = "block2"
))]
pub type UIStoryboardViewControllerCreator =
*mut block2::DynBlock<dyn Fn(NonNull<NSCoder>) -> *mut UIViewController>;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
pub struct UIStoryboard;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIStoryboard {}
);
impl UIStoryboard {
extern_methods!(
#[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
#[unsafe(method(storyboardWithName:bundle:))]
#[unsafe(method_family = none)]
pub fn storyboardWithName_bundle(
name: &NSString,
storyboard_bundle_or_nil: Option<&NSBundle>,
mtm: MainThreadMarker,
) -> Retained<UIStoryboard>;
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
#[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
#[unsafe(method(instantiateInitialViewController))]
#[unsafe(method_family = none)]
pub fn instantiateInitialViewController(&self) -> Option<Retained<UIViewController>>;
#[cfg(all(
feature = "UIResponder",
feature = "UIViewController",
feature = "block2"
))]
#[unsafe(method(instantiateInitialViewControllerWithCreator:))]
#[unsafe(method_family = none)]
pub unsafe fn instantiateInitialViewControllerWithCreator(
&self,
block: UIStoryboardViewControllerCreator,
) -> Option<Retained<UIViewController>>;
#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
#[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
#[unsafe(method(instantiateViewControllerWithIdentifier:))]
#[unsafe(method_family = none)]
pub fn instantiateViewControllerWithIdentifier(
&self,
identifier: &NSString,
) -> Retained<UIViewController>;
#[cfg(all(
feature = "UIResponder",
feature = "UIViewController",
feature = "block2"
))]
#[unsafe(method(instantiateViewControllerWithIdentifier:creator:))]
#[unsafe(method_family = none)]
pub unsafe fn instantiateViewControllerWithIdentifier_creator(
&self,
identifier: &NSString,
block: UIStoryboardViewControllerCreator,
) -> Retained<UIViewController>;
);
}
impl UIStoryboard {
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>;
);
}