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")]
19unsafe impl NSCoding for NSStepperTouchBarItem {}
20
21#[cfg(feature = "NSTouchBarItem")]
22unsafe impl NSObjectProtocol for NSStepperTouchBarItem {}
23
24#[cfg(feature = "NSTouchBarItem")]
25impl NSStepperTouchBarItem {
26 extern_methods!(
27 #[unsafe(method(stepperTouchBarItemWithIdentifier:formatter:))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn stepperTouchBarItemWithIdentifier_formatter(
34 identifier: &NSTouchBarItemIdentifier,
35 formatter: &NSFormatter,
36 mtm: MainThreadMarker,
37 ) -> Retained<Self>;
38
39 #[cfg(feature = "block2")]
40 #[unsafe(method(stepperTouchBarItemWithIdentifier:drawingHandler:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn stepperTouchBarItemWithIdentifier_drawingHandler(
47 identifier: &NSTouchBarItemIdentifier,
48 drawing_handler: &block2::Block<dyn Fn(NSRect, c_double)>,
49 mtm: MainThreadMarker,
50 ) -> Retained<Self>;
51
52 #[unsafe(method(maxValue))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn maxValue(&self) -> c_double;
56
57 #[unsafe(method(setMaxValue:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn setMaxValue(&self, max_value: c_double);
61
62 #[unsafe(method(minValue))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn minValue(&self) -> c_double;
66
67 #[unsafe(method(setMinValue:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn setMinValue(&self, min_value: c_double);
71
72 #[unsafe(method(increment))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn increment(&self) -> c_double;
76
77 #[unsafe(method(setIncrement:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn setIncrement(&self, increment: c_double);
81
82 #[unsafe(method(value))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn value(&self) -> c_double;
86
87 #[unsafe(method(setValue:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn setValue(&self, value: c_double);
91
92 #[unsafe(method(target))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn target(&self) -> Option<Retained<AnyObject>>;
96
97 #[unsafe(method(setTarget:))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
102
103 #[unsafe(method(action))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn action(&self) -> Option<Sel>;
107
108 #[unsafe(method(setAction:))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn setAction(&self, action: Option<Sel>);
112
113 #[unsafe(method(customizationLabel))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn customizationLabel(&self) -> Retained<NSString>;
117
118 #[unsafe(method(setCustomizationLabel:))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
122 );
123}
124
125#[cfg(feature = "NSTouchBarItem")]
127impl NSStepperTouchBarItem {
128 extern_methods!(
129 #[unsafe(method(initWithIdentifier:))]
130 #[unsafe(method_family = init)]
131 pub unsafe fn initWithIdentifier(
132 this: Allocated<Self>,
133 identifier: &NSTouchBarItemIdentifier,
134 ) -> Retained<Self>;
135
136 #[unsafe(method(initWithCoder:))]
137 #[unsafe(method_family = init)]
138 pub unsafe fn initWithCoder(
139 this: Allocated<Self>,
140 coder: &NSCoder,
141 ) -> Option<Retained<Self>>;
142
143 #[unsafe(method(init))]
144 #[unsafe(method_family = init)]
145 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
146 );
147}
148
149#[cfg(feature = "NSTouchBarItem")]
151impl NSStepperTouchBarItem {
152 extern_methods!(
153 #[unsafe(method(new))]
154 #[unsafe(method_family = new)]
155 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
156 );
157}