objc2_clock_kit/generated/
CLKComplicationDescriptor.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/clkcomplicationdescriptor?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct CLKComplicationDescriptor;
14);
15
16extern_conformance!(
17    unsafe impl NSObjectProtocol for CLKComplicationDescriptor {}
18);
19
20impl CLKComplicationDescriptor {
21    extern_methods!(
22        /// Identifies this complication.
23        #[unsafe(method(identifier))]
24        #[unsafe(method_family = none)]
25        pub unsafe fn identifier(&self) -> Retained<NSString>;
26
27        /// The display name for this complication.
28        /// This will be displayed when editing complications of a watch face.
29        #[unsafe(method(displayName))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn displayName(&self) -> Retained<NSString>;
32
33        /// An array of `CLKComplicationFamily`s that this complication supports.
34        #[unsafe(method(supportedFamilies))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn supportedFamilies(&self) -> Retained<NSArray<NSNumber>>;
37
38        /// An optional dictionary that can be used to pass information back to your extension via CLKComplication.
39        #[unsafe(method(userInfo))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
42
43        /// An optional user activity that can be used to pass information back to your extension via CLKComplication.
44        /// This activity will be used to launch your app when the complication is tapped on.
45        #[unsafe(method(userActivity))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn userActivity(&self) -> Option<Retained<NSUserActivity>>;
48
49        #[unsafe(method(init))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
52
53        #[unsafe(method(new))]
54        #[unsafe(method_family = new)]
55        pub unsafe fn new() -> Retained<Self>;
56
57        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
58        #[unsafe(method(initWithIdentifier:displayName:supportedFamilies:))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn initWithIdentifier_displayName_supportedFamilies(
61            this: Allocated<Self>,
62            identifier: &NSString,
63            display_name: &NSString,
64            supported_families: &NSArray<NSNumber>,
65        ) -> Retained<Self>;
66
67        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
68        #[unsafe(method(initWithIdentifier:displayName:supportedFamilies:userInfo:))]
69        #[unsafe(method_family = init)]
70        pub unsafe fn initWithIdentifier_displayName_supportedFamilies_userInfo(
71            this: Allocated<Self>,
72            identifier: &NSString,
73            display_name: &NSString,
74            supported_families: &NSArray<NSNumber>,
75            user_info: &NSDictionary,
76        ) -> Retained<Self>;
77
78        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
79        #[unsafe(method(initWithIdentifier:displayName:supportedFamilies:userActivity:))]
80        #[unsafe(method_family = init)]
81        pub unsafe fn initWithIdentifier_displayName_supportedFamilies_userActivity(
82            this: Allocated<Self>,
83            identifier: &NSString,
84            display_name: &NSString,
85            supported_families: &NSArray<NSNumber>,
86            user_activity: &NSUserActivity,
87        ) -> Retained<Self>;
88    );
89}