objc2_app_kit/generated/
NSStepper.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[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 unsafe fn minValue(&self) -> c_double;
104
105 #[unsafe(method(setMinValue:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn setMinValue(&self, min_value: c_double);
109
110 #[unsafe(method(maxValue))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn maxValue(&self) -> c_double;
113
114 #[unsafe(method(setMaxValue:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setMaxValue(&self, max_value: c_double);
118
119 #[unsafe(method(increment))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn increment(&self) -> c_double;
122
123 #[unsafe(method(setIncrement:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn setIncrement(&self, increment: c_double);
127
128 #[unsafe(method(valueWraps))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn valueWraps(&self) -> bool;
131
132 #[unsafe(method(setValueWraps:))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn setValueWraps(&self, value_wraps: 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}
147
148#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
150impl NSStepper {
151 extern_methods!(
152 #[unsafe(method(initWithFrame:))]
153 #[unsafe(method_family = init)]
154 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
155
156 #[unsafe(method(initWithCoder:))]
157 #[unsafe(method_family = init)]
158 pub unsafe fn initWithCoder(
159 this: Allocated<Self>,
160 coder: &NSCoder,
161 ) -> Option<Retained<Self>>;
162 );
163}
164
165#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
167impl NSStepper {
168 extern_methods!(
169 #[unsafe(method(init))]
170 #[unsafe(method_family = init)]
171 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
172 );
173}
174
175#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
177impl NSStepper {
178 extern_methods!(
179 #[unsafe(method(new))]
180 #[unsafe(method_family = new)]
181 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
182 );
183}