objc2_app_kit/generated/
NSNib.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9pub type NSNibName = NSString;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct NSNib;
17);
18
19unsafe impl NSCoding for NSNib {}
20
21unsafe impl NSObjectProtocol for NSNib {}
22
23impl NSNib {
24 extern_methods!(
25 #[unsafe(method(initWithNibNamed:bundle:))]
26 #[unsafe(method_family = init)]
27 pub unsafe fn initWithNibNamed_bundle(
28 this: Allocated<Self>,
29 nib_name: &NSNibName,
30 bundle: Option<&NSBundle>,
31 ) -> Option<Retained<Self>>;
32
33 #[unsafe(method(initWithNibData:bundle:))]
34 #[unsafe(method_family = init)]
35 pub unsafe fn initWithNibData_bundle(
36 this: Allocated<Self>,
37 nib_data: &NSData,
38 bundle: Option<&NSBundle>,
39 ) -> Retained<Self>;
40 );
41}
42
43impl NSNib {
45 extern_methods!(
46 #[unsafe(method(init))]
47 #[unsafe(method_family = init)]
48 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50 #[unsafe(method(new))]
51 #[unsafe(method_family = new)]
52 pub unsafe fn new() -> Retained<Self>;
53 );
54}
55
56impl NSNib {
58 extern_methods!(
59 #[deprecated]
60 #[unsafe(method(initWithContentsOfURL:))]
61 #[unsafe(method_family = init)]
62 pub unsafe fn initWithContentsOfURL(
63 this: Allocated<Self>,
64 nib_file_url: Option<&NSURL>,
65 ) -> Option<Retained<Self>>;
66
67 #[deprecated]
68 #[unsafe(method(instantiateNibWithExternalNameTable:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn instantiateNibWithExternalNameTable(
71 &self,
72 external_name_table: Option<&NSDictionary>,
73 ) -> bool;
74
75 #[deprecated]
76 #[unsafe(method(instantiateNibWithOwner:topLevelObjects:))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn instantiateNibWithOwner_topLevelObjects(
79 &self,
80 owner: Option<&AnyObject>,
81 top_level_objects: Option<&mut Option<Retained<NSArray>>>,
82 ) -> bool;
83 );
84}
85
86extern "C" {
87 pub static NSNibOwner: &'static NSString;
89}
90
91extern "C" {
92 pub static NSNibTopLevelObjects: &'static NSString;
94}