161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit ArkUI 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ci/** 2261847f8eSopenharmony_ci * Counter component, which provides corresponding increment or decrement counting operations. 2361847f8eSopenharmony_ci * 2461847f8eSopenharmony_ci * @interface CounterInterface 2561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 2661847f8eSopenharmony_ci * @since 7 2761847f8eSopenharmony_ci */ 2861847f8eSopenharmony_ci/** 2961847f8eSopenharmony_ci * Counter component, which provides corresponding increment or decrement counting operations. 3061847f8eSopenharmony_ci * 3161847f8eSopenharmony_ci * @interface CounterInterface 3261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 3361847f8eSopenharmony_ci * @form 3461847f8eSopenharmony_ci * @since 9 3561847f8eSopenharmony_ci */ 3661847f8eSopenharmony_ci/** 3761847f8eSopenharmony_ci * Counter component, which provides corresponding increment or decrement counting operations. 3861847f8eSopenharmony_ci * 3961847f8eSopenharmony_ci * @interface CounterInterface 4061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 4161847f8eSopenharmony_ci * @crossplatform 4261847f8eSopenharmony_ci * @form 4361847f8eSopenharmony_ci * @since 10 4461847f8eSopenharmony_ci */ 4561847f8eSopenharmony_ci/** 4661847f8eSopenharmony_ci * Counter component, which provides corresponding increment or decrement counting operations. 4761847f8eSopenharmony_ci * 4861847f8eSopenharmony_ci * @interface CounterInterface 4961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 5061847f8eSopenharmony_ci * @crossplatform 5161847f8eSopenharmony_ci * @form 5261847f8eSopenharmony_ci * @atomicservice 5361847f8eSopenharmony_ci * @since 11 5461847f8eSopenharmony_ci */ 5561847f8eSopenharmony_ciinterface CounterInterface { 5661847f8eSopenharmony_ci /** 5761847f8eSopenharmony_ci * Return Counter. 5861847f8eSopenharmony_ci * 5961847f8eSopenharmony_ci * @returns { CounterAttribute } 6061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 6161847f8eSopenharmony_ci * @since 7 6261847f8eSopenharmony_ci */ 6361847f8eSopenharmony_ci /** 6461847f8eSopenharmony_ci * Return Counter. 6561847f8eSopenharmony_ci * 6661847f8eSopenharmony_ci * @returns { CounterAttribute } 6761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 6861847f8eSopenharmony_ci * @form 6961847f8eSopenharmony_ci * @since 9 7061847f8eSopenharmony_ci */ 7161847f8eSopenharmony_ci /** 7261847f8eSopenharmony_ci * Return Counter. 7361847f8eSopenharmony_ci * 7461847f8eSopenharmony_ci * @returns { CounterAttribute } 7561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 7661847f8eSopenharmony_ci * @crossplatform 7761847f8eSopenharmony_ci * @form 7861847f8eSopenharmony_ci * @since 10 7961847f8eSopenharmony_ci */ 8061847f8eSopenharmony_ci /** 8161847f8eSopenharmony_ci * Return Counter. 8261847f8eSopenharmony_ci * 8361847f8eSopenharmony_ci * @returns { CounterAttribute } 8461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 8561847f8eSopenharmony_ci * @crossplatform 8661847f8eSopenharmony_ci * @form 8761847f8eSopenharmony_ci * @atomicservice 8861847f8eSopenharmony_ci * @since 11 8961847f8eSopenharmony_ci */ 9061847f8eSopenharmony_ci (): CounterAttribute; 9161847f8eSopenharmony_ci} 9261847f8eSopenharmony_ci 9361847f8eSopenharmony_ci/** 9461847f8eSopenharmony_ci * Defines the Counter attribute functions. 9561847f8eSopenharmony_ci * 9661847f8eSopenharmony_ci * @extends CommonMethod<CounterAttribute> 9761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 9861847f8eSopenharmony_ci * @since 7 9961847f8eSopenharmony_ci */ 10061847f8eSopenharmony_ci/** 10161847f8eSopenharmony_ci * Defines the Counter attribute functions. 10261847f8eSopenharmony_ci * 10361847f8eSopenharmony_ci * @extends CommonMethod<CounterAttribute> 10461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 10561847f8eSopenharmony_ci * @form 10661847f8eSopenharmony_ci * @since 9 10761847f8eSopenharmony_ci */ 10861847f8eSopenharmony_ci/** 10961847f8eSopenharmony_ci * Defines the Counter attribute functions. 11061847f8eSopenharmony_ci * 11161847f8eSopenharmony_ci * @extends CommonMethod<CounterAttribute> 11261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 11361847f8eSopenharmony_ci * @crossplatform 11461847f8eSopenharmony_ci * @form 11561847f8eSopenharmony_ci * @since 10 11661847f8eSopenharmony_ci */ 11761847f8eSopenharmony_ci/** 11861847f8eSopenharmony_ci * Defines the Counter attribute functions. 11961847f8eSopenharmony_ci * 12061847f8eSopenharmony_ci * @extends CommonMethod<CounterAttribute> 12161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 12261847f8eSopenharmony_ci * @crossplatform 12361847f8eSopenharmony_ci * @form 12461847f8eSopenharmony_ci * @atomicservice 12561847f8eSopenharmony_ci * @since 11 12661847f8eSopenharmony_ci */ 12761847f8eSopenharmony_cideclare class CounterAttribute extends CommonMethod<CounterAttribute> { 12861847f8eSopenharmony_ci /** 12961847f8eSopenharmony_ci * Listen to the event that the value increases. 13061847f8eSopenharmony_ci * 13161847f8eSopenharmony_ci * @param { function } event 13261847f8eSopenharmony_ci * @returns { CounterAttribute } 13361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 13461847f8eSopenharmony_ci * @since 7 13561847f8eSopenharmony_ci */ 13661847f8eSopenharmony_ci /** 13761847f8eSopenharmony_ci * Listen to the event that the value increases. 13861847f8eSopenharmony_ci * 13961847f8eSopenharmony_ci * @param { function } event 14061847f8eSopenharmony_ci * @returns { CounterAttribute } 14161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 14261847f8eSopenharmony_ci * @form 14361847f8eSopenharmony_ci * @since 9 14461847f8eSopenharmony_ci */ 14561847f8eSopenharmony_ci /** 14661847f8eSopenharmony_ci * Listen to the event that the value increases. 14761847f8eSopenharmony_ci * 14861847f8eSopenharmony_ci * @param { function } event 14961847f8eSopenharmony_ci * @returns { CounterAttribute } 15061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 15161847f8eSopenharmony_ci * @crossplatform 15261847f8eSopenharmony_ci * @form 15361847f8eSopenharmony_ci * @since 10 15461847f8eSopenharmony_ci */ 15561847f8eSopenharmony_ci /** 15661847f8eSopenharmony_ci * Listen to the event that the value increases. 15761847f8eSopenharmony_ci * 15861847f8eSopenharmony_ci * @param { function } event 15961847f8eSopenharmony_ci * @returns { CounterAttribute } 16061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 16161847f8eSopenharmony_ci * @crossplatform 16261847f8eSopenharmony_ci * @form 16361847f8eSopenharmony_ci * @atomicservice 16461847f8eSopenharmony_ci * @since 11 16561847f8eSopenharmony_ci */ 16661847f8eSopenharmony_ci /** 16761847f8eSopenharmony_ci * Listen to the event that the value increases. 16861847f8eSopenharmony_ci * 16961847f8eSopenharmony_ci * @param { VoidCallback } event 17061847f8eSopenharmony_ci * @returns { CounterAttribute } 17161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 17261847f8eSopenharmony_ci * @crossplatform 17361847f8eSopenharmony_ci * @form 17461847f8eSopenharmony_ci * @atomicservice 17561847f8eSopenharmony_ci * @since 14 17661847f8eSopenharmony_ci */ 17761847f8eSopenharmony_ci onInc(event: VoidCallback): CounterAttribute; 17861847f8eSopenharmony_ci 17961847f8eSopenharmony_ci /** 18061847f8eSopenharmony_ci * Listens to the number decrease event. 18161847f8eSopenharmony_ci * 18261847f8eSopenharmony_ci * @param { function } event 18361847f8eSopenharmony_ci * @returns { CounterAttribute } 18461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 18561847f8eSopenharmony_ci * @since 7 18661847f8eSopenharmony_ci */ 18761847f8eSopenharmony_ci /** 18861847f8eSopenharmony_ci * Listens to the number decrease event. 18961847f8eSopenharmony_ci * 19061847f8eSopenharmony_ci * @param { function } event 19161847f8eSopenharmony_ci * @returns { CounterAttribute } 19261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 19361847f8eSopenharmony_ci * @form 19461847f8eSopenharmony_ci * @since 9 19561847f8eSopenharmony_ci */ 19661847f8eSopenharmony_ci /** 19761847f8eSopenharmony_ci * Listens to the number decrease event. 19861847f8eSopenharmony_ci * 19961847f8eSopenharmony_ci * @param { function } event 20061847f8eSopenharmony_ci * @returns { CounterAttribute } 20161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 20261847f8eSopenharmony_ci * @crossplatform 20361847f8eSopenharmony_ci * @form 20461847f8eSopenharmony_ci * @since 10 20561847f8eSopenharmony_ci */ 20661847f8eSopenharmony_ci /** 20761847f8eSopenharmony_ci * Listens to the number decrease event. 20861847f8eSopenharmony_ci * 20961847f8eSopenharmony_ci * @param { function } event 21061847f8eSopenharmony_ci * @returns { CounterAttribute } 21161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 21261847f8eSopenharmony_ci * @crossplatform 21361847f8eSopenharmony_ci * @form 21461847f8eSopenharmony_ci * @atomicservice 21561847f8eSopenharmony_ci * @since 11 21661847f8eSopenharmony_ci */ 21761847f8eSopenharmony_ci /** 21861847f8eSopenharmony_ci * Listens to the number decrease event. 21961847f8eSopenharmony_ci * 22061847f8eSopenharmony_ci * @param { VoidCallback } event 22161847f8eSopenharmony_ci * @returns { CounterAttribute } 22261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 22361847f8eSopenharmony_ci * @crossplatform 22461847f8eSopenharmony_ci * @form 22561847f8eSopenharmony_ci * @atomicservice 22661847f8eSopenharmony_ci * @since 14 22761847f8eSopenharmony_ci */ 22861847f8eSopenharmony_ci onDec(event: VoidCallback): CounterAttribute; 22961847f8eSopenharmony_ci 23061847f8eSopenharmony_ci /** 23161847f8eSopenharmony_ci * Indicates whether the decrease button of counter component is available or not. 23261847f8eSopenharmony_ci * 23361847f8eSopenharmony_ci * @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. 23461847f8eSopenharmony_ci * @returns { CounterAttribute } The attribute of the counter. 23561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 23661847f8eSopenharmony_ci * @crossplatform 23761847f8eSopenharmony_ci * @since 10 23861847f8eSopenharmony_ci */ 23961847f8eSopenharmony_ci /** 24061847f8eSopenharmony_ci * Indicates whether the decrease button of counter component is available or not. 24161847f8eSopenharmony_ci * 24261847f8eSopenharmony_ci * @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. 24361847f8eSopenharmony_ci * @returns { CounterAttribute } The attribute of the counter. 24461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 24561847f8eSopenharmony_ci * @crossplatform 24661847f8eSopenharmony_ci * @atomicservice 24761847f8eSopenharmony_ci * @since 11 24861847f8eSopenharmony_ci */ 24961847f8eSopenharmony_ci enableDec(value: boolean): CounterAttribute; 25061847f8eSopenharmony_ci 25161847f8eSopenharmony_ci /** 25261847f8eSopenharmony_ci * Indicates whether the increase button of counter component is available or not. 25361847f8eSopenharmony_ci * 25461847f8eSopenharmony_ci * @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. 25561847f8eSopenharmony_ci * @returns { CounterAttribute } The attribute of the counter. 25661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 25761847f8eSopenharmony_ci * @crossplatform 25861847f8eSopenharmony_ci * @since 10 25961847f8eSopenharmony_ci */ 26061847f8eSopenharmony_ci /** 26161847f8eSopenharmony_ci * Indicates whether the increase button of counter component is available or not. 26261847f8eSopenharmony_ci * 26361847f8eSopenharmony_ci * @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. 26461847f8eSopenharmony_ci * @returns { CounterAttribute } The attribute of the counter. 26561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 26661847f8eSopenharmony_ci * @crossplatform 26761847f8eSopenharmony_ci * @atomicservice 26861847f8eSopenharmony_ci * @since 11 26961847f8eSopenharmony_ci */ 27061847f8eSopenharmony_ci enableInc(value: boolean): CounterAttribute; 27161847f8eSopenharmony_ci} 27261847f8eSopenharmony_ci 27361847f8eSopenharmony_ci/** 27461847f8eSopenharmony_ci * Defines Counter Component instance. 27561847f8eSopenharmony_ci * 27661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 27761847f8eSopenharmony_ci * @since 7 27861847f8eSopenharmony_ci */ 27961847f8eSopenharmony_ci/** 28061847f8eSopenharmony_ci * Defines Counter Component instance. 28161847f8eSopenharmony_ci * 28261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 28361847f8eSopenharmony_ci * @form 28461847f8eSopenharmony_ci * @since 9 28561847f8eSopenharmony_ci */ 28661847f8eSopenharmony_ci/** 28761847f8eSopenharmony_ci * Defines Counter Component instance. 28861847f8eSopenharmony_ci * 28961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 29061847f8eSopenharmony_ci * @crossplatform 29161847f8eSopenharmony_ci * @form 29261847f8eSopenharmony_ci * @since 10 29361847f8eSopenharmony_ci */ 29461847f8eSopenharmony_ci/** 29561847f8eSopenharmony_ci * Defines Counter Component instance. 29661847f8eSopenharmony_ci * 29761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 29861847f8eSopenharmony_ci * @crossplatform 29961847f8eSopenharmony_ci * @form 30061847f8eSopenharmony_ci * @atomicservice 30161847f8eSopenharmony_ci * @since 11 30261847f8eSopenharmony_ci */ 30361847f8eSopenharmony_cideclare const CounterInstance: CounterAttribute; 30461847f8eSopenharmony_ci 30561847f8eSopenharmony_ci/** 30661847f8eSopenharmony_ci * Defines Counter Component. 30761847f8eSopenharmony_ci * 30861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 30961847f8eSopenharmony_ci * @since 7 31061847f8eSopenharmony_ci */ 31161847f8eSopenharmony_ci/** 31261847f8eSopenharmony_ci * Defines Counter Component. 31361847f8eSopenharmony_ci * 31461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 31561847f8eSopenharmony_ci * @form 31661847f8eSopenharmony_ci * @since 9 31761847f8eSopenharmony_ci */ 31861847f8eSopenharmony_ci/** 31961847f8eSopenharmony_ci * Defines Counter Component. 32061847f8eSopenharmony_ci * 32161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 32261847f8eSopenharmony_ci * @crossplatform 32361847f8eSopenharmony_ci * @form 32461847f8eSopenharmony_ci * @since 10 32561847f8eSopenharmony_ci */ 32661847f8eSopenharmony_ci/** 32761847f8eSopenharmony_ci * Defines Counter Component. 32861847f8eSopenharmony_ci * 32961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 33061847f8eSopenharmony_ci * @crossplatform 33161847f8eSopenharmony_ci * @form 33261847f8eSopenharmony_ci * @atomicservice 33361847f8eSopenharmony_ci * @since 11 33461847f8eSopenharmony_ci */ 33561847f8eSopenharmony_cideclare const Counter: CounterInterface; 336