objc2_ui_kit/generated/
UICollectionViewController.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(UIViewController, UIResponder, NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
16 pub struct UICollectionViewController;
17);
18
19#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
20extern_conformance!(
21 unsafe impl NSCoding for UICollectionViewController {}
22);
23
24#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
25extern_conformance!(
26 unsafe impl NSObjectProtocol for UICollectionViewController {}
27);
28
29#[cfg(all(
30 feature = "UIAppearance",
31 feature = "UIResponder",
32 feature = "UIViewController"
33))]
34extern_conformance!(
35 unsafe impl UIAppearanceContainer for UICollectionViewController {}
36);
37
38#[cfg(all(
39 feature = "UICollectionView",
40 feature = "UIResponder",
41 feature = "UIViewController"
42))]
43extern_conformance!(
44 unsafe impl UICollectionViewDataSource for UICollectionViewController {}
45);
46
47#[cfg(all(
48 feature = "UICollectionView",
49 feature = "UIResponder",
50 feature = "UIScrollView",
51 feature = "UIViewController"
52))]
53extern_conformance!(
54 unsafe impl UICollectionViewDelegate for UICollectionViewController {}
55);
56
57#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
58extern_conformance!(
59 unsafe impl UIContentContainer for UICollectionViewController {}
60);
61
62#[cfg(all(
63 feature = "UIFocus",
64 feature = "UIResponder",
65 feature = "UIViewController"
66))]
67extern_conformance!(
68 unsafe impl UIFocusEnvironment for UICollectionViewController {}
69);
70
71#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
72extern_conformance!(
73 unsafe impl UIResponderStandardEditActions for UICollectionViewController {}
74);
75
76#[cfg(all(
77 feature = "UIResponder",
78 feature = "UIScrollView",
79 feature = "UIViewController"
80))]
81extern_conformance!(
82 unsafe impl UIScrollViewDelegate for UICollectionViewController {}
83);
84
85#[cfg(all(
86 feature = "UIResponder",
87 feature = "UITraitCollection",
88 feature = "UIViewController"
89))]
90extern_conformance!(
91 unsafe impl UITraitEnvironment for UICollectionViewController {}
92);
93
94#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
95impl UICollectionViewController {
96 extern_methods!(
97 #[cfg(feature = "UICollectionViewLayout")]
98 #[unsafe(method(initWithCollectionViewLayout:))]
99 #[unsafe(method_family = init)]
100 pub unsafe fn initWithCollectionViewLayout(
101 this: Allocated<Self>,
102 layout: &UICollectionViewLayout,
103 ) -> Retained<Self>;
104
105 #[unsafe(method(initWithNibName:bundle:))]
106 #[unsafe(method_family = init)]
107 pub unsafe fn initWithNibName_bundle(
108 this: Allocated<Self>,
109 nib_name_or_nil: Option<&NSString>,
110 nib_bundle_or_nil: Option<&NSBundle>,
111 ) -> Retained<Self>;
112
113 #[unsafe(method(initWithCoder:))]
114 #[unsafe(method_family = init)]
115 pub unsafe fn initWithCoder(
116 this: Allocated<Self>,
117 coder: &NSCoder,
118 ) -> Option<Retained<Self>>;
119
120 #[cfg(all(
121 feature = "UICollectionView",
122 feature = "UIScrollView",
123 feature = "UIView"
124 ))]
125 #[unsafe(method(collectionView))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn collectionView(&self) -> Option<Retained<UICollectionView>>;
128
129 #[cfg(all(
130 feature = "UICollectionView",
131 feature = "UIScrollView",
132 feature = "UIView"
133 ))]
134 #[unsafe(method(setCollectionView:))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn setCollectionView(&self, collection_view: Option<&UICollectionView>);
138
139 #[unsafe(method(clearsSelectionOnViewWillAppear))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn clearsSelectionOnViewWillAppear(&self) -> bool;
142
143 #[unsafe(method(setClearsSelectionOnViewWillAppear:))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn setClearsSelectionOnViewWillAppear(
147 &self,
148 clears_selection_on_view_will_appear: bool,
149 );
150
151 #[unsafe(method(useLayoutToLayoutNavigationTransitions))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn useLayoutToLayoutNavigationTransitions(&self) -> bool;
154
155 #[unsafe(method(setUseLayoutToLayoutNavigationTransitions:))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn setUseLayoutToLayoutNavigationTransitions(
159 &self,
160 use_layout_to_layout_navigation_transitions: bool,
161 );
162
163 #[cfg(feature = "UICollectionViewLayout")]
164 #[unsafe(method(collectionViewLayout))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn collectionViewLayout(&self) -> Retained<UICollectionViewLayout>;
167
168 #[unsafe(method(installsStandardGestureForInteractiveMovement))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn installsStandardGestureForInteractiveMovement(&self) -> bool;
171
172 #[unsafe(method(setInstallsStandardGestureForInteractiveMovement:))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn setInstallsStandardGestureForInteractiveMovement(
176 &self,
177 installs_standard_gesture_for_interactive_movement: bool,
178 );
179 );
180}
181
182#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
184impl UICollectionViewController {
185 extern_methods!(
186 #[unsafe(method(init))]
187 #[unsafe(method_family = init)]
188 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
189
190 #[unsafe(method(new))]
191 #[unsafe(method_family = new)]
192 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
193 );
194}