1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView",
    feature = "block2"
))]
pub type UICollectionViewCellRegistrationConfigurationHandler = *mut block2::Block<
    dyn Fn(NonNull<UICollectionViewCell>, NonNull<NSIndexPath>, NonNull<AnyObject>),
>;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UICollectionViewCellRegistration;

    unsafe impl ClassType for UICollectionViewCellRegistration {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSObjectProtocol for UICollectionViewCellRegistration {}

extern_methods!(
    unsafe impl UICollectionViewCellRegistration {
        #[cfg(all(
            feature = "UICollectionViewCell",
            feature = "UIResponder",
            feature = "UIView",
            feature = "block2"
        ))]
        #[method_id(@__retain_semantics Other registrationWithCellClass:configurationHandler:)]
        pub unsafe fn registrationWithCellClass_configurationHandler(
            cell_class: &AnyClass,
            configuration_handler: UICollectionViewCellRegistrationConfigurationHandler,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(all(
            feature = "UICollectionViewCell",
            feature = "UINib",
            feature = "UIResponder",
            feature = "UIView",
            feature = "block2"
        ))]
        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[method_id(@__retain_semantics Other registrationWithCellNib:configurationHandler:)]
        pub unsafe fn registrationWithCellNib_configurationHandler(
            cell_nib: &UINib,
            configuration_handler: UICollectionViewCellRegistrationConfigurationHandler,
        ) -> Retained<Self>;

        #[method(cellClass)]
        pub unsafe fn cellClass(&self) -> Option<&'static AnyClass>;

        #[cfg(feature = "UINib")]
        #[method_id(@__retain_semantics Other cellNib)]
        pub unsafe fn cellNib(&self) -> Option<Retained<UINib>>;

        #[cfg(all(
            feature = "UICollectionViewCell",
            feature = "UIResponder",
            feature = "UIView",
            feature = "block2"
        ))]
        #[method(configurationHandler)]
        pub unsafe fn configurationHandler(
            &self,
        ) -> UICollectionViewCellRegistrationConfigurationHandler;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl UICollectionViewCellRegistration {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);

#[cfg(all(
    feature = "UICollectionViewCell",
    feature = "UIResponder",
    feature = "UIView",
    feature = "block2"
))]
pub type UICollectionViewSupplementaryRegistrationConfigurationHandler = *mut block2::Block<
    dyn Fn(NonNull<UICollectionReusableView>, NonNull<NSString>, NonNull<NSIndexPath>),
>;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UICollectionViewSupplementaryRegistration;

    unsafe impl ClassType for UICollectionViewSupplementaryRegistration {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSObjectProtocol for UICollectionViewSupplementaryRegistration {}

extern_methods!(
    unsafe impl UICollectionViewSupplementaryRegistration {
        #[cfg(all(
            feature = "UICollectionViewCell",
            feature = "UIResponder",
            feature = "UIView",
            feature = "block2"
        ))]
        #[method_id(@__retain_semantics Other registrationWithSupplementaryClass:elementKind:configurationHandler:)]
        pub unsafe fn registrationWithSupplementaryClass_elementKind_configurationHandler(
            supplementary_class: &AnyClass,
            element_kind: &NSString,
            configuration_handler: UICollectionViewSupplementaryRegistrationConfigurationHandler,
            mtm: MainThreadMarker,
        ) -> Retained<Self>;

        #[cfg(all(
            feature = "UICollectionViewCell",
            feature = "UINib",
            feature = "UIResponder",
            feature = "UIView",
            feature = "block2"
        ))]
        #[deprecated = "Loading Interface Builder products will not be supported in a future version of visionOS."]
        #[method_id(@__retain_semantics Other registrationWithSupplementaryNib:elementKind:configurationHandler:)]
        pub unsafe fn registrationWithSupplementaryNib_elementKind_configurationHandler(
            supplementary_nib: &UINib,
            element_kind: &NSString,
            configuration_handler: UICollectionViewSupplementaryRegistrationConfigurationHandler,
        ) -> Retained<Self>;

        #[method(supplementaryClass)]
        pub unsafe fn supplementaryClass(&self) -> Option<&'static AnyClass>;

        #[cfg(feature = "UINib")]
        #[method_id(@__retain_semantics Other supplementaryNib)]
        pub unsafe fn supplementaryNib(&self) -> Option<Retained<UINib>>;

        #[method_id(@__retain_semantics Other elementKind)]
        pub unsafe fn elementKind(&self) -> Retained<NSString>;

        #[cfg(all(
            feature = "UICollectionViewCell",
            feature = "UIResponder",
            feature = "UIView",
            feature = "block2"
        ))]
        #[method(configurationHandler)]
        pub unsafe fn configurationHandler(
            &self,
        ) -> UICollectionViewSupplementaryRegistrationConfigurationHandler;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl UICollectionViewSupplementaryRegistration {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);