objc2_clock_kit/generated/
CLKImageProvider.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-ui-kit")]
8use objc2_ui_kit::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/clockkit/clkimageprovider?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
17    pub struct CLKImageProvider;
18);
19
20extern_conformance!(
21    unsafe impl NSCopying for CLKImageProvider {}
22);
23
24unsafe impl CopyingHelper for CLKImageProvider {
25    type Result = Self;
26}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for CLKImageProvider {}
30);
31
32impl CLKImageProvider {
33    extern_methods!(
34        #[deprecated = "Use initializers that take parameters."]
35        #[unsafe(method(init))]
36        #[unsafe(method_family = init)]
37        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39        #[deprecated = "Use factory methods that take parameters."]
40        #[unsafe(method(new))]
41        #[unsafe(method_family = new)]
42        pub unsafe fn new() -> Retained<Self>;
43
44        #[cfg(feature = "objc2-ui-kit")]
45        #[unsafe(method(initWithOnePieceImage:))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn initWithOnePieceImage(
48            this: Allocated<Self>,
49            one_piece_image: &UIImage,
50        ) -> Retained<Self>;
51
52        #[cfg(feature = "objc2-ui-kit")]
53        #[unsafe(method(initWithOnePieceImage:twoPieceImageBackground:twoPieceImageForeground:))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn initWithOnePieceImage_twoPieceImageBackground_twoPieceImageForeground(
56            this: Allocated<Self>,
57            one_piece_image: &UIImage,
58            two_piece_image_background: Option<&UIImage>,
59            two_piece_image_foreground: Option<&UIImage>,
60        ) -> Retained<Self>;
61
62        #[cfg(feature = "objc2-ui-kit")]
63        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
64        #[unsafe(method(imageProviderWithOnePieceImage:))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn imageProviderWithOnePieceImage(one_piece_image: &UIImage) -> Retained<Self>;
67
68        #[cfg(feature = "objc2-ui-kit")]
69        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
70        #[unsafe(method(imageProviderWithOnePieceImage:twoPieceImageBackground:twoPieceImageForeground:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn imageProviderWithOnePieceImage_twoPieceImageBackground_twoPieceImageForeground(
73            one_piece_image: &UIImage,
74            two_piece_image_background: Option<&UIImage>,
75            two_piece_image_foreground: Option<&UIImage>,
76        ) -> Retained<Self>;
77
78        #[cfg(feature = "objc2-ui-kit")]
79        /// Image to be used in single-color contexts, e.g. single-color faces.
80        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
81        #[unsafe(method(onePieceImage))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn onePieceImage(&self) -> Retained<UIImage>;
84
85        #[cfg(feature = "objc2-ui-kit")]
86        /// Setter for [`onePieceImage`][Self::onePieceImage].
87        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
88        #[unsafe(method(setOnePieceImage:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setOnePieceImage(&self, one_piece_image: &UIImage);
91
92        #[cfg(feature = "objc2-ui-kit")]
93        /// Tint color, honored in multicolor contexts.
94        /// Not honored for tinted graphic complications.
95        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
96        #[unsafe(method(tintColor))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn tintColor(&self) -> Option<Retained<UIColor>>;
99
100        #[cfg(feature = "objc2-ui-kit")]
101        /// Setter for [`tintColor`][Self::tintColor].
102        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
103        #[unsafe(method(setTintColor:))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn setTintColor(&self, tint_color: Option<&UIColor>);
106
107        #[cfg(feature = "objc2-ui-kit")]
108        /// Background image to be used in multicolor or tinted contexts, e.g. multicolor modular, tinted graphic complications.
109        /// If supplied, a twoPieceImageForeground is required as well.
110        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
111        #[unsafe(method(twoPieceImageBackground))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn twoPieceImageBackground(&self) -> Option<Retained<UIImage>>;
114
115        #[cfg(feature = "objc2-ui-kit")]
116        /// Setter for [`twoPieceImageBackground`][Self::twoPieceImageBackground].
117        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
118        #[unsafe(method(setTwoPieceImageBackground:))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn setTwoPieceImageBackground(
121            &self,
122            two_piece_image_background: Option<&UIImage>,
123        );
124
125        #[cfg(feature = "objc2-ui-kit")]
126        /// Foreground image to be used in multicolor or tinted contexts.
127        /// Overlaid on top of twoPieceImageBackground.
128        /// If supplied, a twoPieceImageBackground is required as well.
129        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
130        #[unsafe(method(twoPieceImageForeground))]
131        #[unsafe(method_family = none)]
132        pub unsafe fn twoPieceImageForeground(&self) -> Option<Retained<UIImage>>;
133
134        #[cfg(feature = "objc2-ui-kit")]
135        /// Setter for [`twoPieceImageForeground`][Self::twoPieceImageForeground].
136        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
137        #[unsafe(method(setTwoPieceImageForeground:))]
138        #[unsafe(method_family = none)]
139        pub unsafe fn setTwoPieceImageForeground(
140            &self,
141            two_piece_image_foreground: Option<&UIImage>,
142        );
143
144        /// Text for accessibility.
145        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
146        #[unsafe(method(accessibilityLabel))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn accessibilityLabel(&self) -> Option<Retained<NSString>>;
149
150        /// Setter for [`accessibilityLabel`][Self::accessibilityLabel].
151        #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
152        #[unsafe(method(setAccessibilityLabel:))]
153        #[unsafe(method_family = none)]
154        pub unsafe fn setAccessibilityLabel(&self, accessibility_label: Option<&NSString>);
155    );
156}