objc2_ui_kit/generated/
UICellConfigurationState.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 UICellConfigurationDragState(pub NSInteger);
15impl UICellConfigurationDragState {
16 #[doc(alias = "UICellConfigurationDragStateNone")]
18 pub const None: Self = Self(0);
19 #[doc(alias = "UICellConfigurationDragStateLifting")]
21 pub const Lifting: Self = Self(1);
22 #[doc(alias = "UICellConfigurationDragStateDragging")]
24 pub const Dragging: Self = Self(2);
25}
26
27unsafe impl Encode for UICellConfigurationDragState {
28 const ENCODING: Encoding = NSInteger::ENCODING;
29}
30
31unsafe impl RefEncode for UICellConfigurationDragState {
32 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
33}
34
35#[repr(transparent)]
38#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
39pub struct UICellConfigurationDropState(pub NSInteger);
40impl UICellConfigurationDropState {
41 #[doc(alias = "UICellConfigurationDropStateNone")]
43 pub const None: Self = Self(0);
44 #[doc(alias = "UICellConfigurationDropStateNotTargeted")]
47 pub const NotTargeted: Self = Self(1);
48 #[doc(alias = "UICellConfigurationDropStateTargeted")]
50 pub const Targeted: Self = Self(2);
51}
52
53unsafe impl Encode for UICellConfigurationDropState {
54 const ENCODING: Encoding = NSInteger::ENCODING;
55}
56
57unsafe impl RefEncode for UICellConfigurationDropState {
58 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
59}
60
61extern_class!(
62 #[unsafe(super(UIViewConfigurationState, NSObject))]
64 #[thread_kind = MainThreadOnly]
65 #[derive(Debug, PartialEq, Eq, Hash)]
66 #[cfg(feature = "UIViewConfigurationState")]
67 pub struct UICellConfigurationState;
68);
69
70#[cfg(feature = "UIViewConfigurationState")]
71unsafe impl NSCoding for UICellConfigurationState {}
72
73#[cfg(feature = "UIViewConfigurationState")]
74unsafe impl NSCopying for UICellConfigurationState {}
75
76#[cfg(feature = "UIViewConfigurationState")]
77unsafe impl CopyingHelper for UICellConfigurationState {
78 type Result = Self;
79}
80
81#[cfg(feature = "UIViewConfigurationState")]
82unsafe impl NSObjectProtocol for UICellConfigurationState {}
83
84#[cfg(feature = "UIViewConfigurationState")]
85unsafe impl NSSecureCoding for UICellConfigurationState {}
86
87#[cfg(all(feature = "UIConfigurationState", feature = "UIViewConfigurationState"))]
88unsafe impl UIConfigurationState for UICellConfigurationState {}
89
90#[cfg(feature = "UIViewConfigurationState")]
91impl UICellConfigurationState {
92 extern_methods!(
93 #[unsafe(method(isEditing))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn isEditing(&self) -> bool;
96
97 #[unsafe(method(setEditing:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn setEditing(&self, editing: bool);
101
102 #[unsafe(method(isExpanded))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn isExpanded(&self) -> bool;
105
106 #[unsafe(method(setExpanded:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn setExpanded(&self, expanded: bool);
110
111 #[unsafe(method(isSwiped))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn isSwiped(&self) -> bool;
114
115 #[unsafe(method(setSwiped:))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn setSwiped(&self, swiped: bool);
119
120 #[unsafe(method(isReordering))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn isReordering(&self) -> bool;
123
124 #[unsafe(method(setReordering:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn setReordering(&self, reordering: bool);
128
129 #[unsafe(method(cellDragState))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn cellDragState(&self) -> UICellConfigurationDragState;
132
133 #[unsafe(method(setCellDragState:))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn setCellDragState(&self, cell_drag_state: UICellConfigurationDragState);
137
138 #[unsafe(method(cellDropState))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn cellDropState(&self) -> UICellConfigurationDropState;
141
142 #[unsafe(method(setCellDropState:))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn setCellDropState(&self, cell_drop_state: UICellConfigurationDropState);
146 );
147}
148
149#[cfg(feature = "UIViewConfigurationState")]
151impl UICellConfigurationState {
152 extern_methods!(
153 #[cfg(feature = "UITraitCollection")]
154 #[unsafe(method(initWithTraitCollection:))]
156 #[unsafe(method_family = init)]
157 pub unsafe fn initWithTraitCollection(
158 this: Allocated<Self>,
159 trait_collection: &UITraitCollection,
160 ) -> Retained<Self>;
161
162 #[unsafe(method(initWithCoder:))]
163 #[unsafe(method_family = init)]
164 pub unsafe fn initWithCoder(
165 this: Allocated<Self>,
166 coder: &NSCoder,
167 ) -> Option<Retained<Self>>;
168
169 #[unsafe(method(init))]
170 #[unsafe(method_family = init)]
171 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
172
173 #[unsafe(method(new))]
174 #[unsafe(method_family = new)]
175 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
176 );
177}