objc2_clock_kit/generated/
CLKComplicationServer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern "C" {
11 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
13 pub static CLKComplicationServerActiveComplicationsDidChangeNotification: &'static NSString;
14}
15
16extern_class!(
17 #[unsafe(super(NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
21 pub struct CLKComplicationServer;
22);
23
24extern_conformance!(
25 unsafe impl NSObjectProtocol for CLKComplicationServer {}
26);
27
28impl CLKComplicationServer {
29 extern_methods!(
30 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
31 #[unsafe(method(sharedInstance))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn sharedInstance() -> Retained<Self>;
34
35 #[cfg(feature = "CLKComplication")]
36 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
37 #[unsafe(method(activeComplications))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn activeComplications(&self) -> Option<Retained<NSArray<CLKComplication>>>;
40
41 #[cfg(feature = "CLKComplication")]
42 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
43 #[unsafe(method(reloadTimelineForComplication:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn reloadTimelineForComplication(&self, complication: &CLKComplication);
46
47 #[cfg(feature = "CLKComplication")]
48 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
49 #[unsafe(method(extendTimelineForComplication:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn extendTimelineForComplication(&self, complication: &CLKComplication);
52
53 #[unsafe(method(reloadComplicationDescriptors))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn reloadComplicationDescriptors(&self);
56
57 #[deprecated = "Time Travel is no longer supported."]
58 #[unsafe(method(earliestTimeTravelDate))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn earliestTimeTravelDate(&self) -> Retained<NSDate>;
61
62 #[deprecated = "Time Travel is no longer supported."]
63 #[unsafe(method(latestTimeTravelDate))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn latestTimeTravelDate(&self) -> Retained<NSDate>;
66 );
67}
68
69impl CLKComplicationServer {
71 extern_methods!(
72 #[unsafe(method(init))]
73 #[unsafe(method_family = init)]
74 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
75
76 #[unsafe(method(new))]
77 #[unsafe(method_family = new)]
78 pub unsafe fn new() -> Retained<Self>;
79 );
80}