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
16unsafe impl Send for CLKComplicationDescriptor {}
17
18unsafe impl Sync for CLKComplicationDescriptor {}
19
20extern_conformance!(
21    unsafe impl NSObjectProtocol for CLKComplicationDescriptor {}
22);
23
24impl CLKComplicationDescriptor {
25    extern_methods!(
26        /// Identifies this complication.
27        ///
28        /// This property is not atomic.
29        ///
30        /// # Safety
31        ///
32        /// This might not be thread-safe.
33        #[unsafe(method(identifier))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn identifier(&self) -> Retained<NSString>;
36
37        /// The display name for this complication.
38        /// This will be displayed when editing complications of a watch face.
39        ///
40        /// This property is not atomic.
41        ///
42        /// # Safety
43        ///
44        /// This might not be thread-safe.
45        #[unsafe(method(displayName))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn displayName(&self) -> Retained<NSString>;
48
49        /// An array of `CLKComplicationFamily`s that this complication supports.
50        ///
51        /// This property is not atomic.
52        ///
53        /// # Safety
54        ///
55        /// This might not be thread-safe.
56        #[unsafe(method(supportedFamilies))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn supportedFamilies(&self) -> Retained<NSArray<NSNumber>>;
59
60        /// An optional dictionary that can be used to pass information back to your extension via CLKComplication.
61        ///
62        /// This property is not atomic.
63        ///
64        /// # Safety
65        ///
66        /// This might not be thread-safe.
67        #[unsafe(method(userInfo))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
70
71        /// An optional user activity that can be used to pass information back to your extension via CLKComplication.
72        /// This activity will be used to launch your app when the complication is tapped on.
73        ///
74        /// This property is not atomic.
75        ///
76        /// # Safety
77        ///
78        /// This might not be thread-safe.
79        #[unsafe(method(userActivity))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn userActivity(&self) -> Option<Retained<NSUserActivity>>;
82
83        #[unsafe(method(init))]
84        #[unsafe(method_family = init)]
85        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
86
87        #[unsafe(method(new))]
88        #[unsafe(method_family = new)]
89        pub unsafe fn new() -> Retained<Self>;
90
91        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
92        #[unsafe(method(initWithIdentifier:displayName:supportedFamilies:))]
93        #[unsafe(method_family = init)]
94        pub unsafe fn initWithIdentifier_displayName_supportedFamilies(
95            this: Allocated<Self>,
96            identifier: &NSString,
97            display_name: &NSString,
98            supported_families: &NSArray<NSNumber>,
99        ) -> Retained<Self>;
100
101        /// # Safety
102        ///
103        /// `user_info` generic should be of the correct type.
104        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
105        #[unsafe(method(initWithIdentifier:displayName:supportedFamilies:userInfo:))]
106        #[unsafe(method_family = init)]
107        pub unsafe fn initWithIdentifier_displayName_supportedFamilies_userInfo(
108            this: Allocated<Self>,
109            identifier: &NSString,
110            display_name: &NSString,
111            supported_families: &NSArray<NSNumber>,
112            user_info: &NSDictionary,
113        ) -> Retained<Self>;
114
115        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
116        #[unsafe(method(initWithIdentifier:displayName:supportedFamilies:userActivity:))]
117        #[unsafe(method_family = init)]
118        pub unsafe fn initWithIdentifier_displayName_supportedFamilies_userActivity(
119            this: Allocated<Self>,
120            identifier: &NSString,
121            display_name: &NSString,
122            supported_families: &NSArray<NSNumber>,
123            user_activity: &NSUserActivity,
124        ) -> Retained<Self>;
125    );
126}