objc2_clock_kit/generated/
CLKComplication.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clkcomplication?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
14    pub struct CLKComplication;
15);
16
17extern_conformance!(
18    unsafe impl NSCopying for CLKComplication {}
19);
20
21unsafe impl CopyingHelper for CLKComplication {
22    type Result = Self;
23}
24
25extern_conformance!(
26    unsafe impl NSObjectProtocol for CLKComplication {}
27);
28
29impl CLKComplication {
30    extern_methods!(
31        #[cfg(feature = "CLKDefines")]
32        /// The family of this complication.
33        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
34        #[unsafe(method(family))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn family(&self) -> CLKComplicationFamily;
37
38        /// The identifier of this complication.
39        #[unsafe(method(identifier))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn identifier(&self) -> Retained<NSString>;
42
43        /// An optional dictionary, defined in this complication's CLKComplicationDescriptor.
44        #[unsafe(method(userInfo))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
47
48        /// An optional user activity, defined in this complication's CLKComplicationDescriptor.
49        #[unsafe(method(userActivity))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn userActivity(&self) -> Option<Retained<NSUserActivity>>;
52    );
53}
54
55/// Methods declared on superclass `NSObject`.
56impl CLKComplication {
57    extern_methods!(
58        #[unsafe(method(init))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
61
62        #[unsafe(method(new))]
63        #[unsafe(method_family = new)]
64        pub unsafe fn new() -> Retained<Self>;
65    );
66}