• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit ArkUI
19 */
20
21/**
22 * Counter component, which provides corresponding increment or decrement counting operations.
23 *
24 * @interface CounterInterface
25 * @syscap SystemCapability.ArkUI.ArkUI.Full
26 * @since 7
27 */
28/**
29 * Counter component, which provides corresponding increment or decrement counting operations.
30 *
31 * @interface CounterInterface
32 * @syscap SystemCapability.ArkUI.ArkUI.Full
33 * @form
34 * @since 9
35 */
36/**
37 * Counter component, which provides corresponding increment or decrement counting operations.
38 *
39 * @interface CounterInterface
40 * @syscap SystemCapability.ArkUI.ArkUI.Full
41 * @crossplatform
42 * @form
43 * @since 10
44 */
45/**
46 * Counter component, which provides corresponding increment or decrement counting operations.
47 *
48 * @interface CounterInterface
49 * @syscap SystemCapability.ArkUI.ArkUI.Full
50 * @crossplatform
51 * @form
52 * @atomicservice
53 * @since 11
54 */
55interface CounterInterface {
56  /**
57   * Return Counter.
58   *
59   * @returns { CounterAttribute }
60   * @syscap SystemCapability.ArkUI.ArkUI.Full
61   * @since 7
62   */
63  /**
64   * Return Counter.
65   *
66   * @returns { CounterAttribute }
67   * @syscap SystemCapability.ArkUI.ArkUI.Full
68   * @form
69   * @since 9
70   */
71  /**
72   * Return Counter.
73   *
74   * @returns { CounterAttribute }
75   * @syscap SystemCapability.ArkUI.ArkUI.Full
76   * @crossplatform
77   * @form
78   * @since 10
79   */
80  /**
81   * Return Counter.
82   *
83   * @returns { CounterAttribute }
84   * @syscap SystemCapability.ArkUI.ArkUI.Full
85   * @crossplatform
86   * @form
87   * @atomicservice
88   * @since 11
89   */
90  (): CounterAttribute;
91}
92
93/**
94 * Defines the Counter attribute functions.
95 *
96 * @extends CommonMethod<CounterAttribute>
97 * @syscap SystemCapability.ArkUI.ArkUI.Full
98 * @since 7
99 */
100/**
101 * Defines the Counter attribute functions.
102 *
103 * @extends CommonMethod<CounterAttribute>
104 * @syscap SystemCapability.ArkUI.ArkUI.Full
105 * @form
106 * @since 9
107 */
108/**
109 * Defines the Counter attribute functions.
110 *
111 * @extends CommonMethod<CounterAttribute>
112 * @syscap SystemCapability.ArkUI.ArkUI.Full
113 * @crossplatform
114 * @form
115 * @since 10
116 */
117/**
118 * Defines the Counter attribute functions.
119 *
120 * @extends CommonMethod<CounterAttribute>
121 * @syscap SystemCapability.ArkUI.ArkUI.Full
122 * @crossplatform
123 * @form
124 * @atomicservice
125 * @since 11
126 */
127declare class CounterAttribute extends CommonMethod<CounterAttribute> {
128  /**
129   * Listen to the event that the value increases.
130   *
131   * @param { function } event
132   * @returns { CounterAttribute }
133   * @syscap SystemCapability.ArkUI.ArkUI.Full
134   * @since 7
135   */
136  /**
137   * Listen to the event that the value increases.
138   *
139   * @param { function } event
140   * @returns { CounterAttribute }
141   * @syscap SystemCapability.ArkUI.ArkUI.Full
142   * @form
143   * @since 9
144   */
145  /**
146   * Listen to the event that the value increases.
147   *
148   * @param { function } event
149   * @returns { CounterAttribute }
150   * @syscap SystemCapability.ArkUI.ArkUI.Full
151   * @crossplatform
152   * @form
153   * @since 10
154   */
155  /**
156   * Listen to the event that the value increases.
157   *
158   * @param { function } event
159   * @returns { CounterAttribute }
160   * @syscap SystemCapability.ArkUI.ArkUI.Full
161   * @crossplatform
162   * @form
163   * @atomicservice
164   * @since 11
165   */
166  /**
167   * Listen to the event that the value increases.
168   * Anonymous Object Rectification.
169   *
170   * @param { VoidCallback } event
171   * @returns { CounterAttribute }
172   * @syscap SystemCapability.ArkUI.ArkUI.Full
173   * @crossplatform
174   * @form
175   * @atomicservice
176   * @since 18
177   */
178  onInc(event: VoidCallback): CounterAttribute;
179
180  /**
181   * Listens to the number decrease event.
182   *
183   * @param { function } event
184   * @returns { CounterAttribute }
185   * @syscap SystemCapability.ArkUI.ArkUI.Full
186   * @since 7
187   */
188  /**
189   * Listens to the number decrease event.
190   *
191   * @param { function } event
192   * @returns { CounterAttribute }
193   * @syscap SystemCapability.ArkUI.ArkUI.Full
194   * @form
195   * @since 9
196   */
197  /**
198   * Listens to the number decrease event.
199   *
200   * @param { function } event
201   * @returns { CounterAttribute }
202   * @syscap SystemCapability.ArkUI.ArkUI.Full
203   * @crossplatform
204   * @form
205   * @since 10
206   */
207  /**
208   * Listens to the number decrease event.
209   *
210   * @param { function } event
211   * @returns { CounterAttribute }
212   * @syscap SystemCapability.ArkUI.ArkUI.Full
213   * @crossplatform
214   * @form
215   * @atomicservice
216   * @since 11
217   */
218  /**
219   * Listens to the number decrease event.
220   * Anonymous Object Rectification.
221   *
222   * @param { VoidCallback } event
223   * @returns { CounterAttribute }
224   * @syscap SystemCapability.ArkUI.ArkUI.Full
225   * @crossplatform
226   * @form
227   * @atomicservice
228   * @since 18
229   */
230  onDec(event: VoidCallback): CounterAttribute;
231
232  /**
233   * Indicates whether the decrease button of counter component is available or not.
234   *
235   * @param { boolean } value - If true, the decrease button is available and can respond to operations such as clicking. If false, click operations are not responded.
236   * @returns { CounterAttribute } The attribute of the counter.
237   * @syscap SystemCapability.ArkUI.ArkUI.Full
238   * @crossplatform
239   * @since 10
240   */
241  /**
242   * Indicates whether the decrease button of counter component is available or not.
243   *
244   * @param { boolean } value - If true, the decrease button is available and can respond to operations such as clicking. If false, click operations are not responded.
245   * @returns { CounterAttribute } The attribute of the counter.
246   * @syscap SystemCapability.ArkUI.ArkUI.Full
247   * @crossplatform
248   * @atomicservice
249   * @since 11
250   */
251  enableDec(value: boolean): CounterAttribute;
252
253  /**
254   * Indicates whether the increase button of counter component is available or not.
255   *
256   * @param { boolean } value - If true, the increase button is available and can respond to operations such as clicking. If false, click operations are not responded.
257   * @returns { CounterAttribute } The attribute of the counter.
258   * @syscap SystemCapability.ArkUI.ArkUI.Full
259   * @crossplatform
260   * @since 10
261   */
262  /**
263   * Indicates whether the increase button of counter component is available or not.
264   *
265   * @param { boolean } value - If true, the increase button is available and can respond to operations such as clicking. If false, click operations are not responded.
266   * @returns { CounterAttribute } The attribute of the counter.
267   * @syscap SystemCapability.ArkUI.ArkUI.Full
268   * @crossplatform
269   * @atomicservice
270   * @since 11
271   */
272  enableInc(value: boolean): CounterAttribute;
273}
274
275/**
276 * Defines Counter Component instance.
277 *
278 * @syscap SystemCapability.ArkUI.ArkUI.Full
279 * @since 7
280 */
281/**
282 * Defines Counter Component instance.
283 *
284 * @syscap SystemCapability.ArkUI.ArkUI.Full
285 * @form
286 * @since 9
287 */
288/**
289 * Defines Counter Component instance.
290 *
291 * @syscap SystemCapability.ArkUI.ArkUI.Full
292 * @crossplatform
293 * @form
294 * @since 10
295 */
296/**
297 * Defines Counter Component instance.
298 *
299 * @syscap SystemCapability.ArkUI.ArkUI.Full
300 * @crossplatform
301 * @form
302 * @atomicservice
303 * @since 11
304 */
305declare const CounterInstance: CounterAttribute;
306
307/**
308 * Defines Counter Component.
309 *
310 * @syscap SystemCapability.ArkUI.ArkUI.Full
311 * @since 7
312 */
313/**
314 * Defines Counter Component.
315 *
316 * @syscap SystemCapability.ArkUI.ArkUI.Full
317 * @form
318 * @since 9
319 */
320/**
321 * Defines Counter Component.
322 *
323 * @syscap SystemCapability.ArkUI.ArkUI.Full
324 * @crossplatform
325 * @form
326 * @since 10
327 */
328/**
329 * Defines Counter Component.
330 *
331 * @syscap SystemCapability.ArkUI.ArkUI.Full
332 * @crossplatform
333 * @form
334 * @atomicservice
335 * @since 11
336 */
337declare const Counter: CounterInterface;
338