• 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  onInc(event: () => void): CounterAttribute;
167
168  /**
169   * Listens to the number decrease event.
170   *
171   * @param { function } event
172   * @returns { CounterAttribute }
173   * @syscap SystemCapability.ArkUI.ArkUI.Full
174   * @since 7
175   */
176  /**
177   * Listens to the number decrease event.
178   *
179   * @param { function } event
180   * @returns { CounterAttribute }
181   * @syscap SystemCapability.ArkUI.ArkUI.Full
182   * @form
183   * @since 9
184   */
185  /**
186   * Listens to the number decrease event.
187   *
188   * @param { function } event
189   * @returns { CounterAttribute }
190   * @syscap SystemCapability.ArkUI.ArkUI.Full
191   * @crossplatform
192   * @form
193   * @since 10
194   */
195  /**
196   * Listens to the number decrease event.
197   *
198   * @param { function } event
199   * @returns { CounterAttribute }
200   * @syscap SystemCapability.ArkUI.ArkUI.Full
201   * @crossplatform
202   * @form
203   * @atomicservice
204   * @since 11
205   */
206  onDec(event: () => void): CounterAttribute;
207
208  /**
209   * Indicates whether the decrease button of counter component is available or not.
210   *
211   * @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.
212   * @returns { CounterAttribute } The attribute of the counter.
213   * @syscap SystemCapability.ArkUI.ArkUI.Full
214   * @crossplatform
215   * @since 10
216   */
217  /**
218   * Indicates whether the decrease button of counter component is available or not.
219   *
220   * @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.
221   * @returns { CounterAttribute } The attribute of the counter.
222   * @syscap SystemCapability.ArkUI.ArkUI.Full
223   * @crossplatform
224   * @atomicservice
225   * @since 11
226   */
227  enableDec(value: boolean): CounterAttribute;
228
229  /**
230   * Indicates whether the increase button of counter component is available or not.
231   *
232   * @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.
233   * @returns { CounterAttribute } The attribute of the counter.
234   * @syscap SystemCapability.ArkUI.ArkUI.Full
235   * @crossplatform
236   * @since 10
237   */
238  /**
239   * Indicates whether the increase button of counter component is available or not.
240   *
241   * @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.
242   * @returns { CounterAttribute } The attribute of the counter.
243   * @syscap SystemCapability.ArkUI.ArkUI.Full
244   * @crossplatform
245   * @atomicservice
246   * @since 11
247   */
248  enableInc(value: boolean): CounterAttribute;
249}
250
251/**
252 * Defines Counter Component instance.
253 *
254 * @syscap SystemCapability.ArkUI.ArkUI.Full
255 * @since 7
256 */
257/**
258 * Defines Counter Component instance.
259 *
260 * @syscap SystemCapability.ArkUI.ArkUI.Full
261 * @form
262 * @since 9
263 */
264/**
265 * Defines Counter Component instance.
266 *
267 * @syscap SystemCapability.ArkUI.ArkUI.Full
268 * @crossplatform
269 * @form
270 * @since 10
271 */
272/**
273 * Defines Counter Component instance.
274 *
275 * @syscap SystemCapability.ArkUI.ArkUI.Full
276 * @crossplatform
277 * @form
278 * @atomicservice
279 * @since 11
280 */
281declare const CounterInstance: CounterAttribute;
282
283/**
284 * Defines Counter Component.
285 *
286 * @syscap SystemCapability.ArkUI.ArkUI.Full
287 * @since 7
288 */
289/**
290 * Defines Counter Component.
291 *
292 * @syscap SystemCapability.ArkUI.ArkUI.Full
293 * @form
294 * @since 9
295 */
296/**
297 * Defines Counter Component.
298 *
299 * @syscap SystemCapability.ArkUI.ArkUI.Full
300 * @crossplatform
301 * @form
302 * @since 10
303 */
304/**
305 * Defines Counter Component.
306 *
307 * @syscap SystemCapability.ArkUI.ArkUI.Full
308 * @crossplatform
309 * @form
310 * @atomicservice
311 * @since 11
312 */
313declare const Counter: CounterInterface;
314