objc2_clock_kit/generated/
CLKTextProvider.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-ui-kit")]
8use objc2_ui_kit::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clktextprovider?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
17    pub struct CLKTextProvider;
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for CLKTextProvider {}
22);
23
24unsafe impl CopyingHelper for CLKTextProvider {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for CLKTextProvider {}
30);
31
32impl CLKTextProvider {
33    extern_methods!(
34        #[deprecated = "Use initializers that take parameters."]
35        #[unsafe(method(init))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39        #[deprecated = "Use factory methods that take parameters."]
40        #[unsafe(method(new))]
41        #[unsafe(method_family = new)]
42        pub unsafe fn new() -> Retained<Self>;
43
44        #[cfg(feature = "objc2-ui-kit")]
45        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
46        #[unsafe(method(tintColor))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn tintColor(&self) -> Retained<UIColor>;
49
50        #[cfg(feature = "objc2-ui-kit")]
51        /// Setter for [`tintColor`][Self::tintColor].
52        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
53        #[unsafe(method(setTintColor:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setTintColor(&self, tint_color: &UIColor);
56
57        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
58        #[unsafe(method(accessibilityLabel))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn accessibilityLabel(&self) -> Option<Retained<NSString>>;
61
62        /// Setter for [`accessibilityLabel`][Self::accessibilityLabel].
63        ///
64        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
65        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
66        #[unsafe(method(setAccessibilityLabel:))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn setAccessibilityLabel(&self, accessibility_label: Option<&NSString>);
69    );
70}
71
72extern_class!(
73    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clksimpletextprovider?language=objc)
74    #[unsafe(super(CLKTextProvider, NSObject))]
75    #[derive(Debug, PartialEq, Eq, Hash)]
76    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
77    pub struct CLKSimpleTextProvider;
78);
79
80extern_conformance!(
81    unsafe impl NSCopying for CLKSimpleTextProvider {}
82);
83
84unsafe impl CopyingHelper for CLKSimpleTextProvider {
85    type Result = Self;
86}
87
88extern_conformance!(
89    unsafe impl NSObjectProtocol for CLKSimpleTextProvider {}
90);
91
92impl CLKSimpleTextProvider {
93    extern_methods!(
94        #[unsafe(method(initWithText:))]
95        #[unsafe(method_family = init)]
96        pub unsafe fn initWithText(this: Allocated<Self>, text: &NSString) -> Retained<Self>;
97
98        #[unsafe(method(initWithText:shortText:))]
99        #[unsafe(method_family = init)]
100        pub unsafe fn initWithText_shortText(
101            this: Allocated<Self>,
102            text: &NSString,
103            short_text: Option<&NSString>,
104        ) -> Retained<Self>;
105
106        #[unsafe(method(initWithText:shortText:accessibilityLabel:))]
107        #[unsafe(method_family = init)]
108        pub unsafe fn initWithText_shortText_accessibilityLabel(
109            this: Allocated<Self>,
110            text: &NSString,
111            short_text: Option<&NSString>,
112            accessibility_label: Option<&NSString>,
113        ) -> Retained<Self>;
114
115        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
116        #[unsafe(method(textProviderWithText:))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn textProviderWithText(text: &NSString) -> Retained<Self>;
119
120        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
121        #[unsafe(method(textProviderWithText:shortText:))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn textProviderWithText_shortText(
124            text: &NSString,
125            short_text: Option<&NSString>,
126        ) -> Retained<Self>;
127
128        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
129        #[unsafe(method(textProviderWithText:shortText:accessibilityLabel:))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn textProviderWithText_shortText_accessibilityLabel(
132            text: &NSString,
133            short_text: Option<&NSString>,
134            accessibility_label: Option<&NSString>,
135        ) -> Retained<Self>;
136
137        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
138        #[unsafe(method(text))]
139        #[unsafe(method_family = none)]
140        pub unsafe fn text(&self) -> Retained<NSString>;
141
142        /// Setter for [`text`][Self::text].
143        ///
144        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
145        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
146        #[unsafe(method(setText:))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn setText(&self, text: &NSString);
149
150        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
151        #[unsafe(method(shortText))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn shortText(&self) -> Option<Retained<NSString>>;
154
155        /// Setter for [`shortText`][Self::shortText].
156        ///
157        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
158        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
159        #[unsafe(method(setShortText:))]
160        #[unsafe(method_family = none)]
161        pub unsafe fn setShortText(&self, short_text: Option<&NSString>);
162    );
163}
164
165/// Methods declared on superclass `CLKTextProvider`.
166impl CLKSimpleTextProvider {
167    extern_methods!(
168        #[deprecated = "Use initializers that take parameters."]
169        #[unsafe(method(init))]
170        #[unsafe(method_family = init)]
171        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
172
173        #[deprecated = "Use factory methods that take parameters."]
174        #[unsafe(method(new))]
175        #[unsafe(method_family = new)]
176        pub unsafe fn new() -> Retained<Self>;
177    );
178}
179
180extern_class!(
181    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clkdatetextprovider?language=objc)
182    #[unsafe(super(CLKTextProvider, NSObject))]
183    #[derive(Debug, PartialEq, Eq, Hash)]
184    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
185    pub struct CLKDateTextProvider;
186);
187
188extern_conformance!(
189    unsafe impl NSCopying for CLKDateTextProvider {}
190);
191
192unsafe impl CopyingHelper for CLKDateTextProvider {
193    type Result = Self;
194}
195
196extern_conformance!(
197    unsafe impl NSObjectProtocol for CLKDateTextProvider {}
198);
199
200impl CLKDateTextProvider {
201    extern_methods!(
202        #[unsafe(method(initWithDate:units:))]
203        #[unsafe(method_family = init)]
204        pub unsafe fn initWithDate_units(
205            this: Allocated<Self>,
206            date: &NSDate,
207            calendar_units: NSCalendarUnit,
208        ) -> Retained<Self>;
209
210        #[unsafe(method(initWithDate:units:timeZone:))]
211        #[unsafe(method_family = init)]
212        pub unsafe fn initWithDate_units_timeZone(
213            this: Allocated<Self>,
214            date: &NSDate,
215            calendar_units: NSCalendarUnit,
216            time_zone: Option<&NSTimeZone>,
217        ) -> Retained<Self>;
218
219        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
220        #[unsafe(method(textProviderWithDate:units:))]
221        #[unsafe(method_family = none)]
222        pub unsafe fn textProviderWithDate_units(
223            date: &NSDate,
224            calendar_units: NSCalendarUnit,
225        ) -> Retained<Self>;
226
227        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
228        #[unsafe(method(textProviderWithDate:units:timeZone:))]
229        #[unsafe(method_family = none)]
230        pub unsafe fn textProviderWithDate_units_timeZone(
231            date: &NSDate,
232            calendar_units: NSCalendarUnit,
233            time_zone: Option<&NSTimeZone>,
234        ) -> Retained<Self>;
235
236        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
237        #[unsafe(method(date))]
238        #[unsafe(method_family = none)]
239        pub unsafe fn date(&self) -> Retained<NSDate>;
240
241        /// Setter for [`date`][Self::date].
242        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
243        #[unsafe(method(setDate:))]
244        #[unsafe(method_family = none)]
245        pub unsafe fn setDate(&self, date: &NSDate);
246
247        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
248        #[unsafe(method(calendarUnits))]
249        #[unsafe(method_family = none)]
250        pub unsafe fn calendarUnits(&self) -> NSCalendarUnit;
251
252        /// Setter for [`calendarUnits`][Self::calendarUnits].
253        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
254        #[unsafe(method(setCalendarUnits:))]
255        #[unsafe(method_family = none)]
256        pub unsafe fn setCalendarUnits(&self, calendar_units: NSCalendarUnit);
257
258        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
259        #[unsafe(method(timeZone))]
260        #[unsafe(method_family = none)]
261        pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
262
263        /// Setter for [`timeZone`][Self::timeZone].
264        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
265        #[unsafe(method(setTimeZone:))]
266        #[unsafe(method_family = none)]
267        pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);
268
269        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
270        #[unsafe(method(uppercase))]
271        #[unsafe(method_family = none)]
272        pub unsafe fn uppercase(&self) -> bool;
273
274        /// Setter for [`uppercase`][Self::uppercase].
275        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
276        #[unsafe(method(setUppercase:))]
277        #[unsafe(method_family = none)]
278        pub unsafe fn setUppercase(&self, uppercase: bool);
279    );
280}
281
282/// Methods declared on superclass `CLKTextProvider`.
283impl CLKDateTextProvider {
284    extern_methods!(
285        #[deprecated = "Use initializers that take parameters."]
286        #[unsafe(method(init))]
287        #[unsafe(method_family = init)]
288        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
289
290        #[deprecated = "Use factory methods that take parameters."]
291        #[unsafe(method(new))]
292        #[unsafe(method_family = new)]
293        pub unsafe fn new() -> Retained<Self>;
294    );
295}
296
297extern_class!(
298    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clktimetextprovider?language=objc)
299    #[unsafe(super(CLKTextProvider, NSObject))]
300    #[derive(Debug, PartialEq, Eq, Hash)]
301    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
302    pub struct CLKTimeTextProvider;
303);
304
305extern_conformance!(
306    unsafe impl NSCopying for CLKTimeTextProvider {}
307);
308
309unsafe impl CopyingHelper for CLKTimeTextProvider {
310    type Result = Self;
311}
312
313extern_conformance!(
314    unsafe impl NSObjectProtocol for CLKTimeTextProvider {}
315);
316
317impl CLKTimeTextProvider {
318    extern_methods!(
319        #[unsafe(method(initWithDate:))]
320        #[unsafe(method_family = init)]
321        pub unsafe fn initWithDate(this: Allocated<Self>, date: &NSDate) -> Retained<Self>;
322
323        #[unsafe(method(initWithDate:timeZone:))]
324        #[unsafe(method_family = init)]
325        pub unsafe fn initWithDate_timeZone(
326            this: Allocated<Self>,
327            date: &NSDate,
328            time_zone: Option<&NSTimeZone>,
329        ) -> Retained<Self>;
330
331        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
332        #[unsafe(method(textProviderWithDate:))]
333        #[unsafe(method_family = none)]
334        pub unsafe fn textProviderWithDate(date: &NSDate) -> Retained<Self>;
335
336        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
337        #[unsafe(method(textProviderWithDate:timeZone:))]
338        #[unsafe(method_family = none)]
339        pub unsafe fn textProviderWithDate_timeZone(
340            date: &NSDate,
341            time_zone: Option<&NSTimeZone>,
342        ) -> Retained<Self>;
343
344        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
345        #[unsafe(method(date))]
346        #[unsafe(method_family = none)]
347        pub unsafe fn date(&self) -> Retained<NSDate>;
348
349        /// Setter for [`date`][Self::date].
350        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
351        #[unsafe(method(setDate:))]
352        #[unsafe(method_family = none)]
353        pub unsafe fn setDate(&self, date: &NSDate);
354
355        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
356        #[unsafe(method(timeZone))]
357        #[unsafe(method_family = none)]
358        pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
359
360        /// Setter for [`timeZone`][Self::timeZone].
361        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
362        #[unsafe(method(setTimeZone:))]
363        #[unsafe(method_family = none)]
364        pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);
365    );
366}
367
368/// Methods declared on superclass `CLKTextProvider`.
369impl CLKTimeTextProvider {
370    extern_methods!(
371        #[deprecated = "Use initializers that take parameters."]
372        #[unsafe(method(init))]
373        #[unsafe(method_family = init)]
374        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
375
376        #[deprecated = "Use factory methods that take parameters."]
377        #[unsafe(method(new))]
378        #[unsafe(method_family = new)]
379        pub unsafe fn new() -> Retained<Self>;
380    );
381}
382
383extern_class!(
384    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clktimeintervaltextprovider?language=objc)
385    #[unsafe(super(CLKTextProvider, NSObject))]
386    #[derive(Debug, PartialEq, Eq, Hash)]
387    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
388    pub struct CLKTimeIntervalTextProvider;
389);
390
391extern_conformance!(
392    unsafe impl NSCopying for CLKTimeIntervalTextProvider {}
393);
394
395unsafe impl CopyingHelper for CLKTimeIntervalTextProvider {
396    type Result = Self;
397}
398
399extern_conformance!(
400    unsafe impl NSObjectProtocol for CLKTimeIntervalTextProvider {}
401);
402
403impl CLKTimeIntervalTextProvider {
404    extern_methods!(
405        #[unsafe(method(initWithStartDate:endDate:))]
406        #[unsafe(method_family = init)]
407        pub unsafe fn initWithStartDate_endDate(
408            this: Allocated<Self>,
409            start_date: &NSDate,
410            end_date: &NSDate,
411        ) -> Retained<Self>;
412
413        #[unsafe(method(initWithStartDate:endDate:timeZone:))]
414        #[unsafe(method_family = init)]
415        pub unsafe fn initWithStartDate_endDate_timeZone(
416            this: Allocated<Self>,
417            start_date: &NSDate,
418            end_date: &NSDate,
419            time_zone: Option<&NSTimeZone>,
420        ) -> Retained<Self>;
421
422        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
423        #[unsafe(method(textProviderWithStartDate:endDate:))]
424        #[unsafe(method_family = none)]
425        pub unsafe fn textProviderWithStartDate_endDate(
426            start_date: &NSDate,
427            end_date: &NSDate,
428        ) -> Retained<Self>;
429
430        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
431        #[unsafe(method(textProviderWithStartDate:endDate:timeZone:))]
432        #[unsafe(method_family = none)]
433        pub unsafe fn textProviderWithStartDate_endDate_timeZone(
434            start_date: &NSDate,
435            end_date: &NSDate,
436            time_zone: Option<&NSTimeZone>,
437        ) -> Retained<Self>;
438
439        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
440        #[unsafe(method(startDate))]
441        #[unsafe(method_family = none)]
442        pub unsafe fn startDate(&self) -> Retained<NSDate>;
443
444        /// Setter for [`startDate`][Self::startDate].
445        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
446        #[unsafe(method(setStartDate:))]
447        #[unsafe(method_family = none)]
448        pub unsafe fn setStartDate(&self, start_date: &NSDate);
449
450        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
451        #[unsafe(method(endDate))]
452        #[unsafe(method_family = none)]
453        pub unsafe fn endDate(&self) -> Retained<NSDate>;
454
455        /// Setter for [`endDate`][Self::endDate].
456        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
457        #[unsafe(method(setEndDate:))]
458        #[unsafe(method_family = none)]
459        pub unsafe fn setEndDate(&self, end_date: &NSDate);
460
461        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
462        #[unsafe(method(timeZone))]
463        #[unsafe(method_family = none)]
464        pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
465
466        /// Setter for [`timeZone`][Self::timeZone].
467        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
468        #[unsafe(method(setTimeZone:))]
469        #[unsafe(method_family = none)]
470        pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);
471    );
472}
473
474/// Methods declared on superclass `CLKTextProvider`.
475impl CLKTimeIntervalTextProvider {
476    extern_methods!(
477        #[deprecated = "Use initializers that take parameters."]
478        #[unsafe(method(init))]
479        #[unsafe(method_family = init)]
480        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
481
482        #[deprecated = "Use factory methods that take parameters."]
483        #[unsafe(method(new))]
484        #[unsafe(method_family = new)]
485        pub unsafe fn new() -> Retained<Self>;
486    );
487}
488
489/// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clkrelativedatestyle?language=objc)
490// NS_ENUM
491#[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
492#[repr(transparent)]
493#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
494pub struct CLKRelativeDateStyle(pub NSInteger);
495impl CLKRelativeDateStyle {
496    #[doc(alias = "CLKRelativeDateStyleNatural")]
497    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
498    pub const Natural: Self = Self(0);
499    #[doc(alias = "CLKRelativeDateStyleOffset")]
500    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
501    pub const Offset: Self = Self(1);
502    #[doc(alias = "CLKRelativeDateStyleTimer")]
503    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
504    pub const Timer: Self = Self(2);
505    #[doc(alias = "CLKRelativeDateStyleNaturalAbbreviated")]
506    pub const NaturalAbbreviated: Self = Self(3);
507    #[doc(alias = "CLKRelativeDateStyleOffsetShort")]
508    pub const OffsetShort: Self = Self(4);
509    #[doc(alias = "CLKRelativeDateStyleNaturalFull")]
510    pub const NaturalFull: Self = Self(5);
511}
512
513unsafe impl Encode for CLKRelativeDateStyle {
514    const ENCODING: Encoding = NSInteger::ENCODING;
515}
516
517unsafe impl RefEncode for CLKRelativeDateStyle {
518    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
519}
520
521extern_class!(
522    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clkrelativedatetextprovider?language=objc)
523    #[unsafe(super(CLKTextProvider, NSObject))]
524    #[derive(Debug, PartialEq, Eq, Hash)]
525    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
526    pub struct CLKRelativeDateTextProvider;
527);
528
529extern_conformance!(
530    unsafe impl NSCopying for CLKRelativeDateTextProvider {}
531);
532
533unsafe impl CopyingHelper for CLKRelativeDateTextProvider {
534    type Result = Self;
535}
536
537extern_conformance!(
538    unsafe impl NSObjectProtocol for CLKRelativeDateTextProvider {}
539);
540
541impl CLKRelativeDateTextProvider {
542    extern_methods!(
543        #[unsafe(method(initWithDate:style:units:))]
544        #[unsafe(method_family = init)]
545        pub unsafe fn initWithDate_style_units(
546            this: Allocated<Self>,
547            date: &NSDate,
548            style: CLKRelativeDateStyle,
549            calendar_units: NSCalendarUnit,
550        ) -> Retained<Self>;
551
552        #[unsafe(method(initWithDate:relativeToDate:style:units:))]
553        #[unsafe(method_family = init)]
554        pub unsafe fn initWithDate_relativeToDate_style_units(
555            this: Allocated<Self>,
556            date: &NSDate,
557            relative_date: Option<&NSDate>,
558            style: CLKRelativeDateStyle,
559            calendar_units: NSCalendarUnit,
560        ) -> Retained<Self>;
561
562        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
563        #[unsafe(method(textProviderWithDate:style:units:))]
564        #[unsafe(method_family = none)]
565        pub unsafe fn textProviderWithDate_style_units(
566            date: &NSDate,
567            style: CLKRelativeDateStyle,
568            calendar_units: NSCalendarUnit,
569        ) -> Retained<Self>;
570
571        #[unsafe(method(textProviderWithDate:relativeToDate:style:units:))]
572        #[unsafe(method_family = none)]
573        pub unsafe fn textProviderWithDate_relativeToDate_style_units(
574            date: &NSDate,
575            relative_to_date: Option<&NSDate>,
576            style: CLKRelativeDateStyle,
577            calendar_units: NSCalendarUnit,
578        ) -> Retained<Self>;
579
580        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
581        #[unsafe(method(date))]
582        #[unsafe(method_family = none)]
583        pub unsafe fn date(&self) -> Retained<NSDate>;
584
585        /// Setter for [`date`][Self::date].
586        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
587        #[unsafe(method(setDate:))]
588        #[unsafe(method_family = none)]
589        pub unsafe fn setDate(&self, date: &NSDate);
590
591        #[unsafe(method(relativeToDate))]
592        #[unsafe(method_family = none)]
593        pub unsafe fn relativeToDate(&self) -> Option<Retained<NSDate>>;
594
595        /// Setter for [`relativeToDate`][Self::relativeToDate].
596        #[unsafe(method(setRelativeToDate:))]
597        #[unsafe(method_family = none)]
598        pub unsafe fn setRelativeToDate(&self, relative_to_date: Option<&NSDate>);
599
600        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
601        #[unsafe(method(relativeDateStyle))]
602        #[unsafe(method_family = none)]
603        pub unsafe fn relativeDateStyle(&self) -> CLKRelativeDateStyle;
604
605        /// Setter for [`relativeDateStyle`][Self::relativeDateStyle].
606        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
607        #[unsafe(method(setRelativeDateStyle:))]
608        #[unsafe(method_family = none)]
609        pub unsafe fn setRelativeDateStyle(&self, relative_date_style: CLKRelativeDateStyle);
610
611        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
612        #[unsafe(method(calendarUnits))]
613        #[unsafe(method_family = none)]
614        pub unsafe fn calendarUnits(&self) -> NSCalendarUnit;
615
616        /// Setter for [`calendarUnits`][Self::calendarUnits].
617        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
618        #[unsafe(method(setCalendarUnits:))]
619        #[unsafe(method_family = none)]
620        pub unsafe fn setCalendarUnits(&self, calendar_units: NSCalendarUnit);
621    );
622}
623
624/// Methods declared on superclass `CLKTextProvider`.
625impl CLKRelativeDateTextProvider {
626    extern_methods!(
627        #[deprecated = "Use initializers that take parameters."]
628        #[unsafe(method(init))]
629        #[unsafe(method_family = init)]
630        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
631
632        #[deprecated = "Use factory methods that take parameters."]
633        #[unsafe(method(new))]
634        #[unsafe(method_family = new)]
635        pub unsafe fn new() -> Retained<Self>;
636    );
637}
638
639/// Localizable.
640#[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
641impl CLKTextProvider {
642    extern_methods!(
643        #[unsafe(method(localizableTextProviderWithStringsFileTextKey:))]
644        #[unsafe(method_family = none)]
645        pub unsafe fn localizableTextProviderWithStringsFileTextKey(
646            text_key: &NSString,
647        ) -> Retained<Self>;
648
649        #[unsafe(method(localizableTextProviderWithStringsFileTextKey:shortTextKey:))]
650        #[unsafe(method_family = none)]
651        pub unsafe fn localizableTextProviderWithStringsFileTextKey_shortTextKey(
652            text_key: &NSString,
653            short_text_key: Option<&NSString>,
654        ) -> Retained<Self>;
655
656        #[unsafe(method(localizableTextProviderWithStringsFileFormatKey:textProviders:))]
657        #[unsafe(method_family = none)]
658        pub unsafe fn localizableTextProviderWithStringsFileFormatKey_textProviders(
659            format_key: &NSString,
660            text_providers: &NSArray<CLKTextProvider>,
661        ) -> Retained<Self>;
662    );
663}