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))]
24unsafe impl NSAccessibility for NSStepper {}
25
26#[cfg(all(
27 feature = "NSAccessibilityProtocols",
28 feature = "NSControl",
29 feature = "NSResponder",
30 feature = "NSView"
31))]
32unsafe impl NSAccessibilityElementProtocol for NSStepper {}
33
34#[cfg(all(
35 feature = "NSAccessibilityProtocols",
36 feature = "NSControl",
37 feature = "NSResponder",
38 feature = "NSView"
39))]
40unsafe impl NSAccessibilityStepper for NSStepper {}
41
42#[cfg(all(
43 feature = "NSAnimation",
44 feature = "NSControl",
45 feature = "NSResponder",
46 feature = "NSView"
47))]
48unsafe impl NSAnimatablePropertyContainer for NSStepper {}
49
50#[cfg(all(
51 feature = "NSAppearance",
52 feature = "NSControl",
53 feature = "NSResponder",
54 feature = "NSView"
55))]
56unsafe impl NSAppearanceCustomization for NSStepper {}
57
58#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
59unsafe impl NSCoding for NSStepper {}
60
61#[cfg(all(
62 feature = "NSControl",
63 feature = "NSDragging",
64 feature = "NSResponder",
65 feature = "NSView"
66))]
67unsafe impl NSDraggingDestination for NSStepper {}
68
69#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
70unsafe impl NSObjectProtocol for NSStepper {}
71
72#[cfg(all(
73 feature = "NSControl",
74 feature = "NSResponder",
75 feature = "NSUserInterfaceItemIdentification",
76 feature = "NSView"
77))]
78unsafe impl NSUserInterfaceItemIdentification for NSStepper {}
79
80#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
81impl NSStepper {
82 extern_methods!(
83 #[unsafe(method(minValue))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn minValue(&self) -> c_double;
86
87 #[unsafe(method(setMinValue:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn setMinValue(&self, min_value: c_double);
91
92 #[unsafe(method(maxValue))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn maxValue(&self) -> c_double;
95
96 #[unsafe(method(setMaxValue:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn setMaxValue(&self, max_value: c_double);
100
101 #[unsafe(method(increment))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn increment(&self) -> c_double;
104
105 #[unsafe(method(setIncrement:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn setIncrement(&self, increment: c_double);
109
110 #[unsafe(method(valueWraps))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn valueWraps(&self) -> bool;
113
114 #[unsafe(method(setValueWraps:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setValueWraps(&self, value_wraps: bool);
118
119 #[unsafe(method(autorepeat))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn autorepeat(&self) -> bool;
122
123 #[unsafe(method(setAutorepeat:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn setAutorepeat(&self, autorepeat: bool);
127 );
128}
129
130#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
132impl NSStepper {
133 extern_methods!(
134 #[unsafe(method(initWithFrame:))]
135 #[unsafe(method_family = init)]
136 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
137
138 #[unsafe(method(initWithCoder:))]
139 #[unsafe(method_family = init)]
140 pub unsafe fn initWithCoder(
141 this: Allocated<Self>,
142 coder: &NSCoder,
143 ) -> Option<Retained<Self>>;
144 );
145}
146
147#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
149impl NSStepper {
150 extern_methods!(
151 #[unsafe(method(init))]
152 #[unsafe(method_family = init)]
153 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
154 );
155}
156
157#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
159impl NSStepper {
160 extern_methods!(
161 #[unsafe(method(new))]
162 #[unsafe(method_family = new)]
163 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
164 );
165}