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 * Provides a way to control the textclock status. 2361847f8eSopenharmony_ci * 2461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 2561847f8eSopenharmony_ci * @since 8 2661847f8eSopenharmony_ci */ 2761847f8eSopenharmony_ci/** 2861847f8eSopenharmony_ci * Provides a way to control the textclock status. 2961847f8eSopenharmony_ci * 3061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 3161847f8eSopenharmony_ci * @crossplatform 3261847f8eSopenharmony_ci * @since 10 3361847f8eSopenharmony_ci */ 3461847f8eSopenharmony_ci/** 3561847f8eSopenharmony_ci * Provides a way to control the textclock status. 3661847f8eSopenharmony_ci * 3761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 3861847f8eSopenharmony_ci * @crossplatform 3961847f8eSopenharmony_ci * @form 4061847f8eSopenharmony_ci * @atomicservice 4161847f8eSopenharmony_ci * @since 11 4261847f8eSopenharmony_ci */ 4361847f8eSopenharmony_cideclare class TextClockController { 4461847f8eSopenharmony_ci /** 4561847f8eSopenharmony_ci * constructor. 4661847f8eSopenharmony_ci * 4761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 4861847f8eSopenharmony_ci * @since 8 4961847f8eSopenharmony_ci */ 5061847f8eSopenharmony_ci /** 5161847f8eSopenharmony_ci * constructor. 5261847f8eSopenharmony_ci * 5361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 5461847f8eSopenharmony_ci * @crossplatform 5561847f8eSopenharmony_ci * @since 10 5661847f8eSopenharmony_ci */ 5761847f8eSopenharmony_ci /** 5861847f8eSopenharmony_ci * constructor. 5961847f8eSopenharmony_ci * 6061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 6161847f8eSopenharmony_ci * @crossplatform 6261847f8eSopenharmony_ci * @form 6361847f8eSopenharmony_ci * @atomicservice 6461847f8eSopenharmony_ci * @since 11 6561847f8eSopenharmony_ci */ 6661847f8eSopenharmony_ci constructor(); 6761847f8eSopenharmony_ci /** 6861847f8eSopenharmony_ci * Provides a start event for textclock. 6961847f8eSopenharmony_ci * 7061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 7161847f8eSopenharmony_ci * @since 8 7261847f8eSopenharmony_ci */ 7361847f8eSopenharmony_ci /** 7461847f8eSopenharmony_ci * Provides a start event for textclock. 7561847f8eSopenharmony_ci * 7661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 7761847f8eSopenharmony_ci * @crossplatform 7861847f8eSopenharmony_ci * @since 10 7961847f8eSopenharmony_ci */ 8061847f8eSopenharmony_ci /** 8161847f8eSopenharmony_ci * Provides a start event for textclock. 8261847f8eSopenharmony_ci * 8361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 8461847f8eSopenharmony_ci * @crossplatform 8561847f8eSopenharmony_ci * @form 8661847f8eSopenharmony_ci * @atomicservice 8761847f8eSopenharmony_ci * @since 11 8861847f8eSopenharmony_ci */ 8961847f8eSopenharmony_ci start(); 9061847f8eSopenharmony_ci /** 9161847f8eSopenharmony_ci * Provides a stop event for textclock. 9261847f8eSopenharmony_ci * 9361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 9461847f8eSopenharmony_ci * @since 8 9561847f8eSopenharmony_ci */ 9661847f8eSopenharmony_ci /** 9761847f8eSopenharmony_ci * Provides a stop event for textclock. 9861847f8eSopenharmony_ci * 9961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 10061847f8eSopenharmony_ci * @crossplatform 10161847f8eSopenharmony_ci * @since 10 10261847f8eSopenharmony_ci */ 10361847f8eSopenharmony_ci /** 10461847f8eSopenharmony_ci * Provides a stop event for textclock. 10561847f8eSopenharmony_ci * 10661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 10761847f8eSopenharmony_ci * @crossplatform 10861847f8eSopenharmony_ci * @form 10961847f8eSopenharmony_ci * @atomicservice 11061847f8eSopenharmony_ci * @since 11 11161847f8eSopenharmony_ci */ 11261847f8eSopenharmony_ci stop(); 11361847f8eSopenharmony_ci} 11461847f8eSopenharmony_ci 11561847f8eSopenharmony_ci/** 11661847f8eSopenharmony_ci * TextClockConfiguration used by text clock content modifier 11761847f8eSopenharmony_ci * 11861847f8eSopenharmony_ci * @interface TextClockConfiguration 11961847f8eSopenharmony_ci * @extends CommonConfiguration<TextClockConfiguration> 12061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 12161847f8eSopenharmony_ci * @crossplatform 12261847f8eSopenharmony_ci * @atomicservice 12361847f8eSopenharmony_ci * @since 12 12461847f8eSopenharmony_ci */ 12561847f8eSopenharmony_cideclare interface TextClockConfiguration extends CommonConfiguration<TextClockConfiguration> { 12661847f8eSopenharmony_ci /** 12761847f8eSopenharmony_ci * Specifies the current time zone. 12861847f8eSopenharmony_ci * The valid value is an integer ranging from - 14 to 12, 12961847f8eSopenharmony_ci * Where a negative value indicates the eastern time zone, for example, -8. 13061847f8eSopenharmony_ci * 13161847f8eSopenharmony_ci * @type { number } 13261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 13361847f8eSopenharmony_ci * @crossplatform 13461847f8eSopenharmony_ci * @atomicservice 13561847f8eSopenharmony_ci * @since 12 13661847f8eSopenharmony_ci */ 13761847f8eSopenharmony_ci timeZoneOffset: number; 13861847f8eSopenharmony_ci 13961847f8eSopenharmony_ci /** 14061847f8eSopenharmony_ci * TextClock is started or not. 14161847f8eSopenharmony_ci * 14261847f8eSopenharmony_ci * @type { boolean } 14361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 14461847f8eSopenharmony_ci * @crossplatform 14561847f8eSopenharmony_ci * @atomicservice 14661847f8eSopenharmony_ci * @since 12 14761847f8eSopenharmony_ci */ 14861847f8eSopenharmony_ci started: boolean; 14961847f8eSopenharmony_ci 15061847f8eSopenharmony_ci /** 15161847f8eSopenharmony_ci * The time of the TextClock. 15261847f8eSopenharmony_ci * 15361847f8eSopenharmony_ci * @type { number } 15461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 15561847f8eSopenharmony_ci * @crossplatform 15661847f8eSopenharmony_ci * @atomicservice 15761847f8eSopenharmony_ci * @since 12 15861847f8eSopenharmony_ci */ 15961847f8eSopenharmony_ci timeValue: number; 16061847f8eSopenharmony_ci} 16161847f8eSopenharmony_ci 16261847f8eSopenharmony_ci/** 16361847f8eSopenharmony_ci * Options to construct TextClock component. 16461847f8eSopenharmony_ci * 16561847f8eSopenharmony_ci * @interface TextClockOptions 16661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 16761847f8eSopenharmony_ci * @crossplatform 16861847f8eSopenharmony_ci * @form 16961847f8eSopenharmony_ci * @atomicservice 17061847f8eSopenharmony_ci * @since 14 17161847f8eSopenharmony_ci */ 17261847f8eSopenharmony_cideclare interface TextClockOptions { 17361847f8eSopenharmony_ci /** 17461847f8eSopenharmony_ci * Time zone offset. 17561847f8eSopenharmony_ci * 17661847f8eSopenharmony_ci * @type { ?number } 17761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 17861847f8eSopenharmony_ci * @since 8 17961847f8eSopenharmony_ci */ 18061847f8eSopenharmony_ci /** 18161847f8eSopenharmony_ci * Time zone offset. 18261847f8eSopenharmony_ci * 18361847f8eSopenharmony_ci * @type { ?number } 18461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 18561847f8eSopenharmony_ci * @crossplatform 18661847f8eSopenharmony_ci * @since 10 18761847f8eSopenharmony_ci */ 18861847f8eSopenharmony_ci /** 18961847f8eSopenharmony_ci * Time zone offset. 19061847f8eSopenharmony_ci * 19161847f8eSopenharmony_ci * @type { ?number } 19261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 19361847f8eSopenharmony_ci * @crossplatform 19461847f8eSopenharmony_ci * @form 19561847f8eSopenharmony_ci * @atomicservice 19661847f8eSopenharmony_ci * @since 11 19761847f8eSopenharmony_ci */ 19861847f8eSopenharmony_ci timeZoneOffset?: number; 19961847f8eSopenharmony_ci 20061847f8eSopenharmony_ci /** 20161847f8eSopenharmony_ci * TextClock controller. 20261847f8eSopenharmony_ci * 20361847f8eSopenharmony_ci * @type { ?TextClockController } 20461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 20561847f8eSopenharmony_ci * @since 8 20661847f8eSopenharmony_ci */ 20761847f8eSopenharmony_ci /** 20861847f8eSopenharmony_ci * TextClock controller. 20961847f8eSopenharmony_ci * 21061847f8eSopenharmony_ci * @type { ?TextClockController } 21161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 21261847f8eSopenharmony_ci * @crossplatform 21361847f8eSopenharmony_ci * @since 10 21461847f8eSopenharmony_ci */ 21561847f8eSopenharmony_ci /** 21661847f8eSopenharmony_ci * TextClock controller. 21761847f8eSopenharmony_ci * 21861847f8eSopenharmony_ci * @type { ?TextClockController } 21961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 22061847f8eSopenharmony_ci * @crossplatform 22161847f8eSopenharmony_ci * @form 22261847f8eSopenharmony_ci * @atomicservice 22361847f8eSopenharmony_ci * @since 11 22461847f8eSopenharmony_ci */ 22561847f8eSopenharmony_ci controller?: TextClockController 22661847f8eSopenharmony_ci} 22761847f8eSopenharmony_ci 22861847f8eSopenharmony_ci/** 22961847f8eSopenharmony_ci * TextClock component, which provides the text clock capability. 23061847f8eSopenharmony_ci * 23161847f8eSopenharmony_ci * @interface TextClockInterface 23261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 23361847f8eSopenharmony_ci * @since 8 23461847f8eSopenharmony_ci */ 23561847f8eSopenharmony_ci/** 23661847f8eSopenharmony_ci * TextClock component, which provides the text clock capability. 23761847f8eSopenharmony_ci * 23861847f8eSopenharmony_ci * @interface TextClockInterface 23961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 24061847f8eSopenharmony_ci * @crossplatform 24161847f8eSopenharmony_ci * @since 10 24261847f8eSopenharmony_ci */ 24361847f8eSopenharmony_ci/** 24461847f8eSopenharmony_ci * TextClock component, which provides the text clock capability. 24561847f8eSopenharmony_ci * 24661847f8eSopenharmony_ci * @interface TextClockInterface 24761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 24861847f8eSopenharmony_ci * @crossplatform 24961847f8eSopenharmony_ci * @form 25061847f8eSopenharmony_ci * @atomicservice 25161847f8eSopenharmony_ci * @since 11 25261847f8eSopenharmony_ci */ 25361847f8eSopenharmony_ciinterface TextClockInterface { 25461847f8eSopenharmony_ci /** 25561847f8eSopenharmony_ci * Construct the text clock component. 25661847f8eSopenharmony_ci * Specifies the current time zone. 25761847f8eSopenharmony_ci * The valid value is an integer ranging from - 14 to 12, 25861847f8eSopenharmony_ci * Where a negative value indicates the eastern time zone, for example, -8. 25961847f8eSopenharmony_ci * 26061847f8eSopenharmony_ci * @param { object } options 26161847f8eSopenharmony_ci * @returns { TextClockAttribute } 26261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 26361847f8eSopenharmony_ci * @since 8 26461847f8eSopenharmony_ci */ 26561847f8eSopenharmony_ci /** 26661847f8eSopenharmony_ci * Construct the text clock component. 26761847f8eSopenharmony_ci * Specifies the current time zone. 26861847f8eSopenharmony_ci * The valid value is an integer ranging from - 14 to 12, 26961847f8eSopenharmony_ci * Where a negative value indicates the eastern time zone, for example, -8. 27061847f8eSopenharmony_ci * 27161847f8eSopenharmony_ci * @param { object } options 27261847f8eSopenharmony_ci * @returns { TextClockAttribute } 27361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 27461847f8eSopenharmony_ci * @crossplatform 27561847f8eSopenharmony_ci * @since 10 27661847f8eSopenharmony_ci */ 27761847f8eSopenharmony_ci /** 27861847f8eSopenharmony_ci * Construct the text clock component. 27961847f8eSopenharmony_ci * Specifies the current time zone. 28061847f8eSopenharmony_ci * The valid value is an integer ranging from - 14 to 12, 28161847f8eSopenharmony_ci * Where a negative value indicates the eastern time zone, for example, -8. 28261847f8eSopenharmony_ci * 28361847f8eSopenharmony_ci * @param { object } options 28461847f8eSopenharmony_ci * @returns { TextClockAttribute } 28561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 28661847f8eSopenharmony_ci * @crossplatform 28761847f8eSopenharmony_ci * @form 28861847f8eSopenharmony_ci * @atomicservice 28961847f8eSopenharmony_ci * @since 11 29061847f8eSopenharmony_ci */ 29161847f8eSopenharmony_ci /** 29261847f8eSopenharmony_ci * Construct the text clock component. 29361847f8eSopenharmony_ci * Specifies the current time zone. 29461847f8eSopenharmony_ci * The valid value is an integer ranging from - 14 to 12, 29561847f8eSopenharmony_ci * Where a negative value indicates the eastern time zone, for example, -8. 29661847f8eSopenharmony_ci * 29761847f8eSopenharmony_ci * @param { TextClockOptions } [options] - TextClock options. 29861847f8eSopenharmony_ci * @returns { TextClockAttribute } 29961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 30061847f8eSopenharmony_ci * @crossplatform 30161847f8eSopenharmony_ci * @form 30261847f8eSopenharmony_ci * @atomicservice 30361847f8eSopenharmony_ci * @since 14 30461847f8eSopenharmony_ci */ 30561847f8eSopenharmony_ci (options?: TextClockOptions): TextClockAttribute; 30661847f8eSopenharmony_ci} 30761847f8eSopenharmony_ci 30861847f8eSopenharmony_ci/** 30961847f8eSopenharmony_ci * Provides attribute for TextClock. 31061847f8eSopenharmony_ci * 31161847f8eSopenharmony_ci * @extends CommonMethod<TextClockAttribute> 31261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 31361847f8eSopenharmony_ci * @since 8 31461847f8eSopenharmony_ci */ 31561847f8eSopenharmony_ci/** 31661847f8eSopenharmony_ci * Provides attribute for TextClock. 31761847f8eSopenharmony_ci * 31861847f8eSopenharmony_ci * @extends CommonMethod<TextClockAttribute> 31961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 32061847f8eSopenharmony_ci * @crossplatform 32161847f8eSopenharmony_ci * @since 10 32261847f8eSopenharmony_ci */ 32361847f8eSopenharmony_ci/** 32461847f8eSopenharmony_ci * Provides attribute for TextClock. 32561847f8eSopenharmony_ci * 32661847f8eSopenharmony_ci * @extends CommonMethod<TextClockAttribute> 32761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 32861847f8eSopenharmony_ci * @crossplatform 32961847f8eSopenharmony_ci * @form 33061847f8eSopenharmony_ci * @atomicservice 33161847f8eSopenharmony_ci * @since 11 33261847f8eSopenharmony_ci */ 33361847f8eSopenharmony_cideclare class TextClockAttribute extends CommonMethod<TextClockAttribute> { 33461847f8eSopenharmony_ci /** 33561847f8eSopenharmony_ci * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". 33661847f8eSopenharmony_ci * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), 33761847f8eSopenharmony_ci * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), 33861847f8eSopenharmony_ci * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). 33961847f8eSopenharmony_ci * 34061847f8eSopenharmony_ci * @param { string } value 34161847f8eSopenharmony_ci * @returns { TextClockAttribute } 34261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 34361847f8eSopenharmony_ci * @since 8 34461847f8eSopenharmony_ci */ 34561847f8eSopenharmony_ci /** 34661847f8eSopenharmony_ci * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". 34761847f8eSopenharmony_ci * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), 34861847f8eSopenharmony_ci * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), 34961847f8eSopenharmony_ci * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). 35061847f8eSopenharmony_ci * 35161847f8eSopenharmony_ci * @param { string } value 35261847f8eSopenharmony_ci * @returns { TextClockAttribute } 35361847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 35461847f8eSopenharmony_ci * @crossplatform 35561847f8eSopenharmony_ci * @since 10 35661847f8eSopenharmony_ci */ 35761847f8eSopenharmony_ci /** 35861847f8eSopenharmony_ci * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". 35961847f8eSopenharmony_ci * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), 36061847f8eSopenharmony_ci * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), 36161847f8eSopenharmony_ci * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). 36261847f8eSopenharmony_ci * The default value is "hh:mm:ss" when TextClock is not in a form. 36361847f8eSopenharmony_ci * The default value is "hh:mm" when TextClock is in a form. 36461847f8eSopenharmony_ci * If the value has second or millisecond, the value will be set to the default value. 36561847f8eSopenharmony_ci * 36661847f8eSopenharmony_ci * @param { string } value 36761847f8eSopenharmony_ci * @returns { TextClockAttribute } 36861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 36961847f8eSopenharmony_ci * @crossplatform 37061847f8eSopenharmony_ci * @form 37161847f8eSopenharmony_ci * @atomicservice 37261847f8eSopenharmony_ci * @since 11 37361847f8eSopenharmony_ci */ 37461847f8eSopenharmony_ci format(value: string): TextClockAttribute; 37561847f8eSopenharmony_ci 37661847f8eSopenharmony_ci /** 37761847f8eSopenharmony_ci * Provides a date change callback. 37861847f8eSopenharmony_ci * The callback parameter is Unix Time Stamp, 37961847f8eSopenharmony_ci * The number of milliseconds that have elapsed since January 1, 1970 (UTC). 38061847f8eSopenharmony_ci * The minimum callback interval for this event is seconds. 38161847f8eSopenharmony_ci * You can listen to this callback, 38261847f8eSopenharmony_ci * Use the format attribute method to customize data display in the callback. 38361847f8eSopenharmony_ci * 38461847f8eSopenharmony_ci * @param { function } event - Listening date event callback. 38561847f8eSopenharmony_ci * @returns { TextClockAttribute } 38661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 38761847f8eSopenharmony_ci * @since 8 38861847f8eSopenharmony_ci */ 38961847f8eSopenharmony_ci /** 39061847f8eSopenharmony_ci * Provides a date change callback. 39161847f8eSopenharmony_ci * The callback parameter is Unix Time Stamp, 39261847f8eSopenharmony_ci * The number of milliseconds that have elapsed since January 1, 1970 (UTC). 39361847f8eSopenharmony_ci * The minimum callback interval for this event is seconds. 39461847f8eSopenharmony_ci * You can listen to this callback, 39561847f8eSopenharmony_ci * Use the format attribute method to customize data display in the callback. 39661847f8eSopenharmony_ci * 39761847f8eSopenharmony_ci * @param { function } event - Listening date event callback. 39861847f8eSopenharmony_ci * @returns { TextClockAttribute } 39961847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 40061847f8eSopenharmony_ci * @crossplatform 40161847f8eSopenharmony_ci * @since 10 40261847f8eSopenharmony_ci */ 40361847f8eSopenharmony_ci /** 40461847f8eSopenharmony_ci * Provides a date change callback. 40561847f8eSopenharmony_ci * The callback parameter is Unix Time Stamp, 40661847f8eSopenharmony_ci * The number of milliseconds that have elapsed since January 1, 1970 (UTC). 40761847f8eSopenharmony_ci * The minimum callback interval for this event default is seconds when TextClock is not in a form. 40861847f8eSopenharmony_ci * The minimum callback interval for this event is minutes when TextClock is in a form. 40961847f8eSopenharmony_ci * If visibility is Hidden the callback be disabled when TextClock is in a form. 41061847f8eSopenharmony_ci * You can listen to this callback, 41161847f8eSopenharmony_ci * Use the format attribute method to customize data display in the callback. 41261847f8eSopenharmony_ci * 41361847f8eSopenharmony_ci * @param { function } event - Listening date event callback. 41461847f8eSopenharmony_ci * @returns { TextClockAttribute } 41561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 41661847f8eSopenharmony_ci * @crossplatform 41761847f8eSopenharmony_ci * @form 41861847f8eSopenharmony_ci * @atomicservice 41961847f8eSopenharmony_ci * @since 11 42061847f8eSopenharmony_ci */ 42161847f8eSopenharmony_ci onDateChange(event: (value: number) => void): TextClockAttribute; 42261847f8eSopenharmony_ci 42361847f8eSopenharmony_ci /** 42461847f8eSopenharmony_ci * Called when the value of TextClock fontColor is set 42561847f8eSopenharmony_ci * 42661847f8eSopenharmony_ci * @param { ResourceColor } value 42761847f8eSopenharmony_ci * @returns { TextClockAttribute } 42861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 42961847f8eSopenharmony_ci * @since 8 43061847f8eSopenharmony_ci */ 43161847f8eSopenharmony_ci /** 43261847f8eSopenharmony_ci * Called when the value of TextClock fontColor is set 43361847f8eSopenharmony_ci * 43461847f8eSopenharmony_ci * @param { ResourceColor } value 43561847f8eSopenharmony_ci * @returns { TextClockAttribute } 43661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 43761847f8eSopenharmony_ci * @crossplatform 43861847f8eSopenharmony_ci * @since 10 43961847f8eSopenharmony_ci */ 44061847f8eSopenharmony_ci /** 44161847f8eSopenharmony_ci * Called when the value of TextClock fontColor is set 44261847f8eSopenharmony_ci * 44361847f8eSopenharmony_ci * @param { ResourceColor } value 44461847f8eSopenharmony_ci * @returns { TextClockAttribute } 44561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 44661847f8eSopenharmony_ci * @crossplatform 44761847f8eSopenharmony_ci * @form 44861847f8eSopenharmony_ci * @atomicservice 44961847f8eSopenharmony_ci * @since 11 45061847f8eSopenharmony_ci */ 45161847f8eSopenharmony_ci fontColor(value: ResourceColor): TextClockAttribute; 45261847f8eSopenharmony_ci 45361847f8eSopenharmony_ci /** 45461847f8eSopenharmony_ci * Called when the value of TextClock fontSize is set 45561847f8eSopenharmony_ci * 45661847f8eSopenharmony_ci * @param { Length } value 45761847f8eSopenharmony_ci * @returns { TextClockAttribute } 45861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 45961847f8eSopenharmony_ci * @since 8 46061847f8eSopenharmony_ci */ 46161847f8eSopenharmony_ci /** 46261847f8eSopenharmony_ci * Called when the value of TextClock fontSize is set 46361847f8eSopenharmony_ci * 46461847f8eSopenharmony_ci * @param { Length } value 46561847f8eSopenharmony_ci * @returns { TextClockAttribute } 46661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 46761847f8eSopenharmony_ci * @crossplatform 46861847f8eSopenharmony_ci * @since 10 46961847f8eSopenharmony_ci */ 47061847f8eSopenharmony_ci /** 47161847f8eSopenharmony_ci * Called when the value of TextClock fontSize is set 47261847f8eSopenharmony_ci * 47361847f8eSopenharmony_ci * @param { Length } value 47461847f8eSopenharmony_ci * @returns { TextClockAttribute } 47561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 47661847f8eSopenharmony_ci * @crossplatform 47761847f8eSopenharmony_ci * @form 47861847f8eSopenharmony_ci * @atomicservice 47961847f8eSopenharmony_ci * @since 11 48061847f8eSopenharmony_ci */ 48161847f8eSopenharmony_ci fontSize(value: Length): TextClockAttribute; 48261847f8eSopenharmony_ci 48361847f8eSopenharmony_ci /** 48461847f8eSopenharmony_ci * Called when the value of TextClock fontStyle is set 48561847f8eSopenharmony_ci * 48661847f8eSopenharmony_ci * @param { FontStyle } value 48761847f8eSopenharmony_ci * @returns { TextClockAttribute } 48861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 48961847f8eSopenharmony_ci * @since 8 49061847f8eSopenharmony_ci */ 49161847f8eSopenharmony_ci /** 49261847f8eSopenharmony_ci * Called when the value of TextClock fontStyle is set 49361847f8eSopenharmony_ci * 49461847f8eSopenharmony_ci * @param { FontStyle } value 49561847f8eSopenharmony_ci * @returns { TextClockAttribute } 49661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 49761847f8eSopenharmony_ci * @crossplatform 49861847f8eSopenharmony_ci * @since 10 49961847f8eSopenharmony_ci */ 50061847f8eSopenharmony_ci /** 50161847f8eSopenharmony_ci * Called when the value of TextClock fontStyle is set 50261847f8eSopenharmony_ci * 50361847f8eSopenharmony_ci * @param { FontStyle } value 50461847f8eSopenharmony_ci * @returns { TextClockAttribute } 50561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 50661847f8eSopenharmony_ci * @crossplatform 50761847f8eSopenharmony_ci * @form 50861847f8eSopenharmony_ci * @atomicservice 50961847f8eSopenharmony_ci * @since 11 51061847f8eSopenharmony_ci */ 51161847f8eSopenharmony_ci fontStyle(value: FontStyle): TextClockAttribute; 51261847f8eSopenharmony_ci 51361847f8eSopenharmony_ci /** 51461847f8eSopenharmony_ci * Called when the value of TextClock fontWeight is set 51561847f8eSopenharmony_ci * 51661847f8eSopenharmony_ci * @param { number | FontWeight | string } value 51761847f8eSopenharmony_ci * @returns { TextClockAttribute } 51861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 51961847f8eSopenharmony_ci * @since 8 52061847f8eSopenharmony_ci */ 52161847f8eSopenharmony_ci /** 52261847f8eSopenharmony_ci * Called when the value of TextClock fontWeight is set 52361847f8eSopenharmony_ci * 52461847f8eSopenharmony_ci * @param { number | FontWeight | string } value 52561847f8eSopenharmony_ci * @returns { TextClockAttribute } 52661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 52761847f8eSopenharmony_ci * @crossplatform 52861847f8eSopenharmony_ci * @since 10 52961847f8eSopenharmony_ci */ 53061847f8eSopenharmony_ci /** 53161847f8eSopenharmony_ci * Called when the value of TextClock fontWeight is set 53261847f8eSopenharmony_ci * 53361847f8eSopenharmony_ci * @param { number | FontWeight | string } value 53461847f8eSopenharmony_ci * @returns { TextClockAttribute } 53561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 53661847f8eSopenharmony_ci * @crossplatform 53761847f8eSopenharmony_ci * @form 53861847f8eSopenharmony_ci * @atomicservice 53961847f8eSopenharmony_ci * @since 11 54061847f8eSopenharmony_ci */ 54161847f8eSopenharmony_ci fontWeight(value: number | FontWeight | string): TextClockAttribute; 54261847f8eSopenharmony_ci 54361847f8eSopenharmony_ci /** 54461847f8eSopenharmony_ci * Called when the value of TextClock fontFamily is set 54561847f8eSopenharmony_ci * 54661847f8eSopenharmony_ci * @param { ResourceStr } value 54761847f8eSopenharmony_ci * @returns { TextClockAttribute } 54861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 54961847f8eSopenharmony_ci * @since 8 55061847f8eSopenharmony_ci */ 55161847f8eSopenharmony_ci /** 55261847f8eSopenharmony_ci * Called when the value of TextClock fontFamily is set 55361847f8eSopenharmony_ci * 55461847f8eSopenharmony_ci * @param { ResourceStr } value 55561847f8eSopenharmony_ci * @returns { TextClockAttribute } 55661847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 55761847f8eSopenharmony_ci * @crossplatform 55861847f8eSopenharmony_ci * @since 10 55961847f8eSopenharmony_ci */ 56061847f8eSopenharmony_ci /** 56161847f8eSopenharmony_ci * Called when the value of TextClock fontFamily is set 56261847f8eSopenharmony_ci * 56361847f8eSopenharmony_ci * @param { ResourceStr } value 56461847f8eSopenharmony_ci * @returns { TextClockAttribute } 56561847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 56661847f8eSopenharmony_ci * @crossplatform 56761847f8eSopenharmony_ci * @form 56861847f8eSopenharmony_ci * @atomicservice 56961847f8eSopenharmony_ci * @since 11 57061847f8eSopenharmony_ci */ 57161847f8eSopenharmony_ci fontFamily(value: ResourceStr): TextClockAttribute; 57261847f8eSopenharmony_ci 57361847f8eSopenharmony_ci /** 57461847f8eSopenharmony_ci * Called when the text shadow is set. 57561847f8eSopenharmony_ci * 57661847f8eSopenharmony_ci * @param { ShadowOptions | Array<ShadowOptions> } value - The shadow options. 57761847f8eSopenharmony_ci * @returns { TextClockAttribute } 57861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 57961847f8eSopenharmony_ci * @crossplatform 58061847f8eSopenharmony_ci * @form 58161847f8eSopenharmony_ci * @since 11 58261847f8eSopenharmony_ci */ 58361847f8eSopenharmony_ci /** 58461847f8eSopenharmony_ci * Called when the text shadow is set. 58561847f8eSopenharmony_ci * 58661847f8eSopenharmony_ci * @param { ShadowOptions | Array<ShadowOptions> } value - The shadow options. 58761847f8eSopenharmony_ci * @returns { TextClockAttribute } 58861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 58961847f8eSopenharmony_ci * @crossplatform 59061847f8eSopenharmony_ci * @form 59161847f8eSopenharmony_ci * @atomicservice 59261847f8eSopenharmony_ci * @since 12 59361847f8eSopenharmony_ci */ 59461847f8eSopenharmony_ci textShadow(value: ShadowOptions | Array<ShadowOptions>): TextClockAttribute; 59561847f8eSopenharmony_ci 59661847f8eSopenharmony_ci /** 59761847f8eSopenharmony_ci * Called when the text fontFeature is set. 59861847f8eSopenharmony_ci * 59961847f8eSopenharmony_ci * @param { string } value - The fontFeature. 60061847f8eSopenharmony_ci * normal | <feature-tag-value>, 60161847f8eSopenharmony_ci * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0 60261847f8eSopenharmony_ci * number of <feature-tag-value> can be single or multiple, and separated by comma ','. 60361847f8eSopenharmony_ci * @returns { TextClockAttribute } 60461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 60561847f8eSopenharmony_ci * @crossplatform 60661847f8eSopenharmony_ci * @form 60761847f8eSopenharmony_ci * @since 11 60861847f8eSopenharmony_ci */ 60961847f8eSopenharmony_ci /** 61061847f8eSopenharmony_ci * Called when the text fontFeature is set. 61161847f8eSopenharmony_ci * 61261847f8eSopenharmony_ci * @param { string } value - The fontFeature. 61361847f8eSopenharmony_ci * normal | <feature-tag-value>, 61461847f8eSopenharmony_ci * where <feature-tag-value> = <string> [ <integer> | on | off ], like: "ss01" 0 61561847f8eSopenharmony_ci * number of <feature-tag-value> can be single or multiple, and separated by comma ','. 61661847f8eSopenharmony_ci * @returns { TextClockAttribute } 61761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 61861847f8eSopenharmony_ci * @crossplatform 61961847f8eSopenharmony_ci * @form 62061847f8eSopenharmony_ci * @atomicservice 62161847f8eSopenharmony_ci * @since 12 62261847f8eSopenharmony_ci */ 62361847f8eSopenharmony_ci fontFeature(value: string): TextClockAttribute; 62461847f8eSopenharmony_ci 62561847f8eSopenharmony_ci /** 62661847f8eSopenharmony_ci * Set the content modifier of textclock. 62761847f8eSopenharmony_ci * 62861847f8eSopenharmony_ci * @param { ContentModifier<TextClockConfiguration> } modifier - The content modifier of textclock. 62961847f8eSopenharmony_ci * @returns { TextClockAttribute } 63061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 63161847f8eSopenharmony_ci * @crossplatform 63261847f8eSopenharmony_ci * @atomicservice 63361847f8eSopenharmony_ci * @since 12 63461847f8eSopenharmony_ci */ 63561847f8eSopenharmony_ci contentModifier(modifier: ContentModifier<TextClockConfiguration>): TextClockAttribute; 63661847f8eSopenharmony_ci 63761847f8eSopenharmony_ci /** 63861847f8eSopenharmony_ci * Set hour format 63961847f8eSopenharmony_ci * 64061847f8eSopenharmony_ci * @param { Optional<DateTimeOptions> } dateTimeOptions - Indicates whether a leading 0 is required for the hour. 64161847f8eSopenharmony_ci * @returns { TextClockAttribute } the attribute of the text clock 64261847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 64361847f8eSopenharmony_ci * @crossplatform 64461847f8eSopenharmony_ci * @form 64561847f8eSopenharmony_ci * @atomicservice 64661847f8eSopenharmony_ci * @since 12 64761847f8eSopenharmony_ci */ 64861847f8eSopenharmony_ci dateTimeOptions(dateTimeOptions: Optional<DateTimeOptions>): TextClockAttribute; 64961847f8eSopenharmony_ci} 65061847f8eSopenharmony_ci 65161847f8eSopenharmony_ci/** 65261847f8eSopenharmony_ci * Defines TextClock Component. 65361847f8eSopenharmony_ci * 65461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 65561847f8eSopenharmony_ci * @since 8 65661847f8eSopenharmony_ci */ 65761847f8eSopenharmony_ci/** 65861847f8eSopenharmony_ci * Defines TextClock Component. 65961847f8eSopenharmony_ci * 66061847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 66161847f8eSopenharmony_ci * @crossplatform 66261847f8eSopenharmony_ci * @since 10 66361847f8eSopenharmony_ci */ 66461847f8eSopenharmony_ci/** 66561847f8eSopenharmony_ci * Defines TextClock Component. 66661847f8eSopenharmony_ci * 66761847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 66861847f8eSopenharmony_ci * @crossplatform 66961847f8eSopenharmony_ci * @form 67061847f8eSopenharmony_ci * @atomicservice 67161847f8eSopenharmony_ci * @since 11 67261847f8eSopenharmony_ci */ 67361847f8eSopenharmony_cideclare const TextClock: TextClockInterface; 67461847f8eSopenharmony_ci 67561847f8eSopenharmony_ci/** 67661847f8eSopenharmony_ci * Defines TextClock Component instance. 67761847f8eSopenharmony_ci * 67861847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 67961847f8eSopenharmony_ci * @since 8 68061847f8eSopenharmony_ci */ 68161847f8eSopenharmony_ci/** 68261847f8eSopenharmony_ci * Defines TextClock Component instance. 68361847f8eSopenharmony_ci * 68461847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 68561847f8eSopenharmony_ci * @crossplatform 68661847f8eSopenharmony_ci * @since 10 68761847f8eSopenharmony_ci */ 68861847f8eSopenharmony_ci/** 68961847f8eSopenharmony_ci * Defines TextClock Component instance. 69061847f8eSopenharmony_ci * 69161847f8eSopenharmony_ci * @syscap SystemCapability.ArkUI.ArkUI.Full 69261847f8eSopenharmony_ci * @crossplatform 69361847f8eSopenharmony_ci * @form 69461847f8eSopenharmony_ci * @atomicservice 69561847f8eSopenharmony_ci * @since 11 69661847f8eSopenharmony_ci */ 69761847f8eSopenharmony_cideclare const TextClockInstance: TextClockAttribute; 698