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 unsafe fn datePickerStyle(&self) -> NSDatePickerStyle;
95
96 #[cfg(feature = "NSDatePickerCell")]
97 #[unsafe(method(setDatePickerStyle:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn setDatePickerStyle(&self, date_picker_style: NSDatePickerStyle);
101
102 #[unsafe(method(isBezeled))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn isBezeled(&self) -> bool;
105
106 #[unsafe(method(setBezeled:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn setBezeled(&self, bezeled: bool);
110
111 #[unsafe(method(isBordered))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn isBordered(&self) -> bool;
114
115 #[unsafe(method(setBordered:))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn setBordered(&self, bordered: bool);
119
120 #[unsafe(method(drawsBackground))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn drawsBackground(&self) -> bool;
123
124 #[unsafe(method(setDrawsBackground:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn setDrawsBackground(&self, draws_background: bool);
128
129 #[cfg(feature = "NSColor")]
130 #[unsafe(method(backgroundColor))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn backgroundColor(&self) -> Retained<NSColor>;
133
134 #[cfg(feature = "NSColor")]
135 #[unsafe(method(setBackgroundColor:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn setBackgroundColor(&self, background_color: &NSColor);
139
140 #[cfg(feature = "NSColor")]
141 #[unsafe(method(textColor))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn textColor(&self) -> Retained<NSColor>;
144
145 #[cfg(feature = "NSColor")]
146 #[unsafe(method(setTextColor:))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn setTextColor(&self, text_color: &NSColor);
150
151 #[cfg(feature = "NSDatePickerCell")]
152 #[unsafe(method(datePickerMode))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn datePickerMode(&self) -> NSDatePickerMode;
155
156 #[cfg(feature = "NSDatePickerCell")]
157 #[unsafe(method(setDatePickerMode:))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn setDatePickerMode(&self, date_picker_mode: NSDatePickerMode);
161
162 #[cfg(feature = "NSDatePickerCell")]
163 #[unsafe(method(datePickerElements))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn datePickerElements(&self) -> NSDatePickerElementFlags;
166
167 #[cfg(feature = "NSDatePickerCell")]
168 #[unsafe(method(setDatePickerElements:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn setDatePickerElements(&self, date_picker_elements: NSDatePickerElementFlags);
172
173 #[unsafe(method(calendar))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn calendar(&self) -> Option<Retained<NSCalendar>>;
176
177 #[unsafe(method(setCalendar:))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>);
181
182 #[unsafe(method(locale))]
183 #[unsafe(method_family = none)]
184 pub unsafe fn locale(&self) -> Option<Retained<NSLocale>>;
185
186 #[unsafe(method(setLocale:))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn setLocale(&self, locale: Option<&NSLocale>);
190
191 #[unsafe(method(timeZone))]
192 #[unsafe(method_family = none)]
193 pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
194
195 #[unsafe(method(setTimeZone:))]
197 #[unsafe(method_family = none)]
198 pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);
199
200 #[unsafe(method(dateValue))]
201 #[unsafe(method_family = none)]
202 pub unsafe fn dateValue(&self) -> Retained<NSDate>;
203
204 #[unsafe(method(setDateValue:))]
206 #[unsafe(method_family = none)]
207 pub unsafe fn setDateValue(&self, date_value: &NSDate);
208
209 #[unsafe(method(timeInterval))]
210 #[unsafe(method_family = none)]
211 pub unsafe fn timeInterval(&self) -> NSTimeInterval;
212
213 #[unsafe(method(setTimeInterval:))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn setTimeInterval(&self, time_interval: NSTimeInterval);
217
218 #[unsafe(method(minDate))]
219 #[unsafe(method_family = none)]
220 pub unsafe fn minDate(&self) -> Option<Retained<NSDate>>;
221
222 #[unsafe(method(setMinDate:))]
224 #[unsafe(method_family = none)]
225 pub unsafe fn setMinDate(&self, min_date: Option<&NSDate>);
226
227 #[unsafe(method(maxDate))]
228 #[unsafe(method_family = none)]
229 pub unsafe fn maxDate(&self) -> Option<Retained<NSDate>>;
230
231 #[unsafe(method(setMaxDate:))]
233 #[unsafe(method_family = none)]
234 pub unsafe fn setMaxDate(&self, max_date: Option<&NSDate>);
235
236 #[unsafe(method(presentsCalendarOverlay))]
237 #[unsafe(method_family = none)]
238 pub unsafe fn presentsCalendarOverlay(&self) -> bool;
239
240 #[unsafe(method(setPresentsCalendarOverlay:))]
242 #[unsafe(method_family = none)]
243 pub unsafe fn setPresentsCalendarOverlay(&self, presents_calendar_overlay: bool);
244
245 #[cfg(feature = "NSDatePickerCell")]
246 #[unsafe(method(delegate))]
247 #[unsafe(method_family = none)]
248 pub unsafe fn delegate(
249 &self,
250 ) -> Option<Retained<ProtocolObject<dyn NSDatePickerCellDelegate>>>;
251
252 #[cfg(feature = "NSDatePickerCell")]
253 #[unsafe(method(setDelegate:))]
256 #[unsafe(method_family = none)]
257 pub unsafe fn setDelegate(
258 &self,
259 delegate: Option<&ProtocolObject<dyn NSDatePickerCellDelegate>>,
260 );
261 );
262}
263
264#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
266impl NSDatePicker {
267 extern_methods!(
268 #[unsafe(method(initWithFrame:))]
269 #[unsafe(method_family = init)]
270 pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
271
272 #[unsafe(method(initWithCoder:))]
273 #[unsafe(method_family = init)]
274 pub unsafe fn initWithCoder(
275 this: Allocated<Self>,
276 coder: &NSCoder,
277 ) -> Option<Retained<Self>>;
278 );
279}
280
281#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
283impl NSDatePicker {
284 extern_methods!(
285 #[unsafe(method(init))]
286 #[unsafe(method_family = init)]
287 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
288 );
289}
290
291#[cfg(all(feature = "NSControl", feature = "NSResponder", feature = "NSView"))]
293impl NSDatePicker {
294 extern_methods!(
295 #[unsafe(method(new))]
296 #[unsafe(method_family = new)]
297 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
298 );
299}