objc2_ui_kit/generated/
UICollectionViewListCell.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::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-quartz-core")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_quartz_core::*;
12
13use crate::*;
14
15extern_class!(
16    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicollectionviewlistcell?language=objc)
17    #[unsafe(super(
18        UICollectionViewCell,
19        UICollectionReusableView,
20        UIView,
21        UIResponder,
22        NSObject
23    ))]
24    #[thread_kind = MainThreadOnly]
25    #[derive(Debug, PartialEq, Eq, Hash)]
26    #[cfg(all(
27        feature = "UICollectionViewCell",
28        feature = "UIResponder",
29        feature = "UIView"
30    ))]
31    pub struct UICollectionViewListCell;
32);
33
34#[cfg(all(
35    feature = "UICollectionViewCell",
36    feature = "UIResponder",
37    feature = "UIView",
38    feature = "objc2-quartz-core"
39))]
40#[cfg(not(target_os = "watchos"))]
41extern_conformance!(
42    unsafe impl CALayerDelegate for UICollectionViewListCell {}
43);
44
45#[cfg(all(
46    feature = "UICollectionViewCell",
47    feature = "UIResponder",
48    feature = "UIView"
49))]
50extern_conformance!(
51    unsafe impl NSCoding for UICollectionViewListCell {}
52);
53
54#[cfg(all(
55    feature = "UICollectionViewCell",
56    feature = "UIResponder",
57    feature = "UIView"
58))]
59extern_conformance!(
60    unsafe impl NSObjectProtocol for UICollectionViewListCell {}
61);
62
63#[cfg(all(
64    feature = "UIAppearance",
65    feature = "UICollectionViewCell",
66    feature = "UIResponder",
67    feature = "UIView"
68))]
69extern_conformance!(
70    unsafe impl UIAppearance for UICollectionViewListCell {}
71);
72
73#[cfg(all(
74    feature = "UIAppearance",
75    feature = "UICollectionViewCell",
76    feature = "UIResponder",
77    feature = "UIView"
78))]
79extern_conformance!(
80    unsafe impl UIAppearanceContainer for UICollectionViewListCell {}
81);
82
83#[cfg(all(
84    feature = "UICollectionViewCell",
85    feature = "UIResponder",
86    feature = "UIView"
87))]
88extern_conformance!(
89    unsafe impl UICoordinateSpace for UICollectionViewListCell {}
90);
91
92#[cfg(all(
93    feature = "UICollectionViewCell",
94    feature = "UIDynamicBehavior",
95    feature = "UIResponder",
96    feature = "UIView"
97))]
98extern_conformance!(
99    unsafe impl UIDynamicItem for UICollectionViewListCell {}
100);
101
102#[cfg(all(
103    feature = "UICollectionViewCell",
104    feature = "UIFocus",
105    feature = "UIResponder",
106    feature = "UIView"
107))]
108extern_conformance!(
109    unsafe impl UIFocusEnvironment for UICollectionViewListCell {}
110);
111
112#[cfg(all(
113    feature = "UICollectionViewCell",
114    feature = "UIFocus",
115    feature = "UIResponder",
116    feature = "UIView"
117))]
118extern_conformance!(
119    unsafe impl UIFocusItem for UICollectionViewListCell {}
120);
121
122#[cfg(all(
123    feature = "UICollectionViewCell",
124    feature = "UIFocus",
125    feature = "UIResponder",
126    feature = "UIView"
127))]
128extern_conformance!(
129    unsafe impl UIFocusItemContainer for UICollectionViewListCell {}
130);
131
132#[cfg(all(
133    feature = "UICollectionViewCell",
134    feature = "UIResponder",
135    feature = "UIView"
136))]
137extern_conformance!(
138    unsafe impl UIResponderStandardEditActions for UICollectionViewListCell {}
139);
140
141#[cfg(all(
142    feature = "UICollectionViewCell",
143    feature = "UIResponder",
144    feature = "UITraitCollection",
145    feature = "UIView"
146))]
147extern_conformance!(
148    unsafe impl UITraitEnvironment for UICollectionViewListCell {}
149);
150
151#[cfg(all(
152    feature = "UICollectionViewCell",
153    feature = "UIResponder",
154    feature = "UIView"
155))]
156impl UICollectionViewListCell {
157    extern_methods!(
158        #[cfg(feature = "UIListContentConfiguration")]
159        /// Returns a default list content configuration for the cell's style.
160        #[unsafe(method(defaultContentConfiguration))]
161        #[unsafe(method_family = none)]
162        pub fn defaultContentConfiguration(&self) -> Retained<UIListContentConfiguration>;
163
164        /// Defines the level of indentation for this cell. This is set automatically when using a hierarchical data source.
165        #[unsafe(method(indentationLevel))]
166        #[unsafe(method_family = none)]
167        pub fn indentationLevel(&self) -> NSInteger;
168
169        /// Setter for [`indentationLevel`][Self::indentationLevel].
170        #[unsafe(method(setIndentationLevel:))]
171        #[unsafe(method_family = none)]
172        pub fn setIndentationLevel(&self, indentation_level: NSInteger);
173
174        #[cfg(feature = "objc2-core-foundation")]
175        /// The width of an indentation level. The overall indentation will be indentationWidth * indentationLevel.
176        #[unsafe(method(indentationWidth))]
177        #[unsafe(method_family = none)]
178        pub fn indentationWidth(&self) -> CGFloat;
179
180        #[cfg(feature = "objc2-core-foundation")]
181        /// Setter for [`indentationWidth`][Self::indentationWidth].
182        #[unsafe(method(setIndentationWidth:))]
183        #[unsafe(method_family = none)]
184        pub fn setIndentationWidth(&self, indentation_width: CGFloat);
185
186        /// Defines whether accessories on the leading side are indented as well. If NO, only the content view will be indented.
187        /// Defaults to YES.
188        #[unsafe(method(indentsAccessories))]
189        #[unsafe(method_family = none)]
190        pub fn indentsAccessories(&self) -> bool;
191
192        /// Setter for [`indentsAccessories`][Self::indentsAccessories].
193        #[unsafe(method(setIndentsAccessories:))]
194        #[unsafe(method_family = none)]
195        pub fn setIndentsAccessories(&self, indents_accessories: bool);
196
197        #[cfg(feature = "UICellAccessory")]
198        /// All the accessories that should be decorating the cell. The order and whether an accessory is
199        /// rendered on the leading or trailing side of the cell is defined by the system.
200        #[unsafe(method(accessories))]
201        #[unsafe(method_family = none)]
202        pub fn accessories(&self) -> Retained<NSArray<UICellAccessory>>;
203
204        #[cfg(feature = "UICellAccessory")]
205        /// Setter for [`accessories`][Self::accessories].
206        ///
207        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
208        #[unsafe(method(setAccessories:))]
209        #[unsafe(method_family = none)]
210        pub fn setAccessories(&self, accessories: &NSArray<UICellAccessory>);
211
212        #[cfg(feature = "UILayoutGuide")]
213        /// When used in a section that supports separators, this guide can be used to adjust the preferred
214        /// insets of the separators. To align the separators to your content, add constraints to the leading
215        /// or trailing anchors of this layout guide. When a system-provided content configuration is applied
216        /// to the cell, the separator will be automatically aligned to the primary text in the content view.
217        ///
218        /// See: UICollectionLayoutListConfiguration
219        #[unsafe(method(separatorLayoutGuide))]
220        #[unsafe(method_family = none)]
221        pub fn separatorLayoutGuide(&self) -> Retained<UILayoutGuide>;
222    );
223}
224
225/// Methods declared on superclass `UIView`.
226#[cfg(all(
227    feature = "UICollectionViewCell",
228    feature = "UIResponder",
229    feature = "UIView"
230))]
231impl UICollectionViewListCell {
232    extern_methods!(
233        #[cfg(feature = "objc2-core-foundation")]
234        #[unsafe(method(initWithFrame:))]
235        #[unsafe(method_family = init)]
236        pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
237
238        /// # Safety
239        ///
240        /// `coder` possibly has further requirements.
241        #[unsafe(method(initWithCoder:))]
242        #[unsafe(method_family = init)]
243        pub unsafe fn initWithCoder(
244            this: Allocated<Self>,
245            coder: &NSCoder,
246        ) -> Option<Retained<Self>>;
247
248        #[unsafe(method(init))]
249        #[unsafe(method_family = init)]
250        pub fn init(this: Allocated<Self>) -> Retained<Self>;
251    );
252}
253
254/// Methods declared on superclass `NSObject`.
255#[cfg(all(
256    feature = "UICollectionViewCell",
257    feature = "UIResponder",
258    feature = "UIView"
259))]
260impl UICollectionViewListCell {
261    extern_methods!(
262        #[unsafe(method(new))]
263        #[unsafe(method_family = new)]
264        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
265    );
266}