objc2_ui_kit/generated/
UINib.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
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uinib?language=objc)
11    #[unsafe(super(NSObject))]
12    #[thread_kind = MainThreadOnly]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
15    pub struct UINib;
16);
17
18extern_conformance!(
19    unsafe impl NSObjectProtocol for UINib {}
20);
21
22impl UINib {
23    extern_methods!(
24        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
25        #[unsafe(method(nibWithNibName:bundle:))]
26        #[unsafe(method_family = none)]
27        pub fn nibWithNibName_bundle(
28            name: &NSString,
29            bundle_or_nil: Option<&NSBundle>,
30            mtm: MainThreadMarker,
31        ) -> Retained<UINib>;
32
33        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
34        #[unsafe(method(nibWithData:bundle:))]
35        #[unsafe(method_family = none)]
36        pub fn nibWithData_bundle(
37            data: &NSData,
38            bundle_or_nil: Option<&NSBundle>,
39            mtm: MainThreadMarker,
40        ) -> Retained<UINib>;
41
42        #[cfg(feature = "UINibLoading")]
43        /// # Safety
44        ///
45        /// - `owner_or_nil` should be of the correct type.
46        /// - `options_or_nil` generic should be of the correct type.
47        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
48        #[unsafe(method(instantiateWithOwner:options:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn instantiateWithOwner_options(
51            &self,
52            owner_or_nil: Option<&AnyObject>,
53            options_or_nil: Option<&NSDictionary<UINibOptionsKey, AnyObject>>,
54        ) -> Retained<NSArray>;
55    );
56}
57
58/// Methods declared on superclass `NSObject`.
59impl UINib {
60    extern_methods!(
61        #[unsafe(method(init))]
62        #[unsafe(method_family = init)]
63        pub fn init(this: Allocated<Self>) -> Retained<Self>;
64
65        #[unsafe(method(new))]
66        #[unsafe(method_family = new)]
67        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
68    );
69}