objc2_clock_kit/generated/
CLKGaugeProvider.rs1use 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 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
17 pub struct CLKGaugeProvider;
18);
19
20extern_conformance!(
21 unsafe impl NSCopying for CLKGaugeProvider {}
22);
23
24unsafe impl CopyingHelper for CLKGaugeProvider {
25 type Result = Self;
26}
27
28extern_conformance!(
29 unsafe impl NSObjectProtocol for CLKGaugeProvider {}
30);
31
32impl CLKGaugeProvider {
33 extern_methods!(
34 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
35 #[unsafe(method(init))]
36 #[unsafe(method_family = init)]
37 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
40 #[unsafe(method(new))]
41 #[unsafe(method_family = new)]
42 pub unsafe fn new() -> Retained<Self>;
43
44 #[cfg(feature = "CLKDefines")]
45 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
46 #[unsafe(method(style))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn style(&self) -> CLKGaugeProviderStyle;
49
50 #[cfg(feature = "objc2-ui-kit")]
51 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
52 #[unsafe(method(gaugeColors))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn gaugeColors(&self) -> Option<Retained<NSArray<UIColor>>>;
55
56 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
57 #[unsafe(method(gaugeColorLocations))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn gaugeColorLocations(&self) -> Option<Retained<NSArray<NSNumber>>>;
60
61 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
63 #[unsafe(method(accessibilityLabel))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn accessibilityLabel(&self) -> Option<Retained<NSString>>;
66
67 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
69 #[unsafe(method(setAccessibilityLabel:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn setAccessibilityLabel(&self, accessibility_label: Option<&NSString>);
72 );
73}
74
75extern_class!(
76 #[unsafe(super(CLKGaugeProvider, NSObject))]
78 #[derive(Debug, PartialEq, Eq, Hash)]
79 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
80 pub struct CLKSimpleGaugeProvider;
81);
82
83extern_conformance!(
84 unsafe impl NSCopying for CLKSimpleGaugeProvider {}
85);
86
87unsafe impl CopyingHelper for CLKSimpleGaugeProvider {
88 type Result = Self;
89}
90
91extern_conformance!(
92 unsafe impl NSObjectProtocol for CLKSimpleGaugeProvider {}
93);
94
95impl CLKSimpleGaugeProvider {
96 extern_methods!(
97 #[cfg(all(feature = "CLKDefines", feature = "objc2-ui-kit"))]
98 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
99 #[unsafe(method(gaugeProviderWithStyle:gaugeColors:gaugeColorLocations:fillFraction:))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn gaugeProviderWithStyle_gaugeColors_gaugeColorLocations_fillFraction(
102 style: CLKGaugeProviderStyle,
103 gauge_colors: Option<&NSArray<UIColor>>,
104 gauge_color_locations: Option<&NSArray<NSNumber>>,
105 fill_fraction: c_float,
106 ) -> Retained<Self>;
107
108 #[cfg(all(feature = "CLKDefines", feature = "objc2-ui-kit"))]
109 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
110 #[unsafe(method(gaugeProviderWithStyle:gaugeColor:fillFraction:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn gaugeProviderWithStyle_gaugeColor_fillFraction(
113 style: CLKGaugeProviderStyle,
114 color: &UIColor,
115 fill_fraction: c_float,
116 ) -> Retained<Self>;
117
118 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
119 #[unsafe(method(fillFraction))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn fillFraction(&self) -> c_float;
122 );
123}
124
125impl CLKSimpleGaugeProvider {
127 extern_methods!(
128 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
129 #[unsafe(method(init))]
130 #[unsafe(method_family = init)]
131 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
132
133 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
134 #[unsafe(method(new))]
135 #[unsafe(method_family = new)]
136 pub unsafe fn new() -> Retained<Self>;
137 );
138}
139
140extern_class!(
141 #[unsafe(super(CLKGaugeProvider, NSObject))]
143 #[derive(Debug, PartialEq, Eq, Hash)]
144 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
145 pub struct CLKTimeIntervalGaugeProvider;
146);
147
148extern_conformance!(
149 unsafe impl NSCopying for CLKTimeIntervalGaugeProvider {}
150);
151
152unsafe impl CopyingHelper for CLKTimeIntervalGaugeProvider {
153 type Result = Self;
154}
155
156extern_conformance!(
157 unsafe impl NSObjectProtocol for CLKTimeIntervalGaugeProvider {}
158);
159
160impl CLKTimeIntervalGaugeProvider {
161 extern_methods!(
162 #[cfg(all(feature = "CLKDefines", feature = "objc2-ui-kit"))]
163 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
164 #[unsafe(method(gaugeProviderWithStyle:gaugeColors:gaugeColorLocations:startDate:endDate:))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn gaugeProviderWithStyle_gaugeColors_gaugeColorLocations_startDate_endDate(
167 style: CLKGaugeProviderStyle,
168 gauge_colors: Option<&NSArray<UIColor>>,
169 gauge_color_locations: Option<&NSArray<NSNumber>>,
170 start_date: &NSDate,
171 end_date: &NSDate,
172 ) -> Retained<Self>;
173
174 #[cfg(all(feature = "CLKDefines", feature = "objc2-ui-kit"))]
175 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
176 #[unsafe(method(gaugeProviderWithStyle:gaugeColors:gaugeColorLocations:startDate:startFillFraction:endDate:endFillFraction:))]
177 #[unsafe(method_family = none)]
178 pub unsafe fn gaugeProviderWithStyle_gaugeColors_gaugeColorLocations_startDate_startFillFraction_endDate_endFillFraction(
179 style: CLKGaugeProviderStyle,
180 gauge_colors: Option<&NSArray<UIColor>>,
181 gauge_color_locations: Option<&NSArray<NSNumber>>,
182 start_date: &NSDate,
183 start_fill_fraction: c_float,
184 end_date: &NSDate,
185 end_fill_fraction: c_float,
186 ) -> Retained<Self>;
187
188 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
189 #[unsafe(method(startDate))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn startDate(&self) -> Retained<NSDate>;
192
193 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
194 #[unsafe(method(endDate))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn endDate(&self) -> Retained<NSDate>;
197
198 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
199 #[unsafe(method(startFillFraction))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn startFillFraction(&self) -> c_float;
202
203 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
204 #[unsafe(method(endFillFraction))]
205 #[unsafe(method_family = none)]
206 pub unsafe fn endFillFraction(&self) -> c_float;
207 );
208}
209
210impl CLKTimeIntervalGaugeProvider {
212 extern_methods!(
213 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
214 #[unsafe(method(init))]
215 #[unsafe(method_family = init)]
216 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
217
218 #[deprecated = "On watchOS 9.0 or later, use WidgetKit instead"]
219 #[unsafe(method(new))]
220 #[unsafe(method_family = new)]
221 pub unsafe fn new() -> Retained<Self>;
222 );
223}