objc2_ui_kit/generated/
UIListSeparatorConfiguration.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct UIListSeparatorVisibility(pub NSInteger);
15impl UIListSeparatorVisibility {
16 #[doc(alias = "UIListSeparatorVisibilityAutomatic")]
18 pub const Automatic: Self = Self(0);
19 #[doc(alias = "UIListSeparatorVisibilityVisible")]
21 pub const Visible: Self = Self(1);
22 #[doc(alias = "UIListSeparatorVisibilityHidden")]
24 pub const Hidden: Self = Self(2);
25}
26
27unsafe impl Encode for UIListSeparatorVisibility {
28 const ENCODING: Encoding = NSInteger::ENCODING;
29}
30
31unsafe impl RefEncode for UIListSeparatorVisibility {
32 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
33}
34
35extern "C" {
36 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
41 pub static UIListSeparatorAutomaticInsets: NSDirectionalEdgeInsets;
42}
43
44extern_class!(
45 #[unsafe(super(NSObject))]
51 #[thread_kind = MainThreadOnly]
52 #[derive(Debug, PartialEq, Eq, Hash)]
53 pub struct UIListSeparatorConfiguration;
54);
55
56extern_conformance!(
57 unsafe impl NSCoding for UIListSeparatorConfiguration {}
58);
59
60extern_conformance!(
61 unsafe impl NSCopying for UIListSeparatorConfiguration {}
62);
63
64unsafe impl CopyingHelper for UIListSeparatorConfiguration {
65 type Result = Self;
66}
67
68extern_conformance!(
69 unsafe impl NSObjectProtocol for UIListSeparatorConfiguration {}
70);
71
72extern_conformance!(
73 unsafe impl NSSecureCoding for UIListSeparatorConfiguration {}
74);
75
76impl UIListSeparatorConfiguration {
77 extern_methods!(
78 #[unsafe(method(init))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82 #[unsafe(method(new))]
83 #[unsafe(method_family = new)]
84 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
85
86 #[cfg(feature = "UICollectionLayoutList")]
87 #[unsafe(method(initWithListAppearance:))]
91 #[unsafe(method_family = init)]
92 pub fn initWithListAppearance(
93 this: Allocated<Self>,
94 list_appearance: UICollectionLayoutListAppearance,
95 ) -> Retained<Self>;
96
97 #[unsafe(method(topSeparatorVisibility))]
99 #[unsafe(method_family = none)]
100 pub fn topSeparatorVisibility(&self) -> UIListSeparatorVisibility;
101
102 #[unsafe(method(setTopSeparatorVisibility:))]
104 #[unsafe(method_family = none)]
105 pub fn setTopSeparatorVisibility(
106 &self,
107 top_separator_visibility: UIListSeparatorVisibility,
108 );
109
110 #[unsafe(method(bottomSeparatorVisibility))]
112 #[unsafe(method_family = none)]
113 pub fn bottomSeparatorVisibility(&self) -> UIListSeparatorVisibility;
114
115 #[unsafe(method(setBottomSeparatorVisibility:))]
117 #[unsafe(method_family = none)]
118 pub fn setBottomSeparatorVisibility(
119 &self,
120 bottom_separator_visibility: UIListSeparatorVisibility,
121 );
122
123 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
124 #[unsafe(method(topSeparatorInsets))]
126 #[unsafe(method_family = none)]
127 pub fn topSeparatorInsets(&self) -> NSDirectionalEdgeInsets;
128
129 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
130 #[unsafe(method(setTopSeparatorInsets:))]
132 #[unsafe(method_family = none)]
133 pub fn setTopSeparatorInsets(&self, top_separator_insets: NSDirectionalEdgeInsets);
134
135 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
136 #[unsafe(method(bottomSeparatorInsets))]
138 #[unsafe(method_family = none)]
139 pub fn bottomSeparatorInsets(&self) -> NSDirectionalEdgeInsets;
140
141 #[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
142 #[unsafe(method(setBottomSeparatorInsets:))]
144 #[unsafe(method_family = none)]
145 pub fn setBottomSeparatorInsets(&self, bottom_separator_insets: NSDirectionalEdgeInsets);
146
147 #[cfg(feature = "UIColor")]
148 #[unsafe(method(color))]
150 #[unsafe(method_family = none)]
151 pub fn color(&self) -> Retained<UIColor>;
152
153 #[cfg(feature = "UIColor")]
154 #[unsafe(method(setColor:))]
156 #[unsafe(method_family = none)]
157 pub fn setColor(&self, color: &UIColor);
158
159 #[cfg(feature = "UIColor")]
160 #[unsafe(method(multipleSelectionColor))]
162 #[unsafe(method_family = none)]
163 pub fn multipleSelectionColor(&self) -> Retained<UIColor>;
164
165 #[cfg(feature = "UIColor")]
166 #[unsafe(method(setMultipleSelectionColor:))]
168 #[unsafe(method_family = none)]
169 pub fn setMultipleSelectionColor(&self, multiple_selection_color: &UIColor);
170
171 #[cfg(feature = "UIVisualEffect")]
172 #[unsafe(method(visualEffect))]
174 #[unsafe(method_family = none)]
175 pub fn visualEffect(&self) -> Option<Retained<UIVisualEffect>>;
176
177 #[cfg(feature = "UIVisualEffect")]
178 #[unsafe(method(setVisualEffect:))]
182 #[unsafe(method_family = none)]
183 pub fn setVisualEffect(&self, visual_effect: Option<&UIVisualEffect>);
184 );
185}