objc2_ui_kit/generated/
UIStepper.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/uistepper?language=objc)
17    #[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 fn isContinuous(&self) -> bool;
131
132        /// Setter for [`isContinuous`][Self::isContinuous].
133        #[unsafe(method(setContinuous:))]
134        #[unsafe(method_family = none)]
135        pub fn setContinuous(&self, continuous: bool);
136
137        #[unsafe(method(autorepeat))]
138        #[unsafe(method_family = none)]
139        pub fn autorepeat(&self) -> bool;
140
141        /// Setter for [`autorepeat`][Self::autorepeat].
142        #[unsafe(method(setAutorepeat:))]
143        #[unsafe(method_family = none)]
144        pub fn setAutorepeat(&self, autorepeat: bool);
145
146        #[unsafe(method(wraps))]
147        #[unsafe(method_family = none)]
148        pub fn wraps(&self) -> bool;
149
150        /// Setter for [`wraps`][Self::wraps].
151        #[unsafe(method(setWraps:))]
152        #[unsafe(method_family = none)]
153        pub fn setWraps(&self, wraps: bool);
154
155        #[unsafe(method(value))]
156        #[unsafe(method_family = none)]
157        pub fn value(&self) -> c_double;
158
159        /// Setter for [`value`][Self::value].
160        #[unsafe(method(setValue:))]
161        #[unsafe(method_family = none)]
162        pub fn setValue(&self, value: c_double);
163
164        #[unsafe(method(minimumValue))]
165        #[unsafe(method_family = none)]
166        pub fn minimumValue(&self) -> c_double;
167
168        /// Setter for [`minimumValue`][Self::minimumValue].
169        #[unsafe(method(setMinimumValue:))]
170        #[unsafe(method_family = none)]
171        pub fn setMinimumValue(&self, minimum_value: c_double);
172
173        #[unsafe(method(maximumValue))]
174        #[unsafe(method_family = none)]
175        pub fn maximumValue(&self) -> c_double;
176
177        /// Setter for [`maximumValue`][Self::maximumValue].
178        #[unsafe(method(setMaximumValue:))]
179        #[unsafe(method_family = none)]
180        pub fn setMaximumValue(&self, maximum_value: c_double);
181
182        #[unsafe(method(stepValue))]
183        #[unsafe(method_family = none)]
184        pub fn stepValue(&self) -> c_double;
185
186        /// Setter for [`stepValue`][Self::stepValue].
187        #[unsafe(method(setStepValue:))]
188        #[unsafe(method_family = none)]
189        pub fn setStepValue(&self, step_value: c_double);
190
191        #[cfg(feature = "UIImage")]
192        #[unsafe(method(setBackgroundImage:forState:))]
193        #[unsafe(method_family = none)]
194        pub fn setBackgroundImage_forState(&self, image: Option<&UIImage>, state: UIControlState);
195
196        #[cfg(feature = "UIImage")]
197        #[unsafe(method(backgroundImageForState:))]
198        #[unsafe(method_family = none)]
199        pub fn backgroundImageForState(&self, state: UIControlState) -> Option<Retained<UIImage>>;
200
201        #[cfg(feature = "UIImage")]
202        #[unsafe(method(setDividerImage:forLeftSegmentState:rightSegmentState:))]
203        #[unsafe(method_family = none)]
204        pub fn setDividerImage_forLeftSegmentState_rightSegmentState(
205            &self,
206            image: Option<&UIImage>,
207            left_state: UIControlState,
208            right_state: UIControlState,
209        );
210
211        #[cfg(feature = "UIImage")]
212        #[unsafe(method(setIncrementImage:forState:))]
213        #[unsafe(method_family = none)]
214        pub fn setIncrementImage_forState(&self, image: Option<&UIImage>, state: UIControlState);
215
216        #[cfg(feature = "UIImage")]
217        #[unsafe(method(incrementImageForState:))]
218        #[unsafe(method_family = none)]
219        pub fn incrementImageForState(&self, state: UIControlState) -> Option<Retained<UIImage>>;
220
221        #[cfg(feature = "UIImage")]
222        #[unsafe(method(setDecrementImage:forState:))]
223        #[unsafe(method_family = none)]
224        pub fn setDecrementImage_forState(&self, image: Option<&UIImage>, state: UIControlState);
225
226        #[cfg(feature = "UIImage")]
227        #[unsafe(method(decrementImageForState:))]
228        #[unsafe(method_family = none)]
229        pub fn decrementImageForState(&self, state: UIControlState) -> Option<Retained<UIImage>>;
230    );
231}
232
233/// Methods declared on superclass `UIControl`.
234#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
235impl UIStepper {
236    extern_methods!(
237        #[cfg(feature = "objc2-core-foundation")]
238        #[unsafe(method(initWithFrame:))]
239        #[unsafe(method_family = init)]
240        pub fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
241
242        /// # Safety
243        ///
244        /// `coder` possibly has further requirements.
245        #[unsafe(method(initWithCoder:))]
246        #[unsafe(method_family = init)]
247        pub unsafe fn initWithCoder(
248            this: Allocated<Self>,
249            coder: &NSCoder,
250        ) -> Option<Retained<Self>>;
251
252        #[cfg(all(
253            feature = "UIAction",
254            feature = "UIMenuElement",
255            feature = "objc2-core-foundation"
256        ))]
257        /// Initializes the control and adds primaryAction for the UIControlEventPrimaryActionTriggered control event. Subclasses of UIControl may alter or add behaviors around the usage of primaryAction, see subclass documentation of this initializer for additional information.
258        #[unsafe(method(initWithFrame:primaryAction:))]
259        #[unsafe(method_family = init)]
260        pub fn initWithFrame_primaryAction(
261            this: Allocated<Self>,
262            frame: CGRect,
263            primary_action: Option<&UIAction>,
264        ) -> Retained<Self>;
265    );
266}
267
268/// Methods declared on superclass `UIView`.
269#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
270impl UIStepper {
271    extern_methods!(
272        #[unsafe(method(init))]
273        #[unsafe(method_family = init)]
274        pub fn init(this: Allocated<Self>) -> Retained<Self>;
275    );
276}
277
278/// Methods declared on superclass `NSObject`.
279#[cfg(all(feature = "UIControl", feature = "UIResponder", feature = "UIView"))]
280impl UIStepper {
281    extern_methods!(
282        #[unsafe(method(new))]
283        #[unsafe(method_family = new)]
284        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
285    );
286}