objc2_app_kit/generated/
NSDatePicker.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 NSDatePicker;
16);
17
18#[cfg(all(
19 feature = "NSAccessibilityProtocols",
20 feature = "NSControl",
21 feature = "NSResponder",
22 feature = "NSView"
23))]
24unsafe impl NSAccessibility for NSDatePicker {}
25
26#[cfg(all(
27 feature = "NSAccessibilityProtocols",
28 feature = "NSControl",
29 feature = "NSResponder",
30 feature = "NSView"
31))]
32unsafe impl NSAccessibilityElementProtocol for NSDatePicker {}
33
34#[cfg(all(
35 feature = "NSAnimation",
36 feature = "NSControl",
37 feature = "NSResponder",
38 feature = "NSView"
39))]
40unsafe impl NSAnimatablePropertyContainer for NSDatePicker {}
41
42#[cfg(all(
43 feature = "NSAppearance",
44 feature = "NSControl",
45 feature = "NSResponder",
46 feature = "NSView"
47))]
48unsafe impl NSAppearanceCustomization for NSDatePicker {}
49
50#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
51unsafe impl NSCoding for NSDatePicker {}
52
53#[cfg(all(
54 feature = "NSControl",
55 feature = "NSDragging",
56 feature = "NSResponder",
57 feature = "NSView"
58))]
59unsafe impl NSDraggingDestination for NSDatePicker {}
60
61#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
62unsafe impl NSObjectProtocol for NSDatePicker {}
63
64#[cfg(all(
65 feature = "NSControl",
66 feature = "NSResponder",
67 feature = "NSUserInterfaceItemIdentification",
68 feature = "NSView"
69))]
70unsafe impl NSUserInterfaceItemIdentification for NSDatePicker {}
71
72#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
73impl NSDatePicker {
74 extern_methods!(
75 #[cfg(feature = "NSDatePickerCell")]
76 #[unsafe(method(datePickerStyle))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn datePickerStyle(&self) -> NSDatePickerStyle;
79
80 #[cfg(feature = "NSDatePickerCell")]
81 #[unsafe(method(setDatePickerStyle:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn setDatePickerStyle(&self, date_picker_style: NSDatePickerStyle);
85
86 #[unsafe(method(isBezeled))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn isBezeled(&self) -> bool;
89
90 #[unsafe(method(setBezeled:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn setBezeled(&self, bezeled: bool);
94
95 #[unsafe(method(isBordered))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn isBordered(&self) -> bool;
98
99 #[unsafe(method(setBordered:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setBordered(&self, bordered: bool);
103
104 #[unsafe(method(drawsBackground))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn drawsBackground(&self) -> bool;
107
108 #[unsafe(method(setDrawsBackground:))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn setDrawsBackground(&self, draws_background: bool);
112
113 #[cfg(feature = "NSColor")]
114 #[unsafe(method(backgroundColor))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn backgroundColor(&self) -> Retained<NSColor>;
117
118 #[cfg(feature = "NSColor")]
119 #[unsafe(method(setBackgroundColor:))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn setBackgroundColor(&self, background_color: &NSColor);
123
124 #[cfg(feature = "NSColor")]
125 #[unsafe(method(textColor))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn textColor(&self) -> Retained<NSColor>;
128
129 #[cfg(feature = "NSColor")]
130 #[unsafe(method(setTextColor:))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn setTextColor(&self, text_color: &NSColor);
134
135 #[cfg(feature = "NSDatePickerCell")]
136 #[unsafe(method(datePickerMode))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn datePickerMode(&self) -> NSDatePickerMode;
139
140 #[cfg(feature = "NSDatePickerCell")]
141 #[unsafe(method(setDatePickerMode:))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn setDatePickerMode(&self, date_picker_mode: NSDatePickerMode);
145
146 #[cfg(feature = "NSDatePickerCell")]
147 #[unsafe(method(datePickerElements))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn datePickerElements(&self) -> NSDatePickerElementFlags;
150
151 #[cfg(feature = "NSDatePickerCell")]
152 #[unsafe(method(setDatePickerElements:))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn setDatePickerElements(&self, date_picker_elements: NSDatePickerElementFlags);
156
157 #[unsafe(method(calendar))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn calendar(&self) -> Option<Retained<NSCalendar>>;
160
161 #[unsafe(method(setCalendar:))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>);
165
166 #[unsafe(method(locale))]
167 #[unsafe(method_family = none)]
168 pub unsafe fn locale(&self) -> Option<Retained<NSLocale>>;
169
170 #[unsafe(method(setLocale:))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn setLocale(&self, locale: Option<&NSLocale>);
174
175 #[unsafe(method(timeZone))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
178
179 #[unsafe(method(setTimeZone:))]
181 #[unsafe(method_family = none)]
182 pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);
183
184 #[unsafe(method(dateValue))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn dateValue(&self) -> Retained<NSDate>;
187
188 #[unsafe(method(setDateValue:))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn setDateValue(&self, date_value: &NSDate);
192
193 #[unsafe(method(timeInterval))]
194 #[unsafe(method_family = none)]
195 pub unsafe fn timeInterval(&self) -> NSTimeInterval;
196
197 #[unsafe(method(setTimeInterval:))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn setTimeInterval(&self, time_interval: NSTimeInterval);
201
202 #[unsafe(method(minDate))]
203 #[unsafe(method_family = none)]
204 pub unsafe fn minDate(&self) -> Option<Retained<NSDate>>;
205
206 #[unsafe(method(setMinDate:))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn setMinDate(&self, min_date: Option<&NSDate>);
210
211 #[unsafe(method(maxDate))]
212 #[unsafe(method_family = none)]
213 pub unsafe fn maxDate(&self) -> Option<Retained<NSDate>>;
214
215 #[unsafe(method(setMaxDate:))]
217 #[unsafe(method_family = none)]
218 pub unsafe fn setMaxDate(&self, max_date: Option<&NSDate>);
219
220 #[unsafe(method(presentsCalendarOverlay))]
221 #[unsafe(method_family = none)]
222 pub unsafe fn presentsCalendarOverlay(&self) -> bool;
223
224 #[unsafe(method(setPresentsCalendarOverlay:))]
226 #[unsafe(method_family = none)]
227 pub unsafe fn setPresentsCalendarOverlay(&self, presents_calendar_overlay: bool);
228
229 #[cfg(feature = "NSDatePickerCell")]
230 #[unsafe(method(delegate))]
231 #[unsafe(method_family = none)]
232 pub unsafe fn delegate(
233 &self,
234 ) -> Option<Retained<ProtocolObject<dyn NSDatePickerCellDelegate>>>;
235
236 #[cfg(feature = "NSDatePickerCell")]
237 #[unsafe(method(setDelegate:))]
240 #[unsafe(method_family = none)]
241 pub unsafe fn setDelegate(
242 &self,
243 delegate: Option<&ProtocolObject<dyn NSDatePickerCellDelegate>>,
244 );
245 );
246}
247
248#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
250impl NSDatePicker {
251 extern_methods!(
252 #[unsafe(method(initWithFrame:))]
253 #[unsafe(method_family = init)]
254 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
255
256 #[unsafe(method(initWithCoder:))]
257 #[unsafe(method_family = init)]
258 pub unsafe fn initWithCoder(
259 this: Allocated<Self>,
260 coder: &NSCoder,
261 ) -> Option<Retained<Self>>;
262 );
263}
264
265#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
267impl NSDatePicker {
268 extern_methods!(
269 #[unsafe(method(init))]
270 #[unsafe(method_family = init)]
271 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
272 );
273}
274
275#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
277impl NSDatePicker {
278 extern_methods!(
279 #[unsafe(method(new))]
280 #[unsafe(method_family = new)]
281 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
282 );
283}