objc2_app_kit/generated/
NSStepper.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsstepper?language=objc)
12    #[unsafe(super(NSControl, NSView, NSResponder, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
15    pub struct NSStepper;
16);
17
18#[cfg(all(
19    feature = "NSAccessibilityProtocols",
20    feature = "NSControl",
21    feature = "NSResponder",
22    feature = "NSView"
23))]
24extern_conformance!(
25    unsafe impl NSAccessibility for NSStepper {}
26);
27
28#[cfg(all(
29    feature = "NSAccessibilityProtocols",
30    feature = "NSControl",
31    feature = "NSResponder",
32    feature = "NSView"
33))]
34extern_conformance!(
35    unsafe impl NSAccessibilityElementProtocol for NSStepper {}
36);
37
38#[cfg(all(
39    feature = "NSAccessibilityProtocols",
40    feature = "NSControl",
41    feature = "NSResponder",
42    feature = "NSView"
43))]
44extern_conformance!(
45    unsafe impl NSAccessibilityStepper for NSStepper {}
46);
47
48#[cfg(all(
49    feature = "NSAnimation",
50    feature = "NSControl",
51    feature = "NSResponder",
52    feature = "NSView"
53))]
54extern_conformance!(
55    unsafe impl NSAnimatablePropertyContainer for NSStepper {}
56);
57
58#[cfg(all(
59    feature = "NSAppearance",
60    feature = "NSControl",
61    feature = "NSResponder",
62    feature = "NSView"
63))]
64extern_conformance!(
65    unsafe impl NSAppearanceCustomization for NSStepper {}
66);
67
68#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
69extern_conformance!(
70    unsafe impl NSCoding for NSStepper {}
71);
72
73#[cfg(all(
74    feature = "NSControl",
75    feature = "NSDragging",
76    feature = "NSResponder",
77    feature = "NSView"
78))]
79extern_conformance!(
80    unsafe impl NSDraggingDestination for NSStepper {}
81);
82
83#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
84extern_conformance!(
85    unsafe impl NSObjectProtocol for NSStepper {}
86);
87
88#[cfg(all(
89    feature = "NSControl",
90    feature = "NSResponder",
91    feature = "NSUserInterfaceItemIdentification",
92    feature = "NSView"
93))]
94extern_conformance!(
95    unsafe impl NSUserInterfaceItemIdentification for NSStepper {}
96);
97
98#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
99impl NSStepper {
100    extern_methods!(
101        #[unsafe(method(minValue))]
102        #[unsafe(method_family = none)]
103        pub fn minValue(&self) -> c_double;
104
105        /// Setter for [`minValue`][Self::minValue].
106        #[unsafe(method(setMinValue:))]
107        #[unsafe(method_family = none)]
108        pub fn setMinValue(&self, min_value: c_double);
109
110        #[unsafe(method(maxValue))]
111        #[unsafe(method_family = none)]
112        pub fn maxValue(&self) -> c_double;
113
114        /// Setter for [`maxValue`][Self::maxValue].
115        #[unsafe(method(setMaxValue:))]
116        #[unsafe(method_family = none)]
117        pub fn setMaxValue(&self, max_value: c_double);
118
119        #[unsafe(method(increment))]
120        #[unsafe(method_family = none)]
121        pub fn increment(&self) -> c_double;
122
123        /// Setter for [`increment`][Self::increment].
124        #[unsafe(method(setIncrement:))]
125        #[unsafe(method_family = none)]
126        pub fn setIncrement(&self, increment: c_double);
127
128        #[unsafe(method(valueWraps))]
129        #[unsafe(method_family = none)]
130        pub fn valueWraps(&self) -> bool;
131
132        /// Setter for [`valueWraps`][Self::valueWraps].
133        #[unsafe(method(setValueWraps:))]
134        #[unsafe(method_family = none)]
135        pub fn setValueWraps(&self, value_wraps: 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}
147
148/// Methods declared on superclass `NSControl`.
149#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
150impl NSStepper {
151    extern_methods!(
152        #[unsafe(method(initWithFrame:))]
153        #[unsafe(method_family = init)]
154        pub fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
155
156        /// # Safety
157        ///
158        /// `coder` possibly has further requirements.
159        #[unsafe(method(initWithCoder:))]
160        #[unsafe(method_family = init)]
161        pub unsafe fn initWithCoder(
162            this: Allocated<Self>,
163            coder: &NSCoder,
164        ) -> Option<Retained<Self>>;
165    );
166}
167
168/// Methods declared on superclass `NSResponder`.
169#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
170impl NSStepper {
171    extern_methods!(
172        #[unsafe(method(init))]
173        #[unsafe(method_family = init)]
174        pub fn init(this: Allocated<Self>) -> Retained<Self>;
175    );
176}
177
178/// Methods declared on superclass `NSObject`.
179#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
180impl NSStepper {
181    extern_methods!(
182        #[unsafe(method(new))]
183        #[unsafe(method_family = new)]
184        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
185    );
186}