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))]
24extern_conformance!(
25 unsafe impl NSAccessibility for NSDatePicker {}
26);
27
28#[cfg(all(
29 feature = "NSAccessibilityProtocols",
30 feature = "NSControl",
31 feature = "NSResponder",
32 feature = "NSView"
33))]
34extern_conformance!(
35 unsafe impl NSAccessibilityElementProtocol for NSDatePicker {}
36);
37
38#[cfg(all(
39 feature = "NSAnimation",
40 feature = "NSControl",
41 feature = "NSResponder",
42 feature = "NSView"
43))]
44extern_conformance!(
45 unsafe impl NSAnimatablePropertyContainer for NSDatePicker {}
46);
47
48#[cfg(all(
49 feature = "NSAppearance",
50 feature = "NSControl",
51 feature = "NSResponder",
52 feature = "NSView"
53))]
54extern_conformance!(
55 unsafe impl NSAppearanceCustomization for NSDatePicker {}
56);
57
58#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
59extern_conformance!(
60 unsafe impl NSCoding for NSDatePicker {}
61);
62
63#[cfg(all(
64 feature = "NSControl",
65 feature = "NSDragging",
66 feature = "NSResponder",
67 feature = "NSView"
68))]
69extern_conformance!(
70 unsafe impl NSDraggingDestination for NSDatePicker {}
71);
72
73#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
74extern_conformance!(
75 unsafe impl NSObjectProtocol for NSDatePicker {}
76);
77
78#[cfg(all(
79 feature = "NSControl",
80 feature = "NSResponder",
81 feature = "NSUserInterfaceItemIdentification",
82 feature = "NSView"
83))]
84extern_conformance!(
85 unsafe impl NSUserInterfaceItemIdentification for NSDatePicker {}
86);
87
88#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
89impl NSDatePicker {
90 extern_methods!(
91 #[cfg(feature = "NSDatePickerCell")]
92 #[unsafe(method(datePickerStyle))]
93 #[unsafe(method_family = none)]
94 pub fn datePickerStyle(&self) -> NSDatePickerStyle;
95
96 #[cfg(feature = "NSDatePickerCell")]
97 #[unsafe(method(setDatePickerStyle:))]
99 #[unsafe(method_family = none)]
100 pub fn setDatePickerStyle(&self, date_picker_style: NSDatePickerStyle);
101
102 #[unsafe(method(isBezeled))]
103 #[unsafe(method_family = none)]
104 pub fn isBezeled(&self) -> bool;
105
106 #[unsafe(method(setBezeled:))]
108 #[unsafe(method_family = none)]
109 pub fn setBezeled(&self, bezeled: bool);
110
111 #[unsafe(method(isBordered))]
112 #[unsafe(method_family = none)]
113 pub fn isBordered(&self) -> bool;
114
115 #[unsafe(method(setBordered:))]
117 #[unsafe(method_family = none)]
118 pub fn setBordered(&self, bordered: bool);
119
120 #[unsafe(method(drawsBackground))]
121 #[unsafe(method_family = none)]
122 pub fn drawsBackground(&self) -> bool;
123
124 #[unsafe(method(setDrawsBackground:))]
126 #[unsafe(method_family = none)]
127 pub fn setDrawsBackground(&self, draws_background: bool);
128
129 #[cfg(feature = "NSColor")]
130 #[unsafe(method(backgroundColor))]
131 #[unsafe(method_family = none)]
132 pub fn backgroundColor(&self) -> Retained<NSColor>;
133
134 #[cfg(feature = "NSColor")]
135 #[unsafe(method(setBackgroundColor:))]
139 #[unsafe(method_family = none)]
140 pub fn setBackgroundColor(&self, background_color: &NSColor);
141
142 #[cfg(feature = "NSColor")]
143 #[unsafe(method(textColor))]
144 #[unsafe(method_family = none)]
145 pub fn textColor(&self) -> Retained<NSColor>;
146
147 #[cfg(feature = "NSColor")]
148 #[unsafe(method(setTextColor:))]
152 #[unsafe(method_family = none)]
153 pub fn setTextColor(&self, text_color: &NSColor);
154
155 #[cfg(feature = "NSDatePickerCell")]
156 #[unsafe(method(datePickerMode))]
157 #[unsafe(method_family = none)]
158 pub fn datePickerMode(&self) -> NSDatePickerMode;
159
160 #[cfg(feature = "NSDatePickerCell")]
161 #[unsafe(method(setDatePickerMode:))]
163 #[unsafe(method_family = none)]
164 pub fn setDatePickerMode(&self, date_picker_mode: NSDatePickerMode);
165
166 #[cfg(feature = "NSDatePickerCell")]
167 #[unsafe(method(datePickerElements))]
168 #[unsafe(method_family = none)]
169 pub fn datePickerElements(&self) -> NSDatePickerElementFlags;
170
171 #[cfg(feature = "NSDatePickerCell")]
172 #[unsafe(method(setDatePickerElements:))]
174 #[unsafe(method_family = none)]
175 pub fn setDatePickerElements(&self, date_picker_elements: NSDatePickerElementFlags);
176
177 #[unsafe(method(calendar))]
178 #[unsafe(method_family = none)]
179 pub fn calendar(&self) -> Option<Retained<NSCalendar>>;
180
181 #[unsafe(method(setCalendar:))]
185 #[unsafe(method_family = none)]
186 pub fn setCalendar(&self, calendar: Option<&NSCalendar>);
187
188 #[unsafe(method(locale))]
189 #[unsafe(method_family = none)]
190 pub fn locale(&self) -> Option<Retained<NSLocale>>;
191
192 #[unsafe(method(setLocale:))]
196 #[unsafe(method_family = none)]
197 pub fn setLocale(&self, locale: Option<&NSLocale>);
198
199 #[unsafe(method(timeZone))]
200 #[unsafe(method_family = none)]
201 pub fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
202
203 #[unsafe(method(setTimeZone:))]
207 #[unsafe(method_family = none)]
208 pub fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);
209
210 #[unsafe(method(dateValue))]
211 #[unsafe(method_family = none)]
212 pub fn dateValue(&self) -> Retained<NSDate>;
213
214 #[unsafe(method(setDateValue:))]
218 #[unsafe(method_family = none)]
219 pub fn setDateValue(&self, date_value: &NSDate);
220
221 #[unsafe(method(timeInterval))]
222 #[unsafe(method_family = none)]
223 pub fn timeInterval(&self) -> NSTimeInterval;
224
225 #[unsafe(method(setTimeInterval:))]
227 #[unsafe(method_family = none)]
228 pub fn setTimeInterval(&self, time_interval: NSTimeInterval);
229
230 #[unsafe(method(minDate))]
231 #[unsafe(method_family = none)]
232 pub fn minDate(&self) -> Option<Retained<NSDate>>;
233
234 #[unsafe(method(setMinDate:))]
238 #[unsafe(method_family = none)]
239 pub fn setMinDate(&self, min_date: Option<&NSDate>);
240
241 #[unsafe(method(maxDate))]
242 #[unsafe(method_family = none)]
243 pub fn maxDate(&self) -> Option<Retained<NSDate>>;
244
245 #[unsafe(method(setMaxDate:))]
249 #[unsafe(method_family = none)]
250 pub fn setMaxDate(&self, max_date: Option<&NSDate>);
251
252 #[unsafe(method(presentsCalendarOverlay))]
253 #[unsafe(method_family = none)]
254 pub fn presentsCalendarOverlay(&self) -> bool;
255
256 #[unsafe(method(setPresentsCalendarOverlay:))]
258 #[unsafe(method_family = none)]
259 pub fn setPresentsCalendarOverlay(&self, presents_calendar_overlay: bool);
260
261 #[cfg(feature = "NSDatePickerCell")]
262 #[unsafe(method(delegate))]
263 #[unsafe(method_family = none)]
264 pub fn delegate(&self) -> Option<Retained<ProtocolObject<dyn NSDatePickerCellDelegate>>>;
265
266 #[cfg(feature = "NSDatePickerCell")]
267 #[unsafe(method(setDelegate:))]
271 #[unsafe(method_family = none)]
272 pub fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn NSDatePickerCellDelegate>>);
273 );
274}
275
276#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
278impl NSDatePicker {
279 extern_methods!(
280 #[unsafe(method(initWithFrame:))]
281 #[unsafe(method_family = init)]
282 pub fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
283
284 #[unsafe(method(initWithCoder:))]
288 #[unsafe(method_family = init)]
289 pub unsafe fn initWithCoder(
290 this: Allocated<Self>,
291 coder: &NSCoder,
292 ) -> Option<Retained<Self>>;
293 );
294}
295
296#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
298impl NSDatePicker {
299 extern_methods!(
300 #[unsafe(method(init))]
301 #[unsafe(method_family = init)]
302 pub fn init(this: Allocated<Self>) -> Retained<Self>;
303 );
304}
305
306#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
308impl NSDatePicker {
309 extern_methods!(
310 #[unsafe(method(new))]
311 #[unsafe(method_family = new)]
312 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
313 );
314}