objc2_ui_kit/generated/
UICollectionViewController.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicollectionviewcontroller?language=objc)
12    #[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"))]
20unsafe impl NSCoding for UICollectionViewController {}
21
22#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
23unsafe impl NSObjectProtocol for UICollectionViewController {}
24
25#[cfg(all(
26    feature = "UIAppearance",
27    feature = "UIResponder",
28    feature = "UIViewController"
29))]
30unsafe impl UIAppearanceContainer for UICollectionViewController {}
31
32#[cfg(all(
33    feature = "UICollectionView",
34    feature = "UIResponder",
35    feature = "UIViewController"
36))]
37unsafe impl UICollectionViewDataSource for UICollectionViewController {}
38
39#[cfg(all(
40    feature = "UICollectionView",
41    feature = "UIResponder",
42    feature = "UIScrollView",
43    feature = "UIViewController"
44))]
45unsafe impl UICollectionViewDelegate for UICollectionViewController {}
46
47#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
48unsafe impl UIContentContainer for UICollectionViewController {}
49
50#[cfg(all(
51    feature = "UIFocus",
52    feature = "UIResponder",
53    feature = "UIViewController"
54))]
55unsafe impl UIFocusEnvironment for UICollectionViewController {}
56
57#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
58unsafe impl UIResponderStandardEditActions for UICollectionViewController {}
59
60#[cfg(all(
61    feature = "UIResponder",
62    feature = "UIScrollView",
63    feature = "UIViewController"
64))]
65unsafe impl UIScrollViewDelegate for UICollectionViewController {}
66
67#[cfg(all(
68    feature = "UIResponder",
69    feature = "UITraitCollection",
70    feature = "UIViewController"
71))]
72unsafe impl UITraitEnvironment for UICollectionViewController {}
73
74#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
75impl UICollectionViewController {
76    extern_methods!(
77        #[cfg(feature = "UICollectionViewLayout")]
78        #[unsafe(method(initWithCollectionViewLayout:))]
79        #[unsafe(method_family = init)]
80        pub unsafe fn initWithCollectionViewLayout(
81            this: Allocated<Self>,
82            layout: &UICollectionViewLayout,
83        ) -> Retained<Self>;
84
85        #[unsafe(method(initWithNibName:bundle:))]
86        #[unsafe(method_family = init)]
87        pub unsafe fn initWithNibName_bundle(
88            this: Allocated<Self>,
89            nib_name_or_nil: Option<&NSString>,
90            nib_bundle_or_nil: Option<&NSBundle>,
91        ) -> Retained<Self>;
92
93        #[unsafe(method(initWithCoder:))]
94        #[unsafe(method_family = init)]
95        pub unsafe fn initWithCoder(
96            this: Allocated<Self>,
97            coder: &NSCoder,
98        ) -> Option<Retained<Self>>;
99
100        #[cfg(all(
101            feature = "UICollectionView",
102            feature = "UIScrollView",
103            feature = "UIView"
104        ))]
105        #[unsafe(method(collectionView))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn collectionView(&self) -> Option<Retained<UICollectionView>>;
108
109        #[cfg(all(
110            feature = "UICollectionView",
111            feature = "UIScrollView",
112            feature = "UIView"
113        ))]
114        /// Setter for [`collectionView`][Self::collectionView].
115        #[unsafe(method(setCollectionView:))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn setCollectionView(&self, collection_view: Option<&UICollectionView>);
118
119        #[unsafe(method(clearsSelectionOnViewWillAppear))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn clearsSelectionOnViewWillAppear(&self) -> bool;
122
123        /// Setter for [`clearsSelectionOnViewWillAppear`][Self::clearsSelectionOnViewWillAppear].
124        #[unsafe(method(setClearsSelectionOnViewWillAppear:))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn setClearsSelectionOnViewWillAppear(
127            &self,
128            clears_selection_on_view_will_appear: bool,
129        );
130
131        #[unsafe(method(useLayoutToLayoutNavigationTransitions))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn useLayoutToLayoutNavigationTransitions(&self) -> bool;
134
135        /// Setter for [`useLayoutToLayoutNavigationTransitions`][Self::useLayoutToLayoutNavigationTransitions].
136        #[unsafe(method(setUseLayoutToLayoutNavigationTransitions:))]
137        #[unsafe(method_family = none)]
138        pub unsafe fn setUseLayoutToLayoutNavigationTransitions(
139            &self,
140            use_layout_to_layout_navigation_transitions: bool,
141        );
142
143        #[cfg(feature = "UICollectionViewLayout")]
144        #[unsafe(method(collectionViewLayout))]
145        #[unsafe(method_family = none)]
146        pub unsafe fn collectionViewLayout(&self) -> Retained<UICollectionViewLayout>;
147
148        #[unsafe(method(installsStandardGestureForInteractiveMovement))]
149        #[unsafe(method_family = none)]
150        pub unsafe fn installsStandardGestureForInteractiveMovement(&self) -> bool;
151
152        /// Setter for [`installsStandardGestureForInteractiveMovement`][Self::installsStandardGestureForInteractiveMovement].
153        #[unsafe(method(setInstallsStandardGestureForInteractiveMovement:))]
154        #[unsafe(method_family = none)]
155        pub unsafe fn setInstallsStandardGestureForInteractiveMovement(
156            &self,
157            installs_standard_gesture_for_interactive_movement: bool,
158        );
159    );
160}
161
162/// Methods declared on superclass `NSObject`.
163#[cfg(all(feature = "UIResponder", feature = "UIViewController"))]
164impl UICollectionViewController {
165    extern_methods!(
166        #[unsafe(method(init))]
167        #[unsafe(method_family = init)]
168        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
169
170        #[unsafe(method(new))]
171        #[unsafe(method_family = new)]
172        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
173    );
174}