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 unsafe 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 unsafe fn indentationLevel(&self) -> NSInteger;
168
169        /// Setter for [`indentationLevel`][Self::indentationLevel].
170        #[unsafe(method(setIndentationLevel:))]
171        #[unsafe(method_family = none)]
172        pub unsafe 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 unsafe 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 unsafe 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 unsafe fn indentsAccessories(&self) -> bool;
191
192        /// Setter for [`indentsAccessories`][Self::indentsAccessories].
193        #[unsafe(method(setIndentsAccessories:))]
194        #[unsafe(method_family = none)]
195        pub unsafe 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 unsafe fn accessories(&self) -> Retained<NSArray<UICellAccessory>>;
203
204        #[cfg(feature = "UICellAccessory")]
205        /// Setter for [`accessories`][Self::accessories].
206        #[unsafe(method(setAccessories:))]
207        #[unsafe(method_family = none)]
208        pub unsafe fn setAccessories(&self, accessories: &NSArray<UICellAccessory>);
209
210        #[cfg(feature = "UILayoutGuide")]
211        /// When used in a section that supports separators, this guide can be used to adjust the preferred
212        /// insets of the separators. To align the separators to your content, add constraints to the leading
213        /// or trailing anchors of this layout guide. When a system-provided content configuration is applied
214        /// to the cell, the separator will be automatically aligned to the primary text in the content view.
215        ///
216        /// See: UICollectionLayoutListConfiguration
217        #[unsafe(method(separatorLayoutGuide))]
218        #[unsafe(method_family = none)]
219        pub unsafe fn separatorLayoutGuide(&self) -> Retained<UILayoutGuide>;
220    );
221}
222
223/// Methods declared on superclass `UIView`.
224#[cfg(all(
225    feature = "UICollectionViewCell",
226    feature = "UIResponder",
227    feature = "UIView"
228))]
229impl UICollectionViewListCell {
230    extern_methods!(
231        #[cfg(feature = "objc2-core-foundation")]
232        #[unsafe(method(initWithFrame:))]
233        #[unsafe(method_family = init)]
234        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
235
236        #[unsafe(method(initWithCoder:))]
237        #[unsafe(method_family = init)]
238        pub unsafe fn initWithCoder(
239            this: Allocated<Self>,
240            coder: &NSCoder,
241        ) -> Option<Retained<Self>>;
242    );
243}
244
245/// Methods declared on superclass `NSObject`.
246#[cfg(all(
247    feature = "UICollectionViewCell",
248    feature = "UIResponder",
249    feature = "UIView"
250))]
251impl UICollectionViewListCell {
252    extern_methods!(
253        #[unsafe(method(init))]
254        #[unsafe(method_family = init)]
255        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
256
257        #[unsafe(method(new))]
258        #[unsafe(method_family = new)]
259        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
260    );
261}