objc2-clock-kit 0.3.2

Bindings to the ClockKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clkcomplicationserveractivecomplicationsdidchangenotification?language=objc)
    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
    pub static CLKComplicationServerActiveComplicationsDidChangeNotification: &'static NSString;
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clkcomplicationserver?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
    pub struct CLKComplicationServer;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for CLKComplicationServer {}
);

impl CLKComplicationServer {
    extern_methods!(
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(sharedInstance))]
        #[unsafe(method_family = none)]
        pub unsafe fn sharedInstance() -> Retained<Self>;

        #[cfg(feature = "CLKComplication")]
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(activeComplications))]
        #[unsafe(method_family = none)]
        pub unsafe fn activeComplications(&self) -> Option<Retained<NSArray<CLKComplication>>>;

        #[cfg(feature = "CLKComplication")]
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(reloadTimelineForComplication:))]
        #[unsafe(method_family = none)]
        pub unsafe fn reloadTimelineForComplication(&self, complication: &CLKComplication);

        #[cfg(feature = "CLKComplication")]
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(extendTimelineForComplication:))]
        #[unsafe(method_family = none)]
        pub unsafe fn extendTimelineForComplication(&self, complication: &CLKComplication);

        #[unsafe(method(reloadComplicationDescriptors))]
        #[unsafe(method_family = none)]
        pub unsafe fn reloadComplicationDescriptors(&self);

        #[deprecated = "Time Travel is no longer supported."]
        #[unsafe(method(earliestTimeTravelDate))]
        #[unsafe(method_family = none)]
        pub unsafe fn earliestTimeTravelDate(&self) -> Retained<NSDate>;

        #[deprecated = "Time Travel is no longer supported."]
        #[unsafe(method(latestTimeTravelDate))]
        #[unsafe(method_family = none)]
        pub unsafe fn latestTimeTravelDate(&self) -> Retained<NSDate>;
    );
}

/// Methods declared on superclass `NSObject`.
impl CLKComplicationServer {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}