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
19extern_conformance!(
20 unsafe impl NSCoding for NSNib {}
21);
22
23extern_conformance!(
24 unsafe impl NSObjectProtocol for NSNib {}
25);
26
27impl NSNib {
28 extern_methods!(
29 #[unsafe(method(initWithNibNamed:bundle:))]
30 #[unsafe(method_family = init)]
31 pub fn initWithNibNamed_bundle(
32 this: Allocated<Self>,
33 nib_name: &NSNibName,
34 bundle: Option<&NSBundle>,
35 ) -> Option<Retained<Self>>;
36
37 #[unsafe(method(initWithNibData:bundle:))]
38 #[unsafe(method_family = init)]
39 pub fn initWithNibData_bundle(
40 this: Allocated<Self>,
41 nib_data: &NSData,
42 bundle: Option<&NSBundle>,
43 ) -> Retained<Self>;
44 );
45}
46
47impl NSNib {
49 extern_methods!(
50 #[unsafe(method(init))]
51 #[unsafe(method_family = init)]
52 pub fn init(this: Allocated<Self>) -> Retained<Self>;
53
54 #[unsafe(method(new))]
55 #[unsafe(method_family = new)]
56 pub fn new() -> Retained<Self>;
57 );
58}
59
60impl DefaultRetained for NSNib {
61 #[inline]
62 fn default_retained() -> Retained<Self> {
63 Self::new()
64 }
65}
66
67impl NSNib {
69 extern_methods!(
70 #[deprecated]
74 #[unsafe(method(initWithContentsOfURL:))]
75 #[unsafe(method_family = init)]
76 pub unsafe fn initWithContentsOfURL(
77 this: Allocated<Self>,
78 nib_file_url: Option<&NSURL>,
79 ) -> Option<Retained<Self>>;
80
81 #[deprecated]
86 #[unsafe(method(instantiateNibWithExternalNameTable:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn instantiateNibWithExternalNameTable(
89 &self,
90 external_name_table: Option<&NSDictionary>,
91 ) -> bool;
92
93 #[deprecated]
100 #[unsafe(method(instantiateNibWithOwner:topLevelObjects:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn instantiateNibWithOwner_topLevelObjects(
103 &self,
104 owner: Option<&AnyObject>,
105 top_level_objects: Option<&mut Option<Retained<NSArray>>>,
106 ) -> bool;
107 );
108}
109
110extern "C" {
111 #[deprecated]
113 pub static NSNibOwner: &'static NSString;
114}
115
116extern "C" {
117 #[deprecated]
119 pub static NSNibTopLevelObjects: &'static NSString;
120}