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::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

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

extern_conformance!(
    unsafe impl NSCopying for CLKComplication {}
);

unsafe impl CopyingHelper for CLKComplication {
    type Result = Self;
}

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

impl CLKComplication {
    extern_methods!(
        #[cfg(feature = "CLKDefines")]
        /// The family of this complication.
        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
        #[unsafe(method(family))]
        #[unsafe(method_family = none)]
        pub unsafe fn family(&self) -> CLKComplicationFamily;

        /// The identifier of this complication.
        #[unsafe(method(identifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn identifier(&self) -> Retained<NSString>;

        /// An optional dictionary, defined in this complication's CLKComplicationDescriptor.
        #[unsafe(method(userInfo))]
        #[unsafe(method_family = none)]
        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;

        /// An optional user activity, defined in this complication's CLKComplicationDescriptor.
        #[unsafe(method(userActivity))]
        #[unsafe(method_family = none)]
        pub unsafe fn userActivity(&self) -> Option<Retained<NSUserActivity>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl CLKComplication {
    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>;
    );
}