objc2_app_kit/generated/
NSNib.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsnibname?language=objc)
10pub type NSNibName = NSString;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsnib?language=objc)
14    #[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 unsafe 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 unsafe fn initWithNibData_bundle(
40            this: Allocated<Self>,
41            nib_data: &NSData,
42            bundle: Option<&NSBundle>,
43        ) -> Retained<Self>;
44    );
45}
46
47/// Methods declared on superclass `NSObject`.
48impl NSNib {
49    extern_methods!(
50        #[unsafe(method(init))]
51        #[unsafe(method_family = init)]
52        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
53
54        #[unsafe(method(new))]
55        #[unsafe(method_family = new)]
56        pub unsafe fn new() -> Retained<Self>;
57    );
58}
59
60/// NSDeprecated.
61impl NSNib {
62    extern_methods!(
63        #[deprecated]
64        #[unsafe(method(initWithContentsOfURL:))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn initWithContentsOfURL(
67            this: Allocated<Self>,
68            nib_file_url: Option<&NSURL>,
69        ) -> Option<Retained<Self>>;
70
71        #[deprecated]
72        #[unsafe(method(instantiateNibWithExternalNameTable:))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn instantiateNibWithExternalNameTable(
75            &self,
76            external_name_table: Option<&NSDictionary>,
77        ) -> bool;
78
79        #[deprecated]
80        #[unsafe(method(instantiateNibWithOwner:topLevelObjects:))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn instantiateNibWithOwner_topLevelObjects(
83            &self,
84            owner: Option<&AnyObject>,
85            top_level_objects: Option<&mut Option<Retained<NSArray>>>,
86        ) -> bool;
87    );
88}
89
90extern "C" {
91    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsnibowner?language=objc)
92    pub static NSNibOwner: &'static NSString;
93}
94
95extern "C" {
96    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsnibtoplevelobjects?language=objc)
97    pub static NSNibTopLevelObjects: &'static NSString;
98}