objc2_app_kit/generated/
NSStoryboard.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9pub type NSStoryboardName = NSString;
11
12pub type NSStoryboardSceneIdentifier = NSString;
14
15#[cfg(feature = "block2")]
17pub type NSStoryboardControllerCreator =
18 *mut block2::DynBlock<dyn Fn(NonNull<NSCoder>) -> *mut AnyObject>;
19
20extern_class!(
21 #[unsafe(super(NSObject))]
23 #[derive(Debug, PartialEq, Eq, Hash)]
24 pub struct NSStoryboard;
25);
26
27extern_conformance!(
28 unsafe impl NSObjectProtocol for NSStoryboard {}
29);
30
31impl NSStoryboard {
32 extern_methods!(
33 #[unsafe(method(mainStoryboard))]
34 #[unsafe(method_family = none)]
35 pub fn mainStoryboard() -> Option<Retained<NSStoryboard>>;
36
37 #[unsafe(method(storyboardWithName:bundle:))]
38 #[unsafe(method_family = none)]
39 pub fn storyboardWithName_bundle(
40 name: &NSStoryboardName,
41 storyboard_bundle_or_nil: Option<&NSBundle>,
42 ) -> Retained<Self>;
43
44 #[unsafe(method(instantiateInitialController))]
45 #[unsafe(method_family = none)]
46 pub fn instantiateInitialController(&self) -> Option<Retained<AnyObject>>;
47
48 #[cfg(feature = "block2")]
49 #[unsafe(method(instantiateInitialControllerWithCreator:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn instantiateInitialControllerWithCreator(
55 &self,
56 block: NSStoryboardControllerCreator,
57 ) -> Option<Retained<AnyObject>>;
58
59 #[unsafe(method(instantiateControllerWithIdentifier:))]
60 #[unsafe(method_family = none)]
61 pub fn instantiateControllerWithIdentifier(
62 &self,
63 identifier: &NSStoryboardSceneIdentifier,
64 ) -> Retained<AnyObject>;
65
66 #[cfg(feature = "block2")]
67 #[unsafe(method(instantiateControllerWithIdentifier:creator:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn instantiateControllerWithIdentifier_creator(
73 &self,
74 identifier: &NSStoryboardSceneIdentifier,
75 block: NSStoryboardControllerCreator,
76 ) -> Retained<AnyObject>;
77 );
78}
79
80impl NSStoryboard {
82 extern_methods!(
83 #[unsafe(method(init))]
84 #[unsafe(method_family = init)]
85 pub fn init(this: Allocated<Self>) -> Retained<Self>;
86
87 #[unsafe(method(new))]
88 #[unsafe(method_family = new)]
89 pub fn new() -> Retained<Self>;
90 );
91}
92
93impl DefaultRetained for NSStoryboard {
94 #[inline]
95 fn default_retained() -> Retained<Self> {
96 Self::new()
97 }
98}