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 unsafe 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 unsafe 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 unsafe fn maxValue(&self) -> c_double;
60
61 #[unsafe(method(setMaxValue:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn setMaxValue(&self, max_value: c_double);
65
66 #[unsafe(method(minValue))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn minValue(&self) -> c_double;
70
71 #[unsafe(method(setMinValue:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn setMinValue(&self, min_value: c_double);
75
76 #[unsafe(method(increment))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn increment(&self) -> c_double;
80
81 #[unsafe(method(setIncrement:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn setIncrement(&self, increment: c_double);
85
86 #[unsafe(method(value))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn value(&self) -> c_double;
90
91 #[unsafe(method(setValue:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn setValue(&self, value: c_double);
95
96 #[unsafe(method(target))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
100
101 #[unsafe(method(setTarget:))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
106
107 #[unsafe(method(action))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn action(&self) -> Option<Sel>;
111
112 #[unsafe(method(setAction:))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn setAction(&self, action: Option<Sel>);
116
117 #[unsafe(method(customizationLabel))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn customizationLabel(&self) -> Retained<NSString>;
121
122 #[unsafe(method(setCustomizationLabel:))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
126 );
127}
128
129#[cfg(feature = "NSTouchBarItem")]
131impl NSStepperTouchBarItem {
132 extern_methods!(
133 #[unsafe(method(initWithIdentifier:))]
134 #[unsafe(method_family = init)]
135 pub unsafe fn initWithIdentifier(
136 this: Allocated<Self>,
137 identifier: &NSTouchBarItemIdentifier,
138 ) -> Retained<Self>;
139
140 #[unsafe(method(initWithCoder:))]
141 #[unsafe(method_family = init)]
142 pub unsafe fn initWithCoder(
143 this: Allocated<Self>,
144 coder: &NSCoder,
145 ) -> Option<Retained<Self>>;
146
147 #[unsafe(method(init))]
148 #[unsafe(method_family = init)]
149 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
150 );
151}
152
153#[cfg(feature = "NSTouchBarItem")]
155impl NSStepperTouchBarItem {
156 extern_methods!(
157 #[unsafe(method(new))]
158 #[unsafe(method_family = new)]
159 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
160 );
161}