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 unsafe 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 unsafe fn nibWithData_bundle(
37            data: &NSData,
38            bundle_or_nil: Option<&NSBundle>,
39            mtm: MainThreadMarker,
40        ) -> Retained<UINib>;
41
42        #[cfg(feature = "UINibLoading")]
43        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
44        #[unsafe(method(instantiateWithOwner:options:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn instantiateWithOwner_options(
47            &self,
48            owner_or_nil: Option<&AnyObject>,
49            options_or_nil: Option<&NSDictionary<UINibOptionsKey, AnyObject>>,
50        ) -> Retained<NSArray>;
51    );
52}
53
54/// Methods declared on superclass `NSObject`.
55impl UINib {
56    extern_methods!(
57        #[unsafe(method(init))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
60
61        #[unsafe(method(new))]
62        #[unsafe(method_family = new)]
63        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
64    );
65}