objc2_app_kit/generated/
NSStepperTouchBarItem.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSTouchBarItem, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "NSTouchBarItem")]
15 pub struct NSStepperTouchBarItem;
16);
17
18#[cfg(feature = "NSTouchBarItem")]
19extern_conformance!(
20 unsafe impl NSCoding for NSStepperTouchBarItem {}
21);
22
23#[cfg(feature = "NSTouchBarItem")]
24extern_conformance!(
25 unsafe impl NSObjectProtocol for NSStepperTouchBarItem {}
26);
27
28#[cfg(feature = "NSTouchBarItem")]
29impl NSStepperTouchBarItem {
30 extern_methods!(
31 #[unsafe(method(stepperTouchBarItemWithIdentifier:formatter:))]
36 #[unsafe(method_family = none)]
37 pub fn stepperTouchBarItemWithIdentifier_formatter(
38 identifier: &NSTouchBarItemIdentifier,
39 formatter: &NSFormatter,
40 mtm: MainThreadMarker,
41 ) -> Retained<Self>;
42
43 #[cfg(feature = "block2")]
44 #[unsafe(method(stepperTouchBarItemWithIdentifier:drawingHandler:))]
49 #[unsafe(method_family = none)]
50 pub fn stepperTouchBarItemWithIdentifier_drawingHandler(
51 identifier: &NSTouchBarItemIdentifier,
52 drawing_handler: &block2::DynBlock<dyn Fn(NSRect, c_double)>,
53 mtm: MainThreadMarker,
54 ) -> Retained<Self>;
55
56 #[unsafe(method(maxValue))]
58 #[unsafe(method_family = none)]
59 pub fn maxValue(&self) -> c_double;
60
61 #[unsafe(method(setMaxValue:))]
63 #[unsafe(method_family = none)]
64 pub fn setMaxValue(&self, max_value: c_double);
65
66 #[unsafe(method(minValue))]
68 #[unsafe(method_family = none)]
69 pub fn minValue(&self) -> c_double;
70
71 #[unsafe(method(setMinValue:))]
73 #[unsafe(method_family = none)]
74 pub fn setMinValue(&self, min_value: c_double);
75
76 #[unsafe(method(increment))]
78 #[unsafe(method_family = none)]
79 pub fn increment(&self) -> c_double;
80
81 #[unsafe(method(setIncrement:))]
83 #[unsafe(method_family = none)]
84 pub fn setIncrement(&self, increment: c_double);
85
86 #[unsafe(method(value))]
88 #[unsafe(method_family = none)]
89 pub fn value(&self) -> c_double;
90
91 #[unsafe(method(setValue:))]
93 #[unsafe(method_family = none)]
94 pub fn setValue(&self, value: c_double);
95
96 #[unsafe(method(target))]
98 #[unsafe(method_family = none)]
99 pub fn target(&self) -> Option<Retained<AnyObject>>;
100
101 #[unsafe(method(setTarget:))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
111
112 #[unsafe(method(action))]
114 #[unsafe(method_family = none)]
115 pub fn action(&self) -> Option<Sel>;
116
117 #[unsafe(method(setAction:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn setAction(&self, action: Option<Sel>);
125
126 #[unsafe(method(customizationLabel))]
128 #[unsafe(method_family = none)]
129 pub fn customizationLabel(&self) -> Retained<NSString>;
130
131 #[unsafe(method(setCustomizationLabel:))]
135 #[unsafe(method_family = none)]
136 pub fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
137 );
138}
139
140#[cfg(feature = "NSTouchBarItem")]
142impl NSStepperTouchBarItem {
143 extern_methods!(
144 #[unsafe(method(initWithIdentifier:))]
145 #[unsafe(method_family = init)]
146 pub fn initWithIdentifier(
147 this: Allocated<Self>,
148 identifier: &NSTouchBarItemIdentifier,
149 ) -> Retained<Self>;
150
151 #[unsafe(method(initWithCoder:))]
155 #[unsafe(method_family = init)]
156 pub unsafe fn initWithCoder(
157 this: Allocated<Self>,
158 coder: &NSCoder,
159 ) -> Option<Retained<Self>>;
160
161 #[unsafe(method(init))]
162 #[unsafe(method_family = init)]
163 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
164 );
165}
166
167#[cfg(feature = "NSTouchBarItem")]
169impl NSStepperTouchBarItem {
170 extern_methods!(
171 #[unsafe(method(new))]
172 #[unsafe(method_family = new)]
173 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
174 );
175}