objc2_ui_kit/generated/
UIStepper.rs1use 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 #[unsafe(super(UIControl, UIView, UIResponder, NSObject))]
18 #[thread_kind = MainThreadOnly]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
21 pub struct UIStepper;
22);
23
24#[cfg(all(
25 feature = "UIControl",
26 feature = "UIResponder",
27 feature = "UIView",
28 feature = "objc2-quartz-core"
29))]
30#[cfg(not(target_os = "watchos"))]
31extern_conformance!(
32 unsafe impl CALayerDelegate for UIStepper {}
33);
34
35#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
36extern_conformance!(
37 unsafe impl NSCoding for UIStepper {}
38);
39
40#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
41extern_conformance!(
42 unsafe impl NSObjectProtocol for UIStepper {}
43);
44
45#[cfg(all(
46 feature = "UIAppearance",
47 feature = "UIControl",
48 feature = "UIResponder",
49 feature = "UIView"
50))]
51extern_conformance!(
52 unsafe impl UIAppearance for UIStepper {}
53);
54
55#[cfg(all(
56 feature = "UIAppearance",
57 feature = "UIControl",
58 feature = "UIResponder",
59 feature = "UIView"
60))]
61extern_conformance!(
62 unsafe impl UIAppearanceContainer for UIStepper {}
63);
64
65#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
66extern_conformance!(
67 unsafe impl UICoordinateSpace for UIStepper {}
68);
69
70#[cfg(all(
71 feature = "UIControl",
72 feature = "UIDynamicBehavior",
73 feature = "UIResponder",
74 feature = "UIView"
75))]
76extern_conformance!(
77 unsafe impl UIDynamicItem for UIStepper {}
78);
79
80#[cfg(all(
81 feature = "UIControl",
82 feature = "UIFocus",
83 feature = "UIResponder",
84 feature = "UIView"
85))]
86extern_conformance!(
87 unsafe impl UIFocusEnvironment for UIStepper {}
88);
89
90#[cfg(all(
91 feature = "UIControl",
92 feature = "UIFocus",
93 feature = "UIResponder",
94 feature = "UIView"
95))]
96extern_conformance!(
97 unsafe impl UIFocusItem for UIStepper {}
98);
99
100#[cfg(all(
101 feature = "UIControl",
102 feature = "UIFocus",
103 feature = "UIResponder",
104 feature = "UIView"
105))]
106extern_conformance!(
107 unsafe impl UIFocusItemContainer for UIStepper {}
108);
109
110#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
111extern_conformance!(
112 unsafe impl UIResponderStandardEditActions for UIStepper {}
113);
114
115#[cfg(all(
116 feature = "UIControl",
117 feature = "UIResponder",
118 feature = "UITraitCollection",
119 feature = "UIView"
120))]
121extern_conformance!(
122 unsafe impl UITraitEnvironment for UIStepper {}
123);
124
125#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
126impl UIStepper {
127 extern_methods!(
128 #[unsafe(method(isContinuous))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn isContinuous(&self) -> bool;
131
132 #[unsafe(method(setContinuous:))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn setContinuous(&self, continuous: bool);
136
137 #[unsafe(method(autorepeat))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn autorepeat(&self) -> bool;
140
141 #[unsafe(method(setAutorepeat:))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn setAutorepeat(&self, autorepeat: bool);
145
146 #[unsafe(method(wraps))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn wraps(&self) -> bool;
149
150 #[unsafe(method(setWraps:))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn setWraps(&self, wraps: bool);
154
155 #[unsafe(method(value))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn value(&self) -> c_double;
158
159 #[unsafe(method(setValue:))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn setValue(&self, value: c_double);
163
164 #[unsafe(method(minimumValue))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn minimumValue(&self) -> c_double;
167
168 #[unsafe(method(setMinimumValue:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn setMinimumValue(&self, minimum_value: c_double);
172
173 #[unsafe(method(maximumValue))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn maximumValue(&self) -> c_double;
176
177 #[unsafe(method(setMaximumValue:))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn setMaximumValue(&self, maximum_value: c_double);
181
182 #[unsafe(method(stepValue))]
183 #[unsafe(method_family = none)]
184 pub unsafe fn stepValue(&self) -> c_double;
185
186 #[unsafe(method(setStepValue:))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn setStepValue(&self, step_value: c_double);
190
191 #[cfg(feature = "UIImage")]
192 #[unsafe(method(setBackgroundImage:forState:))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn setBackgroundImage_forState(
195 &self,
196 image: Option<&UIImage>,
197 state: UIControlState,
198 );
199
200 #[cfg(feature = "UIImage")]
201 #[unsafe(method(backgroundImageForState:))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn backgroundImageForState(
204 &self,
205 state: UIControlState,
206 ) -> Option<Retained<UIImage>>;
207
208 #[cfg(feature = "UIImage")]
209 #[unsafe(method(setDividerImage:forLeftSegmentState:rightSegmentState:))]
210 #[unsafe(method_family = none)]
211 pub unsafe fn setDividerImage_forLeftSegmentState_rightSegmentState(
212 &self,
213 image: Option<&UIImage>,
214 left_state: UIControlState,
215 right_state: UIControlState,
216 );
217
218 #[cfg(feature = "UIImage")]
219 #[unsafe(method(setIncrementImage:forState:))]
220 #[unsafe(method_family = none)]
221 pub unsafe fn setIncrementImage_forState(
222 &self,
223 image: Option<&UIImage>,
224 state: UIControlState,
225 );
226
227 #[cfg(feature = "UIImage")]
228 #[unsafe(method(incrementImageForState:))]
229 #[unsafe(method_family = none)]
230 pub unsafe fn incrementImageForState(
231 &self,
232 state: UIControlState,
233 ) -> Option<Retained<UIImage>>;
234
235 #[cfg(feature = "UIImage")]
236 #[unsafe(method(setDecrementImage:forState:))]
237 #[unsafe(method_family = none)]
238 pub unsafe fn setDecrementImage_forState(
239 &self,
240 image: Option<&UIImage>,
241 state: UIControlState,
242 );
243
244 #[cfg(feature = "UIImage")]
245 #[unsafe(method(decrementImageForState:))]
246 #[unsafe(method_family = none)]
247 pub unsafe fn decrementImageForState(
248 &self,
249 state: UIControlState,
250 ) -> Option<Retained<UIImage>>;
251 );
252}
253
254#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
256impl UIStepper {
257 extern_methods!(
258 #[cfg(feature = "objc2-core-foundation")]
259 #[unsafe(method(initWithFrame:))]
260 #[unsafe(method_family = init)]
261 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
262
263 #[unsafe(method(initWithCoder:))]
264 #[unsafe(method_family = init)]
265 pub unsafe fn initWithCoder(
266 this: Allocated<Self>,
267 coder: &NSCoder,
268 ) -> Option<Retained<Self>>;
269
270 #[cfg(all(
271 feature = "UIAction",
272 feature = "UIMenuElement",
273 feature = "objc2-core-foundation"
274 ))]
275 #[unsafe(method(initWithFrame:primaryAction:))]
277 #[unsafe(method_family = init)]
278 pub unsafe fn initWithFrame_primaryAction(
279 this: Allocated<Self>,
280 frame: CGRect,
281 primary_action: Option<&UIAction>,
282 ) -> Retained<Self>;
283 );
284}
285
286#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
288impl UIStepper {
289 extern_methods!(
290 #[unsafe(method(init))]
291 #[unsafe(method_family = init)]
292 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
293
294 #[unsafe(method(new))]
295 #[unsafe(method_family = new)]
296 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
297 );
298}